/* Aquaflow Comercial · sistema de diseño
   Índigo #3050C0 primario · cian #00C0FF como acento puntual · texto #12181F / #3A434D · etiquetas #0E6274
   Sora para títulos y cifras · Public Sans para texto.
   Superficies sin bordes: la jerarquía sale del fondo, el espacio y una sombra suave. */
@font-face { font-family: 'Sora'; font-weight: 600; font-display: swap; src: url('../fonts/sora-latin-600-normal.woff2') format('woff2'), url('../fonts/sora-latin-600-normal.woff') format('woff'); }
@font-face { font-family: 'Sora'; font-weight: 700; font-display: swap; src: url('../fonts/sora-latin-700-normal.woff2') format('woff2'), url('../fonts/sora-latin-700-normal.woff') format('woff'); }
@font-face { font-family: 'Public Sans'; font-weight: 400; font-display: swap; src: url('../fonts/public-sans-latin-400-normal.woff2') format('woff2'), url('../fonts/public-sans-latin-400-normal.woff') format('woff'); }
@font-face { font-family: 'Public Sans'; font-weight: 400; font-style: italic; font-display: swap; src: url('../fonts/public-sans-latin-400-italic.woff2') format('woff2'), url('../fonts/public-sans-latin-400-italic.woff') format('woff'); }
@font-face { font-family: 'Public Sans'; font-weight: 600; font-display: swap; src: url('../fonts/public-sans-latin-600-normal.woff2') format('woff2'), url('../fonts/public-sans-latin-600-normal.woff') format('woff'); }
@font-face { font-family: 'Public Sans'; font-weight: 700; font-display: swap; src: url('../fonts/public-sans-latin-700-normal.woff2') format('woff2'), url('../fonts/public-sans-latin-700-normal.woff') format('woff'); }

:root {
  --indigo: #3050C0; --indigo-700: #2843A6; --indigo-900: #0E1A4A; --indigo-50: #EEF1FC; --indigo-100: #DFE5F9;
  --cyan: #00C0FF; --cyan-50: #E6F8FF;
  --text: #12181F; --text-2: #3A434D; --muted: #6B7685; --label: #0E6274;
  --rule: #E4E8EF; --bg: #F3F5F9; --surface: #FFFFFF; --sunken: #F4F6FA; --hover: #EEF1F6;
  --danger: #C2321F; --danger-bg: #FCEEEC; --warn: #9A6400; --warn-bg: #FFF5E0; --ok: #0E7A6E; --ok-bg: #E5F5F2;
  --radius: 10px; --radius-lg: 16px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 6px 20px -8px rgba(16, 24, 40, .10);
  --shadow-lg: 0 24px 60px -18px rgba(14, 26, 74, .35);
  --ring: 0 0 0 3px rgba(48, 80, 192, .18);
  --font: 'Public Sans', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --font-head: 'Sora', 'Public Sans', system-ui, sans-serif;
  --side-w: 248px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --indigo: #8197F2; --indigo-700: #A1B2F6; --indigo-50: #1A2240; --indigo-100: #232D52; --cyan-50: #0E2733;
    --text: #EEF1F5; --text-2: #C2C9D3; --muted: #8C96A3; --label: #6CCBDD;
    --rule: #262D38; --bg: #0D1117; --surface: #151A22; --sunken: #1B212B; --hover: #1F2633;
    --danger: #FF8F80; --danger-bg: #2C1714; --warn: #F2C26B; --warn-bg: #2A2110; --ok: #6FD3C2; --ok-bg: #11262A;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px -8px rgba(0, 0, 0, .5);
    --ring: 0 0 0 3px rgba(129, 151, 242, .28);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 14.5px/1.55 var(--font); color: var(--text-2); background: var(--bg); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--font-head); color: var(--text); margin: 0; font-weight: 600; letter-spacing: -.012em; }
h1 { font-size: 27px; line-height: 1.2; letter-spacing: -.022em; } h2 { font-size: 16.5px; } h3 { font-size: 14.5px; }
a { color: var(--indigo); text-decoration: none; } a:hover { color: var(--indigo-700); }
p { margin: 0 0 .75em; }
.muted { color: var(--muted); } .small { font-size: 12.5px; } .right { text-align: right; } .nowrap { white-space: nowrap; }
.num { font-family: var(--font-head); font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 6px; }
::selection { background: var(--indigo-100); }

/* ---------- íconos ---------- */
.ico { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.ico.sm { width: 15px; height: 15px; } .ico.lg { width: 22px; height: 22px; }

/* ---------- estructura ---------- */
.shell { display: grid; grid-template-columns: var(--side-w) 1fr; min-height: 100vh; }
.shell > div { min-width: 0; }
.split > * { min-width: 0; }
.side { background: linear-gradient(180deg, #0E1A4A 0%, #13245F 100%); color: rgba(255, 255, 255, .72); padding: 22px 14px 18px; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.15) transparent; }
.side .brand { padding: 2px 12px 22px; }
.side .brand img { height: 22px; display: block; }
.side .brand span { display: block; font: 600 10.5px var(--font); letter-spacing: .16em; text-transform: uppercase; color: rgba(255, 255, 255, .45); margin-top: 9px; }
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav .group { font: 600 10.5px var(--font); letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .38); padding: 18px 12px 6px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 8px 12px; border-radius: 9px; color: rgba(255, 255, 255, .74); font-weight: 500; font-size: 14px; transition: background .12s, color .12s; }
.nav a .ico { opacity: .75; }
.nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav a[aria-current="page"] { background: rgba(255, 255, 255, .12); color: #fff; font-weight: 600; }
.nav a[aria-current="page"] .ico { opacity: 1; color: var(--cyan); }
.nav .count { margin-left: auto; font: 600 11px var(--font-head); background: var(--cyan); color: #06243A; border-radius: 10px; padding: 1px 7px; }
.side .who { margin-top: 16px; padding: 12px; border-radius: 12px; background: rgba(255, 255, 255, .06); display: flex; gap: 10px; align-items: center; font-size: 13px; }
.side .who .avatar { width: 34px; height: 34px; border-radius: 50%; background: rgba(0, 192, 255, .18); color: #BDEBFF; display: grid; place-items: center; font: 600 13px var(--font-head); flex: none; }
.side .who .id { min-width: 0; flex: 1; }
.side .who strong { display: block; color: #fff; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side .who .role { display: block; color: rgba(255, 255, 255, .5); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side .who .tools { display: flex; gap: 2px; }
.side .who .tools a, .side .who .tools button { color: rgba(255, 255, 255, .6); background: none; border: 0; padding: 6px; border-radius: 8px; cursor: pointer; display: grid; place-items: center; }
.side .who .tools a:hover, .side .who .tools button:hover { color: #fff; background: rgba(255, 255, 255, .1); }
.main { padding: 34px 44px 72px; max-width: 1320px; width: 100%; }
.topbar { display: none; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 26px; }
.page-head .sub { color: var(--muted); margin-top: 6px; font-size: 15px; }
.page-head .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.crumb { font-size: 13px; margin-bottom: 8px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.crumb a { color: var(--muted); } .crumb a:hover { color: var(--indigo); }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 280px; z-index: 40; transform: translateX(-100%); transition: transform .2s ease; }
  .side.open { transform: none; box-shadow: var(--shadow-lg); }
  .topbar { display: flex; align-items: center; gap: 12px; background: #0E1A4A; padding: 10px 14px; position: sticky; top: 0; z-index: 30; }
  .topbar img { height: 18px; } .topbar .title { font: 600 14px var(--font-head); color: #fff; margin-left: auto; }
  .topbar .menu-btn { color: #fff; background: rgba(255, 255, 255, .1); border: 0; border-radius: 9px; padding: 7px; display: grid; place-items: center; cursor: pointer; }
  .main { padding: 22px 16px 64px; }
  h1 { font-size: 23px; }
  .scrim { position: fixed; inset: 0; background: rgba(14, 26, 74, .45); backdrop-filter: blur(2px); z-index: 35; }
}

/* ---------- superficies ---------- */
.card { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.card > .card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 22px 4px; }
.card > .card-head h2 { font-size: 16px; }
.card > .card-body { padding: 16px 22px 22px; }
.card > .table-wrap { padding: 6px 10px 10px; }
.card + .card { margin-top: 20px; }

/* ---------- botones ---------- */
.btn { font: 600 13.5px var(--font); display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: var(--radius); border: 0; background: var(--indigo); color: #fff; padding: 10px 17px; cursor: pointer; text-decoration: none; line-height: 1.2; white-space: nowrap;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .12), inset 0 1px 0 rgba(255, 255, 255, .12); transition: background .12s, box-shadow .12s, transform .06s; }
.btn:hover { background: var(--indigo-700); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn .ico { width: 16px; height: 16px; margin-left: -2px; }
.btn.secondary { background: var(--surface); color: var(--text); box-shadow: 0 0 0 1px var(--rule), 0 1px 2px rgba(16, 24, 40, .05); }
.btn.secondary:hover { background: var(--hover); color: var(--text); }
.btn.ghost { background: transparent; color: var(--indigo); box-shadow: none; padding: 7px 10px; }
.btn.ghost:hover { background: var(--indigo-50); }
.btn.danger { background: var(--danger-bg); color: var(--danger); box-shadow: none; }
.btn.danger:hover { background: var(--danger); color: #fff; }
.btn.small { padding: 6px 11px; font-size: 12.5px; border-radius: 8px; }
.btn[disabled], .btn.loading { opacity: .5; pointer-events: none; }
.btn.loading { position: relative; color: transparent !important; }
.btn.loading::after { content: ''; position: absolute; width: 15px; height: 15px; border-radius: 50%; border: 2px solid; border-color: rgba(255,255,255,.9) rgba(255,255,255,.9) transparent transparent; animation: spin .7s linear infinite; }
.btn.secondary.loading::after, .btn.ghost.loading::after, .btn.danger.loading::after { border-color: var(--indigo) var(--indigo) transparent transparent; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---------- formularios ---------- */
label.lbl, .lbl { display: block; font: 600 12.5px var(--font); color: var(--text-2); margin: 0 0 6px; }
.field { margin: 0 0 16px; min-width: 0; }
.field .hint { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=search], input[type=file], select, textarea {
  width: 100%; font: 400 14.5px var(--font); color: var(--text); background-color: var(--sunken); border: 1px solid transparent; border-radius: var(--radius); padding: 9px 12px; min-height: 40px;
  transition: background-color .12s, border-color .12s, box-shadow .12s; }
input::placeholder, textarea::placeholder { color: #98A1AE; }
textarea { min-height: 92px; resize: vertical; line-height: 1.5; }
select { appearance: none; padding-right: 34px; 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='%236B7685' 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 11px center; }
input[type=search] { padding-left: 38px; 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='%236B7685' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: 12px center; }
input:hover, select:hover, textarea:hover { background-color: var(--hover); }
/* on the page background (outside cards) fields sit on a white surface */
.main > div > input[type=search], .toolbar input, .toolbar select, .search-box, .main input[type=search] { background-color: var(--surface); box-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 0 0 1px rgba(16, 24, 40, .04); }
.card input[type=search] { background-color: var(--sunken); box-shadow: none; }
input:focus, select:focus, textarea:focus { outline: none; background-color: var(--surface); border-color: var(--indigo); box-shadow: var(--ring); }
input[disabled], select[disabled], textarea[disabled], input[readonly] { color: var(--muted); }
input[type=checkbox], input[type=radio] { width: 17px; height: 17px; accent-color: var(--indigo); vertical-align: -3px; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 14px; } .check span { color: var(--text-2); }
.grid { display: grid; gap: 0 18px; } .grid.c2 { grid-template-columns: 1fr 1fr; } .grid.c3 { grid-template-columns: repeat(3, 1fr); } .grid.c4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 760px) { .grid.c2, .grid.c3, .grid.c4 { grid-template-columns: 1fr; } }
.error-text { color: var(--danger); font-size: 13px; margin-top: 4px; }

/* ---------- tablas (sin líneas) ---------- */
.table-wrap { overflow-x: auto; background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 8px 10px 10px; }
.card .table-wrap, dialog .table-wrap { background: none; box-shadow: none; border-radius: 0; }
.loading-state { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 48px 20px; color: var(--muted); }
.loading-state::before { content: ''; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--indigo-100); border-top-color: var(--indigo); animation: spin .7s linear infinite; }
table.tabla { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.tabla th { text-align: left; font: 500 12.5px var(--font); color: var(--muted); padding: 10px 14px 8px; white-space: nowrap; background: none; border: 0; }
.tabla td { padding: 13px 14px; vertical-align: top; color: var(--text); border: 0; }
.tabla tbody tr td:first-child { border-radius: 10px 0 0 10px; } .tabla tbody tr td:last-child { border-radius: 0 10px 10px 0; }
.tabla tbody tr:nth-child(even) td { background: var(--sunken); }
.tabla tbody tr.link { cursor: pointer; }
.tabla tbody tr.link:hover td, .tabla tbody tr.link:focus-visible td { background: var(--indigo-50); }
.tabla tbody tr.link:focus-visible { box-shadow: none; outline: none; }
.tabla td.r, .tabla th.r { text-align: right; }
.tabla td .sub { display: block; color: var(--muted); font-size: 12.5px; margin-top: 1px; }

/* ---------- estados: punto de color + texto ---------- */
.badge { display: inline-flex; align-items: center; gap: 7px; font: 500 13px var(--font); color: var(--text-2); white-space: nowrap; }
.badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #A3ADBB; flex: none; }
.badge.indigo::before, .badge.solid::before { background: var(--indigo); }
.badge.solid { color: var(--text); font-weight: 600; }
.badge.teal::before { background: #17A592; } .badge.teal { color: var(--ok); }
.badge.warn::before { background: #E0A100; } .badge.warn { color: var(--warn); }
.badge.danger::before { background: var(--danger); } .badge.danger { color: var(--danger); }

/* ---------- avisos ---------- */
.alert { position: relative; background: var(--indigo-50); color: var(--text); padding: 13px 16px 13px 46px; border-radius: 12px; margin: 0 0 16px; font-size: 14px; border: 0; }
.alert::before { content: ''; position: absolute; left: 16px; top: 14px; width: 18px; height: 18px; background: var(--indigo); -webkit-mask: url('../img/icons/info.svg') center / contain no-repeat; mask: url('../img/icons/info.svg') center / contain no-repeat; }
.alert.warn { background: var(--warn-bg); } .alert.warn::before { background: #C98A00; -webkit-mask-image: url('../img/icons/triangle-alert.svg'); mask-image: url('../img/icons/triangle-alert.svg'); }
.alert.danger { background: var(--danger-bg); } .alert.danger::before { background: var(--danger); -webkit-mask-image: url('../img/icons/circle-alert.svg'); mask-image: url('../img/icons/circle-alert.svg'); }
.alert ul { margin: 6px 0 0 18px; padding: 0; } .alert li { margin: 2px 0; } .alert strong { font-weight: 600; }

/* ---------- cifras ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin-bottom: 26px; }
.stat { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; color: inherit; position: relative; transition: transform .12s, box-shadow .12s; }
a.stat:hover { transform: translateY(-2px); box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 14px 30px -12px rgba(16,24,40,.22); color: inherit; }
.stat .tile { width: 36px; height: 36px; border-radius: 10px; background: var(--indigo-50); color: var(--indigo); display: grid; place-items: center; margin-bottom: 10px; }
.stat .v { font: 600 30px/1.05 var(--font-head); color: var(--text); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat .l { font-size: 13.5px; color: var(--muted); }

/* ---------- filtros: control segmentado ---------- */
.chips { display: inline-flex; gap: 2px; flex-wrap: wrap; margin-bottom: 18px; padding: 4px; background: #E8ECF3; border-radius: 12px; max-width: 100%; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .chips { background: var(--sunken); } }
.chip { font: 600 13px var(--font); border: 0; background: transparent; color: var(--text-2); border-radius: 9px; padding: 7px 14px; cursor: pointer; white-space: nowrap; transition: background .12s, color .12s; }
.chip:hover { color: var(--text); }
.chip[aria-pressed="true"] { background: var(--surface); color: var(--indigo); box-shadow: 0 1px 2px rgba(16, 24, 40, .1), 0 1px 1px rgba(16, 24, 40, .04); }
.toolbar { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.toolbar .search { max-width: 340px; flex: 1; }
.toolbar .chips { margin-bottom: 0; }

/* ---------- estado vacío ---------- */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 52px 24px; color: var(--muted); max-width: 520px; margin: 0 auto; line-height: 1.55; }
.empty::before { content: ''; width: 52px; height: 52px; border-radius: 16px; margin-bottom: 10px; background: var(--indigo-50) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%233050C0' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22a7 7 0 0 0 7-7c0-2-1-3.9-3-5.5s-3.5-4-4-6.5c-.5 2.5-2 4.9-4 6.5C6 11.1 5 13 5 15a7 7 0 0 0 7 7z'/%3E%3C/svg%3E") center / 24px no-repeat; }
.empty strong { display: block; color: var(--text); font: 600 16px var(--font-head); }
.empty .btn { margin-top: 14px; }

/* ---------- pasos ---------- */
.steps { display: flex; margin: 0 0 26px; padding: 0; list-style: none; counter-reset: s; }
.steps li { flex: 1; position: relative; padding: 0 8px 0 0; font-size: 13px; font-weight: 600; color: var(--muted); counter-increment: s; display: flex; align-items: center; gap: 10px; min-width: 0; border: 0; }
.steps li::before { content: counter(s); flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font: 600 12.5px var(--font-head); background: var(--surface); color: var(--muted); box-shadow: inset 0 0 0 1.5px #CBD2DD; }
.steps li::after { content: ''; flex: 1; height: 2px; background: #DCE1E9; border-radius: 2px; margin-left: 4px; min-width: 12px; }
.steps li:last-child::after { display: none; }
.steps li.done { color: var(--text-2); } .steps li.done::before { content: '✓'; background: var(--indigo); color: #fff; box-shadow: none; } .steps li.done::after { background: var(--indigo); }
.steps li.now { color: var(--indigo); } .steps li.now::before { background: var(--indigo); color: #fff; box-shadow: 0 0 0 4px var(--indigo-100); }
@media (max-width: 640px) { .steps li { font-size: 0; gap: 0; } .steps li.now { font-size: 12.5px; gap: 8px; } }

/* ---------- datos ---------- */
dl.kv { display: grid; grid-template-columns: 160px 1fr; gap: 10px 16px; margin: 0; } dl.kv dt { color: var(--muted); font-size: 13.5px; font-weight: 400; } dl.kv dd { margin: 0; color: var(--text); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: start; } .split > aside { position: sticky; top: 24px; }
@media (max-width: 1080px) { .split { grid-template-columns: 1fr; } .split > aside { position: static; } }
.summary .row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; color: var(--text); border: 0; }
.summary .total { font: 600 24px var(--font-head); color: var(--text); letter-spacing: -.02em; } .summary .row.big { align-items: baseline; padding-top: 14px; margin-top: 6px; }
.summary .lab { color: var(--muted); }

/* ---------- diálogos y avisos flotantes ---------- */
dialog { border: 0; border-radius: 20px; padding: 0; width: min(580px, calc(100vw - 24px)); max-height: calc(100vh - 40px); box-shadow: var(--shadow-lg); background: var(--surface); color: var(--text-2); }
dialog::backdrop { background: rgba(14, 26, 74, .42); backdrop-filter: blur(3px); }
dialog[open] { animation: pop .16s ease-out; } @keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
dialog form { display: flex; flex-direction: column; max-height: calc(100vh - 40px); }
dialog .d-head { padding: 24px 26px 6px; border: 0; } dialog .d-head::after { display: none; } dialog .d-head h2 { font-size: 19px; }
dialog .d-body { padding: 14px 26px 6px; overflow-y: auto; } dialog .d-foot { padding: 14px 26px 22px; display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
dialog.wide { width: min(800px, calc(100vw - 24px)); }
.toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 100; max-width: min(420px, calc(100vw - 32px)); }
.toast { background: #0E1A4A; color: #fff; padding: 13px 16px 13px 44px; border-radius: 14px; box-shadow: var(--shadow-lg); font-size: 14px; white-space: pre-line; position: relative; animation: pop .18s ease-out; border: 0; }
.toast::before { content: ''; position: absolute; left: 16px; top: 14px; width: 18px; height: 18px; background: var(--cyan); -webkit-mask: url('../img/icons/circle-check.svg') center / contain no-repeat; mask: url('../img/icons/circle-check.svg') center / contain no-repeat; }
.toast.error { background: #3A1410; } .toast.error::before { background: #FF8F80; -webkit-mask-image: url('../img/icons/circle-alert.svg'); mask-image: url('../img/icons/circle-alert.svg'); }

/* ---------- páginas de acceso ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); background: var(--surface); }
.auth .brand-panel { background: radial-gradient(900px 520px at -10% 110%, rgba(0, 192, 255, .24), transparent 60%), linear-gradient(160deg, #0E1A4A 0%, #1B2F7A 70%, #2A43A4 100%); color: #fff; padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth .brand-panel::after { content: ''; position: absolute; left: -20%; right: -20%; bottom: -38%; height: 70%; background: repeating-radial-gradient(ellipse at 50% 100%, rgba(255,255,255,.055) 0 2px, transparent 2px 26px); pointer-events: none; }
.auth .brand-panel img { height: 28px; position: relative; z-index: 1; align-self: flex-start; }
.auth .brand-panel .claim { position: relative; z-index: 1; max-width: 460px; }
.auth .brand-panel h2 { font: 600 34px/1.15 var(--font-head); color: #fff; letter-spacing: -.025em; margin: 0 0 14px; }
.auth .brand-panel p { color: rgba(255, 255, 255, .72); font-size: 15.5px; margin: 0; }
.auth .brand-panel .foot { position: relative; z-index: 1; color: rgba(255, 255, 255, .45); font-size: 12.5px; }
.auth .form-panel { display: grid; place-items: center; padding: 40px 24px; }
.auth .form-box { width: min(380px, 100%); }
.auth .form-box h1 { font-size: 26px; margin-bottom: 6px; }
.auth .form-box .lead { color: var(--muted); margin-bottom: 28px; }
.auth .form-box .btn { width: 100%; padding: 12px 16px; font-size: 14.5px; }
.auth .mobile-logo { display: none; }
@media (max-width: 860px) { .auth { grid-template-columns: 1fr; } .auth .brand-panel { display: none; } .auth .mobile-logo { display: block; height: 24px; margin-bottom: 30px; } }
.center-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--bg); }
.center-card { width: min(440px, 100%); background: var(--surface); border-radius: 20px; box-shadow: var(--shadow); padding: 34px 32px 30px; border: 0; }
.center-card .brand { margin-bottom: 26px; border: 0; padding: 0; } .center-card .brand::after { display: none; } .center-card .brand img { height: 24px; display: block; }
.scale { display: flex; gap: 8px; flex-wrap: wrap; }
.scale label { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; background: var(--sunken); border: 0; border-radius: 12px; padding: 11px 14px; cursor: pointer; font: 600 16px var(--font-head); color: var(--text); min-width: 52px; transition: background .12s, color .12s; }
.scale label:hover { background: var(--indigo-50); }
.scale input { position: absolute; opacity: 0; }
.scale label:has(input:checked) { background: var(--indigo); color: #fff; }
.scale label:has(input:focus-visible) { box-shadow: var(--ring); }

@media print { .side, .topbar, .page-head .actions, .btn { display: none !important; } .shell { display: block; } .main { padding: 0; } .card, .stat { box-shadow: none; } }
