/*
 * Botón Antipánico · Panel de licencias
 * Ajustes de marca sobre Materialize (los colores primarios ya vienen en core.css,
 * ver resources/brand/brand-core-css.sh).
 */

/* Chivo y Chivo Mono (SIL Open Font License 1.1), las de botonantipanico.com */
@font-face {
  font-family: 'Chivo';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(../fonts/chivo/chivo-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Chivo';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(../fonts/chivo/chivo-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Chivo Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url(../fonts/chivo/chivo-mono-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Chivo Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url(../fonts/chivo/chivo-mono-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root,
[data-bs-theme] {
  --bs-font-sans-serif: 'Chivo', -apple-system, 'Segoe UI', sans-serif;
  --bs-font-monospace: 'Chivo Mono', ui-monospace, Consolas, monospace;
  --bs-body-font-family: var(--bs-font-sans-serif);
  --apb-red: #c8102e;
  --apb-ink: #14161a;
  --apb-paper: #f7f7f5;
}

[data-bs-theme='light'] {
  --bs-body-bg: #f7f7f5;
}

body {
  font-family: var(--bs-font-sans-serif);
}

/* Números de serie, identificadores de servidor, etc. */
.font-mono,
code.serial {
  font-family: var(--bs-font-monospace);
  letter-spacing: 0.02em;
}
code.serial {
  color: inherit;
  font-size: 0.95em;
  white-space: nowrap;
}

/* Del demo.css de la plantilla: alto de la marca y hueco del navbar fijo */
.menu .app-brand.demo {
  height: 64px;
}
.layout-navbar-fixed .layout-wrapper:not(.layout-without-menu) .layout-page {
  padding-top: 64px !important;
}
.content-wrapper .navbar {
  z-index: auto;
}

/* Marca en el menú */
.app-brand-logo svg {
  display: block;
}
.app-brand-text {
  font-weight: 700 !important;
  letter-spacing: -0.01em;
}
.app-brand-text small {
  display: block;
  font-size: 0.7rem;
  font-weight: 400;
  opacity: 0.7;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Tablas del panel */
.table-apb td,
.table-apb th {
  vertical-align: middle;
}
.table-apb th a {
  color: inherit;
}
.table-apb th a.asc::after {
  content: ' ↑';
}
.table-apb th a.desc::after {
  content: ' ↓';
}

/* Definiciones (ficha de licencia, cliente...) */
.dl-apb dt {
  font-weight: 500;
  color: var(--bs-secondary-color);
  font-size: 0.8125rem;
}
.dl-apb dd {
  margin-bottom: 0.9rem;
  color: var(--bs-heading-color);
}

/* Zona de subida del .apbreq */
.drop-zone {
  border: 2px dashed var(--bs-border-color);
  border-radius: 0.5rem;
  padding: 2.5rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s;
}
.drop-zone.dragover,
.drop-zone:hover {
  border-color: var(--apb-red);
  background: rgba(200, 16, 46, 0.04);
}

/* Errores de formulario (FormHelper) */
.error-message {
  color: var(--bs-danger);
  font-size: 0.8125rem;
  margin-top: 0.25rem;
}

/* Paginador */
.pagination .page-item.disabled a {
  pointer-events: none;
}

/*
 * Modo oscuro neutro (Materialize lo trae azulado): grises de la marca.
 */
[data-bs-theme='dark'] {
  --bs-body-color: #c3c4c7;
  --bs-secondary-color: #8b8d93;
  --bs-secondary-bg: #4a4c52;
  --bs-secondary-bg-subtle: #2c2e34;
  --bs-light-bg-subtle: #2a2c32;
  --bs-dark-bg-subtle: #2c2e34;
  --bs-secondary-border-subtle: #55575d;
  --bs-dark-border-subtle: #55575d;
  --bs-light-text-emphasis: #c3c4c7;
  --bs-highlight-color: #c3c4c7;
  --bs-link-hover-color: #f4a7b2;
  --bs-table-header-bg-color: #25272d;
  --bs-gray-25: #1b1d21;
  --bs-gray-50: #25272d;
  --bs-gray-75: #2a2c32;
  --bs-gray-100: #2c2e34;
  --bs-gray-200: #45474d;
  --bs-gray-300: #5c5e64;
  --bs-gray-400: #74767c;
  --bs-gray-500: #8b8d93;
  --bs-body-bg-rgb: 20, 22, 26;
  --bs-paper-bg-rgb: 30, 32, 37;
  --bs-base-color-rgb: 247, 247, 245;
  --bs-body-color-rgb: 195, 196, 199;
  --bs-tertiary-color-rgb: 195, 196, 199;
  --bs-secondary-color-rgb: 139, 141, 147;
  --bs-secondary-bg-rgb: 74, 76, 82;
  --bs-tertiary-bg-rgb: 42, 44, 50;
  --bs-menu-color-rgb: 220, 221, 224;
  --bs-gray-rgb: 44, 46, 52;
  --bs-light-rgb: 46, 48, 54;
  --bs-dark-rgb: 120, 122, 128;
  --bs-link-hover-color-rgb: 244, 167, 178;
}
[data-bs-theme='dark'] .table {
  --bs-table-header-bg-color: #25272d;
}
[data-bs-theme='light'] {
  --bs-link-hover-color-rgb: 180, 14, 41;
  --bs-dark-rgb: 20, 22, 26;
}

/* Botones y cabeceras en castellano: sin mayúscula en cada palabra */
.btn,
.card-header,
.dropdown-item {
  text-transform: none;
}
