/*
 * Itza Pay — design tokens y estilos base.
 * Se carga DESPUÉS de los CSS de Metronic. Los colores del tema Metronic ya apuntan a estas
 * variables (ver scripts/retheme-metronic.js); si cambias un token aquí, cambia en todo el panel.
 *
 * Paleta oficial: #0A2332 navy · #F2C642 dorado · #0579A6 azul · #038C75 verde · #FFFFFF blanco.
 * Aprobados: #B42318 (error) y #02705E (verde para texto).
 * El resto son tintes/sombras derivados de la paleta.
 *
 * Contraste (WCAG AA texto normal >= 4.5):
 *   blanco/navy 16.2 · navy/dorado 9.9 · blanco/azul 4.9 · blanco/rojo 6.6 · #02705E/blanco 6.0
 *   NO: blanco sobre dorado (1.6) -> texto navy · blanco sobre verde (4.2) solo texto >= 18.7px bold
 */

:root {
    /* Marca */
    --iz-navy: #0A2332;
    --iz-gold: #F2C642;
    --iz-blue: #0579A6;
    --iz-green: #038C75;
    --iz-white: #FFFFFF;
    --iz-red: #B42318;

    /* Estados interactivos (derivados) */
    --iz-navy-hover: #2F4451;
    --iz-blue-hover: #06668C;
    --iz-green-hover: #02705E;
    --iz-gold-hover: #BFA23E;
    --iz-red-hover: #8F231E;

    /* Fondos suaves (tinte 12 % sobre blanco) */
    --iz-navy-light: #E2E5E6;
    --iz-blue-light: #E1EFF4;
    --iz-green-light: #E1F1EE;
    --iz-gold-light: #FDF8E8;
    --iz-red-light: #F6E5E3;

    /* Texto de cada familia sobre blanco o sobre su tinte (>= 4.5:1) */
    --iz-navy-strong: #0A2332;
    --iz-blue-strong: #06668C;
    --iz-green-strong: #02705E;
    --iz-gold-strong: #0A2332;
    --iz-red-strong: #B42318;

    /* Neutros: tintes de navy */
    --iz-n-25: #F8F8F9;
    --iz-n-50: #F0F2F3;
    --iz-n-100: #E7E9EB;
    --iz-n-200: #D8DCDE;
    --iz-n-300: #BAC1C6;
    --iz-n-400: #919CA3;
    --iz-n-500: #717F88; /* solo bordes/íconos/placeholder: 4.1:1 */
    --iz-n-600: #546570; /* texto secundario: 6.0:1 */
    --iz-n-700: #364B57; /* texto de cuerpo: 9.1:1 */

    /* Semánticos de uso (cambian con el tema; ver [data-theme="dark"] abajo) */
    --iz-page: var(--iz-n-25);
    --iz-surface: #FFFFFF;
    --iz-surface-2: var(--iz-n-50);
    --iz-heading: #0A2332;
    --iz-text: var(--iz-n-700);
    --iz-text-muted: var(--iz-n-600);
    --iz-border: var(--iz-n-100);
    --iz-input-border: var(--iz-n-500);   /* 4.1:1 sobre blanco (WCAG 1.4.11) */
    --iz-placeholder: var(--iz-n-600);    /* 6.0:1 */
    --iz-link: #06668C;
    --iz-focus: #0579A6;
    --iz-brand-surface: #0A2332;          /* tarjetas de marca: saldo, avatar, menú de usuario */
    --iz-aside-bg: #0A2332;
    --iz-chart-1: #0579A6;                /* barras de gráficas: 4.9:1 sobre blanco */

    /* Familias (las usa también el CSS de Metronic re-mapeado): sólido, hover, tinte, texto, texto sobre sólido */
    --iz-primary-bg: #0A2332;  --iz-primary-hover: #2F4451;  --iz-primary-soft: #E2E5E6;  --iz-primary-text: #0A2332;  --iz-primary-on: #FFFFFF;
    --iz-dark-bg: #0A2332;     --iz-dark-hover: #2F4451;     --iz-dark-soft: #E2E5E6;     --iz-dark-text: #0A2332;     --iz-dark-on: #FFFFFF;
    --iz-success-bg: #02705E;  --iz-success-hover: #045951;  --iz-success-soft: #E1F1EE;  --iz-success-text: #02705E;  --iz-success-on: #FFFFFF;
    --iz-info-bg: #0579A6;     --iz-info-hover: #06668C;     --iz-info-soft: #E1EFF4;     --iz-info-text: #06668C;     --iz-info-on: #FFFFFF;
    --iz-warning-bg: #F2C642;  --iz-warning-hover: #BFA23E;  --iz-warning-soft: #FDF8E8;  --iz-warning-text: #0A2332;  --iz-warning-on: #0A2332;
    --iz-danger-bg: #B42318;   --iz-danger-hover: #8F231E;   --iz-danger-soft: #F6E5E3;   --iz-danger-text: #B42318;   --iz-danger-on: #FFFFFF;

    /* Alias anteriores */
    --iz-primary: var(--iz-primary-bg);
    --iz-accent: var(--iz-gold);
    --iz-success: var(--iz-green);
    --iz-info: var(--iz-blue);
    --iz-warning: var(--iz-gold);
    --iz-danger: var(--iz-red);

    /* Tipografía: fuentes del sistema (0 KB de descarga) */
    --iz-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --iz-font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    --iz-fs-xs: 0.8571rem;  /* 12px con base 14px */
    --iz-fs-sm: 0.9286rem;  /* 13px */
    --iz-fs-md: 1rem;
    --iz-fs-lg: 1.25rem;
    --iz-fs-xl: 1.5rem;
    --iz-fs-2xl: 2rem;

    /* Espaciado (base 4 px) */
    --iz-space-1: 0.25rem;
    --iz-space-2: 0.5rem;
    --iz-space-3: 0.75rem;
    --iz-space-4: 1rem;
    --iz-space-5: 1.5rem;
    --iz-space-6: 2rem;
    --iz-space-7: 3rem;

    /* Radios y sombras */
    --iz-radius-sm: 6px;
    --iz-radius-md: 10px;
    --iz-radius-lg: 16px;
    --iz-radius-pill: 999px;
    --iz-shadow-sm: 0 1px 2px rgba(10, 35, 50, 0.06), 0 1px 3px rgba(10, 35, 50, 0.08);
    --iz-shadow-md: 0 4px 12px rgba(10, 35, 50, 0.08);
    --iz-shadow-lg: 0 12px 32px rgba(10, 35, 50, 0.14);

    /* Movimiento */
    --iz-ease: cubic-bezier(0.2, 0, 0, 1);
    --iz-duration: 160ms;

    --iz-focus-ring: 0 0 0 3px rgba(5, 121, 166, 0.45);
}

/*
 * Tema oscuro: se activa con <html data-theme="dark"> (lo pone el script del <head> según la
 * preferencia guardada o la del sistema). Contraste verificado con scripts/check-contrast.js:
 *   texto 12.2:1 · títulos 14.4:1 · secundario 8.5:1 · placeholder 6.6:1 · borde de campo 6.6:1
 *   dorado (acción principal, enlaces) 9.9:1 · estados: verde 7.6 · azul 7.1 · rojo 6.5 (sobre navy)
 * Verde #74C0B3, azul #76B5CE y rojo #DA918C: tonos aclarados aprobados solo para el tema oscuro.
 */
:root[data-theme="dark"] {
    color-scheme: dark;

    /* Neutros invertidos: misma escala, de navy hacia blanco */
    --iz-n-25: #142C3A;
    --iz-n-50: #1B3240;
    --iz-n-100: #253B49;
    --iz-n-200: #364B57;
    --iz-n-300: #546570;
    --iz-n-400: #78868E;
    --iz-n-500: #9DA7AD;
    --iz-n-600: #B6BDC2;
    --iz-n-700: #DDE0E2;

    --iz-page: #071721;
    --iz-surface: #0A2332;
    --iz-surface-2: #1B3240;
    --iz-heading: #F0F2F3;
    --iz-border: #253B49;
    --iz-placeholder: var(--iz-n-500);    /* 6.6:1 sobre navy */
    --iz-link: #F2C642;
    --iz-focus: #F2C642;
    --iz-brand-surface: #1B3240;
    --iz-aside-bg: #0A2332;
    --iz-chart-1: #76B5CE;

    --iz-primary-bg: #F2C642;  --iz-primary-hover: #BFA23E;  --iz-primary-soft: #2A3A34;  --iz-primary-text: #F2C642;  --iz-primary-on: #0A2332;
    --iz-dark-bg: #F0F2F3;     --iz-dark-hover: #DDE0E2;     --iz-dark-soft: #1B3240;     --iz-dark-text: #F0F2F3;     --iz-dark-on: #0A2332;
    --iz-success-bg: #02705E;  --iz-success-hover: #045951;  --iz-success-soft: #09363E;  --iz-success-text: #74C0B3;  --iz-success-on: #FFFFFF;
    --iz-info-bg: #0579A6;     --iz-info-hover: #06668C;     --iz-info-soft: #09364C;     --iz-info-text: #76B5CE;     --iz-info-on: #FFFFFF;
    --iz-warning-bg: #F2C642;  --iz-warning-hover: #BFA23E;  --iz-warning-soft: #2A3A34;  --iz-warning-text: #F2C642;  --iz-warning-on: #0A2332;
    --iz-danger-bg: #B42318;   --iz-danger-hover: #8F231E;   --iz-danger-soft: #2F232C;   --iz-danger-text: #DA918C;   --iz-danger-on: #FFFFFF;

    --iz-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35), 0 1px 3px rgba(0, 0, 0, 0.3);
    --iz-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --iz-shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);
    --iz-focus-ring: 0 0 0 3px rgba(242, 198, 66, 0.45);
}
:root[data-theme="light"] { color-scheme: light; }

/* ---------- Base ---------- */
html, body {
    font-family: var(--iz-font);
}
body {
    color: var(--iz-text);
    -webkit-font-smoothing: antialiased;
}
body#kt_body {
    background-color: var(--iz-page);
}
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
    color: var(--iz-heading);
}
a {
    color: var(--iz-link);
}
a:hover {
    color: var(--iz-heading);
}
code, kbd, pre, samp {
    font-family: var(--iz-font-mono);
}
.iz-tabular {
    font-variant-numeric: tabular-nums;
}

/* Foco visible y consistente para teclado */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--iz-focus);
    outline-offset: 2px;
    box-shadow: none;
}
.form-control:focus,
.custom-select:focus {
    box-shadow: var(--iz-focus-ring);
}

/* Microinteracciones */
.btn,
.form-control,
.card,
.label,
.nav-link,
.menu-link {
    transition: background-color var(--iz-duration) var(--iz-ease),
        border-color var(--iz-duration) var(--iz-ease),
        color var(--iz-duration) var(--iz-ease),
        box-shadow var(--iz-duration) var(--iz-ease);
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* Barra de desplazamiento (antes inline en los layouts) */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--iz-n-400); border-radius: var(--iz-radius-pill); }
::-webkit-scrollbar-thumb:hover { background: var(--iz-n-500); }
::-webkit-scrollbar-track { background: var(--iz-n-100); border-radius: var(--iz-radius-pill); }
::-webkit-scrollbar-corner { background: transparent; }

/* ---------- Ajustes sobre Metronic ---------- */
.card.card-custom {
    border-radius: var(--iz-radius-md);
    box-shadow: var(--iz-shadow-sm);
}
.btn {
    border-radius: var(--iz-radius-sm);
    font-weight: 600;
}
.form-control {
    border-radius: var(--iz-radius-sm);
}
label,
.col-form-label {
    color: var(--iz-heading);
    font-weight: 600;
}
.form-text.text-muted {
    font-size: var(--iz-fs-xs);
}
.table thead th {
    color: var(--iz-n-600);
    font-size: var(--iz-fs-xs);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* Elemento activo del menú lateral: acento dorado */
html body .aside-menu .menu-nav > .menu-item.menu-item-active > .menu-link,
html body .aside-menu .menu-nav > .menu-item.menu-item-here > .menu-link {
    box-shadow: inset 3px 0 0 var(--iz-gold);
}

/* Validación junto al campo */
.form-control.is-invalid,
.was-validated .form-control:invalid {
    border-color: var(--iz-danger-text);
}
.invalid-feedback {
    color: var(--iz-danger-text);
    font-size: var(--iz-fs-sm);
}

/* ---------- Componentes (resources/views/components) ---------- */

/* Campos de código (robots.txt, etc.) */
.iz-code { font-family: var(--iz-font-mono); font-size: var(--iz-fs-sm); resize: vertical; }

/* Botón con ícono */
.iz-btn-icon { display: inline-flex; align-items: center; gap: var(--iz-space-2); }
.iz-btn-icon svg { width: 1em; height: 1em; }

/* Botón con estado de carga: evita doble envío */
.btn.is-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}
.btn.is-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1.1em;
    height: 1.1em;
    margin: -0.55em 0 0 -0.55em;
    border: 2px solid currentColor;
    border-color: var(--iz-white) var(--iz-white) transparent transparent;
    border-radius: 50%;
    animation: iz-spin 0.7s linear infinite;
}
.btn-warning.is-loading::after,
.btn-light.is-loading::after,
.btn-secondary.is-loading::after,
[class*="btn-light-"].is-loading::after,
[class*="btn-outline-"].is-loading::after {
    border-color: var(--iz-heading) var(--iz-heading) transparent transparent;
}
.btn-primary.is-loading::after { border-color: var(--iz-primary-on) var(--iz-primary-on) transparent transparent; }
@keyframes iz-spin {
    to { transform: rotate(360deg); }
}

/* Badge de estado: color + ícono, nunca solo color */
.iz-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--iz-space-1);
    padding: 0.2rem 0.6rem;
    border-radius: var(--iz-radius-pill);
    font-size: var(--iz-fs-xs);
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
}
.iz-badge svg { width: 0.9em; height: 0.9em; flex: none; }
.iz-badge--success { background: var(--iz-success-soft); color: var(--iz-success-text); }
.iz-badge--danger { background: var(--iz-danger-soft); color: var(--iz-danger-text); }
.iz-badge--warning { background: var(--iz-warning-soft); color: var(--iz-warning-text); box-shadow: inset 0 0 0 1px var(--iz-gold); }
.iz-badge--info { background: var(--iz-info-soft); color: var(--iz-info-text); }
.iz-badge--neutral { background: var(--iz-n-50); color: var(--iz-n-700); }

/* Alerta */
.iz-alert {
    display: flex;
    gap: var(--iz-space-3);
    align-items: flex-start;
    padding: var(--iz-space-4);
    margin-bottom: var(--iz-space-5);
    border-radius: var(--iz-radius-md);
    border-left: 4px solid currentColor;
    background: var(--iz-surface);
    box-shadow: var(--iz-shadow-sm);
    font-size: var(--iz-fs-sm);
}
.iz-alert__icon { flex: none; width: 1.25rem; height: 1.25rem; margin-top: 0.1rem; }
.iz-alert__body { flex: 1; color: var(--iz-text); }
.iz-alert__body ul { margin: 0; padding-left: 1.1rem; }
.iz-alert__title { display: block; font-weight: 700; color: var(--iz-heading); }
.iz-alert__close {
    flex: none;
    background: none;
    border: 0;
    padding: 0 var(--iz-space-1);
    font-size: 1.25rem;
    line-height: 1;
    color: var(--iz-n-600);
    cursor: pointer;
}
.iz-alert--success { color: var(--iz-success-text); background: var(--iz-success-soft); }
.iz-alert--danger { color: var(--iz-danger-text); background: var(--iz-danger-soft); }
.iz-alert--warning { color: var(--iz-warning-bg); background: var(--iz-warning-soft); }
.iz-alert--info { color: var(--iz-info-text); background: var(--iz-info-soft); }

/* Tarjeta */
.iz-card__subtitle {
    display: block;
    margin-top: var(--iz-space-1);
    font-size: var(--iz-fs-sm);
    color: var(--iz-text-muted);
    font-weight: 400;
}

/* KPI / cifra destacada */
.iz-stat {
    display: flex;
    flex-direction: column;
    gap: var(--iz-space-1);
}
.iz-stat__label {
    font-size: var(--iz-fs-sm);
    color: var(--iz-text-muted);
    font-weight: 600;
}
.iz-stat__value {
    font-size: var(--iz-fs-2xl);
    font-weight: 700;
    color: var(--iz-heading);
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}

.iz-stat__value--muted { color: var(--iz-n-400); }

/* Tarjetas de indicadores (dashboard) */
.iz-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--iz-space-5);
    margin-bottom: var(--iz-space-5);
}
.iz-kpi {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--iz-space-3);
    padding: var(--iz-space-5);
    border-radius: var(--iz-radius-md);
    background: var(--iz-surface);
    box-shadow: var(--iz-shadow-sm);
    color: inherit;
    transition: box-shadow var(--iz-duration) var(--iz-ease), transform var(--iz-duration) var(--iz-ease);
}
a.iz-kpi:hover { box-shadow: var(--iz-shadow-md); transform: translateY(-2px); text-decoration: none; color: inherit; }
.iz-kpi__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--iz-radius-md);
    background: var(--iz-brand-surface);
    color: var(--iz-gold);
}
.iz-kpi__icon svg { width: 22px; height: 22px; }
.iz-kpi--balance .iz-kpi__icon { background: var(--iz-info-soft); color: var(--iz-link); }
.iz-kpi__link {
    display: inline-flex;
    align-items: center;
    gap: var(--iz-space-1);
    font-size: var(--iz-fs-sm);
    font-weight: 600;
    color: var(--iz-link);
}
.iz-kpi__link svg { width: 14px; height: 14px; }
.iz-kpi .iz-badge { align-self: flex-start; }

/* Gráficas */
.iz-chart { min-height: 140px; }
.iz-chart-table { margin-top: var(--iz-space-3); }
.iz-chart-table summary {
    display: inline-block;
    cursor: pointer;
    font-size: var(--iz-fs-sm);
    font-weight: 600;
    color: var(--iz-link);
}
.iz-chart-table[open] summary { margin-bottom: var(--iz-space-3); }

/* Estado vacío */
.iz-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--iz-space-3);
    padding: var(--iz-space-7) var(--iz-space-4);
    color: var(--iz-text-muted);
}
.iz-empty__icon {
    width: 3rem;
    height: 3rem;
    padding: 0.75rem;
    border-radius: 50%;
    background: var(--iz-n-50);
    color: var(--iz-n-500);
}
.iz-empty__title { margin: 0; font-size: var(--iz-fs-lg); font-weight: 700; color: var(--iz-heading); }
.iz-empty__text { margin: 0; max-width: 32rem; }

/* Skeleton */
.iz-skeleton {
    display: block;
    border-radius: var(--iz-radius-sm);
    background: linear-gradient(90deg, var(--iz-n-50) 25%, var(--iz-n-100) 37%, var(--iz-n-50) 63%);
    background-size: 400% 100%;
    animation: iz-shimmer 1.4s ease infinite;
}
.iz-skeleton--text { height: 0.9rem; margin-bottom: var(--iz-space-2); }
.iz-skeleton--title { height: 1.5rem; width: 40%; margin-bottom: var(--iz-space-4); }
.iz-skeleton--block { height: 6rem; }
@keyframes iz-shimmer {
    0% { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}

/* Tabla responsive */
.iz-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.iz-table-wrap > .table { margin-bottom: 0; }
.iz-table-wrap .table td { vertical-align: middle; }

/* Tabla apilada en móvil: cada fila es una tarjeta (td necesita data-label) */
@media (max-width: 575.98px) {
    .iz-table--stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
    .iz-table--stack tbody tr {
        display: block;
        padding: var(--iz-space-3) 0;
        border-bottom: 1px solid var(--iz-border);
    }
    .iz-table--stack tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: var(--iz-space-3);
        padding: var(--iz-space-1) 0 !important;
        border: 0 !important;
        text-align: right !important;
        white-space: normal;
    }
    .iz-table--stack tbody td::before {
        content: attr(data-label);
        flex: none;
        font-size: var(--iz-fs-xs);
        font-weight: 600;
        color: var(--iz-text-muted);
        text-align: left;
    }
    .iz-table--stack tbody td[data-label=""]::before { content: none; }
    .iz-table--stack tbody td:first-child { font-size: var(--iz-fs-md); }
}

.iz-table-total th,
.iz-table-total td { border-top: 2px solid var(--iz-heading) !important; font-size: var(--iz-fs-md); color: var(--iz-heading); }
@media (max-width: 575.98px) {
    .iz-table--stack tfoot tr { display: flex; flex-wrap: wrap; justify-content: space-between; }
    .iz-table--stack tfoot th[colspan] { flex-basis: 100%; }
}

/* Paginación (vendor/pagination/admin-pagination) */
.iz-pagination { display: flex; flex-direction: column; align-items: center; gap: var(--iz-space-2); }
.iz-pagination ul { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--iz-space-1); margin: 0; padding: 0; list-style: none; }
.iz-page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 var(--iz-space-2);
    border-radius: var(--iz-radius-sm);
    background: var(--iz-surface);
    color: var(--iz-heading);
    font-weight: 600;
    box-shadow: inset 0 0 0 1px var(--iz-border);
}
a.iz-page:hover { background: var(--iz-n-50); color: var(--iz-heading); text-decoration: none; }
.iz-page--current { background: var(--iz-primary-bg); color: var(--iz-primary-on); box-shadow: none; }
.iz-page--disabled { color: var(--iz-n-400); }
.iz-page--gap { box-shadow: none; background: transparent; }
.iz-pagination__info { margin: 0; font-size: var(--iz-fs-sm); color: var(--iz-text-muted); }

/* Referencias / folios */
.iz-ref {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: var(--iz-radius-sm);
    background: var(--iz-n-50);
    color: var(--iz-heading);
    font-size: var(--iz-fs-sm);
    word-break: break-all;
}

/* Tarjeta de filtros: sin margen inferior extra */
.iz-filters .card-body { padding-bottom: 0.5rem; }
.iz-filters-toggle { border-radius: var(--iz-radius-md); font-weight: 600; }
.iz-filters:has(.iz-filters-toggle) { background: transparent; box-shadow: none; }
.iz-filters .iz-filters-toggle + .card-body:not([hidden]) { margin-top: var(--iz-space-3); border-radius: var(--iz-radius-md); background: var(--iz-surface); box-shadow: var(--iz-shadow-sm); }

/* Tablas con campos editables */
.iz-table--form td { vertical-align: middle; }
.iz-table--form .form-control { min-width: 7rem; }
.iz-check { width: 1.15rem; height: 1.15rem; accent-color: var(--iz-heading); cursor: pointer; }
.iz-thumb { width: 48px; height: 48px; object-fit: cover; border-radius: var(--iz-radius-sm); background: var(--iz-n-50); cursor: zoom-in; }
@media (max-width: 575.98px) {
    .iz-table--form .form-control { min-width: 0; max-width: 60%; }
}

/* Montos */
.iz-amount {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    color: var(--iz-heading);
    white-space: nowrap;
}
.iz-amount--positive { color: var(--iz-success-text); }
.iz-amount--negative { color: var(--iz-danger-text); }

/* Logo en imagen: la versión que contrasta con el tema activo */
/* align-self/flex: un contenedor flex (p. ej. el panel de marca del login) no debe estirarlo;
   object-fit: si max-width lo encoge, conserva la proporción en vez de deformarse */
.iz-logo { display: inline-block; flex: none; align-self: flex-start; width: auto; max-width: 100%; object-fit: contain; object-position: left center; }
.iz-logo--on-dark { display: none; }
:root[data-theme="dark"] .iz-logo--on-light { display: none; }
:root[data-theme="dark"] .iz-logo--on-dark { display: inline-block; }

/* Logo en texto (respaldo si faltan los PNG de public/images/brand) */
.iz-wordmark {
    display: inline-block;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1;
    color: var(--iz-heading);
}
.iz-wordmark__accent { color: var(--iz-blue); margin-left: 0.15em; }
.iz-wordmark--light { color: var(--iz-white); }
.iz-wordmark--light .iz-wordmark__accent { color: var(--iz-gold); }

/* Botón dentro de un campo (ver contraseña, limpiar, etc.) */
.iz-input-action {
    position: absolute;
    top: 50%;
    right: 0.5rem;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: 0;
    border-radius: var(--iz-radius-sm);
    background: transparent;
    color: var(--iz-n-600);
    cursor: pointer;
}
.iz-input-action:hover { color: var(--iz-heading); background: var(--iz-n-50); }
.iz-input-action svg { width: 1.15rem; height: 1.15rem; }
.iz-input-action[aria-pressed="true"] { color: var(--iz-link); }

/* ---------- Layout del panel ---------- */

/* Enlace para saltar al contenido (visible solo con teclado) */
.iz-skip-link {
    position: fixed;
    top: -100px;
    left: var(--iz-space-4);
    z-index: 10000;
    padding: var(--iz-space-2) var(--iz-space-4);
    border-radius: var(--iz-radius-sm);
    background: var(--iz-gold);
    color: var(--iz-navy);
    font-weight: 700;
}
.iz-skip-link:focus { top: var(--iz-space-4); color: var(--iz-navy); }

/* Íconos del menú lateral (SVG de trazo) */
.aside-menu .menu-nav > .menu-item > .menu-link .menu-icon svg,
.aside-menu .menu-nav > .menu-item > .menu-heading .menu-icon svg {
    width: 20px;
    height: 20px;
}
.aside-menu .menu-nav > .menu-item > .menu-link .menu-text {
    font-size: var(--iz-fs-sm);
    font-weight: 500;
}
.iz-brand-toggle-icon {
    width: 22px;
    height: 22px;
    color: rgba(255, 255, 255, 0.7);
    transition: transform var(--iz-duration) var(--iz-ease), color var(--iz-duration) var(--iz-ease);
}
.brand .brand-toggle:hover .iz-brand-toggle-icon { color: var(--iz-gold); }
@media (min-width: 992px) {
    .aside-minimize:not(.aside-minimize-hover) .brand .brand-logo { display: none; }
    .aside-minimize:not(.aside-minimize-hover) .brand { justify-content: center; }
}
.aside-minimize .iz-brand-toggle-icon { transform: rotate(180deg); }
.iz-mobile-user svg { width: 22px; height: 22px; color: rgba(255, 255, 255, 0.8); }

/* Encabezado: menú de usuario */
.iz-user-toggle {
    display: flex;
    align-items: center;
    gap: var(--iz-space-3);
    padding: var(--iz-space-1) var(--iz-space-2);
    border: 0;
    border-radius: var(--iz-radius-md);
    background: transparent;
    cursor: pointer;
}
.iz-user-toggle:hover { background: var(--iz-n-50); }
.iz-user-toggle__text { flex-direction: column; align-items: flex-end; line-height: 1.2; }
.iz-user-toggle__hello { font-size: var(--iz-fs-xs); color: var(--iz-text-muted); }
.iz-user-toggle__name { font-size: var(--iz-fs-sm); font-weight: 700; color: var(--iz-heading); }

.iz-avatar {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 36px;
    height: 36px;
    overflow: hidden;
    border-radius: 50%;
    background: var(--iz-brand-surface);
    color: var(--iz-gold);
    font-weight: 700;
}
.iz-avatar img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.iz-avatar--lg { width: 48px; height: 48px; font-size: var(--iz-fs-lg); }
.iz-avatar--xl { width: 72px; height: 72px; font-size: var(--iz-fs-2xl); }
.iz-avatar--square { border-radius: var(--iz-radius-sm); background: var(--iz-n-50); color: var(--iz-n-600); }
.iz-icon-xs { width: 12px; height: 12px; }
.image-input.image-input-outline { background-color: var(--iz-n-50); background-size: cover; background-position: center; }

/* Requisitos de contraseña */
.iz-rules { padding: var(--iz-space-4); border-radius: var(--iz-radius-md); background: var(--iz-n-25); border: 1px solid var(--iz-border); }
.iz-rules ul { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--iz-space-2); }
.iz-rules li { position: relative; padding-left: 1.6rem; color: var(--iz-text-muted); font-size: var(--iz-fs-sm); }
.iz-rules li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.1rem;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    border: 2px solid var(--iz-n-300);
}
.iz-rules li.is-met { color: var(--iz-success-text); font-weight: 600; }
.iz-rules li.is-met::before {
    border-color: var(--iz-green);
    background: var(--iz-green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 70% no-repeat;
}
.iz-match { min-height: 1.25rem; margin-top: calc(-1 * var(--iz-space-3)); font-size: var(--iz-fs-sm); font-weight: 600; }
.iz-match.is-ok { color: var(--iz-success-text); }
.iz-match.is-error { color: var(--iz-danger-text); }

.iz-user-menu { min-width: 280px; overflow: hidden; border-radius: var(--iz-radius-md); box-shadow: var(--iz-shadow-lg); }
.iz-user-menu__head {
    display: flex;
    align-items: center;
    gap: var(--iz-space-3);
    padding: var(--iz-space-4);
    background: var(--iz-brand-surface);
    color: var(--iz-white);
}
.iz-user-menu__name { font-weight: 700; }
.iz-user-menu__email { font-size: var(--iz-fs-sm); color: rgba(255, 255, 255, 0.75); }
.iz-user-menu__list { margin: 0; padding: var(--iz-space-2); list-style: none; }
.iz-user-menu__item {
    display: flex;
    align-items: center;
    gap: var(--iz-space-3);
    padding: var(--iz-space-2) var(--iz-space-3);
    border-radius: var(--iz-radius-sm);
    color: var(--iz-text);
    font-weight: 500;
}
.iz-user-menu__item svg { width: 18px; height: 18px; color: var(--iz-n-600); }
.iz-user-menu__item:hover,
.iz-user-menu__item:focus { background: var(--iz-n-50); color: var(--iz-heading); text-decoration: none; }
.iz-user-menu__item--danger,
.iz-user-menu__item--danger svg { color: var(--iz-danger-text); }
.iz-user-menu__item--danger:hover { background: var(--iz-danger-soft); color: var(--iz-danger-text); }
.min-w-0 { min-width: 0; }

/* Selector de tema (layouts/theme-toggle) */
.iz-theme-radio { margin: 0; padding: var(--iz-space-3) var(--iz-space-4) 0; border: 0; }
.iz-theme-radio__legend { margin-bottom: var(--iz-space-2); font-size: var(--iz-fs-xs); font-weight: 700; color: var(--iz-text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.iz-theme-radio__options { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--iz-space-1); }
.iz-theme-radio__option { margin: 0; cursor: pointer; }
.iz-theme-radio__chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: var(--iz-space-2) var(--iz-space-1);
    border: 1px solid var(--iz-border);
    border-radius: var(--iz-radius-sm);
    font-size: var(--iz-fs-xs);
    font-weight: 600;
    color: var(--iz-text);
}
.iz-theme-radio__chip svg { width: 18px; height: 18px; }
.iz-theme-radio__option:hover .iz-theme-radio__chip { background: var(--iz-surface-2); }
.iz-theme-radio__option input:checked + .iz-theme-radio__chip {
    border-color: var(--iz-primary-bg);
    background: var(--iz-primary-soft);
    color: var(--iz-primary-text);
    box-shadow: inset 0 0 0 1px var(--iz-primary-bg);
}
.iz-theme-radio__option input:focus-visible + .iz-theme-radio__chip { outline: 2px solid var(--iz-focus); outline-offset: 2px; }

.iz-theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: var(--iz-space-2);
    padding: var(--iz-space-2) var(--iz-space-3);
    border: 1px solid var(--iz-border);
    border-radius: var(--iz-radius-pill);
    background: var(--iz-surface);
    color: var(--iz-text);
    font-size: var(--iz-fs-sm);
    font-weight: 600;
    cursor: pointer;
}
.iz-theme-toggle:hover { background: var(--iz-surface-2); }
.iz-theme-toggle__icon { display: none; }
.iz-theme-toggle__icon svg { position: static; width: 18px; height: 18px; }
.iz-theme-toggle[data-pref="light"] .iz-theme-toggle__icon--light,
.iz-theme-toggle[data-pref="dark"] .iz-theme-toggle__icon--dark,
.iz-theme-toggle:not([data-pref]) .iz-theme-toggle__icon--auto,
.iz-theme-toggle[data-pref="auto"] .iz-theme-toggle__icon--auto { display: inline-flex; }
.iz-theme-toggle--floating { position: fixed; top: var(--iz-space-4); right: var(--iz-space-4); z-index: 20; box-shadow: var(--iz-shadow-sm); }

/* Subheader (componente @pageheader) */
.iz-subheader { background: var(--iz-surface); border-bottom: 1px solid var(--iz-border); }
.iz-subheader__title {
    margin: 0;
    font-size: var(--iz-fs-lg);
    font-weight: 700;
    line-height: 1.3;
}
.iz-subheader__subtitle { margin: 0; font-size: var(--iz-fs-sm); color: var(--iz-text-muted); }
.iz-subheader__actions { gap: var(--iz-space-2); }

/* Footer */
.iz-footer { font-size: var(--iz-fs-sm); color: var(--iz-text-muted); }
.iz-footer strong { color: var(--iz-heading); }

/* Indicador de carga para peticiones AJAX (#modalParent) */
.iz-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(10, 35, 50, 0.55);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}
.iz-loading-overlay__spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 48px;
    height: 48px;
    margin: -24px 0 0 -24px;
    border: 4px solid rgba(255, 255, 255, 0.25);
    border-top-color: var(--iz-gold);
    border-radius: 50%;
    animation: iz-spin 0.8s linear infinite;
}

/* Visor de imágenes (openAvatar en layouts/app_theme) */
.modal_avatar {
    position: fixed;
    inset: 0;
    z-index: 2100;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--iz-space-4);
    padding: var(--iz-space-6);
    background: rgba(10, 35, 50, 0.92);
}
.modal_avatar[hidden] { display: none; }
.modal-content-avatar {
    max-width: min(90vw, 520px);
    max-height: 70vh;
    border-radius: var(--iz-radius-md);
    background: var(--iz-surface);
    animation: iz-zoom-in var(--iz-duration) var(--iz-ease);
}
.name_avatar_modal { margin: 0; color: var(--iz-white); text-align: center; font-size: var(--iz-fs-lg); }
.close_modal_avatar {
    position: absolute;
    top: var(--iz-space-4);
    right: var(--iz-space-4);
    width: 2.75rem;
    height: 2.75rem;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: var(--iz-white);
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
}
.close_modal_avatar:hover { background: rgba(255, 255, 255, 0.22); }
@keyframes iz-zoom-in { from { transform: scale(0.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ---------- Pantallas de acceso (login, recuperar contraseña) ---------- */
.iz-auth {
    display: flex;
    min-height: 100vh;
    background: var(--iz-surface);
}
.iz-auth__panel {
    flex: 1 1 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--iz-space-6) var(--iz-space-4);
}
.iz-auth__form-wrap {
    width: 100%;
    max-width: 400px;
}
.iz-auth__logo {
    display: inline-block;
    margin-bottom: var(--iz-space-7);
}
.iz-auth__title {
    margin: 0 0 var(--iz-space-2);
    font-size: var(--iz-fs-2xl);
    font-weight: 800;
    letter-spacing: -0.02em;
}
.iz-auth__lead {
    margin-bottom: var(--iz-space-6);
    color: var(--iz-text-muted);
    font-size: var(--iz-fs-md);
}
.iz-auth .form-control {
    height: calc(1.5em + 1.5rem + 2px);
    padding: 0.75rem 1rem;
    font-size: var(--iz-fs-md);
}
.iz-auth .form-control.pr-12 { padding-right: 3rem; }
.iz-auth__link {
    font-size: var(--iz-fs-sm);
    font-weight: 600;
}
.iz-auth__brand {
    flex: 1 1 50%;
    display: none;
    position: relative;
    overflow: hidden;
    background: var(--iz-brand-surface);
    color: var(--iz-white);
}
/* Detalle decorativo con los colores de la paleta */
.iz-auth__brand::before,
.iz-auth__brand::after {
    content: "";
    position: absolute;
    border-radius: 50%;
}
.iz-auth__brand::before {
    width: 520px; height: 520px;
    right: -180px; bottom: -200px;
    border: 64px solid var(--iz-blue);
    opacity: 0.35;
}
.iz-auth__brand::after {
    width: 180px; height: 180px;
    right: 140px; top: 80px;
    background: var(--iz-gold);
    opacity: 0.9;
}
.iz-auth__brand-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    max-width: 460px;
    padding: var(--iz-space-7);
}
.iz-auth__claim {
    margin: var(--iz-space-6) 0;
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
}
.iz-auth__claim span { color: var(--iz-gold); }
.iz-auth__features {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: var(--iz-space-3);
    font-size: var(--iz-fs-md);
    color: rgba(255, 255, 255, 0.85);
}
.iz-auth__features li { display: flex; align-items: center; gap: var(--iz-space-3); }
.iz-auth__features svg { width: 1.25rem; height: 1.25rem; color: var(--iz-gold); flex: none; }
@media (min-width: 992px) {
    .iz-auth__brand { display: block; }
}

/* Saldo destacado (balance e historial) */
.iz-balance {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--iz-space-4);
    margin-bottom: var(--iz-space-5);
    padding: var(--iz-space-6);
    border-radius: var(--iz-radius-lg);
    background: var(--iz-brand-surface);
    color: var(--iz-white);
    box-shadow: var(--iz-shadow-md);
}
.iz-balance > div { display: flex; flex-direction: column; gap: var(--iz-space-1); }
.iz-balance__label { font-size: var(--iz-fs-sm); color: rgba(255, 255, 255, 0.75); font-weight: 600; }
.iz-balance__value {
    font-size: clamp(2rem, 6vw, 2.75rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}
.iz-balance__value small { font-size: var(--iz-fs-md); font-weight: 600; color: var(--iz-gold); }
.iz-balance__owner { color: rgba(255, 255, 255, 0.85); }
.iz-balance__icon {
    display: inline-flex;
    padding: var(--iz-space-4);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: var(--iz-gold);
}
.iz-balance__icon svg { width: 32px; height: 32px; }

/* Impresión: solo el contenido */
@media print {
    .aside, .header, .header-mobile, .footer, .iz-no-print, .iz-skip-link { display: none !important; }
    .wrapper { padding: 0 !important; }
    .iz-balance { box-shadow: none; border: 1px solid var(--iz-navy); }
}

/* Barra de acciones de formulario (fija al fondo en móvil) */
.iz-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--iz-space-2);
    margin-bottom: var(--iz-space-6);
}
@media (max-width: 575.98px) {
    .iz-form-actions {
        position: sticky;
        bottom: 0;
        z-index: 5;
        margin: 0 calc(-1 * var(--iz-space-4)) var(--iz-space-4);
        padding: var(--iz-space-3) var(--iz-space-4);
        background: var(--iz-surface);
        box-shadow: 0 -4px 12px rgba(10, 35, 50, 0.08);
    }
    .iz-form-actions .btn { flex: 1; }
}

/* Sugerencia contextual */
.iz-hint {
    display: flex;
    align-items: center;
    gap: var(--iz-space-3);
    padding: var(--iz-space-3) var(--iz-space-4);
    border-radius: var(--iz-radius-md);
    background: var(--iz-info-soft);
    color: var(--iz-text);
    font-size: var(--iz-fs-sm);
}
.iz-hint svg { flex: none; width: 18px; height: 18px; color: var(--iz-link); }

/* Resultado de búsqueda (p. ej. cajero encontrado) */
.iz-found {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--iz-space-4);
    padding: var(--iz-space-4);
    border-radius: var(--iz-radius-md);
    border: 1px solid var(--iz-border);
    background: var(--iz-n-25);
}

/* Resumen antes de pagar / confirmar */
.iz-summary {
    margin: 0;
    border: 1px solid var(--iz-border);
    border-radius: var(--iz-radius-md);
    overflow: hidden;
}
.iz-summary > div {
    display: flex;
    justify-content: space-between;
    gap: var(--iz-space-4);
    padding: var(--iz-space-3) var(--iz-space-4);
    border-bottom: 1px solid var(--iz-border);
}
.iz-summary > div:last-child { border-bottom: 0; }
.iz-summary dt { font-weight: 500; color: var(--iz-text-muted); }
.iz-summary dd { margin: 0; text-align: right; font-weight: 600; color: var(--iz-heading); }
.iz-summary__total { background: var(--iz-n-25); }
.iz-summary__total dd { font-size: var(--iz-fs-xl); }

/* Utilidades */
.iz-sr-only {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0);
    white-space: nowrap; border: 0;
}

/* ---------- Terceros en tema oscuro ---------- */
/* SweetAlert v1 (/plugins/bower_components/sweetalert/sweetalert.css, se carga por vista) */
:root[data-theme="dark"] .sweet-alert { background-color: var(--iz-surface); box-shadow: var(--iz-shadow-lg); }
:root[data-theme="dark"] .sweet-alert h2 { color: var(--iz-heading); }
:root[data-theme="dark"] .sweet-alert p { color: var(--iz-text); }
:root[data-theme="dark"] .sweet-alert .sa-icon.sa-success::before,
:root[data-theme="dark"] .sweet-alert .sa-icon.sa-success::after,
:root[data-theme="dark"] .sweet-alert .sa-icon.sa-success .sa-fix { background-color: var(--iz-surface); }
:root[data-theme="dark"] .sweet-alert button.cancel { background-color: var(--iz-n-200); color: var(--iz-heading); }
:root[data-theme="dark"] .sweet-overlay { background-color: rgba(0, 0, 0, 0.6); }
/* ApexCharts: ejes y leyendas heredan los tokens; el tooltip claro se ajusta al tema */
:root[data-theme="dark"] .apexcharts-tooltip.apexcharts-theme-light { background: var(--iz-surface-2); border-color: var(--iz-border); color: var(--iz-text); }
:root[data-theme="dark"] .apexcharts-tooltip.apexcharts-theme-light .apexcharts-tooltip-title { background: var(--iz-surface); border-color: var(--iz-border); }
/* Imágenes de la demo de Metronic con fondo blanco */
:root[data-theme="dark"] .iz-thumb,
:root[data-theme="dark"] .modal-content-avatar { background: var(--iz-surface-2); }
/* El color del botón de confirmar lo fija cada vista en JS (navy); en oscuro usa la acción principal (dorado) */
:root[data-theme="dark"] .sweet-alert button.confirm { background-color: var(--iz-primary-bg) !important; color: var(--iz-primary-on) !important; box-shadow: none !important; }

/* ---------- Accesibilidad ---------- */
/* Texto base: Metronic fija 13px (12px en móvil); 14px en todos los tamaños */
html, body { font-size: 14px !important; }
.font-size-xs { font-size: var(--iz-fs-xs) !important; }
.font-size-sm { font-size: var(--iz-fs-sm) !important; }

/* Bordes de campos con 3:1 contra el fondo (WCAG 1.4.11) */
.form-control,
.form-control.form-control-solid,
.custom-select,
.bootstrap-select > .dropdown-toggle.btn,
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
    border-color: var(--iz-input-border);
}
.form-control.form-control-solid { background-color: var(--iz-surface); }
.form-control:focus,
.form-control.form-control-solid:focus,
.custom-select:focus { border-color: var(--iz-focus); }
.form-control::placeholder { color: var(--iz-placeholder); opacity: 1; }

/* Enlaces dentro del contenido: subrayados, no solo por color (WCAG 1.4.1) */
.card-body a:not(.btn):not([class*="iz-"]):not(.menu-link):not(.navi-link):not(.nav-link):not(.dropdown-item),
.iz-alert__body a,
.iz-hint a {
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Botones de submenú del menú lateral (antes <a href="javascript:;">) */
.aside-menu button.menu-link {
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    font: inherit;
    cursor: pointer;
}

/* Resumen de errores enfocable tras un envío fallido */
.iz-alert[tabindex="-1"]:focus { outline: 2px solid var(--iz-focus); outline-offset: 2px; }

/* Modo de alto contraste (Windows): bordes visibles donde el diseño usa solo fondos */
@media (forced-colors: active) {
    .btn, .card, .iz-badge, .iz-alert, .iz-kpi, .iz-page, .iz-theme-radio__chip, .iz-found, .iz-summary { border: 1px solid CanvasText; }
    .iz-page--current, .iz-theme-radio__option input:checked + .iz-theme-radio__chip { border-width: 3px; }
    .iz-skeleton { background: Canvas; border: 1px dashed CanvasText; }
}

/* Búsqueda rápida (layouts/command-palette, Ctrl/Cmd + K) */
.iz-search-trigger {
    display: inline-flex;
    align-items: center;
    gap: var(--iz-space-2);
    align-self: center;
    margin-right: var(--iz-space-3);
    padding: var(--iz-space-2) var(--iz-space-3);
    border: 1px solid var(--iz-input-border);
    border-radius: var(--iz-radius-md);
    background: var(--iz-surface);
    color: var(--iz-text-muted);
    font-size: var(--iz-fs-sm);
    cursor: pointer;
}
.iz-search-trigger:hover { color: var(--iz-heading); background: var(--iz-surface-2); }
.iz-search-trigger svg { width: 16px; height: 16px; }
.iz-search-trigger__kbd,
.iz-cmdk kbd {
    padding: 1px 6px;
    border: 1px solid var(--iz-border);
    border-radius: 4px;
    background: var(--iz-surface-2);
    color: var(--iz-text);
    font-family: var(--iz-font);
    font-size: var(--iz-fs-xs);
    box-shadow: none;
}
@media (max-width: 767.98px) {
    .iz-search-trigger__label, .iz-search-trigger__kbd { display: none; }
}

.iz-cmdk { position: fixed; inset: 0; z-index: 2200; }
.iz-cmdk[hidden] { display: none; }
.iz-cmdk__backdrop { position: absolute; inset: 0; background: rgba(7, 23, 33, 0.6); }
.iz-cmdk__dialog {
    position: relative;
    width: min(640px, calc(100vw - 2rem));
    margin: 12vh auto 0;
    overflow: hidden;
    border-radius: var(--iz-radius-lg);
    background: var(--iz-surface);
    box-shadow: var(--iz-shadow-lg);
}
.iz-cmdk__search { display: flex; align-items: center; gap: var(--iz-space-3); padding: var(--iz-space-4); border-bottom: 1px solid var(--iz-border); }
.iz-cmdk__search-icon { flex: none; width: 20px; height: 20px; color: var(--iz-text-muted); }
.iz-cmdk__input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--iz-heading); font-size: var(--iz-fs-lg); outline: none; }
.iz-cmdk__input::placeholder { color: var(--iz-placeholder); }
.iz-cmdk__list { max-height: min(50vh, 420px); margin: 0; padding: var(--iz-space-2); overflow-y: auto; list-style: none; }
.iz-cmdk__option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--iz-space-3);
    padding: var(--iz-space-3) var(--iz-space-3);
    border-radius: var(--iz-radius-sm);
    color: var(--iz-text);
    cursor: pointer;
}
.iz-cmdk__option[aria-selected="true"] { background: var(--iz-primary-soft); color: var(--iz-primary-text); box-shadow: inset 3px 0 0 var(--iz-primary-bg); }
.iz-cmdk__hint { flex: none; font-size: var(--iz-fs-xs); color: var(--iz-text-muted); }
.iz-cmdk__empty { margin: 0; padding: var(--iz-space-5) var(--iz-space-4); color: var(--iz-text-muted); text-align: center; }
.iz-cmdk__footer { display: flex; gap: var(--iz-space-4); margin: 0; padding: var(--iz-space-3) var(--iz-space-4); border-top: 1px solid var(--iz-border); font-size: var(--iz-fs-xs); color: var(--iz-text-muted); }
.iz-cmdk__footer kbd { margin-right: 2px; }
body.iz-cmdk-open { overflow: hidden; }
.iz-icon-md { width: 22px; height: 22px; }
