/* GV-SOFT - estilo fintech (verde/claro), mobile-first, navegación inferior */

:root {
    --primary: #2CB870;        /* verde acción (botones, activos) */
    --primary-strong: #3DDC84; /* verde acento/hero */
    --primary-dark: #22995c;
    --bg: #EEF1F5;
    --card: #ffffff;
    --inset: #F5F7F9;          /* tarjetas internas / campos */
    --text: #12151C;
    --text-muted: #6B7280;
    --border: rgba(15, 23, 42, 0.08);
    --danger: #FF6B5E;
    --success: #3DDC84;
    --warning: #FFB84D;
    --info: #5B8DEF;
    --nav-height: 66px;
    --font-head: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-body: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary-dark); text-decoration: none; }

/* ---------- Header superior ---------- */
.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    color: var(--text);
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--border);
}

.topbar h1 { font-family: var(--font-head); font-size: 19px; font-weight: 800; letter-spacing: -0.02em; }

.topbar .topbar-action {
    color: #06231a;
    font-weight: 700;
    font-size: 13.5px;
    background: var(--primary-strong);
    padding: 8px 15px;
    border-radius: 99px;
    white-space: nowrap;
}


/* ---------- Contenido ---------- */
.container {
    max-width: 680px;
    margin: 0 auto;
    padding: 18px 16px calc(var(--nav-height) + 28px);
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
}

a.card { display: block; color: var(--text); }
a.card:active { background: #fbfcfd; }

.card-title { font-family: var(--font-head); font-weight: 700; font-size: 15px; letter-spacing: -0.01em; }
.card-sub { color: var(--text-muted); font-size: 13px; margin-top: 3px; }
.card-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card-amount { font-family: var(--font-head); font-weight: 700; white-space: nowrap; }

/* ---------- Chips de estado ---------- */
.chip {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 99px;
    background: rgba(61, 220, 132, 0.15);
    color: #1f9e5c;
    margin-top: 6px;
    margin-right: 4px;
}

.chip-success { background: rgba(61, 220, 132, 0.15); color: #1f9e5c; }
.chip-danger { background: rgba(255, 107, 94, 0.15); color: #e0473a; }
.chip-warning { background: rgba(255, 184, 77, 0.18); color: #b97a12; }
.chip-muted { background: #eceef1; color: var(--text-muted); }

/* ---------- Secciones y dashboard ---------- */
.section-title {
    font-family: var(--font-head);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-muted);
    margin: 20px 4px 10px;
}

.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat-card { text-align: center; padding: 20px 12px; }
.stat-value { font-family: var(--font-head); font-size: 28px; font-weight: 800; color: var(--primary); letter-spacing: -0.02em; }
.stat-label { color: var(--text-muted); font-size: 13px; margin-top: 4px; }

/* ---------- Buscador ---------- */
.searchbar { display: flex; gap: 8px; margin-bottom: 14px; }

.searchbar input[type="search"] {
    flex: 1;
    border: 1px solid var(--border);
    border-radius: 99px;
    padding: 11px 18px 11px 44px;
    font-size: 15px;
    background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-4.35-4.35'/%3E%3C/svg%3E") no-repeat 16px center;
    outline: none;
    font-family: inherit;
}

.searchbar input[type="search"]:focus { border-color: var(--primary-strong); }
.searchbar input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }

/* ---------- Contador de resultados ---------- */
.list-count { color: var(--text-muted); font-size: 12.5px; font-weight: 600; margin: 0 4px 12px; }

/* ---------- Matriz de permisos (roles) ---------- */
.permisos-grupo { padding: 14px 16px; }
.permisos-grupo-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.permisos-grupo-titulo { font-family: var(--font-head); font-weight: 800; font-size: 15px; letter-spacing: -0.01em; }
.permisos-grupo-toggle { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--text-muted); }
.permisos-grupo-toggle input { width: 18px; height: 18px; }
.permisos-tabla { width: 100%; border-collapse: collapse; font-size: 13px; }
.permisos-tabla th, .permisos-tabla td { padding: 9px 6px; text-align: center; border-bottom: 1px solid var(--border); }
.permisos-tabla thead th { color: var(--text-muted); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .03em; }
.permisos-tabla .permisos-modulo { text-align: left; font-weight: 600; white-space: nowrap; }
.permisos-tabla input[type="checkbox"] { width: 18px; height: 18px; }

/* ---------- Sesión (configuración) ---------- */
.sesion-card { display: flex; align-items: center; gap: 12px; }
.sesion-card .sesion-info { flex: 1; min-width: 0; }
.sesion-card .sesion-nombre { font-family: var(--font-head); font-weight: 700; }
.sesion-card .sesion-email { color: var(--text-muted); font-size: 13px; }

/* ---------- Configuración (acordeón de módulos) ---------- */
.config-modulo {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    margin-bottom: 10px;
    box-shadow: 0 4px 18px rgba(15, 23, 42, .04);
    overflow: hidden;
}
.config-modulo > summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 16px;
}
.config-modulo > summary::-webkit-details-marker { display: none; }
.config-icon {
    width: 40px; height: 40px; border-radius: 11px; flex-shrink: 0;
    background: #ffffff; border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-head); font-weight: 700; font-size: 16px; color: #4b5563;
}
.config-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.config-nombre { font-family: var(--font-head); font-weight: 700; font-size: 15px; }
.config-desc { color: var(--text-muted); font-size: 12.5px; }
.config-chevron { color: var(--text-muted); font-size: 20px; line-height: 1; transition: transform .2s ease; }
.config-modulo[open] > summary .config-chevron { transform: rotate(90deg); }
.config-body { padding: 0 16px 8px; border-top: 1px solid var(--border); }

/* ---------- Sistema de filtros (control segmentado) ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.filter-group {
    display: inline-flex;
    align-items: center;
    background: var(--inset);
    border: 1px solid var(--border);
    border-radius: 99px;
    padding: 3px;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
}
.filter-group::-webkit-scrollbar { display: none; }
.filter-group a {
    padding: 7px 15px;
    border-radius: 99px;
    white-space: nowrap;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-muted);
    line-height: 1;
}
.filter-group a.active {
    background: var(--card);
    color: var(--text);
    box-shadow: 0 1px 3px rgba(15, 23, 42, .12);
}

/* ---------- Formularios ---------- */
.form-group { margin-bottom: 14px; }

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 15px;
    background: var(--card);
    outline: none;
    font-family: inherit;
    color: var(--text);
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: var(--primary-strong);
    box-shadow: 0 0 0 3px rgba(61, 220, 132, 0.12);
}

.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }

.field-error { color: var(--danger); font-size: 12px; margin-top: 4px; }

/* ---------- Botones ---------- */
.btn {
    display: inline-block;
    border: none;
    border-radius: 99px;
    padding: 13px 22px;
    font-size: 15px;
    font-weight: 700;
    font-family: var(--font-head);
    cursor: pointer;
    text-align: center;
    letter-spacing: -0.01em;
}

.btn-primary { background: var(--primary-strong); color: #06231a; }
.btn-primary:active { background: var(--primary); }
.btn-secondary { background: var(--inset); color: var(--text); border: 1px solid var(--border); }
.btn-danger-link { background: none; color: var(--danger); font-size: 14px; font-family: var(--font-body); font-weight: 600; }
.btn-block { display: block; width: 100%; }

.form-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }

/* ---------- Alertas ---------- */
.alert {
    border-radius: 14px;
    padding: 12px 16px;
    margin-bottom: 14px;
    font-size: 14px;
    font-weight: 500;
}

.alert-success { background: rgba(61, 220, 132, 0.15); color: #147a45; }
.alert-danger { background: rgba(255, 107, 94, 0.15); color: #c23b2f; }

.empty-state {
    text-align: center;
    color: var(--text-muted);
    padding: 48px 16px;
    font-size: 14px;
}

/* ---------- Paginación ---------- */
.pagination-wrap { margin-top: 16px; display: flex; justify-content: center; }

.pagination {
    display: flex;
    list-style: none;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination li a, .pagination li span {
    display: block;
    min-width: 36px;
    padding: 8px 10px;
    text-align: center;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-size: 14px;
}

.pagination li.active span { background: var(--primary-strong); color: #06231a; font-weight: 700; border-color: var(--primary-strong); }
.pagination li.disabled span { color: #c4c4c4; }

/* ---------- Resumen de dinero (3 columnas) ---------- */
.money-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.money-box { background: var(--inset); border: 1px solid var(--border); border-radius: 16px; padding: 14px 10px; text-align: center; }
.money-box .money-label { color: var(--text-muted); font-size: 11px; }
.money-box .money-value { font-family: var(--font-head); font-weight: 700; font-size: 16px; margin-top: 4px; }
.money-value.pos { color: var(--success); }
.money-value.neg { color: var(--danger); }

/* ---------- Selector de periodo ---------- */
.periodo-bar { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; }
.periodo-bar input[type="month"] { flex: 1; border: 1px solid var(--border); border-radius: 99px; padding: 11px 16px; font-size: 15px; background: var(--card); outline: none; font-family: inherit; }

/* Chips seleccionables (períodos) */
.pchips { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.pchip { padding: 9px 15px; border-radius: 99px; font-size: 12.5px; font-weight: 600; border: 1px solid var(--border); background: var(--inset); color: var(--text-muted); cursor: pointer; }
.pchip.active { background: var(--primary-strong); color: #06231a; border-color: var(--primary-strong); }

/* ---------- Hero de pronóstico ---------- */
.forecast-hero {
    background: linear-gradient(160deg, #F3F6F4, #E7F1EA);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 22px;
    margin-bottom: 16px;
}
.forecast-hero .fh-label { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.forecast-hero .fh-value { font-family: var(--font-head); font-weight: 800; font-size: 34px; letter-spacing: -0.02em; }
.forecast-hero .fh-hint { font-size: 12px; color: var(--text-muted); margin-bottom: 18px; }
.fh-bar-label { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 6px; }
.fh-track { height: 10px; background: rgba(15, 23, 42, 0.08); border-radius: 99px; overflow: hidden; margin-bottom: 14px; }
.fh-fill { height: 100%; border-radius: 99px; }

/* ---------- Saldo (hero cuenta corriente) ---------- */
.saldo-hero {
    background: linear-gradient(160deg, #F3F6F4, #E7F1EA);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 22px 16px;
    text-align: center;
    margin-bottom: 14px;
}
.saldo-hero .saldo-label { color: var(--text-muted); font-size: 13px; }
.saldo-hero .saldo-value { font-family: var(--font-head); font-size: 32px; font-weight: 800; margin-top: 4px; letter-spacing: -0.02em; }
.saldo-value.debe { color: var(--danger); }
.saldo-value.favor { color: var(--success); }
.saldo-value.cero { color: var(--text); }

/* ---------- Libro de movimientos (cuenta corriente / caja) ---------- */
.ledger-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.ledger-row:last-child { border-bottom: none; }
.ledger-concepto { font-size: 14px; font-weight: 500; }
.ledger-meta { color: var(--text-muted); font-size: 12px; margin-top: 2px; }
.ledger-amounts { text-align: right; white-space: nowrap; }
.ledger-monto { font-family: var(--font-head); font-weight: 700; font-size: 15px; }
.ledger-monto.debe { color: var(--danger); }
.ledger-monto.haber { color: var(--success); }
.ledger-saldo { color: var(--text-muted); font-size: 12px; margin-top: 2px; }

.inline-actions { display: flex; gap: 8px; margin-bottom: 16px; }
.inline-actions .btn { flex: 1; padding: 11px 14px; font-size: 14px; }

/* ---------- Accesos rápidos ---------- */
.quick-links { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.quick-link { background: var(--card); border: 1px solid var(--border); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 3px; box-shadow: 0 4px 18px rgba(15,23,42,0.04); }
.quick-link-title { font-family: var(--font-head); font-weight: 800; color: var(--text); font-size: 18px; letter-spacing: -0.02em; }
.quick-link-sub { color: var(--text-muted); font-size: 12px; }

/* ---------- Ítems (presupuestos / facturas) ---------- */
.item-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.item-row:last-child { border-bottom: none; }
.item-desc { font-size: 14px; font-weight: 500; }
.item-meta { color: var(--text-muted); font-size: 12px; margin-top: 2px; }
.item-sub { font-family: var(--font-head); font-weight: 700; white-space: nowrap; }
.totales-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; }
.totales-row.total { font-family: var(--font-head); font-size: 17px; font-weight: 800; border-top: 1px solid var(--border); margin-top: 6px; padding-top: 10px; }
.btn-icon-del { background: none; border: none; color: var(--danger); font-size: 18px; cursor: pointer; padding: 0 4px; }

/* ---------- Avatares (iniciales) ---------- */
.avatar { width: 38px; height: 38px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-family: var(--font-head); font-weight: 700; font-size: 13px; color: #0B0E14; flex-shrink: 0; }

/* ---------- Links del cliente (chips con ícono) ---------- */
.cliente-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.link-chip {
    width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
    background: var(--inset); border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted);
}
.link-chip:active { background: #eceef1; }
.link-chip svg { width: 19px; height: 19px; }

/* Repetidor de links en el formulario */
.link-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.link-row select { flex: 0 0 40%; min-width: 0; }
.link-row input { flex: 1; min-width: 0; }
.link-row select, .link-row input {
    border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px;
    font-size: 14px; font-family: inherit; background: var(--card); color: var(--text); outline: none;
}
.link-row select:focus, .link-row input:focus { border-color: var(--primary-strong); }
.link-row .btn-icon-del { flex: 0 0 auto; font-size: 22px; }

/* ---------- Miniaturas en listados ---------- */
.thumb {
    width: 46px; height: 46px; border-radius: 13px; flex-shrink: 0;
    object-fit: cover; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-head); font-weight: 700; font-size: 15px;
    background: #ffffff; color: #4b5563;
    border: 1px solid var(--border);
}
.card-media { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }

/* ---------- Campo de imagen (formularios) ---------- */
.img-field { display: flex; gap: 14px; align-items: flex-start; }
.img-preview {
    width: 84px; height: 84px; border-radius: 16px; flex-shrink: 0;
    background: var(--inset); border: 1px solid var(--border); overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-head); font-weight: 700; color: var(--text-muted); font-size: 20px;
}
.img-preview img { width: 100%; height: 100%; object-fit: cover; }
.img-placeholder { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.img-field input[type="file"] { font-size: 13px; }

/* ---------- Formulario en solo lectura ---------- */
.ro { border: 0; padding: 0; margin: 0; min-inline-size: 0; }
.ro:disabled, fieldset.ro[disabled] { opacity: .75; }
.alert-info { background: var(--inset); color: var(--text-muted); }

/* ---------- Login ---------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card {
    background: var(--card); border: 1px solid var(--border); border-radius: 22px;
    padding: 32px 24px; width: 100%; max-width: 380px;
    box-shadow: 0 10px 40px rgba(15, 23, 42, .08); text-align: center;
}
.login-card form { text-align: left; }
.login-title { font-family: var(--font-head); font-weight: 800; font-size: 24px; letter-spacing: -0.02em; }
.login-sub { color: var(--text-muted); font-size: 14px; margin: 4px 0 20px; }

/* ---------- Slider de actualizaciones ---------- */
.update-slider { position: relative; }
.update-slide { display: none; }
.update-slide.active { display: block; animation: fadeUpd .3s ease; }
@keyframes fadeUpd { from { opacity: 0; } to { opacity: 1; } }
.update-tag { display: inline-block; font-size: 11px; font-weight: 700; color: var(--primary-dark); background: rgba(61,220,132,.15); padding: 3px 10px; border-radius: 99px; }
.update-title { font-family: var(--font-head); font-weight: 700; font-size: 16px; margin-top: 10px; }
.update-desc { color: var(--text-muted); font-size: 13.5px; margin-top: 4px; }
.update-dots { display: flex; gap: 6px; justify-content: center; margin-top: 14px; }
.update-dot { width: 7px; height: 7px; border-radius: 99px; border: none; background: var(--border); cursor: pointer; padding: 0; }
.update-dot.active { background: var(--primary); width: 20px; }

/* Versión en el login */
.login-version { text-align: center; color: var(--text-muted); font-size: 12px; margin-top: 18px; }

/* ---------- Bienvenida ---------- */
.welcome { text-align: center; padding: 60px 20px; }
.welcome .welcome-logo { width: 76px; height: 76px; border-radius: 22px; background: linear-gradient(145deg, #3DDC84, #2CB870); display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; box-shadow: 0 10px 26px rgba(61,220,132,0.35); }
.welcome h2 { font-family: var(--font-head); font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.welcome p { color: var(--text-muted); font-size: 14px; margin-top: 8px; }

/* ---------- Navegación inferior ---------- */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border);
    display: flex;
    z-index: 100;
    padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav .nav-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--text-muted);
    font-size: 10.5px;
    font-weight: 600;
    min-width: 0;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    text-align: center;
}
.bottom-nav .nav-tab[hidden] { display: none; }
.bottom-nav .nav-tab svg { width: 23px; height: 23px; }
.bottom-nav .nav-tab.active { color: var(--primary); }
.bottom-nav .nav-tab span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

/* ---------- Desplegable "Más opciones" (estilo Mercado Pago) ---------- */
.nav-backdrop {
    position: fixed; inset: 0; z-index: 115;
    background: rgba(15, 23, 42, .4);
    opacity: 0; pointer-events: none; transition: opacity .25s ease;
}
.nav-backdrop.open { opacity: 1; pointer-events: auto; }

.nav-sheet {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 120;
    background: var(--card);
    border-radius: 22px 22px 0 0;
    box-shadow: 0 -8px 30px rgba(15, 23, 42, .18);
    padding: 8px 14px calc(18px + env(safe-area-inset-bottom));
    transform: translateY(110%);
    transition: transform .25s ease;
    max-width: 1120px; margin: 0 auto;
}
.nav-sheet.open { transform: translateY(0); }
.nav-sheet-handle { width: 40px; height: 4px; border-radius: 99px; background: var(--border); margin: 8px auto 4px; }
.nav-sheet-title { font-family: var(--font-head); font-weight: 700; font-size: 13px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; margin: 6px 6px 10px; }

/* Las mismas pestañas, pero como filas dentro del desplegable */
.nav-sheet .nav-tab {
    flex-direction: row;
    justify-content: flex-start;
    gap: 14px;
    padding: 14px 12px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    border-radius: 12px;
}
.nav-sheet .nav-tab svg { width: 22px; height: 22px; color: var(--text-muted); }
.nav-sheet .nav-tab.active { background: var(--inset); color: var(--primary); }
.nav-sheet .nav-tab.active svg { color: var(--primary); }

/* =========================================================
   ESCRITORIO: aprovechar el ancho (mobile-first se mantiene).
   El 90% del uso es móvil; en pantallas anchas se ensancha el
   contenido y los listados pasan a varias columnas.
   ========================================================= */
@media (min-width: 900px) {
    .container { max-width: 1120px; padding-left: 24px; padding-right: 24px; }

    /* Listados de tarjetas en 2 columnas */
    .card-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
    .card-list > .card { margin-bottom: 0; }
    .card-list > .empty-state { grid-column: 1 / -1; }

    /* Los formularios no se estiran a todo el ancho (más cómodos de leer) */
    .container > form:not(.searchbar) { max-width: 780px; }

    /* La barra inferior de navegación se centra como el contenido */
    .bottom-nav { max-width: 1120px; margin: 0 auto; border-left: 1px solid var(--border); border-right: 1px solid var(--border); }
}

@media (min-width: 1400px) {
    .container { max-width: 1320px; }
    .card-list { grid-template-columns: 1fr 1fr 1fr; }
    .bottom-nav { max-width: 1320px; }
}
