/* =================================================
   Kaptur · Portal DEOM · Estilos mobile-first
   ================================================= 
   Estructura: empezamos por móvil (360-768px) y vamos
   escalando con min-width media queries.
   ================================================= */

:root {
    --az-horreols: #14181f;
    --az-medio:    #2747b0;
    --az-claro:    #6da3e0;
    --az-pale:     #b5d4f4;
    --az-bg:       #eef1fc;
    --az-light:    #f4f7fc;

    --bg-page:    #f5f6f8;
    --bg-card:    #ffffff;
    --bg-soft:    #f1f3f6;
    --ink:        #0f172a;
    --ink-soft:   #475569;
    --ink-muted:  #94a3b8;
    --ink-light:  #cbd5e1;
    --line:       #e2e8f0;
    --line-soft:  #eef2f6;

    --ok:      #3b6d11;
    --ok-bg:   #eaf3de;
    --warn:    #854f0b;
    --warn-bg: #faeeda;
    --danger:  #791f1f;
    --danger-bg:#fcebeb;
    --info:    #0c447c;
    --info-bg: #e6f1fb;

    --font-serif: 'Plus Jakarta Sans', -apple-system, 'Segoe UI', sans-serif;
    --font-sans:  'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono:  'JetBrains Mono', monospace;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --shadow-sm: 0 1px 2px rgba(15,23,42,0.06);
    --shadow-md: 0 4px 16px rgba(15,23,42,0.08);
    --shadow-lg: 0 10px 30px rgba(15,23,42,0.15);

    /* Layout vars */
    --sidebar-w: 240px;
    --topbar-h: 56px;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
    --safe-right: env(safe-area-inset-right, 0px);

    /* Tap targets mínimos para móvil */
    --tap-min: 44px;
}

/* ===== RESET ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
html, body { height: 100%; }
body { max-width: 100vw; overflow-x: clip; }
body {
    font-family: var(--font-sans);
    background: var(--bg-page);
    color: var(--ink);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}
a { color: var(--az-medio); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; height: auto; display: block; }
button { font: inherit; }

/* Notch / safe areas iOS */
body { padding-left: var(--safe-left); padding-right: var(--safe-right); }

/* =================================================
   AUTH (login / recuperar / reset)
   Mobile: stack vertical (brand arriba breve, form abajo)
   Desktop: dos columnas
   ================================================= */
.auth-screen {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex; flex-direction: column;
}
.auth-brand {
    background: linear-gradient(135deg, var(--az-horreols) 0%, #1c3585 100%);
    color: var(--az-light);
    padding: calc(20px + var(--safe-top)) 20px 24px;
    position: relative; overflow: hidden;
    flex-shrink: 0;
}
.auth-brand::before, .auth-brand::after {
    content: ''; position: absolute; border-radius: 50%;
    border: 1px solid rgba(244,247,252,0.06);
    pointer-events: none;
}
.auth-brand::before { top: -60px; right: -60px; width: 200px; height: 200px; }
.auth-brand::after  { top: -120px; right: -120px; width: 320px; height: 320px; }

.brand-mark { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.brand-mark .logo-box {
    width: 38px; height: 38px; border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-serif); font-weight: 600; font-size: 22px;
    letter-spacing: -0.05em;
}
.brand-mark .logo-kaptur {
    background: linear-gradient(135deg, var(--az-light), var(--az-claro));
    color: var(--az-horreols);
    box-shadow: 0 4px 12px rgba(109,163,224,0.3);
}
.brand-mark .brand-name {
    font-family: var(--font-serif); font-weight: 600; font-size: 20px;
    letter-spacing: -0.01em; line-height: 1; display: block;
}
.brand-mark .brand-tag {
    font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.18em;
    color: var(--az-claro); margin-top: 4px;
}

.brand-headline { margin-top: 24px; position: relative; z-index: 1; }
.brand-headline .eyebrow {
    font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.2em;
    color: var(--az-claro); margin-bottom: 10px;
}
.brand-headline h1 {
    font-family: var(--font-serif); font-size: 24px; line-height: 1.15;
    font-weight: 500; letter-spacing: -0.02em; margin-bottom: 10px;
}
.brand-headline p { font-size: 13px; line-height: 1.5; color: rgba(244,247,252,0.7); max-width: 380px; }

.brand-foot {
    margin-top: 16px;
    font-family: var(--font-mono); font-size: 9px;
    color: rgba(244,247,252,0.4);
    display: flex; justify-content: space-between;
    position: relative; z-index: 1;
}

.auth-form {
    padding: 28px 20px calc(28px + var(--safe-bottom));
    background: var(--bg-card);
    flex: 1;
    display: flex; flex-direction: column; justify-content: center;
    max-width: 520px; width: 100%; margin: 0 auto;
}
.auth-form h2 { font-family: var(--font-serif); font-size: 24px; font-weight: 500; letter-spacing: -0.02em; margin-bottom: 6px; }
.auth-form .sub { color: var(--ink-soft); font-size: 14px; margin-bottom: 24px; }

.footer-brand {
    margin-top: 28px; padding-top: 16px;
    border-top: 1px solid var(--line);
    display: flex; align-items: center; justify-content: center; gap: 6px;
    font-family: var(--font-mono); font-size: 10px;
    color: var(--ink-muted); letter-spacing: 0.1em;
}
.footer-brand strong {
    color: var(--az-horreols); font-family: var(--font-serif);
    font-weight: 600; font-size: 13px; letter-spacing: -0.01em;
}

/* =================================================
   FIELDS / BUTTONS (mobile-first sizing)
   ================================================= */
.field { margin-bottom: 16px; display: flex; flex-direction: column; }
.field label {
    display: block; font-family: var(--font-mono); font-size: 10px;
    letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--ink-soft); margin-bottom: 6px;
}
.field label .req { color: var(--danger); margin-left: 3px; }
.field input, .field select, .field textarea {
    width: 100%;
    padding: 12px 14px;            /* más grueso en móvil */
    min-height: var(--tap-min);    /* asegura tap target */
    border: 1px solid var(--line);
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    font-family: inherit; font-size: 16px; /* 16px evita zoom auto en iOS */
    color: var(--ink);
    transition: border-color 0.15s, box-shadow 0.15s;
    -webkit-appearance: none;
    appearance: none;
}
.field input:focus, .field select:focus, .field textarea:focus {
    outline: none; border-color: var(--az-medio); box-shadow: 0 0 0 3px var(--az-bg);
}
.field input:disabled, .field input[readonly] { background: var(--bg-soft); color: var(--ink-muted); }
.field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23475569' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}
.field-hint { font-size: 12px; color: var(--ink-muted); margin-top: 4px; }

.btn {
    display: inline-flex; align-items: center; gap: 6px; justify-content: center;
    padding: 11px 16px;
    min-height: var(--tap-min);
    border: 1px solid var(--line); background: var(--bg-card);
    color: var(--ink); border-radius: var(--radius-sm);
    font-family: inherit; font-size: 14px; font-weight: 500;
    cursor: pointer; transition: background 0.15s, border-color 0.15s, transform 0.05s;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: var(--bg-soft); text-decoration: none; }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--az-horreols); color: var(--az-light); border-color: var(--az-horreols); }
.btn-primary:hover { background: #04142b; }
.btn-blue { background: var(--az-medio); color: #fff; border-color: var(--az-medio); }
.btn-danger { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-bg); }
.btn-block { width: 100%; padding: 14px; font-size: 15px; }
.btn-sm { padding: 8px 12px; font-size: 13px; min-height: 36px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.alert {
    padding: 12px 14px; border-radius: var(--radius-sm);
    font-size: 14px; margin-bottom: 16px;
    display: flex; align-items: flex-start; gap: 10px;
}
.alert i { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.alert-error   { background: var(--danger-bg); color: var(--danger); border-left: 3px solid var(--danger); }
.alert-success { background: var(--ok-bg);     color: var(--ok);     border-left: 3px solid var(--ok); }
.alert-info    { background: var(--info-bg);   color: var(--info);   border-left: 3px solid var(--az-medio); }
.alert-warn    { background: var(--warn-bg);   color: var(--warn);   border-left: 3px solid var(--warn); }

/* =================================================
   APP LAYOUT — Mobile first
   Por defecto: sin sidebar (oculto, accesible via hamburguesa)
   Topbar fija arriba con título + hamburguesa
   ================================================= */
.app {
    display: grid;
    grid-template-columns: 1fr;
    min-height: 100vh;
    min-height: 100dvh;
}

/* Topbar móvil (visible solo en móvil) */
.mobile-topbar {
    display: flex; align-items: center; gap: 10px;
    height: var(--topbar-h);
    padding: 0 14px;
    padding-top: var(--safe-top);
    height: calc(var(--topbar-h) + var(--safe-top));
    background: var(--az-horreols);
    color: var(--az-light);
    position: sticky; top: 0; z-index: 50;
    box-shadow: var(--shadow-sm);
}
.menu-toggle {
    width: var(--tap-min); height: var(--tap-min);
    background: transparent; border: 0; color: var(--az-light);
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; cursor: pointer; border-radius: 4px;
    -webkit-tap-highlight-color: transparent;
}
.menu-toggle:active { background: rgba(255,255,255,0.1); }
.mobile-topbar .mtb-brand {
    display: flex; align-items: center; gap: 8px; flex: 1;
}
.mobile-topbar .mtb-brand .logo-box {
    width: 28px; height: 28px; border-radius: 5px;
    background: linear-gradient(135deg, var(--az-light), var(--az-claro));
    color: var(--az-horreols);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-serif); font-weight: 600; font-size: 16px;
    letter-spacing: -0.05em;
}
.mobile-topbar .mtb-brand .name {
    font-family: var(--font-serif); font-weight: 600; font-size: 17px;
    color: var(--az-light); letter-spacing: -0.01em;
}
.mobile-topbar .mtb-user {
    width: var(--tap-min); height: var(--tap-min);
    display: flex; align-items: center; justify-content: center;
}
.mobile-topbar .mtb-user .avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--az-claro); color: var(--az-horreols);
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 600;
}

/* Sidebar (drawer en móvil, fijo en desktop) */
.sidebar {
    background: var(--az-horreols); color: var(--az-light);
    width: 80%; max-width: 320px;
    padding: 16px 0 calc(16px + var(--safe-bottom));
    position: fixed; top: 0; left: 0; bottom: 0;
    z-index: 100;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    display: flex; flex-direction: column;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-top: calc(16px + var(--safe-top));
}
.sidebar.is-open { transform: translateX(0); box-shadow: var(--shadow-lg); }

.sidebar-backdrop {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99;
    opacity: 0; pointer-events: none;
    transition: opacity 0.2s;
}
.sidebar-backdrop.is-visible { opacity: 1; pointer-events: auto; }

.sidebar-brand { padding: 0 18px 16px; border-bottom: 1px solid rgba(244,247,252,0.1); margin-bottom: 10px; }
.sidebar-brand .logo { display: flex; align-items: center; gap: 11px; }
.sidebar-brand .logo-box {
    width: 32px; height: 32px; border-radius: 5px;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-serif); font-weight: 600;
    font-size: 17px; letter-spacing: -0.05em;
}
.sidebar-brand .logo-kaptur {
    background: linear-gradient(135deg, var(--az-light), var(--az-claro));
    color: var(--az-horreols);
}
.sidebar-brand .name {
    font-family: var(--font-serif); font-weight: 600;
    font-size: 17px; line-height: 1; display: block; color: var(--az-light);
    letter-spacing: -0.01em;
}
.sidebar-brand .dept {
    font-family: var(--font-mono); font-size: 8.5px; letter-spacing: 0.18em;
    color: var(--az-claro); margin-top: 4px; display: block;
}

.nav-section { padding: 0 12px; margin-bottom: 6px; }
.nav-section-title {
    font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.15em;
    text-transform: uppercase; color: rgba(244,247,252,0.4); padding: 10px 10px 4px;
}
.nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px;
    min-height: var(--tap-min);
    color: rgba(244,247,252,0.75); border-radius: var(--radius-sm);
    font-size: 14px; font-weight: 500; text-decoration: none;
    transition: background 0.12s, color 0.12s;
}
.nav-item:hover { background: rgba(244,247,252,0.06); color: var(--az-light); text-decoration: none; }
.nav-item.active { background: rgba(109,163,224,0.18); color: var(--az-claro); }
.nav-item:active { background: rgba(244,247,252,0.1); }
.nav-item .ti { font-size: 18px; }

.sidebar-user {
    margin-top: auto; padding: 14px 18px;
    border-top: 1px solid rgba(244,247,252,0.1);
    display: flex; align-items: center; gap: 12px;
}
.avatar {
    width: 38px; height: 38px; background: var(--az-claro);
    color: var(--az-horreols); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 600; font-size: 13px; text-decoration: none;
    flex-shrink: 0;
}
.sidebar-user .info { flex: 1; min-width: 0; }
.sidebar-user .name { font-size: 13px; font-weight: 500; color: var(--az-light); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user .role { font-family: var(--font-mono); font-size: 9px; color: var(--az-claro); letter-spacing: 0.05em; }
.logout-btn {
    width: var(--tap-min); height: var(--tap-min);
    background: none; border: none; color: rgba(244,247,252,0.5); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; border-radius: 4px;
}
.logout-btn:hover { color: var(--az-light); background: rgba(255,255,255,0.05); }

/* Main content (mobile) */
.main {
    padding: 16px;
    padding-bottom: calc(16px + var(--safe-bottom));
    max-width: 100%;
    width: 100%;
}

.topbar {
    margin-bottom: 18px; padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
    display: flex; flex-direction: column; gap: 12px;
}
.topbar .breadcrumb {
    font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.15em;
    color: var(--ink-soft); text-transform: uppercase; margin-bottom: 4px;
}
.topbar h1 { font-family: var(--font-serif); font-size: 22px; font-weight: 500; letter-spacing: -0.02em; color: var(--ink); }
.topbar p { font-size: 13px; color: var(--ink-soft); margin-top: 4px; }
.topbar .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.topbar .actions .btn { flex: 1; min-width: 0; }  /* en móvil, botones expanden */

/* =================================================
   KPIs (mobile: 2 columnas; desktop: auto-fit)
   ================================================= */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}
.kpi-card {
    background: var(--bg-card); border: 1px solid var(--line);
    border-radius: var(--radius-md); padding: 14px;
    display: block;
}
.kpi-card .label {
    font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.1em;
    color: var(--ink-soft); text-transform: uppercase;
    line-height: 1.3;
}
.kpi-card .value {
    font-family: var(--font-serif); font-size: 28px; font-weight: 500;
    letter-spacing: -0.02em; margin-top: 4px; color: var(--ink);
    line-height: 1.1;
}
.kpi-card.warn .value { color: var(--warn); }
.kpi-card.danger .value { color: var(--danger); }
.kpi-card.ok .value { color: var(--ok); }
.kpi-card.info .value { color: var(--info); }
.kpi-link { cursor: pointer; transition: transform 0.12s, box-shadow 0.12s, border-color 0.12s; }
.kpi-link:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); border-color: var(--az-claro); text-decoration: none; }
.kpi-link .value { color: var(--az-horreols); }
.kpi-link.warn .value { color: var(--warn); }
.kpi-link.info .value { color: var(--info); }
.kpi-link.ok .value { color: var(--ok); }
.kpi-link.danger .value { color: var(--danger); }

/* =================================================
   TABLAS — En móvil se convierten en CARDS
   Estrategia: tabla normal en desktop, en móvil
   añadimos data-label a cada <td> y los apilamos.
   ================================================= */
.table-wrap {
    background: var(--bg-card); border: 1px solid var(--line);
    border-radius: var(--radius-md); overflow: hidden;
}
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table thead { display: none; }   /* oculto en móvil */
.table tbody tr {
    display: block;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line-soft);
}
.table tbody tr:last-child { border-bottom: none; }
.table tbody td {
    display: flex; justify-content: space-between; align-items: center;
    padding: 6px 0;
    text-align: right;
    font-size: 13px;
    gap: 12px;
}
.table tbody td::before {
    content: attr(data-label);
    font-family: var(--font-mono); font-size: 10px;
    letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--ink-soft); font-weight: 500;
    text-align: left;
}
/* Si el td no tiene data-label se muestra sin prefijo */
.table tbody td:not([data-label])::before { content: none; }
.table tbody td:not([data-label]) { justify-content: flex-end; }

/* Para acciones (sin label, alineadas a derecha) */
.table .td-actions { padding-top: 10px; }

/* Badges */
.badge { display: inline-block; padding: 2px 10px; border-radius: 10px; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.05em; font-weight: 500; }
.badge-pending  { background: var(--bg-soft);   color: var(--ink-soft); }
.badge-amber    { background: var(--warn-bg);   color: var(--warn); }
.badge-red      { background: var(--danger-bg); color: var(--danger); }
.badge-info     { background: var(--info-bg);   color: var(--info); }
.badge-green    { background: var(--ok-bg);     color: var(--ok); }
.badge-gray     { background: var(--bg-soft);   color: var(--ink-muted); }

/* Section heading */
.section-title { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--ink-soft); margin: 20px 0 10px; }

/* Form sections */
.form-section { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 16px; margin-bottom: 14px; }
.form-section-title { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em; color: var(--az-medio); margin-bottom: 12px; }

/* Grids: en móvil siempre 1 columna */
.grid-2, .grid-3, .grid-4 { display: grid; grid-template-columns: 1fr; gap: 12px; }

/* Yes/No toggle */
.yn { display: flex; gap: 6px; }
.yn-btn {
    flex: 1; padding: 10px;
    min-height: var(--tap-min);
    border: 1px solid var(--line); background: var(--bg-card);
    border-radius: var(--radius-sm); font-size: 13px;
    cursor: pointer; color: var(--ink-soft); font-family: inherit;
}
.yn-btn.on { background: var(--az-horreols); color: #fff; border-color: var(--az-horreols); }
.yn-btn.on-no { background: var(--warn-bg); color: var(--warn); border-color: var(--warn); }

/* Tabs — scroll horizontal en móvil con indicador */
.tabs-bar {
    background: var(--bg-card); border-radius: var(--radius-md) var(--radius-md) 0 0;
    border: 1px solid var(--line); border-bottom: none; padding: 0 12px;
    display: flex; gap: 4px;
    overflow-x: auto; overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    position: relative;
}
.tabs-bar::-webkit-scrollbar { height: 3px; }
.tabs-bar::-webkit-scrollbar-thumb { background: var(--az-claro); }
.tab {
    padding: 12px 14px; font-size: 13px; color: var(--ink-soft);
    cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap;
    display: flex; align-items: center; gap: 6px; font-weight: 500;
    text-decoration: none;
    min-height: var(--tap-min);
    flex-shrink: 0;
}
.tab:hover { color: var(--az-horreols); text-decoration: none; }
.tab.active { color: var(--az-horreols); border-bottom-color: var(--az-medio); }
.tab.locked, .tab.no-access { color: var(--ink-light); cursor: not-allowed; }
.tab.no-access { text-decoration: line-through; }
.tab .ti { font-size: 16px; }
.tab .perm { font-family: var(--font-mono); font-size: 8px; padding: 1px 5px; border-radius: 6px; margin-left: 3px; letter-spacing: 0.05em; }
.perm-edit { background: var(--ok-bg); color: var(--ok); }
.perm-view { background: var(--bg-soft); color: var(--ink-soft); }

.tab-content {
    background: var(--bg-card); border-radius: 0 0 var(--radius-md) var(--radius-md);
    border: 1px solid var(--line); border-top: none;
    padding: 18px 16px;
}

/* Cards (estándares, etc.) */
.card-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.card { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 14px; }
.card-icon { width: 36px; height: 36px; border-radius: 6px; background: var(--az-bg); color: var(--az-medio); display: flex; align-items: center; justify-content: center; font-size: 18px; margin-bottom: 10px; }
.card-title { font-size: 14px; font-weight: 500; color: var(--ink); margin: 0 0 4px; }
.card-meta { font-size: 12px; color: var(--ink-soft); }
.card-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }

/* Filter pills */
.filter-pills { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.filter-pill {
    padding: 6px 12px; border-radius: 14px; font-size: 12px;
    font-family: var(--font-mono); background: var(--bg-soft);
    color: var(--ink-soft); cursor: pointer; text-decoration: none;
    min-height: 32px; display: inline-flex; align-items: center;
}
.filter-pill.active { background: var(--az-horreols); color: var(--az-light); }
.filter-pill:hover { text-decoration: none; }

/* Switches estilo iOS */
.switch-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 0; gap: 12px; cursor: pointer;
    min-height: var(--tap-min);
}
.switch-row + .switch-row { border-top: 1px solid var(--line-soft); }
.switch-row > span:first-child {
    display: flex; flex-direction: column; gap: 2px;
    font-size: 14px; color: var(--ink);
}
.switch-row .hint {
    font-size: 12px; color: var(--ink-muted); font-weight: 400;
}
.switch {
    position: relative; display: inline-block;
    width: 48px; height: 28px; flex-shrink: 0;
}
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
    position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
    background: var(--ink-light); transition: 0.2s;
    border-radius: 28px;
}
.switch .slider::before {
    position: absolute; content: '';
    height: 22px; width: 22px; left: 3px; bottom: 3px;
    background: white; transition: 0.2s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.switch input:checked + .slider { background: var(--ok); }
.switch input:checked + .slider::before { transform: translateX(20px); }

/* Footer */
.app-footer {
    margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--line);
    font-family: var(--font-mono); font-size: 10px; color: var(--ink-muted);
    display: flex; flex-direction: column; gap: 4px;
    letter-spacing: 0.05em; text-align: center;
}
.app-footer a { color: var(--ink-soft); }

/* Banner de instalación PWA */
.install-banner {
    position: fixed; left: 14px; right: 14px;
    bottom: calc(14px + var(--safe-bottom));
    background: var(--az-horreols); color: var(--az-light);
    padding: 14px 16px; border-radius: var(--radius-md);
    display: flex; align-items: center; gap: 12px;
    box-shadow: var(--shadow-lg);
    z-index: 200;
    animation: slideUp 0.3s ease;
}
@keyframes slideUp { from { transform: translateY(150%); } to { transform: translateY(0); } }
.install-banner .ib-icon {
    width: 36px; height: 36px; border-radius: 6px;
    background: linear-gradient(135deg, var(--az-light), var(--az-claro));
    color: var(--az-horreols);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-serif); font-weight: 600; font-size: 18px;
    flex-shrink: 0;
}
.install-banner .ib-text { flex: 1; font-size: 13px; line-height: 1.4; }
.install-banner .ib-text strong { display: block; font-weight: 600; }
.install-banner .ib-actions { display: flex; gap: 6px; flex-shrink: 0; }
.install-banner button {
    padding: 8px 12px; border-radius: 6px; font-size: 12px; font-weight: 500;
    border: 0; cursor: pointer; min-height: 36px;
}
.install-banner .ib-yes { background: var(--az-claro); color: var(--az-horreols); }
.install-banner .ib-no { background: transparent; color: rgba(244,247,252,0.5); }

/* Banner promo arriba (alternativa al popup inferior) */
.install-bar {
    background: var(--az-bg); color: var(--info);
    padding: 10px 14px;
    display: flex; align-items: center; gap: 10px;
    font-size: 13px;
    border-bottom: 1px solid var(--az-pale);
}
.install-bar .ib-icon-sm {
    width: 28px; height: 28px; border-radius: 5px;
    background: linear-gradient(135deg, var(--az-light), var(--az-claro));
    color: var(--az-horreols);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-serif); font-weight: 600; font-size: 15px;
    flex-shrink: 0;
}
.install-bar .ib-text { flex: 1; line-height: 1.3; }
.install-bar .ib-text strong { font-weight: 600; }
.install-bar .ib-action {
    background: var(--az-horreols); color: var(--az-light);
    border: 0; padding: 8px 14px; border-radius: 5px;
    font-size: 12px; font-weight: 500; cursor: pointer;
    min-height: 36px;
    font-family: inherit;
    flex-shrink: 0;
}
.install-bar .ib-action:hover { background: #04142b; }
.install-bar .ib-close {
    background: transparent; color: var(--ink-soft);
    width: 32px; height: 32px; border-radius: 5px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; border: 0; padding: 0;
    flex-shrink: 0;
}
.install-bar .ib-close:hover { background: rgba(15,23,42,0.06); }

/* ==========================================================
   TABLET (≥ 600px)
   - KPIs auto-fit
   - Grids form a 2 cols
   ========================================================== */
@media (min-width: 600px) {
    body { font-size: 14px; }
    .main { padding: 24px; }
    .topbar { flex-direction: row; justify-content: space-between; align-items: flex-start; }
    .topbar h1 { font-size: 26px; }
    .topbar .actions { flex-wrap: nowrap; }
    .topbar .actions .btn { flex: 0 1 auto; }

    .kpi-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

    .grid-2 { grid-template-columns: 1fr 1fr; gap: 12px 16px; }
    .grid-3 { grid-template-columns: 1fr 1fr 1fr; gap: 12px 16px; }
    .grid-4 { grid-template-columns: 1fr 1fr; gap: 12px 16px; }

    .card-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

    .app-footer { flex-direction: row; justify-content: space-between; text-align: left; }

    /* AUTH a dos columnas */
    .auth-screen { flex-direction: row; }
    .auth-brand { padding: 48px 40px; width: 50%; max-width: 50%; }
    .brand-headline h1 { font-size: 32px; }
    .auth-form { padding: 48px 40px; max-width: 480px; }
}

/* ==========================================================
   DESKTOP (≥ 900px)
   - Sidebar fijo a la izquierda
   - Mobile-topbar oculto
   - Tablas en formato tradicional
   ========================================================== */
@media (min-width: 900px) {
    body { font-size: 14px; }
    .app { grid-template-columns: var(--sidebar-w) 1fr; }

    .mobile-topbar { display: none; }

    /* Sidebar siempre visible y fijo */
    .sidebar {
        position: sticky; top: 0;
        height: 100vh; width: var(--sidebar-w); max-width: var(--sidebar-w);
        transform: none;
        box-shadow: none;
        padding-top: 16px;
    }
    .sidebar-backdrop { display: none; }

    .main { padding: 28px 36px; max-width: 1400px; }
    .topbar h1 { font-size: 28px; }

    /* Tablas: vuelven a formato tradicional */
    .table { font-size: 13px; }
    .table thead { display: table-header-group; }
    .table thead th {
        background: var(--bg-soft); padding: 10px 14px; text-align: left;
        font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em;
        text-transform: uppercase; color: var(--ink-soft);
        border-bottom: 1px solid var(--line); font-weight: 500;
    }
    .table tbody tr {
        display: table-row; padding: 0;
        border-bottom: 1px solid var(--line-soft);
    }
    .table tbody tr:hover { background: var(--bg-soft); }
    .table tbody td {
        display: table-cell; text-align: left;
        padding: 12px 14px;
        font-size: 13px;
        justify-content: initial;
    }
    .table tbody td::before { content: none; }

    .kpi-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
    .kpi-card { padding: 16px; }
    .kpi-card .value { font-size: 30px; }
    .kpi-card .label { font-size: 10px; }

    .grid-2 { gap: 10px 16px; }
    .grid-3 { grid-template-columns: 1fr 1fr 1fr; gap: 10px 16px; }
    .grid-4 { grid-template-columns: 1fr 1fr 1fr 1fr; gap: 10px 16px; }

    .form-section { padding: 18px 22px; }
    .tab-content { padding: 22px 26px; }

    /* Tabs no se "necesita" scroll horizontal pero lo dejamos por si hay muchas */
    .tab { padding: 11px 14px; }
}

/* ==========================================================
   DESKTOP grande (≥ 1200px)
   ========================================================== */
@media (min-width: 1200px) {
    body { font-size: 14px; }
    .field input, .field select, .field textarea {
        font-size: 13px; padding: 8px 12px; min-height: auto;
    }
    .btn { padding: 8px 14px; min-height: auto; font-size: 13px; }
    .btn-sm { padding: 5px 10px; min-height: auto; font-size: 11px; }
}

/* ============================================================
   ÍNDICE DE FICHA DE TIENDA · Grid de cards de secciones
   Mobile-first: 2 cols → 4 cols (tablet) → 6 cols (desktop)
   ============================================================ */

.indice-wrapper {
    margin-bottom: 16px;
}
.indice-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    padding: 0 2px;
}
.indice-title {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.15em;
    color: var(--ink-soft);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.indice-title .ti { font-size: 13px; color: var(--az-medio); }

.indice-toggle {
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 11px;
    color: var(--ink-soft);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: background .1s, color .1s, border-color .1s;
}
.indice-toggle:hover {
    background: var(--bg-soft);
    color: var(--az-medio);
    border-color: var(--az-medio);
}
.indice-toggle .ti { font-size: 13px; }

.indice-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

/* Tablet: 4 columnas */
@media (min-width: 600px) {
    .indice-grid { grid-template-columns: repeat(4, 1fr); gap: 10px; }
}

/* Desktop: 6 columnas */
@media (min-width: 1100px) {
    .indice-grid { grid-template-columns: repeat(6, 1fr); }
}

.indice-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 14px 8px 12px;
    text-decoration: none;
    color: var(--ink);
    transition: border-color .12s, transform .08s, box-shadow .12s, background .12s;
    min-height: var(--tap-min);
    justify-content: center;
}
.indice-card:hover {
    border-color: var(--az-medio);
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(10, 37, 64, 0.05);
}
.indice-card:active { transform: translateY(0); }

/* Estado: card de la sección actual */
.indice-card.active {
    border: 1.5px solid var(--az-medio);
    background: var(--az-bg);
    box-shadow: 0 0 0 2px rgba(24, 95, 165, 0.08);
}
.indice-card.active .indice-icono { color: var(--az-horreols); }
.indice-card.active .indice-nombre { color: var(--az-horreols); }

/* Card especial "en construcción" (no clicable) */
.indice-card-soon {
    background: linear-gradient(135deg, var(--info-bg) 0%, var(--az-pale) 100%);
    border: 1px dashed var(--info);
    cursor: not-allowed;
    opacity: 0.75;
}
.indice-card-soon:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--info);
}
.indice-card-soon .indice-nombre,
.indice-card-soon .indice-icono { color: var(--info); }

.indice-icono {
    font-size: 22px;
    color: var(--az-medio);
    margin-bottom: 6px;
}
.indice-nombre {
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 5px;
    color: var(--ink);
    line-height: 1.2;
}
.indice-badge {
    font-size: 9px;
    font-family: var(--font-mono);
}

/* Desktop: cards un poco más grandes */
@media (min-width: 900px) {
    .indice-card { padding: 16px 10px 14px; }
    .indice-icono { font-size: 24px; margin-bottom: 8px; }
    .indice-nombre { font-size: 13px; }
    .indice-badge { font-size: 10px; }
}

/* ============================================================
   SECCIÓN ACTUAL desplegada debajo del grid
   ============================================================ */
.seccion-actual {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 18px;
}
.seccion-actual-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 14px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--line-soft, var(--line));
}
.seccion-actual-header .ti {
    font-size: 20px;
    color: var(--az-medio);
}

@media (max-width: 600px) {
    .seccion-actual { padding: 14px; }
    .seccion-actual-header { padding-bottom: 10px; margin-bottom: 10px; }
}

/* ============================================================
   SUB-MENÚ EN EL SIDEBAR (cuando entras a una tienda)
   ============================================================ */
.nav-submenu {
    background: rgba(255,255,255,0.03);
    margin: 4px 8px 8px;
    border-radius: 6px;
    padding: 4px 0;
    border-left: 2px solid var(--az-claro);
}
.nav-submenu-title {
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 0.1em;
    color: var(--az-light);
    padding: 6px 12px 4px;
    margin: 0;
    display: flex; align-items: center; gap: 4px;
    opacity: 0.7;
}
.nav-subitem {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px 6px 16px;
    font-size: 12px;
    color: var(--az-light);
    text-decoration: none;
    transition: background .1s;
}
.nav-subitem:hover {
    background: rgba(255,255,255,0.06);
    color: white;
    text-decoration: none;
}
.nav-subitem.active {
    background: var(--az-medio);
    color: white;
}
.nav-subitem .ti {
    font-size: 13px;
    flex-shrink: 0;
}

/* En móvil ocupa todo el sidebar igual */
@media (max-width: 899px) {
    .nav-submenu { margin: 4px 12px; }
}

/* ============================================================
   BARRA DE PROGRESO DE ETAPAS DE TIENDA
   ============================================================ */
.flujo-barra {
    margin-bottom: 16px;
    padding: 0 2px;
}
.flujo-barra-titulo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
    gap: 8px;
}
.flujo-label {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.15em;
    color: var(--ink-soft);
}
.flujo-actual {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.1em;
    color: var(--ok);
    font-weight: 500;
}
.flujo-actual-rojo { color: var(--danger); display: inline-flex; align-items: center; gap: 4px; }
.flujo-actual-rojo .ti { font-size: 12px; }

.flujo-barra-grid {
    display: flex;
    gap: 3px;
    align-items: stretch;
}
.flujo-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.flujo-step-bar {
    height: 6px;
    border-radius: 2px;
    transition: background .15s;
}
.flujo-step-label {
    font-size: 9px;
    font-family: var(--font-mono);
    text-align: center;
    letter-spacing: 0.02em;
    line-height: 1.1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Estado: COMPLETADA (verde) */
.flujo-step-completada .flujo-step-bar { background: #97C459; }
.flujo-step-completada .flujo-step-label { color: #3B6D11; }

/* Estado: ACTUAL (ámbar destacado) */
.flujo-step-actual .flujo-step-bar {
    background: #EF9F27;
    box-shadow: 0 0 0 2px rgba(239, 159, 39, 0.18);
}
.flujo-step-actual .flujo-step-label {
    color: #854F0B;
    font-weight: 500;
}

/* Estado: FUTURA (gris) */
.flujo-step-futura .flujo-step-bar { background: #D3D1C7; }
.flujo-step-futura .flujo-step-label { color: #888780; }

/* Estado: CERRADA (al final, gris oscuro) */
.flujo-step-cerrada .flujo-step-bar { background: #5F5E5A; }
.flujo-step-cerrada .flujo-step-label { color: #2C2C2A; font-weight: 500; }

/* Caso especial: DESCARTADA (fila roja entera) */
.flujo-barra-descartada-line {
    height: 6px;
    background: #E24B4A;
    border-radius: 2px;
    box-shadow: 0 0 0 2px rgba(226, 75, 74, 0.15);
}

/* Móvil: labels más pequeños y rotados si no caben */
@media (max-width: 600px) {
    .flujo-step-label { font-size: 8px; }
    .flujo-step-bar { height: 5px; }
    .flujo-barra-grid { gap: 2px; }
}

/* ============================================================
   BUSCADOR DE TIENDAS
   ============================================================ */
.buscador-tiendas { position: relative; width: 100%; max-width: 380px; }
.buscador-compacto { max-width: 260px; }
.buscador-input-wrap {
    position: relative; display: flex; align-items: center;
    background: var(--bg-card); border: 1px solid var(--line); border-radius: 8px; padding: 0 8px;
    transition: border-color .12s, box-shadow .12s;
}
.buscador-input-wrap:focus-within { border-color: var(--az-medio); box-shadow: 0 0 0 3px rgba(24,95,165,.08); }
.buscador-icono { font-size: 16px; color: var(--ink-muted); flex-shrink: 0; }
.buscador-input {
    flex: 1; border: none; background: transparent; padding: 8px 6px;
    font-size: 13px; color: var(--ink); outline: none; min-width: 0;
}
.buscador-input::placeholder { color: var(--ink-muted); font-size: 12px; }
.buscador-compacto .buscador-input { padding: 6px; font-size: 12px; }
.buscador-limpiar { background: transparent; border: none; cursor: pointer; padding: 4px; color: var(--ink-muted); display: flex; align-items: center; }
.buscador-limpiar:hover { color: var(--danger); }

.buscador-resultados {
    position: absolute; top: calc(100% + 4px); right: 0; left: 0;
    background: white; border: 1px solid var(--line); border-radius: 8px;
    box-shadow: 0 8px 24px rgba(10,37,64,.10);
    max-height: 380px; overflow-y: auto; z-index: 1000;
}
.buscador-compacto .buscador-resultados { width: 320px; left: auto; right: 0; }
.buscador-section-title {
    margin: 0; padding: 10px 14px 4px;
    font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.15em; color: var(--ink-muted);
}
.buscador-item {
    display: flex; align-items: center; gap: 10px; padding: 8px 14px;
    text-decoration: none; color: var(--ink); transition: background .1s;
}
.buscador-item:hover { background: var(--bg-soft); text-decoration: none; }
.buscador-item-num {
    font-family: var(--font-mono); font-size: 11px;
    background: var(--info-bg); color: var(--info);
    padding: 3px 7px; border-radius: 5px; flex-shrink: 0;
}
.buscador-item-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.buscador-item-titulo { font-size: 12px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.buscador-item-meta { font-size: 10px; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.buscador-item-meta em { font-style: normal; color: var(--az-medio); font-family: var(--font-mono); }

@media (max-width: 600px) {
    .buscador-compacto { max-width: 100%; }
    .buscador-compacto .buscador-resultados { width: 100%; }
}
@keyframes spin { from { transform: rotate(0); } to { transform: rotate(360deg); } }

/* ============================================================
   ICONO CASCO DE OBRA personalizado (sustituye al ti-helmet)
   ============================================================ */
.ti-helmet {
    -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M3 18h18v-2c0-4.418-4.03-8-9-8s-9 3.582-9 8v2z'/><path d='M12 8V4'/><path d='M9 4h6'/><line x1='9' y1='13' x2='9' y2='18'/><line x1='15' y1='13' x2='15' y2='18'/></svg>");
    mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M3 18h18v-2c0-4.418-4.03-8-9-8s-9 3.582-9 8v2z'/><path d='M12 8V4'/><path d='M9 4h6'/><line x1='9' y1='13' x2='9' y2='18'/><line x1='15' y1='13' x2='15' y2='18'/></svg>");
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    background-color: currentColor;
    display: inline-block;
    width: 1em;
    height: 1em;
    vertical-align: -2px;
}
.ti-helmet::before { content: ""; display: none; }

/* ============================================================
   BARRA DE SIMULACIÓN DE ROL (v1.10.0)
   Aparece arriba del todo cuando un admin está simulando
   ============================================================ */
.sim-bar {
    position: sticky;
    top: 0;
    z-index: 1500;
    background: #EF9F27;
    color: #2C2C2A;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
    flex-wrap: wrap;
    border-bottom: 1px solid #C97F11;
    box-shadow: 0 2px 6px rgba(239, 159, 39, 0.25);
}
.sim-bar-content {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    flex: 1;
    min-width: 0;
}
.sim-bar-content .ti { font-size: 16px; }
.sim-bar-label { font-weight: 500; }
.sim-bar-badge {
    background: white;
    padding: 2px 10px;
    border-radius: 12px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.05em;
    font-weight: 500;
}
.sim-bar-extra {
    font-size: 12px;
    color: #4A2C0B;
}
.sim-bar-hint {
    font-size: 11px;
    opacity: 0.7;
    font-style: italic;
}
.sim-bar-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}
.sim-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    text-decoration: none;
}
.sim-btn-light { background: white; color: #2C2C2A; }
.sim-btn-light:hover { background: #FFF8E8; color: #2C2C2A; text-decoration: none; }
.sim-btn-dark { background: #854F0B; color: white; }
.sim-btn-dark:hover { background: #633806; color: white; }

@media (max-width: 600px) {
    .sim-bar { padding: 6px 10px; font-size: 11px; }
    .sim-bar-hint { display: none; }
    .sim-bar-extra { display: none; }
}


/* ============================================================
   KAPTUR · TEMA CLARO (override de v1.23.2 — no borra lo anterior)
   Sidebar claro + acentos azul Kaptur, como luz.kaptur.es
   ============================================================ */
.sidebar { background: var(--bg-card); color: var(--ink); border-right: 1px solid var(--line); }
.sidebar.is-open { box-shadow: 6px 0 30px rgba(20,24,31,0.18); }
.sidebar-brand { border-bottom: 1px solid var(--line); }
.sidebar-brand .logo-kaptur { background: var(--az-medio); color: #fff; }
.sidebar-brand .name { color: var(--ink); }
.sidebar-brand .dept { color: var(--ink-muted); }
.nav-section-title { color: #9aa2ae; }
.nav-item { color: var(--ink-soft); }
.nav-item .ti { opacity: .85; }
.nav-item:hover { background: var(--bg-soft); color: var(--ink); }
.nav-item.active { background: var(--az-bg); color: var(--az-medio); }
.nav-item.active .ti { opacity: 1; }
.nav-item:active { background: var(--line-soft); }
.nav-submenu-title { color: #9aa2ae; }
.nav-subitem { color: var(--ink-soft); }
.nav-subitem:hover { background: var(--bg-soft); color: var(--ink); }
.nav-subitem.active { background: var(--az-bg); color: var(--az-medio); }
.sidebar-user { border-top: 1px solid var(--line); }
.sidebar-user .name { color: var(--ink); }
.sidebar-user .role { color: var(--ink-muted); }
.avatar { background: var(--az-bg); color: var(--az-medio); }
.logout-btn { color: var(--ink-muted); }
.logout-btn:hover { color: var(--danger); }
/* boton primario al azul de marca, como luz */
.btn-primary { background: var(--az-medio); color: #fff; border-color: var(--az-medio); }
