/* =========================================================================
   MAVEV · Estilo «Sobrio» (2026-10-27, pedido del usuario: «más elegante, tipo administrativo, no tan cargado de
   colores, sin un cambio drástico»). Capa opcional sobre app.css: solo actúa con <html data-estilo="sobrio">
   (menú del usuario › Estilo; se guarda en localStorage «mavev.estilo»; lo aplica theme-init.js antes de pintar).
   Mantiene la estructura, el azul marino y los radios; cambia:
   · tipografía neutra (Inter, local en Content/lib/inter, licencia OFL) con pesos ligeros (400 / 500 / 600);
   · grises más neutros y menos saturados, menú lateral grafito;
   · menos color: íconos, estados, chips y contadores en neutro, el color queda solo en el punto o el número;
   · encabezados de tabla sin mayúsculas, sombras mínimas.
   Para retirarlo: quitar el <link> de Views/Shared/_Head.cshtml (el atributo sin hoja no hace nada).
   ========================================================================= */

@font-face {
    font-family: "Inter";
    src: url("../lib/inter/inter-latin-wght-normal.woff2") format("woff2");
    font-weight: 100 900; font-style: normal; font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Inter";
    src: url("../lib/inter/inter-latin-ext-wght-normal.woff2") format("woff2");
    font-weight: 100 900; font-style: normal; font-display: swap;
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Tokens ---------- */
[data-estilo="sobrio"][data-bs-theme="light"] {
    --app-bg: #f5f6f8;
    --app-surface: #ffffff;
    --app-surface-2: #fafbfc;
    --app-surface-3: #f1f3f6;
    --app-border: #e6e8ec;
    --app-border-strong: #d6dae1;
    --app-text: #18202c;
    --app-text-2: #3a4351;
    --app-muted: #6b7481;

    /* Azul del logo (#355ea3) para acciones, enlaces y lo activo */
    --app-primary: #355ea3;
    --app-primary-rgb: 53, 94, 163;
    --app-primary-hover: #2d5191;
    --app-primary-active: #26457b;
    --app-primary-soft: #eef3fb;
    --app-primary-soft-2: #d8e3f5;
    --app-accent: #355ea3;

    --app-success: #2f7a5b; --app-success-soft: #edf6f1;
    --app-warning: #94680f; --app-warning-soft: #fbf4e6;
    --app-danger: #b23a30;  --app-danger-soft: #fbeeec;
    --app-info: #355ea3;    --app-info-soft: #eef3fb;
    --app-neutral: #5f6876; --app-neutral-soft: #f1f3f6;

    /* Menú lateral en el pizarra oscuro del logo (#2c3149) */
    --sidebar-bg: #262b40;
    --sidebar-text: #b8bed0;
    --sidebar-text-strong: #ffffff;
    --sidebar-muted: #7d849d;
    --sidebar-hover: #2f354d;
    --sidebar-active: #33416a;
    --sidebar-border: #343a53;
    --sidebar-marker: #7aa2ea;

    --shadow-xs: none;
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, .04);
    --shadow-md: 0 4px 14px rgba(16, 24, 40, .07);
    --shadow-lg: 0 12px 32px rgba(16, 24, 40, .12);

    --bs-primary: #355ea3;
    --bs-primary-rgb: 53, 94, 163;
    --bs-link-color: #355ea3;
    --bs-link-color-rgb: 53, 94, 163;
    --bs-link-hover-color: #26457b;
    --bs-focus-ring-color: rgba(53, 94, 163, .2);
}
[data-estilo="sobrio"][data-bs-theme="dark"] {
    --app-bg: #0f141b;
    --app-surface: #161c25;
    --app-surface-2: #131921;
    --app-surface-3: #1c232e;
    --app-border: #262e3a;
    --app-border-strong: #333d4b;
    --app-text: #e6e9ed;
    --app-text-2: #c3c9d2;
    --app-muted: #8b94a1;

    --app-primary: #7aa2ea;
    --app-primary-rgb: 122, 162, 234;
    --app-primary-hover: #92b4ef;
    --app-primary-active: #6690de;
    --app-primary-soft: #1a2438;
    --app-primary-soft-2: #23314d;
    --app-accent: #92b4ef;

    --app-success: #6cc39c; --app-success-soft: #16261f;
    --app-warning: #e0b261; --app-warning-soft: #2b2415;
    --app-danger: #ec948a;  --app-danger-soft: #2e1c1b;
    --app-info: #92b4ef;    --app-info-soft: #1a2438;
    --app-neutral: #9aa3b0; --app-neutral-soft: #1f2631;

    --sidebar-bg: #141826;
    --sidebar-hover: #1c2132;
    --sidebar-active: #243150;
    --sidebar-border: #20253a;
    --sidebar-marker: #7aa2ea;

    --bs-primary: #7aa2ea;
    --bs-primary-rgb: 122, 162, 234;
    --bs-link-color: #92b4ef;
    --bs-link-color-rgb: 146, 180, 239;
    --bs-link-hover-color: #b3cbf4;
}
[data-estilo="sobrio"] {
    --bs-body-font-family: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
    --bs-body-font-size: .9rem;
    --bs-body-font-weight: 400;
}

/* ---------- Base: pesos ligeros ---------- */
[data-estilo="sobrio"] body { font-feature-settings: "cv11", "ss03"; letter-spacing: -.003em; }
[data-estilo="sobrio"] h1, [data-estilo="sobrio"] h2, [data-estilo="sobrio"] h3, [data-estilo="sobrio"] h4,
[data-estilo="sobrio"] h5, [data-estilo="sobrio"] h6, [data-estilo="sobrio"] .h5 { font-weight: 600; letter-spacing: -.012em; }
[data-estilo="sobrio"] strong, [data-estilo="sobrio"] b, [data-estilo="sobrio"] .fw-bold { font-weight: 600 !important; }
[data-estilo="sobrio"] .badge { font-weight: 500; }

/* Botones y campos */
[data-estilo="sobrio"] .btn { font-weight: 500; }
[data-estilo="sobrio"] .btn-soft { color: var(--app-text-2); }
[data-estilo="sobrio"] .btn-soft:hover, [data-estilo="sobrio"] .btn-soft:focus-visible, [data-estilo="sobrio"] .btn-soft.show,
[data-estilo="sobrio"] .icon-btn:hover { background: var(--app-surface-3); border-color: var(--app-border-strong); color: var(--app-text); }
[data-estilo="sobrio"] .form-control, [data-estilo="sobrio"] .form-select { font-weight: 400; }
[data-estilo="sobrio"] .form-control:focus, [data-estilo="sobrio"] .form-select:focus {
    border-color: rgba(var(--app-primary-rgb), .55); box-shadow: 0 0 0 3px rgba(var(--app-primary-rgb), .1);
}
[data-estilo="sobrio"] .form-label { font-weight: 500; color: var(--app-text-2); }

/* ---------- Menú lateral ---------- */
[data-estilo="sobrio"] .brand-text strong { font-weight: 700; }
[data-estilo="sobrio"] .sidebar-search input { background: rgba(255, 255, 255, .04); font-weight: 400; }
[data-estilo="sobrio"] .nav-caption { font-weight: 500; letter-spacing: .02em; text-transform: none; font-size: .74rem; }
[data-estilo="sobrio"] .sidebar .nav-link { font-weight: 450; font-size: .85rem; }
[data-estilo="sobrio"] .sidebar .nav-link.active { font-weight: 500; background: rgba(122, 162, 234, .16); }
[data-estilo="sobrio"] .sidebar .nav-link.active .nav-icon { color: var(--sidebar-marker); }
[data-estilo="sobrio"] .nav-badge { font-weight: 600; background: rgba(255, 255, 255, .08); color: var(--sidebar-text); }
[data-estilo="sobrio"] .migration-card { background: rgba(255, 255, 255, .03); font-weight: 400; }

/* ---------- Barra superior ---------- */
[data-estilo="sobrio"] .topbar-section { font-weight: 500; letter-spacing: 0; text-transform: none; font-size: .76rem; }
[data-estilo="sobrio"] .topbar-heading { font-weight: 600; }
[data-estilo="sobrio"] .quick-search input, [data-estilo="sobrio"] .user-chip-text small,
[data-estilo="sobrio"] .app-switch .form-select { font-weight: 400; }
[data-estilo="sobrio"] .user-chip-text strong { font-weight: 500; }
[data-estilo="sobrio"] .avatar { font-weight: 600; }
[data-estilo="sobrio"] .dropdown-item { font-weight: 400; }
[data-estilo="sobrio"] .dropdown-item:hover { background: var(--app-surface-3); }
[data-estilo="sobrio"] .app-footer { font-weight: 400; }

/* ---------- Encabezado de página y tarjetas ---------- */
[data-estilo="sobrio"] .page-icon { background: var(--app-primary-soft); color: var(--app-primary); width: 42px; height: 42px; font-size: 1.15rem; }
[data-estilo="sobrio"] .page-title { font-weight: 600; font-size: 1.32rem; letter-spacing: -.02em; }
[data-estilo="sobrio"] .page-subtitle, [data-estilo="sobrio"] .app-card-subtitle { font-weight: 400; }
/* Cifras del encabezado: sin caja, separadas por una línea fina */
[data-estilo="sobrio"] .page-header-stats { gap: 0; }
[data-estilo="sobrio"] .mini-stat { background: transparent; border: 0; border-left: 1px solid var(--app-border-strong); border-radius: 0; padding: 2px 18px; min-width: 0; }
[data-estilo="sobrio"] .mini-stat span { font-weight: 500; text-transform: none; letter-spacing: 0; font-size: .76rem; }
[data-estilo="sobrio"] .mini-stat strong { font-weight: 600; font-size: 1.25rem; letter-spacing: -.02em; }
[data-estilo="sobrio"] .app-card { box-shadow: none; }
[data-estilo="sobrio"] .app-card-title { font-weight: 600; }

/* Bienvenida */
[data-estilo="sobrio"] .welcome-head { border-left: 1px solid var(--app-border); }
[data-estilo="sobrio"] .welcome-title { font-weight: 600; letter-spacing: -.02em; }
[data-estilo="sobrio"] .welcome-date, [data-estilo="sobrio"] .welcome-text, [data-estilo="sobrio"] .help-list li,
[data-estilo="sobrio"] .quick-tile small { font-weight: 400; }
[data-estilo="sobrio"] .meta-item { font-weight: 500; background: var(--app-surface-2); border: 1px solid var(--app-border); }
[data-estilo="sobrio"] .meta-item i, [data-estilo="sobrio"] .help-list i { color: var(--app-muted); }
[data-estilo="sobrio"] .section-title { font-weight: 600; }
[data-estilo="sobrio"] .quick-tile strong { font-weight: 500; }
[data-estilo="sobrio"] .quick-tile:hover { background: var(--app-surface-2); border-color: var(--app-border-strong); }
[data-estilo="sobrio"] .quick-icon { background: var(--app-primary-soft); color: var(--app-primary); }
[data-estilo="sobrio"] .quick-arrow { color: var(--app-muted); }
[data-estilo="sobrio"] .quick-tile:hover .quick-arrow { color: var(--app-primary); }
[data-estilo="sobrio"] .section-title { text-transform: none; letter-spacing: 0; font-size: .82rem; color: var(--app-text-2); }

/* ---------- Grillas ---------- */
[data-estilo="sobrio"] .grid-search .form-control { background: var(--app-surface); }
[data-estilo="sobrio"] .filter-chips { background: var(--app-surface); }
[data-estilo="sobrio"] .chip { font-weight: 500; }
[data-estilo="sobrio"] .grid-wrap .dt-info, [data-estilo="sobrio"] .grid-wrap .dt-length { font-weight: 400; }
[data-estilo="sobrio"] .grid-wrap .dt-paging .page-link { font-weight: 500; }
[data-estilo="sobrio"] .grid-scroll-hint { font-weight: 500; }

[data-estilo="sobrio"] table.app-table > thead > tr > th {
    background: var(--app-surface-2) !important; color: var(--app-muted);
    text-transform: none; letter-spacing: 0; font-size: .78rem; font-weight: 600;
}
[data-estilo="sobrio"] table.app-table > tbody > tr > td { font-weight: 400; color: var(--app-text); }
[data-estilo="sobrio"] table.app-table > tbody > tr:hover > td { background: var(--app-primary-soft); }
[data-estilo="sobrio"] table.app-table a { text-decoration-color: rgba(var(--app-primary-rgb), .35); text-underline-offset: 3px; }
[data-estilo="sobrio"] table.app-table a:hover { text-decoration-color: currentColor; }
[data-estilo="sobrio"] .sum-chip small { text-transform: none; letter-spacing: 0; font-size: .74rem; font-weight: 500; }
[data-estilo="sobrio"] .cell-id { font-weight: 500; }
[data-estilo="sobrio"] .cell-strong { font-weight: 500; }
[data-estilo="sobrio"] .cell-sub { font-weight: 400; }
[data-estilo="sobrio"] .sum-chip { background: var(--app-surface); }
[data-estilo="sobrio"] .sum-chip small { font-weight: 600; letter-spacing: .04em; }
[data-estilo="sobrio"] .sum-chip strong { font-weight: 600; }
[data-estilo="sobrio"] .sum-chip.is-danger { background: var(--app-surface); border-color: var(--app-border); }
[data-estilo="sobrio"] .sum-chip.is-danger small { color: var(--app-muted); }

/* ---------- Estados: neutros, el color solo en el punto ---------- */
[data-estilo="sobrio"] .pill {
    --pill-dot: var(--app-neutral);
    background: var(--app-surface) !important; color: var(--app-text-2) !important;
    border: 1px solid var(--app-border-strong); font-weight: 500; padding: 1px 8px;
}
[data-estilo="sobrio"] .pill::before { background: var(--pill-dot); }
[data-estilo="sobrio"] .pill-warning { --pill-dot: var(--app-warning); }
[data-estilo="sobrio"] .pill-success { --pill-dot: var(--app-success); }
[data-estilo="sobrio"] .pill-danger  { --pill-dot: var(--app-danger); }
[data-estilo="sobrio"] .pill-info    { --pill-dot: var(--app-info); }
[data-estilo="sobrio"] .pill-primary { --pill-dot: var(--app-primary); }
[data-estilo="sobrio"] .tag { font-weight: 500; background: var(--app-surface-2); }
[data-estilo="sobrio"] .days { font-weight: 600; background: transparent !important; padding-inline: 0; }
[data-estilo="sobrio"] .days-done { color: var(--app-muted); }
[data-estilo="sobrio"] .yn-yes { background: transparent; }
[data-estilo="sobrio"] .yn-no { background: transparent; color: var(--app-muted); }
[data-estilo="sobrio"] .count-chip { background: var(--app-surface-3); border-color: var(--app-border); color: var(--app-text-2); font-weight: 600; }
[data-estilo="sobrio"] .count-chip:hover { background: var(--app-primary); border-color: var(--app-primary); color: #fff; }
[data-estilo="sobrio"] .tab-count { font-weight: 600; }

/* ---------- Fichas, avisos y ventanas ---------- */
[data-estilo="sobrio"] .client-avatar, [data-estilo="sobrio"] .client-avatar.is-juridica {
    background: var(--app-primary-soft); color: var(--app-primary); font-weight: 600;
}
[data-estilo="sobrio"] .client-avatar-sm { background: var(--app-primary-soft); color: var(--app-primary); font-weight: 600; }
[data-estilo="sobrio"] .info-note { background: var(--app-surface-2); color: var(--app-text-2); border: 1px solid var(--app-border); border-left: 3px solid var(--app-info); font-weight: 400; }
[data-estilo="sobrio"] .info-note.is-warning { background: var(--app-surface-2); color: var(--app-text-2); border-left-color: var(--app-warning); }
[data-estilo="sobrio"] .notice { font-weight: 400; }
[data-estilo="sobrio"] .yn-row { font-weight: 500; }
[data-estilo="sobrio"] .status-card h1 { font-weight: 600; }
[data-estilo="sobrio"] .status-card p { font-weight: 400; }
[data-estilo="sobrio"] .modal-backdrop.show { opacity: .45; }
