/* ════════════════════════════════════════════════════════════════════════════
   ADX THEME — Sistema de diseño corporativo Aduanimex
   ⚠️ FUENTE DE VERDAD EN RUNTIME (issue #44): la paleta activa la inyecta
   App.razor en el <head> DESPUÉS de este archivo (IBrandingService →
   AdxThemeFactory.BuildRootCss), por lo que estos :root son solo FALLBACK.
   Para cambiar la marca, edita AdxPalette / la config (F2), no estos valores.
   ════════════════════════════════════════════════════════════════════════════ */

:root {
  /* ── Colores primarios ──────────────────────────────────────────────── */
  --adx-navy:         #1e3a6e;
  --adx-navy-dark:    #152b55;
  --adx-navy-light:   #2d4f8a;

  --adx-orange:       #e8832a;
  --adx-orange-light: #f4a557;
  --adx-orange-dark:  #c66b1a;

  /* Encabezado de formularios (independiente del navbar) */
  --adx-header:       #1e3a6e;

  /* ── Semánticos ─────────────────────────────────────────────────────── */
  --adx-success: #1d9e75;
  --adx-danger:  #d85a30;
  --adx-warning: #ef9f27;
  --adx-info:    #378add;

  /* ── Grises ─────────────────────────────────────────────────────────── */
  --adx-gray-50:  #f8f9fc;
  --adx-gray-100: #eef0f5;
  --adx-gray-200: #dde1ec;
  --adx-gray-400: #8b92a9;
  --adx-gray-600: #4f5670;
  --adx-gray-800: #1e2235;

  /* ── Tipografía ─────────────────────────────────────────────────────── */
  --adx-font: 'Nunito', sans-serif;

  /* ── Espaciado ──────────────────────────────────────────────────────── */
  --adx-space-xs: 4px;
  --adx-space-sm: 8px;
  --adx-space-md: 16px;
  --adx-space-lg: 24px;
  --adx-space-xl: 32px;

  /* ── Bordes ─────────────────────────────────────────────────────────── */
  --adx-r-sm: 6px;
  --adx-r-md: 10px;
  --adx-r-lg: 16px;

  /* ── Sombras ────────────────────────────────────────────────────────── */
  --adx-shadow:    0 2px 8px rgba(30, 58, 110, .10);
  --adx-shadow-md: 0 4px 16px rgba(30, 58, 110, .14);
  --adx-shadow-lg: 0 10px 30px rgba(30, 58, 110, .18);
}

/* ── Barra de color corporativa ────────────────────────────────────────── */
.adx-color-bar {
  height: 3px;
  background: linear-gradient(90deg,
    var(--adx-navy)         0%,
    var(--adx-navy-light)   25%,
    var(--adx-orange)       50%,
    var(--adx-orange-light) 75%,
    var(--adx-success)      100%);
  width: 100%;
}

/* ── Encabezado unificado de formularios (issue #44) ───────────────────────
   Diseño base = el de Apertura D.O.: gradiente del token --adx-header + barra
   naranja inferior. Clase GLOBAL (no scoped) → la usan todas las páginas y
   módulos para que TODOS los banners se vean igual. Cambiar el diseño aquí =
   cambia en toda la app. La usa el componente <AdxPageHeader>. */
.adx-form-header {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background: linear-gradient(135deg, var(--adx-header) 0%, color-mix(in srgb, var(--adx-header) 75%, #000) 100%);
  color: #fff;
  font-family: var(--adx-font);
  padding: 14px 22px;
  border-radius: 12px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(30, 58, 110, .18);
}
.adx-form-header::before {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  height: 3px; width: 100%;
  background: linear-gradient(90deg, var(--adx-orange) 0%, var(--adx-orange-light) 100%);
}
/* Variante para banners con contenido apilado (varias filas): no usa flex-row. */
.adx-form-header--block { display: block; }
.adx-form-header__label   { font-size: .68rem; letter-spacing: 2px; font-weight: 800; color: rgba(255,255,255,.6); text-transform: uppercase; margin-bottom: 2px; }
.adx-form-header__title   { font-size: 1.15rem; font-weight: 800; color: #fff; margin: 0; line-height: 1.2; display: flex; align-items: center; gap: 8px; }
.adx-form-header__sub     { font-size: .75rem; color: rgba(255,255,255,.78); font-weight: 500; margin-top: 3px; }
.adx-form-header__actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; margin-left: auto; }

/* ── Headers de tabla → color del banner (issue #44) ────────────────────────
   Para que las tablas (incl. reportes que usan el header por defecto de Mud)
   compartan el color del encabezado de formulario, no el del navbar. */
.mud-table-head .mud-table-cell,
.mud-table-head th,
.mud-simple-table thead th {
  background-color: var(--adx-header) !important;
  color: #fff !important;
}

/* ── Animaciones globales ──────────────────────────────────────────────── */
@keyframes adx-spin     { to { transform: rotate(360deg); } }
@keyframes adx-shimmer  { 0% { background-position: -400px 0; } 100% { background-position: 400px 0; } }
@keyframes adx-bounce   { 0%,80%,100% { transform: scale(0); } 40% { transform: scale(1); } }
@keyframes adx-fadein   { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes adx-pulse    { 0%,100% { transform: scale(1); } 50% { transform: scale(1.04); } }

/* ── Scrollbar corporativo ─────────────────────────────────────────────── */
.adx-scroll::-webkit-scrollbar          { width: 10px; height: 10px; }
.adx-scroll::-webkit-scrollbar-track    { background: var(--adx-gray-100); }
.adx-scroll::-webkit-scrollbar-thumb    { background: var(--adx-gray-200); border-radius: 10px; }
.adx-scroll::-webkit-scrollbar-thumb:hover { background: var(--adx-navy-light); }
