/* ============================================================
   Directorio Telefónico · Fundación Villa del Cine
   Sistema visual minimalista con iconos flotantes
   ============================================================ */

:root {
    --bg: #f4f5f7;
    --surface: #ffffff;
    --surface-2: #f8f9fb;
    --surface-3: #eef1f6;
    --ink: #0f172a;
    --ink-2: #475569;
    --muted: #7c8798;
    --line: #e7e9ef;
    --line-strong: #d8dce6;
    --accent: #4f46e5;
    --accent-ink: #3730a3;
    --accent-soft: #eef2ff;
    --violet: #8b5cf6;
    --teal: #0d9488;
    --teal-soft: #ccfbf1;
    --ok: #0f9d58;
    --ok-soft: #e7f7ee;
    --info: #0369a1;
    --info-soft: #e0f2fe;
    --warn: #b45309;
    --warn-soft: #fef3c7;
    --danger: #dc2626;
    --danger-soft: #fee2e2;
    --radius: 20px;
    --radius-sm: 12px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
    --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 18px 40px -28px rgba(15, 23, 42, .28);
    --shadow-lg: 0 30px 70px -40px rgba(15, 23, 42, .45);
    --font: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    --mono: "JetBrains Mono", "Cascadia Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0b1120;
        --surface: #111827;
        --surface-2: #172033;
        --surface-3: #1e293b;
        --ink: #e8edf5;
        --ink-2: #c3cddd;
        --muted: #93a1b7;
        --line: #22304a;
        --line-strong: #2c3c5a;
        --accent: #8f8bff;
        --accent-ink: #c7c4ff;
        --accent-soft: rgba(99, 102, 241, .18);
        --teal-soft: rgba(13, 148, 136, .2);
        --ok-soft: rgba(15, 157, 88, .16);
        --info-soft: rgba(3, 105, 161, .22);
        --warn-soft: rgba(180, 83, 9, .22);
        --danger-soft: rgba(220, 38, 38, .18);
        --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 20px 44px -28px rgba(0, 0, 0, .7);
    }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.55;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body.app-body {
    background:
        radial-gradient(1100px 520px at 82% -12%, rgba(79, 70, 229, .10), transparent 62%),
        radial-gradient(900px 480px at -10% 8%, rgba(13, 148, 136, .08), transparent 58%),
        var(--bg);
    background-attachment: fixed;
}

a { color: inherit; text-decoration: none; }

button, input, select, textarea { font: inherit; color: inherit; }

svg.icon { width: 20px; height: 20px; flex: none; }

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
    position: absolute; left: 16px; top: -60px; z-index: 200;
    background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px;
    transition: top .2s ease;
}
.skip-link:focus { top: 16px; }

:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent);
    outline-offset: 2px;
}

/* ---------- Estructura ---------- */

.shell {
    display: grid;
    grid-template-columns: 264px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding: 24px 18px 18px;
    border-right: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface) 72%, transparent);
    backdrop-filter: blur(18px) saturate(140%);
    z-index: 40;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 8px;
}

.brand__mark {
    width: 42px; height: 42px;
    display: grid; place-items: center;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(140deg, #4f46e5, #7c3aed 55%, #0d9488);
    box-shadow: 0 14px 26px -14px rgba(79, 70, 229, .75);
}
.brand__mark svg { width: 21px; height: 21px; }

.brand__text { display: grid; line-height: 1.15; }
.brand__text strong { font-size: 16px; letter-spacing: -.02em; }
.brand__text small { font-size: 11.5px; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }

.nav { display: flex; flex-direction: column; gap: 3px; overflow-y: auto; }

.nav__label {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--muted);
    padding: 14px 12px 6px;
}

.nav__item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 12px;
    border-radius: 12px;
    color: var(--ink-2);
    font-size: 14px;
    font-weight: 550;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}
.nav__item:hover { background: var(--surface-2); color: var(--ink); transform: translateX(2px); }
.nav__item.is-active { background: var(--accent-soft); color: var(--accent-ink); }
.nav__item.is-active .nav__icon { color: var(--accent); }
.nav__icon { width: 19px; height: 19px; color: var(--muted); transition: color .18s ease; }

.sidebar__foot { margin-top: auto; display: grid; gap: 12px; }

.manual-card {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 12px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--accent-soft) 82%, transparent), transparent),
        var(--surface);
    transition: transform .2s ease, box-shadow .2s ease;
}
.manual-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.manual-card__icon {
    width: 36px; height: 36px; border-radius: 11px;
    display: grid; place-items: center;
    background: var(--surface); color: var(--accent);
    border: 1px solid var(--line);
}
.manual-card__icon svg { width: 18px; height: 18px; }
.manual-card strong { display: block; font-size: 13px; }
.manual-card small { font-size: 11.5px; color: var(--muted); }
.manual-card__arrow { width: 16px; height: 16px; margin-left: auto; color: var(--muted); }

.user-mini {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 14px;
}
.user-mini__text { display: grid; line-height: 1.2; min-width: 0; }
.user-mini__text strong { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-mini__text small { font-size: 11.5px; color: var(--muted); }
.user-mini .icon-btn { margin-left: auto; }

.main { display: flex; flex-direction: column; min-width: 0; }

.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 18px;
    height: 70px;
    padding: 0 clamp(18px, 3vw, 34px);
    border-bottom: 1px solid color-mix(in srgb, var(--line) 75%, transparent);
    background: color-mix(in srgb, var(--bg) 78%, transparent);
    backdrop-filter: blur(16px) saturate(150%);
}

.menu-btn { display: none; }

.crumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    color: var(--muted);
    white-space: nowrap;
}
.crumbs a:hover { color: var(--ink); }
.crumbs strong { color: var(--ink); font-weight: 600; }
.crumbs__sep { width: 14px; height: 14px; opacity: .55; }

.topbar__actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }

.quick-search__field {
    display: flex;
    align-items: center;
    gap: 9px;
    height: 38px;
    padding: 0 13px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    min-width: 250px;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.quick-search__field:focus-within {
    border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent);
    background: var(--surface);
}
.quick-search__field svg { width: 17px; height: 17px; color: var(--muted); }
.quick-search__field input {
    border: 0; background: transparent; outline: none; width: 100%; font-size: 13.5px;
}
.quick-search__field input::placeholder { color: var(--muted); }

.user-chip { display: flex; align-items: center; gap: 9px; }
.user-chip__name { font-size: 13px; font-weight: 600; }

.content {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: clamp(20px, 3vw, 34px) clamp(16px, 3vw, 34px) 90px;
}

/* ---------- Avatares ---------- */

.avatar {
    --hue: 240;
    width: 36px; height: 36px;
    flex: none;
    display: inline-grid;
    place-items: center;
    border-radius: 11px;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: .02em;
    color: hsl(var(--hue) 62% 30%);
    background: hsl(var(--hue) 84% 94%);
    border: 1px solid hsl(var(--hue) 60% 88%);
}
@media (prefers-color-scheme: dark) {
    .avatar {
        color: hsl(var(--hue) 90% 86%);
        background: hsl(var(--hue) 40% 24%);
        border-color: hsl(var(--hue) 35% 32%);
    }
}

/* ---------- Encabezado de página ---------- */

.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}
.page-head h1 {
    margin: 0 0 4px;
    font-size: clamp(24px, 2.5vw, 31px);
    letter-spacing: -.035em;
    font-weight: 660;
    line-height: 1.15;
}
.page-head p { margin: 0; color: var(--muted); font-size: 14px; max-width: 62ch; }
.page-head__actions { display: flex; gap: 10px; flex-wrap: wrap; }

.eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--accent);
    margin: 0 0 8px;
}

/* ---------- Tarjetas ---------- */

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.card--pad { padding: 22px; }
.card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--line);
}
.card__head h2 { margin: 0; font-size: 15.5px; letter-spacing: -.015em; }
.card__head p { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }
.card__body { padding: 20px 22px; }
.card__link { font-size: 13px; color: var(--accent); font-weight: 600; display: inline-flex; align-items: center; gap: 5px; }
.card__link svg { width: 15px; height: 15px; }

/* ---------- Hero con iconos flotantes ---------- */

.hero {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    padding: clamp(24px, 3.4vw, 40px);
    margin-bottom: 26px;
    border: 1px solid color-mix(in srgb, var(--accent) 14%, var(--line));
    background:
        radial-gradient(700px 300px at 88% 10%, rgba(139, 92, 246, .18), transparent 62%),
        radial-gradient(600px 300px at 70% 90%, rgba(13, 148, 136, .14), transparent 60%),
        linear-gradient(135deg, #eef2ff 0%, #f7f5ff 46%, #f2fdfb 100%);
    min-height: 210px;
    display: flex;
    align-items: center;
}
@media (prefers-color-scheme: dark) {
    .hero {
        background:
            radial-gradient(700px 300px at 88% 10%, rgba(139, 92, 246, .22), transparent 62%),
            radial-gradient(600px 300px at 70% 90%, rgba(13, 148, 136, .18), transparent 60%),
            linear-gradient(135deg, #141c31, #151a2e 55%, #0e1c22);
    }
}
.hero__text { position: relative; z-index: 2; max-width: 58ch; }
.hero h1 {
    margin: 0 0 10px;
    font-size: clamp(26px, 3.4vw, 40px);
    line-height: 1.08;
    letter-spacing: -.045em;
    font-weight: 680;
}
.hero p { margin: 0 0 20px; color: var(--ink-2); font-size: 15px; max-width: 52ch; }
.hero__meta { display: flex; flex-wrap: wrap; gap: 8px; }
.hero__meta span {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 12.5px; font-weight: 600; color: var(--ink-2);
    background: color-mix(in srgb, var(--surface) 72%, transparent);
    border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
    border-radius: 999px; padding: 6px 12px;
}
.hero__meta svg { width: 14px; height: 14px; color: var(--accent); }

.hero__art {
    position: absolute;
    inset: 0 0 0 auto;
    width: min(46%, 460px);
    pointer-events: none;
}

.float-tile {
    position: absolute;
    width: var(--size, 60px);
    height: var(--size, 60px);
    display: grid;
    place-items: center;
    border-radius: 19px;
    color: #fff;
    background: linear-gradient(145deg, hsl(var(--h, 250) 78% 62%), hsl(var(--h2, 265) 72% 48%));
    box-shadow:
        0 22px 36px -20px hsl(var(--h, 250) 70% 40% / .8),
        inset 0 1px 0 rgba(255, 255, 255, .32);
    transform: rotate(var(--rot, 0deg));
    animation: floaty var(--dur, 7s) ease-in-out infinite;
    animation-delay: var(--delay, 0s);
}
.float-tile svg { width: calc(var(--size, 60px) * .42); height: calc(var(--size, 60px) * .42); }
.float-tile--glass {
    background: color-mix(in srgb, var(--surface) 62%, transparent);
    color: var(--accent);
    border: 1px solid color-mix(in srgb, var(--surface) 80%, transparent);
    box-shadow: 0 20px 40px -26px rgba(15, 23, 42, .5);
    backdrop-filter: blur(8px);
}

@keyframes floaty {
    0%, 100% { transform: translate3d(0, 0, 0) rotate(var(--rot, 0deg)); }
    50% { transform: translate3d(0, -13px, 0) rotate(calc(var(--rot, 0deg) + 2.5deg)); }
}

/* ---------- Estadísticas ---------- */

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 16px;
    margin-bottom: 26px;
}
.stat {
    position: relative;
    overflow: hidden;
    padding: 19px 20px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: transform .22s ease, box-shadow .22s ease;
}
.stat:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.stat__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.stat__icon {
    width: 40px; height: 40px;
    display: grid; place-items: center;
    border-radius: 13px;
    background: var(--accent-soft);
    color: var(--accent);
}
.stat__icon svg { width: 19px; height: 19px; }
.stat__icon--ok { background: var(--ok-soft); color: var(--ok); }
.stat__icon--info { background: var(--info-soft); color: var(--info); }
.stat__icon--warn { background: var(--warn-soft); color: var(--warn); }
.stat__icon--teal { background: var(--teal-soft); color: var(--teal); }
.stat__value {
    font-size: 33px;
    font-weight: 680;
    letter-spacing: -.04em;
    line-height: 1.05;
    font-variant-numeric: tabular-nums;
}
.stat__label { margin-top: 3px; font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.stat__hint { margin-top: 10px; font-size: 12.5px; color: var(--ink-2); }
.stat__spark { position: absolute; right: -12px; bottom: -22px; width: 90px; height: 90px; border-radius: 50%; background: var(--accent-soft); opacity: .55; }

/* ---------- Grillas ---------- */

.grid { display: grid; gap: 18px; }
.grid--2 { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--sidebar { grid-template-columns: minmax(0, 1fr) 330px; }

/* ---------- Tablas ---------- */

.table-tools {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
}
.table-tools__search {
    display: flex; align-items: center; gap: 8px;
    height: 38px; padding: 0 12px;
    border: 1px solid var(--line-strong); border-radius: 11px;
    background: var(--surface-2);
    flex: 1 1 240px; max-width: 340px;
}
.table-tools__search svg { width: 16px; height: 16px; color: var(--muted); }
.table-tools__search input { border: 0; background: transparent; outline: none; width: 100%; font-size: 13.5px; }
.table-tools__count { margin-left: auto; font-size: 12.5px; color: var(--muted); }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; }
.table th {
    position: sticky; top: 0;
    text-align: left;
    padding: 11px 18px;
    font-size: 10.8px;
    font-weight: 700;
    letter-spacing: .11em;
    text-transform: uppercase;
    color: var(--muted);
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
    z-index: 1;
}
.table td {
    padding: 13px 18px;
    border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
    font-size: 13.8px;
    vertical-align: middle;
}
.table tbody tr { transition: background .15s ease; }
.table tbody tr:hover { background: var(--surface-2); }
.table tbody tr:last-child td { border-bottom: 0; }
.table .num { font-variant-numeric: tabular-nums; }
.table .right { text-align: right; }
.table .nowrap { white-space: nowrap; }

.person { display: flex; align-items: center; gap: 11px; min-width: 220px; }
.person__text { display: grid; line-height: 1.3; min-width: 0; }
.person__text strong { font-weight: 620; font-size: 13.8px; }
.person__text small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }

.ext {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 11px;
    border-radius: 10px;
    border: 1px solid var(--line-strong);
    background: var(--surface-2);
    font-family: var(--mono);
    font-size: 13px;
    font-weight: 650;
    letter-spacing: .01em;
    cursor: pointer;
    transition: all .18s ease;
}
.ext:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); color: var(--accent-ink); background: var(--accent-soft); }
.ext svg { width: 13px; height: 13px; opacity: .55; }
.ext--empty { color: var(--muted); font-family: var(--font); font-weight: 500; cursor: default; background: transparent; border-style: dashed; }

.row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.row-actions .icon-btn { width: 32px; height: 32px; border-radius: 9px; }
.row-actions .icon-btn svg { width: 16px; height: 16px; }

/* ---------- Insignias ---------- */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 650;
    letter-spacing: .01em;
    border: 1px solid transparent;
    white-space: nowrap;
}
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge--ok { color: var(--ok); background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 22%, transparent); }
.badge--info { color: var(--info); background: var(--info-soft); border-color: color-mix(in srgb, var(--info) 20%, transparent); }
.badge--muted { color: var(--muted); background: var(--surface-2); border-color: var(--line-strong); }
.badge--warn { color: var(--warn); background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 22%, transparent); }
.badge--plain { background: var(--surface-2); color: var(--ink-2); border-color: var(--line); }
.badge--plain::before { display: none; }

/* ---------- Botones ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 40px;
    padding: 0 16px;
    border-radius: 12px;
    border: 1px solid transparent;
    font-size: 13.5px;
    font-weight: 620;
    cursor: pointer;
    white-space: nowrap;
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease, color .16s ease;
}
.btn svg { width: 17px; height: 17px; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--ink); color: var(--surface); box-shadow: 0 10px 22px -14px rgba(15, 23, 42, .7); }
.btn--primary:hover { background: color-mix(in srgb, var(--ink) 88%, #4f46e5); box-shadow: 0 14px 26px -14px rgba(15, 23, 42, .65); }
.btn--accent { background: var(--accent); color: #fff; box-shadow: 0 12px 24px -14px color-mix(in srgb, var(--accent) 75%, transparent); }
.btn--accent:hover { filter: brightness(1.05); }
.btn--ghost { background: var(--surface); border-color: var(--line-strong); color: var(--ink-2); }
.btn--ghost:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); color: var(--ink); background: var(--surface); }
.btn--danger { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 24%, transparent); }
.btn--danger:hover { background: var(--danger); color: #fff; }
.btn--sm { height: 33px; padding: 0 11px; font-size: 12.5px; border-radius: 9px; }
.btn--sm svg { width: 15px; height: 15px; }
.btn--block { width: 100%; }

.icon-btn {
    width: 38px; height: 38px;
    display: inline-grid; place-items: center;
    border-radius: 11px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink-2);
    cursor: pointer;
    transition: all .16s ease;
}
.icon-btn:hover { color: var(--ink); border-color: var(--line-strong); background: var(--surface-2); }
.icon-btn--ghost { border-color: transparent; background: transparent; color: var(--muted); }
.icon-btn--ghost:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn--danger:hover { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, transparent); background: var(--danger-soft); }
.icon-btn svg { width: 18px; height: 18px; }

/* ---------- Formularios ---------- */

.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field > label { font-size: 12.5px; font-weight: 650; color: var(--ink-2); }
.field small { font-size: 12px; color: var(--muted); }
.input, .select, .textarea {
    width: 100%;
    height: 42px;
    padding: 0 13px;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: var(--surface);
    font-size: 14px;
    transition: border-color .16s ease, box-shadow .16s ease;
}
.textarea { height: auto; min-height: 90px; padding: 11px 13px; resize: vertical; }
.input::placeholder { color: var(--muted); }
.input:focus, .select:focus, .textarea:focus {
    outline: none;
    border-color: color-mix(in srgb, var(--accent) 60%, var(--line-strong));
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 13%, transparent);
}
.select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237c8798' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 38px;
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-hint { font-size: 12.5px; color: var(--muted); }
.form-error { font-size: 12.5px; color: var(--danger); font-weight: 600; }

.checkbox { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--ink-2); }
.checkbox input { width: 17px; height: 17px; accent-color: var(--accent); }

/* ---------- Chips y filtros ---------- */

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 7px 13px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface);
    font-size: 12.8px;
    font-weight: 550;
    color: var(--ink-2);
    transition: all .16s ease;
}
.chip:hover { border-color: var(--line-strong); color: var(--ink); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.chip span { font-size: 11.5px; opacity: .7; }

/* ---------- Barras y dona ---------- */

.bar-row { display: grid; gap: 7px; padding: 9px 0; }
.bar-row__top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 13px; }
.bar-row__top span { color: var(--ink-2); }
.bar-row__top strong { font-variant-numeric: tabular-nums; font-size: 13px; }
.bar { height: 7px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.bar__fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent), var(--violet));
    width: var(--w, 0%);
    transition: width .6s cubic-bezier(.2, .7, .2, 1);
}

.donut-wrap { display: flex; align-items: center; gap: 18px; }
.donut {
    width: 128px; height: 128px;
    flex: none;
    border-radius: 50%;
    display: grid; place-items: center;
    background: conic-gradient(var(--accent) 0 var(--p1, 0%), var(--teal) var(--p1, 0%) var(--p2, 0%), var(--surface-3) var(--p2, 0%) 100%);
    position: relative;
}
.donut::after {
    content: "";
    position: absolute;
    inset: 13px;
    border-radius: 50%;
    background: var(--surface);
}
.donut__value { position: relative; z-index: 1; text-align: center; line-height: 1.05; }
.donut__value strong { display: block; font-size: 25px; letter-spacing: -.04em; }
.donut__value small { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.legend { display: grid; gap: 9px; font-size: 12.5px; color: var(--ink-2); }
.legend span { display: flex; align-items: center; gap: 8px; }
.legend i { width: 9px; height: 9px; border-radius: 3px; background: var(--accent); }
.legend i.teal { background: var(--teal); }
.legend i.soft { background: var(--surface-3); }

/* ---------- Listas compactas ---------- */

.list { display: grid; }
.list__item {
    display: flex; align-items: center; gap: 11px;
    padding: 11px 0;
    border-bottom: 1px solid color-mix(in srgb, var(--line) 65%, transparent);
}
.list__item:last-child { border-bottom: 0; }
.list__text { display: grid; line-height: 1.3; min-width: 0; flex: 1; }
.list__text strong { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list__text small { font-size: 12px; color: var(--muted); }
.list__meta { font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); }

/* ---------- Vacíos ---------- */

.empty {
    display: grid;
    place-items: center;
    gap: 10px;
    padding: 48px 24px;
    text-align: center;
}
.empty__icon {
    width: 54px; height: 54px;
    display: grid; place-items: center;
    border-radius: 17px;
    background: var(--surface-2);
    color: var(--muted);
    border: 1px dashed var(--line-strong);
}
.empty strong { font-size: 14.5px; }
.empty p { margin: 0; color: var(--muted); font-size: 13px; max-width: 40ch; }

/* ---------- Modales ---------- */

.modal {
    border: 0;
    padding: 0;
    width: min(540px, calc(100% - 28px));
    border-radius: 24px;
    background: var(--surface);
    color: var(--ink);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}
.modal[open] { animation: modalIn .24s cubic-bezier(.2, .8, .2, 1); }
.modal::backdrop { background: rgba(15, 23, 42, .48); backdrop-filter: blur(5px); }
.modal__head {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
    padding: 20px 22px 14px;
}
.modal__head h2 { margin: 0; font-size: 18px; letter-spacing: -.02em; }
.modal__head p { margin: 3px 0 0; font-size: 13px; color: var(--muted); }
.modal__body { padding: 4px 22px 18px; }
.modal__foot {
    display: flex; justify-content: flex-end; gap: 10px;
    padding: 15px 22px;
    border-top: 1px solid var(--line);
    background: var(--surface-2);
}

@keyframes modalIn {
    from { opacity: 0; transform: translateY(12px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------- Avisos ---------- */

.toasts {
    position: fixed;
    left: 22px;
    bottom: 22px;
    z-index: 90;
    display: grid;
    gap: 9px;
    max-width: min(380px, calc(100vw - 44px));
}
.toast {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 12px 12px 13px;
    border-radius: 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    font-size: 13px;
    animation: toastIn .28s cubic-bezier(.2, .8, .2, 1);
}
.toast.is-hiding { animation: toastOut .22s ease forwards; }
.toast__icon { width: 26px; height: 26px; flex: none; display: grid; place-items: center; border-radius: 8px; }
.toast__icon svg { width: 15px; height: 15px; }
.toast--ok .toast__icon { background: var(--ok-soft); color: var(--ok); }
.toast--error .toast__icon { background: var(--danger-soft); color: var(--danger); }
.toast--info .toast__icon { background: var(--info-soft); color: var(--info); }
.toast__close { margin-left: auto; border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 2px; }
.toast__close svg { width: 14px; height: 14px; }

@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px); } }

/* ---------- Muelle flotante ---------- */

.dock {
    position: fixed;
    right: 26px;
    bottom: 26px;
    z-index: 60;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 14px;
    pointer-events: none;
}
.dock__fab { pointer-events: auto; }
.dock__actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px) scale(.97);
    transition: opacity .2s ease, transform .2s ease;
}
.dock.is-open .dock__actions { opacity: 1; pointer-events: auto; transform: none; }
.dock__action { display: flex; align-items: center; gap: 10px; }
.dock__label {
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    padding: 7px 12px;
    border-radius: 10px;
    font-size: 12.5px;
    font-weight: 600;
    opacity: 0;
    transform: translateX(6px);
    transition: opacity .18s ease, transform .18s ease;
}
.dock__action:hover .dock__label { opacity: 1; transform: none; }
.dock__button {
    width: 46px; height: 46px;
    display: grid; place-items: center;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--ink-2);
    box-shadow: 0 12px 24px -16px rgba(15, 23, 42, .6);
    transition: transform .18s ease, color .18s ease, border-color .18s ease;
}
.dock__button svg { width: 19px; height: 19px; }
.dock__action:hover .dock__button { transform: translateY(-2px); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.dock__fab {
    width: 58px; height: 58px;
    display: grid; place-items: center;
    border: 0;
    border-radius: 50%;
    background: linear-gradient(145deg, #1e293b, #0f172a);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 22px 40px -18px rgba(15, 23, 42, .75);
    transition: transform .2s ease, box-shadow .2s ease;
}
.dock__fab svg { width: 24px; height: 24px; transition: transform .25s ease; }
.dock__fab:hover { transform: translateY(-3px); box-shadow: 0 26px 46px -18px rgba(15, 23, 42, .7); }
.dock.is-open .dock__fab svg { transform: rotate(135deg); }

/* ---------- Login ---------- */

.auth-body {
    min-height: 100vh;
    background: #0b1120;
    color: #e8edf5;
    overflow-x: hidden;
}
.auth {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.04fr .96fr;
}
.auth__aside {
    position: relative;
    overflow: hidden;
    padding: clamp(32px, 5vw, 64px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background:
        radial-gradient(700px 420px at 20% 10%, rgba(79, 70, 229, .38), transparent 60%),
        radial-gradient(600px 380px at 85% 85%, rgba(13, 148, 136, .28), transparent 60%),
        #0a0f1d;
}
.auth__aside::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, .12) 1px, transparent 1px);
    background-size: 26px 26px;
    mask-image: radial-gradient(ellipse at 30% 20%, #000 10%, transparent 68%);
    opacity: .5;
    pointer-events: none;
}
.auth__brand { position: relative; z-index: 3; display: flex; align-items: center; gap: 12px; }
.auth__brand .brand__mark { width: 44px; height: 44px; }
.auth__brand strong { display: block; font-size: 15px; letter-spacing: -.01em; }
.auth__brand small { display: block; font-size: 11.5px; color: #93a1b7; letter-spacing: .08em; text-transform: uppercase; }

.auth__headline { position: relative; z-index: 3; max-width: 30ch; margin: 40px 0; }
.auth__headline h1 {
    font-size: clamp(34px, 4.4vw, 54px);
    line-height: 1.03;
    letter-spacing: -.05em;
    font-weight: 680;
    margin: 0 0 16px;
}
.auth__headline p { color: #a7b3c6; font-size: 15px; margin: 0; max-width: 42ch; }

.auth__foot { position: relative; z-index: 3; display: flex; gap: 22px; flex-wrap: wrap; font-size: 12px; color: #7f8da3; }
.auth__foot span { display: inline-flex; align-items: center; gap: 6px; }
.auth__foot svg { width: 14px; height: 14px; color: #8b9ab1; }

.auth__floats {
    position: absolute;
    top: clamp(14px, 2.4vh, 28px);
    right: clamp(16px, 2.6vw, 28px);
    width: clamp(120px, 18vh, 166px);
    height: clamp(120px, 18vh, 166px);
    z-index: 1;
    pointer-events: none;
}
.auth__floats .float-tile { opacity: .92; }

.auth__panel {
    display: grid;
    place-items: center;
    padding: clamp(20px, 4vw, 46px);
    background: #f4f5f7;
    color: #0f172a;
    /* La tarjeta es clara: fija los colores para que el modo oscuro del
       sistema no invierta botones ni campos dentro de ella. */
    color-scheme: light;
    --ink: #0f172a;
    --ink-2: #475569;
    --muted: #7c8798;
    --surface: #ffffff;
    --surface-2: #f8f9fb;
    --line: #e7e9ef;
    --line-strong: #d8dce6;
    --accent: #4f46e5;
    --accent-ink: #3730a3;
    --accent-soft: #eef2ff;
}
.auth__wrap { width: min(410px, 100%); display: grid; gap: 12px; justify-items: center; }
.auth__back { margin: 0; font-size: 12.5px; }
.auth__back a { display: inline-flex; align-items: center; gap: 6px; color: #7c8798; font-weight: 600; }
.auth__back a:hover { color: #0f172a; }
.auth__back svg { width: 14px; height: 14px; }
.auth__wrap .auth__card { width: 100%; }
.auth__card {
    width: 100%;
    background: #fff;
    border: 1px solid #e7e9ef;
    border-radius: 24px;
    padding: clamp(20px, 3.4vw, 30px);
    box-shadow: 0 40px 90px -60px rgba(2, 6, 23, .5);
    animation: rise .5s cubic-bezier(.2, .7, .2, 1) both;
}
.auth__card h2 { margin: 0 0 4px; font-size: 23px; letter-spacing: -.03em; }
.auth__card > p { margin: 0 0 18px; color: #7c8798; font-size: 13.5px; }
.auth__card .field > label { color: #475569; }
.auth__card .input { background: #f8f9fb; border-color: #dbe0e9; }
.auth__card .input:focus { background: #fff; }
.auth__card .form { gap: 12px; }
.auth__hint {
    margin-top: 14px;
    padding: 11px 13px;
    border-radius: 12px;
    background: #f1f5ff;
    border: 1px solid #e0e7ff;
    font-size: 12px;
    color: #4b5563;
    display: flex;
    gap: 8px;
    align-items: flex-start;
}
.auth__hint svg { width: 15px; height: 15px; color: #4f46e5; flex: none; margin-top: 1px; }

/* ---------- Página de error ---------- */

.error-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(700px 400px at 50% -10%, rgba(79, 70, 229, .16), transparent 65%),
        var(--bg);
}
.error-card {
    width: min(520px, 100%);
    text-align: center;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 26px;
    padding: 40px 32px;
    box-shadow: var(--shadow);
}
.error-card__icon {
    width: 62px; height: 62px;
    margin: 0 auto 16px;
    display: grid; place-items: center;
    border-radius: 18px;
    background: var(--accent-soft);
    color: var(--accent);
}
.error-card__icon svg { width: 27px; height: 27px; }
.error-card h1 { margin: 0 0 8px; font-size: 25px; letter-spacing: -.03em; }
.error-card p { margin: 0 auto 22px; color: var(--muted); font-size: 14px; max-width: 42ch; }
.error-card__actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }

/* ---------- Animación de entrada ---------- */

.reveal { animation: rise .55s cubic-bezier(.2, .7, .2, 1) both; animation-delay: var(--d, 0s); }
@keyframes rise {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
}

/* ---------- Portada pública ---------- */

.pub-body {
    background:
        radial-gradient(1000px 480px at 85% -10%, rgba(79, 70, 229, .10), transparent 60%),
        radial-gradient(800px 420px at 0% 6%, rgba(13, 148, 136, .08), transparent 55%),
        var(--bg);
    background-attachment: fixed;
}

.pub-head {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 13px clamp(16px, 3vw, 34px);
    border-bottom: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: blur(16px) saturate(150%);
}
.pub-head__right { display: flex; align-items: center; gap: 14px; }
.pub-head__note {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--muted);
}

.pub-main {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 clamp(16px, 3vw, 32px) 30px;
}

.pub-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    min-height: 240px;
    margin: 26px 0 36px;
    padding: clamp(24px, 4vw, 46px);
    border-radius: 30px;
    border: 1px solid color-mix(in srgb, var(--accent) 14%, var(--line));
    background:
        radial-gradient(700px 300px at 88% 8%, rgba(139, 92, 246, .18), transparent 62%),
        radial-gradient(600px 300px at 72% 95%, rgba(13, 148, 136, .14), transparent 60%),
        linear-gradient(135deg, #eef2ff 0%, #f7f5ff 48%, #f2fdfb 100%);
}
@media (prefers-color-scheme: dark) {
    .pub-hero {
        background:
            radial-gradient(700px 300px at 88% 8%, rgba(139, 92, 246, .22), transparent 62%),
            radial-gradient(600px 300px at 72% 95%, rgba(13, 148, 136, .18), transparent 60%),
            linear-gradient(135deg, #141c31, #151a2e 55%, #0e1c22);
    }
}
.pub-hero__text { position: relative; z-index: 2; max-width: 62ch; }
.pub-hero h1 {
    margin: 0 0 10px;
    font-size: clamp(30px, 4.4vw, 48px);
    line-height: 1.04;
    letter-spacing: -.05em;
    font-weight: 680;
}
.pub-hero p { margin: 0; color: var(--ink-2); font-size: 14.5px; max-width: 56ch; }
.pub-hero__art { position: absolute; inset: 0 0 0 auto; width: min(38%, 360px); pointer-events: none; }

.pub-search { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; max-width: 620px; }
.pub-search__field {
    flex: 1 1 250px;
    display: flex;
    align-items: center;
    gap: 10px;
    height: 46px;
    padding: 0 14px;
    border-radius: 13px;
    border: 1px solid color-mix(in srgb, var(--line-strong) 80%, transparent);
    background: var(--surface);
    box-shadow: 0 10px 24px -20px rgba(15, 23, 42, .45);
}
.pub-search__field:focus-within {
    border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent);
}
.pub-search__field svg { width: 18px; height: 18px; color: var(--muted); }
.pub-search__field input { width: 100%; border: 0; outline: none; background: transparent; font-size: 14px; }
.pub-search .btn { height: 46px; }

.pub-stats { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 20px; font-size: 12.5px; color: var(--ink-2); }
.pub-stats strong { margin-right: 4px; font-size: 15px; color: var(--ink); font-variant-numeric: tabular-nums; }

.pub-section { margin: 0 0 38px; scroll-margin-top: 90px; }

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.section-head h2 { margin: 0 0 3px; font-size: 20px; letter-spacing: -.03em; }
.section-head p { margin: 0; font-size: 13px; color: var(--muted); }
.section-head__actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.dept-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(212px, 1fr)); gap: 12px; }
.dept {
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding: 15px 16px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: var(--surface);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}
.dept:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
    border-color: color-mix(in srgb, var(--accent) 28%, var(--line));
}
.dept.is-active {
    border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
    background: var(--accent-soft);
}
.dept__icon {
    width: 46px; height: 46px;
    display: grid; place-items: center;
    border-radius: 15px;
    background: hsl(var(--h, 245) 85% 94%);
    border: 1px solid hsl(var(--h, 245) 62% 88%);
    color: hsl(var(--h, 245) 58% 38%);
}
@media (prefers-color-scheme: dark) {
    .dept__icon {
        background: hsl(var(--h, 245) 38% 22%);
        border-color: hsl(var(--h, 245) 32% 32%);
        color: hsl(var(--h, 245) 85% 82%);
    }
}
.dept.is-active .dept__icon { border-color: transparent; }
.dept__icon svg { width: 21px; height: 21px; }
.dept__name { font-size: 13.2px; font-weight: 620; line-height: 1.3; }
.dept__meta { font-size: 11.5px; color: var(--muted); }
.dept__cta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
    font-size: 11.8px;
    font-weight: 620;
    color: var(--muted);
    transition: color .18s ease;
}
.dept__cta svg { width: 13px; height: 13px; transition: transform .18s ease; }
.dept:hover .dept__cta { color: var(--accent); }
.dept:hover .dept__cta svg { transform: translateX(3px); }

.pub-intro { padding: 36px 0 22px; }
.pub-title { margin: 0 0 6px; font-size: clamp(26px, 3.6vw, 40px); letter-spacing: -.045em; line-height: 1.1; }
.pub-sub { margin: 0; color: var(--muted); font-size: 14px; }
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 28px 0 10px;
    font-size: 13px;
    font-weight: 620;
    color: var(--muted);
}
.back-link:hover { color: var(--ink); }
.back-link svg { width: 14px; height: 14px; transform: rotate(180deg); }
.pub-note { margin: 14px 2px 0; font-size: 12px; color: var(--muted); }

.pub-foot {
    margin-top: 14px;
    padding: 26px 20px 36px;
    text-align: center;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 12.5px;
}
.pub-foot p { margin: 3px 0; }
.pub-foot a { color: var(--accent); font-weight: 600; }

/* ---------- Actividad ---------- */

.audit-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    align-items: end;
    padding: 18px 20px;
    border-bottom: 1px solid var(--line);
}
.audit-filters .field { gap: 4px; }
.audit-filters .field > span {
    font-size: 11.5px;
    font-weight: 650;
    color: var(--muted);
    letter-spacing: .02em;
}
.audit-filters .select,
.audit-filters .input { height: 38px; font-size: 13.5px; }
.audit-filters__q { grid-column: span 2; }
.audit-filters__actions { display: flex; gap: 8px; align-items: center; }
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 16px;
    border-top: 1px solid var(--line);
    font-size: 12.5px;
    color: var(--muted);
}

@media (max-width: 720px) {
    .audit-filters__q { grid-column: span 1; }
}

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
    .grid--2, .grid--sidebar { grid-template-columns: minmax(0, 1fr); }
    .quick-search__field { min-width: 190px; }
}

@media (max-width: 900px) {
    .shell { grid-template-columns: minmax(0, 1fr); }
    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: 282px;
        transform: translateX(-102%);
        transition: transform .26s cubic-bezier(.2, .8, .2, 1);
        box-shadow: var(--shadow-lg);
        background: var(--surface);
    }
    .sidebar.is-open { transform: none; }
    .menu-btn { display: inline-grid; }
    .quick-search { display: none; }
    .user-chip__name { display: none; }
    .hero { min-height: 0; }
    .hero__art { width: 44%; opacity: .8; }
    .grid--3 { grid-template-columns: minmax(0, 1fr); }
    .auth { grid-template-columns: minmax(0, 1fr); }
    .auth__aside { min-height: 0; padding: 32px 26px; }
    .auth__floats { display: none; }
    .auth__headline { margin: 22px 0; }
    .auth__headline h1 { font-size: 36px; }
    .auth__foot { display: none; }
    .auth__panel { padding: 30px 18px 46px; }
    .pub-head__note { display: none; }
    .pub-hero__art { width: 34%; opacity: .55; }
    .pub-hero { min-height: 0; }
}

@media (max-width: 640px) {
    body { font-size: 14.5px; }
    .content { padding-bottom: 110px; }
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .stat { padding: 15px; }
    .stat__value { font-size: 27px; }
    .stat__icon { width: 35px; height: 35px; border-radius: 11px; }
    .page-head { align-items: flex-start; }
    .page-head__actions { width: 100%; }
    .page-head__actions .btn { flex: 1; }
    .field-row { grid-template-columns: minmax(0, 1fr); }
    .table th, .table td { padding: 11px 13px; }
    .dock { right: 16px; bottom: 16px; }
    .toasts { left: 14px; bottom: 84px; right: 14px; max-width: none; }
    .donut-wrap { flex-direction: column; align-items: flex-start; }
    .pub-search .btn { flex: 1; }
    .dept-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pub-head .brand__text small { display: none; }
    .pub-head__right .btn { padding: 0 12px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
}

/* ---------- Accesos rápidos ---------- */

.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quick {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 15px;
    border: 1px solid var(--line);
    background: var(--surface-2);
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
}
.quick:hover {
    transform: translateY(-2px);
    background: var(--surface);
    border-color: color-mix(in srgb, var(--accent) 26%, var(--line));
    box-shadow: var(--shadow-sm);
}
.quick__icon {
    width: 40px; height: 40px;
    flex: none;
    display: grid; place-items: center;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(145deg, hsl(var(--h, 240) 78% 62%), hsl(var(--h, 240) 68% 46%));
    box-shadow: 0 10px 20px -12px hsl(var(--h, 240) 70% 40% / .85);
}
.quick__icon svg { width: 18px; height: 18px; }
.quick strong { display: block; font-size: 13px; font-weight: 620; line-height: 1.25; }
.quick small { font-size: 11.5px; color: var(--muted); }

/* ---------- Coordinaciones ---------- */

.coord-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
    gap: 16px;
}
.coord {
    display: flex;
    flex-direction: column;
    padding: 18px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.coord:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    border-color: color-mix(in srgb, var(--accent) 22%, var(--line));
}
.coord__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 13px; }
.coord__icon {
    width: 42px; height: 42px;
    display: grid; place-items: center;
    border-radius: 13px;
    background: var(--accent-soft);
    color: var(--accent);
}
.coord__icon svg { width: 20px; height: 20px; }
.coord h3 { margin: 0; font-size: 14.8px; line-height: 1.28; letter-spacing: -.015em; }
.coord__stats { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.coord__stats strong { color: var(--ink); font-weight: 650; font-variant-numeric: tabular-nums; }
.coord__dot { width: 3px; height: 3px; border-radius: 50%; background: var(--line-strong); }
.coord__link {
    margin-top: auto;
    padding-top: 14px;
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 12.5px; font-weight: 620;
    color: var(--accent);
}
.coord__link svg { width: 14px; height: 14px; }

/* ---------- Reportes ---------- */

.group-row td {
    background: var(--surface-2) !important;
    padding-top: 17px !important;
    padding-bottom: 8px !important;
    border-bottom: 1px solid var(--line);
}
.group-row__title { font-size: 11px; font-weight: 750; letter-spacing: .13em; text-transform: uppercase; color: var(--ink-2); }
.group-row__count { margin-left: 8px; font-size: 11.5px; color: var(--muted); }

/* ---------- Filtro de coordinación ---------- */

.filter-select {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 14px 20px 4px;
}
.filter-select__field {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1 1 280px;
    max-width: 380px;
}
.filter-select__field > svg {
    position: absolute;
    left: 12px;
    width: 16px;
    height: 16px;
    color: var(--muted);
    pointer-events: none;
    z-index: 1;
}
.filter-select__field .select {
    height: 38px;
    font-size: 13.5px;
    padding-left: 36px;
    background-color: var(--surface-2);
}

/* ---------- Ajustes de modal ---------- */
.modal__form { display: flex; flex-direction: column; max-height: min(88vh, 780px); }
.modal__body { overflow: auto; }
.modal__body .form { gap: 14px; }
.modal--confirm { width: min(440px, calc(100% - 28px)); }
.modal--confirm .modal__head { padding: 22px 22px 16px; }
.modal--confirm .modal__foot { border-top: 1px solid var(--line); }

.print-only { display: none; }
[hidden] { display: none !important; }

/* ---------- Impresión ---------- */
@media print {
    :root { --bg: #fff; --surface: #fff; --line: #ddd; --ink: #000; }
    body { background: #fff !important; }
    .sidebar, .topbar, .dock, .toasts, .page-head__actions, .table-tools, .no-print { display: none !important; }
    .shell { display: block; }
    .content { max-width: none; padding: 0; }
    .card { box-shadow: none; border-color: #ddd; break-inside: avoid; }
    .table th { position: static; background: #fff; }
    a[href]::after { content: ""; }
    .hero { border: 0; background: none !important; padding: 0 0 14px; min-height: 0; }
    .hero__art, .float-tile { display: none !important; }
    .print-only { display: block !important; }
    .print-title { margin: 0 0 4px; font-size: 20px; }
    .print-meta { color: #555; font-size: 11px; margin: 0 0 18px; }
    .pub-head, .pub-hero, #areas, .pub-foot, .section-head__actions, .back-link, .pub-note { display: none !important; }
    .pub-main { padding: 0; max-width: none; }
}
