/* Esnaola Gestión — identidad: azul marino, verde profundo, azul acción, salvia, cielo claro. Cormorant Garamond + Inter. */
@font-face { font-family: 'Cormorant Garamond'; font-weight: 500; font-style: normal; font-display: swap; src: url('/fonts/cormorant-garamond-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Cormorant Garamond'; font-weight: 600; font-style: normal; font-display: swap; src: url('/fonts/cormorant-garamond-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Cormorant Garamond'; font-weight: 700; font-style: normal; font-display: swap; src: url('/fonts/cormorant-garamond-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Cormorant Garamond'; font-weight: 500; font-style: italic; font-display: swap; src: url('/fonts/cormorant-garamond-latin-500-italic.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 400; font-display: swap; src: url('/fonts/inter-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 500; font-display: swap; src: url('/fonts/inter-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 600; font-display: swap; src: url('/fonts/inter-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 700; font-display: swap; src: url('/fonts/inter-latin-700-normal.woff2') format('woff2'); }

:root {
  --navy: #002048; --green: #085030; --blue-h: #184878; --blue: #105088; --sage: #588880; --text: #606870; --ink: #1c2a3a;
  --sky: #ecf5fc; --sky2: #f2f7fb; --line: #d9e4ee; --line2: #e8eff6; --white: #fff;
  --danger: #b3261e; --danger-bg: #fdecea; --warn: #9a5b00; --warn-bg: #fff4e0; --ok: #085030; --ok-bg: #e4f3ec; --info: #105088; --info-bg: #e6f0fa; --crit: #7a0b0b; --crit-bg: #fbdcdc; --muted-bg: #eef2f6;
  --radius: 10px; --shadow: 0 1px 2px rgba(0, 32, 72, .06), 0 4px 14px rgba(0, 32, 72, .06); --side: 256px;
  --serif: 'Cormorant Garamond', Georgia, serif; --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--sans); font-size: 14.5px; line-height: 1.5; color: var(--text); background: var(--sky2); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { color: var(--blue-h); margin: 0; font-weight: 600; }
h1 { font-family: var(--serif); font-size: 34px; line-height: 1.1; letter-spacing: -.01em; color: var(--navy); }
h2 { font-family: var(--serif); font-size: 24px; line-height: 1.15; }
h3 { font-size: 15px; font-weight: 600; color: var(--navy); }
a { color: var(--blue); text-decoration: none; } a:hover { text-decoration: underline; }
button { font-family: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
.muted { color: var(--text); opacity: .85; } .small { font-size: 12.5px; } .tiny { font-size: 11.5px; } .right { text-align: right; } .nowrap { white-space: nowrap; } .grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 10px; } .row.wrap { flex-wrap: wrap; } .col { display: flex; flex-direction: column; gap: 10px; } .gap-s { gap: 6px; } .gap-l { gap: 18px; } .between { justify-content: space-between; }
.hide-mobile { } .only-mobile { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ----- Estructura ----- */
.app { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--side); background: var(--navy); color: #cfe0f0; display: flex; flex-direction: column; z-index: 40; overflow-y: auto; }
.brand { padding: 22px 22px 14px; display: flex; flex-direction: column; gap: 2px; }
.brand .wordmark { font-family: var(--serif); font-size: 32px; font-weight: 600; color: #fff; letter-spacing: -.01em; line-height: 1; }
.brand .wordmark i { color: #8fd0b0; font-style: normal; }
.brand small { color: #8fb2d4; font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; }
.nav { padding: 8px 12px 20px; display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 8px; color: #cfe0f0; font-weight: 500; font-size: 14px; }
.nav a:hover { background: rgba(255, 255, 255, .07); text-decoration: none; }
.nav a.active { background: #fff; color: var(--navy); } .nav a.active svg { color: var(--blue); }
.nav .count { margin-left: auto; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; border-radius: 99px; padding: 1px 7px; }
.nav .sep { height: 1px; background: rgba(255, 255, 255, .1); margin: 10px 8px; }
.nav .group { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: #6f93b8; padding: 10px 12px 4px; }
.main { margin-left: var(--side); min-height: 100vh; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; background: rgba(255, 255, 255, .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); padding: 10px 28px; display: flex; align-items: center; gap: 14px; }
.content { padding: 26px 28px 60px; max-width: 1480px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head p { margin: 6px 0 0; max-width: 70ch; }
.search { position: relative; flex: 1; max-width: 520px; }
.search input { width: 100%; padding: 9px 12px 9px 38px; border: 1px solid var(--line); border-radius: 99px; background: var(--sky2); font: inherit; color: var(--ink); }
.search svg { position: absolute; left: 12px; top: 10px; color: var(--sage); }
.search-pop { position: absolute; top: 44px; left: 0; right: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); max-height: 70vh; overflow: auto; z-index: 50; }
.search-pop h4 { padding: 8px 14px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--sage); }
.search-pop a { display: block; padding: 7px 14px; color: var(--ink); } .search-pop a:hover { background: var(--sky); text-decoration: none; }
.iconbtn { position: relative; background: transparent; border: 1px solid var(--line); width: 38px; height: 38px; border-radius: 99px; display: grid; place-items: center; cursor: pointer; color: var(--blue-h); }
.iconbtn:hover { background: var(--sky); }
.iconbtn .dot { position: absolute; top: -3px; right: -3px; background: var(--danger); color: #fff; font-size: 10px; font-weight: 700; min-width: 17px; height: 17px; border-radius: 99px; display: grid; place-items: center; padding: 0 4px; }
.avatar { width: 34px; height: 34px; border-radius: 99px; background: var(--blue-h); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 12.5px; flex: none; }
.menu { position: absolute; right: 0; top: 46px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 220px; z-index: 60; padding: 6px; }
.menu a, .menu button { display: block; width: 100%; text-align: left; padding: 9px 12px; background: none; border: 0; border-radius: 6px; color: var(--ink); cursor: pointer; font: inherit; }
.menu a:hover, .menu button:hover { background: var(--sky); text-decoration: none; }

/* ----- Tarjetas y KPIs ----- */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 18px 20px; } .card-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid var(--line2); gap: 10px; flex-wrap: wrap; }
.grid { display: grid; gap: 18px; } .g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin-bottom: 20px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); display: block; color: inherit; position: relative; overflow: hidden; }
a.kpi:hover { text-decoration: none; border-color: var(--blue); }
.kpi::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--sage); }
.kpi.danger::before { background: var(--danger); } .kpi.warning::before { background: #d98a00; } .kpi.success::before { background: var(--green); } .kpi.critical::before { background: var(--crit); }
.kpi .label { font-size: 12px; color: var(--text); font-weight: 500; }
.kpi .value { font-family: var(--serif); font-size: 31px; font-weight: 600; color: var(--navy); line-height: 1.1; margin-top: 2px; font-variant-numeric: lining-nums; }
.kpi .hint { font-size: 11.5px; color: var(--sage); margin-top: 2px; }

/* ----- Botones y formularios ----- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8.5px 15px; border-radius: 8px; border: 1px solid var(--blue); background: var(--blue); color: #fff; font-weight: 600; font-size: 13.5px; cursor: pointer; white-space: nowrap; transition: background .12s; }
.btn:hover { background: var(--blue-h); text-decoration: none; } .btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.secondary { background: #fff; color: var(--blue-h); border-color: var(--line); } .btn.secondary:hover { background: var(--sky); }
.btn.green { background: var(--green); border-color: var(--green); } .btn.green:hover { background: #063d25; }
.btn.danger { background: var(--danger); border-color: var(--danger); } .btn.danger:hover { background: #8e1d17; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--blue); } .btn.ghost:hover { background: var(--sky); }
.btn.sm { padding: 5px 10px; font-size: 12.5px; border-radius: 7px; }
label.f { display: flex; flex-direction: column; gap: 5px; font-weight: 500; color: var(--navy); font-size: 13px; }
label.f .help { font-weight: 400; color: var(--text); font-size: 12px; } label.f .err { color: var(--danger); font-size: 12px; font-weight: 500; } label.f .req { color: var(--danger); }
input, select, textarea { font: inherit; color: var(--ink); background: #fff; border: 1px solid #c8d6e3; border-radius: 8px; padding: 8px 10px; width: 100%; min-width: 0; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(16, 80, 136, .35); border-color: var(--blue); }
input:disabled, select:disabled, textarea:disabled { background: var(--muted-bg); color: #6a7480; }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--blue); }
textarea { min-height: 84px; resize: vertical; }
.invalid input, .invalid select, .invalid textarea { border-color: var(--danger); background: #fffafa; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; } .form-grid .full { grid-column: 1 / -1; }
.form-group { margin: 0 0 18px; } .form-group > h3 { margin: 0 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line2); font-family: var(--serif); font-size: 19px; color: var(--blue-h); }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; color: var(--navy); font-size: 13.5px; cursor: pointer; }

/* ----- Tabla ----- */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line2); }
.toolbar input[type=search], .toolbar .q { max-width: 280px; } .toolbar select { width: auto; max-width: 190px; padding: 7px 9px; }
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.t th { text-align: left; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--sage); font-weight: 600; padding: 10px 14px; background: var(--sky2); border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; }
table.t th.sortable { cursor: pointer; user-select: none; } table.t th.sortable:hover { color: var(--blue-h); }
table.t td { padding: 10px 14px; border-bottom: 1px solid var(--line2); vertical-align: middle; color: var(--ink); }
table.t tr.click { cursor: pointer; } table.t tr.click:hover td { background: var(--sky); }
table.t td.num, table.t th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.t tfoot td { font-weight: 700; background: var(--sky2); }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px; flex-wrap: wrap; }
.pager .pg { display: flex; gap: 4px; }
.cell-title { font-weight: 600; color: var(--navy); } .cell-sub { font-size: 12px; color: var(--text); }
.empty { padding: 42px 20px; text-align: center; color: var(--text); } .empty h3 { font-family: var(--serif); font-size: 22px; color: var(--blue-h); margin-bottom: 4px; }
.skeleton { height: 14px; border-radius: 6px; background: linear-gradient(90deg, #e8eff6, #f4f8fb, #e8eff6); background-size: 200% 100%; animation: sk 1.2s infinite; margin: 10px 0; }
@keyframes sk { to { background-position: -200% 0; } }

/* ----- Etiquetas ----- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--muted-bg); color: #44505c; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 99px; background: currentColor; opacity: .7; }
.badge.success { background: var(--ok-bg); color: var(--ok); } .badge.danger { background: var(--danger-bg); color: var(--danger); } .badge.warning { background: var(--warn-bg); color: var(--warn); }
.badge.info { background: var(--info-bg); color: var(--info); } .badge.primary { background: #dbe8f6; color: var(--blue-h); } .badge.critical { background: var(--crit); color: #fff; } .badge.muted { background: var(--muted-bg); color: #5d6874; } .badge.neutral { background: var(--sky); color: var(--blue-h); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; } .chip { padding: 5px 12px; border-radius: 99px; border: 1px solid var(--line); background: #fff; font-size: 12.5px; font-weight: 600; color: var(--blue-h); cursor: pointer; }
.chip:hover { background: var(--sky); } .chip.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.tag { background: var(--sky); color: var(--blue-h); border-radius: 6px; padding: 1px 7px; font-size: 12px; }
.progress { height: 7px; background: var(--line2); border-radius: 99px; overflow: hidden; min-width: 70px; } .progress > i { display: block; height: 100%; background: var(--green); border-radius: 99px; } .progress.warn > i { background: #d98a00; } .progress.bad > i { background: var(--danger); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs a, .tabs button { padding: 10px 16px; font-weight: 600; font-size: 14px; color: var(--text); border: 0; background: none; border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; margin-bottom: -1px; }
.tabs a:hover, .tabs button:hover { color: var(--blue-h); text-decoration: none; } .tabs .on { color: var(--navy); border-bottom-color: var(--navy); }
.callout { border-radius: var(--radius); padding: 12px 14px; font-size: 13.5px; display: flex; gap: 10px; align-items: flex-start; background: var(--info-bg); color: #0d3a63; border: 1px solid #c4daf0; }
.callout.warn { background: var(--warn-bg); color: #6b4000; border-color: #f0d9aa; } .callout.danger { background: var(--danger-bg); color: #7a1912; border-color: #f2c1bd; } .callout.ok { background: var(--ok-bg); color: #063d25; border-color: #bfe0cf; }

/* ----- Modal / toast ----- */
.overlay { position: fixed; inset: 0; background: rgba(0, 24, 56, .5); z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 4vh 16px; overflow-y: auto; }
.modal { background: #fff; border-radius: 14px; width: 100%; max-width: 760px; box-shadow: 0 20px 60px rgba(0, 24, 56, .35); }
.modal.wide { max-width: 1040px; } .modal.narrow { max-width: 480px; }
.modal-head { padding: 18px 24px 12px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line2); }
.modal-body { padding: 20px 24px; } .modal-foot { padding: 14px 24px; border-top: 1px solid var(--line2); display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; background: var(--sky2); border-radius: 0 0 14px 14px; }
.toasts { position: fixed; bottom: 18px; right: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 200; max-width: min(420px, calc(100vw - 32px)); }
.toast { background: var(--navy); color: #fff; padding: 11px 16px; border-radius: 10px; box-shadow: var(--shadow); font-size: 13.5px; } .toast.err { background: var(--danger); } .toast.warn { background: #8a5200; }

/* ----- Kanban ----- */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 12px; align-items: start; }
.kcol { background: var(--muted-bg); border-radius: 12px; padding: 10px; min-height: 140px; } .kcol.over { outline: 2px dashed var(--blue); background: var(--info-bg); }
.kcol h4 { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; text-transform: uppercase; letter-spacing: .07em; padding: 4px 6px 10px; color: var(--navy); }
.kcard { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; margin-bottom: 9px; box-shadow: 0 1px 2px rgba(0, 32, 72, .05); cursor: grab; } .kcard:hover { border-color: var(--blue); } .kcard.dragging { opacity: .4; }
.kcard .t { font-weight: 600; color: var(--navy); line-height: 1.3; margin-bottom: 4px; display: block; }

/* ----- Alertas ----- */
.alert-item { display: flex; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line2); align-items: flex-start; border-left: 4px solid var(--line); color: inherit; }
a.alert-item:hover { background: var(--sky); text-decoration: none; }
.alert-item.critica { border-left-color: var(--crit); background: #fff8f8; } .alert-item.alta { border-left-color: var(--danger); } .alert-item.media { border-left-color: #d98a00; } .alert-item.baja { border-left-color: var(--blue); } .alert-item.informativa { border-left-color: var(--sage); }
.alert-item .ttl { font-weight: 600; color: var(--navy); }
.list-item { display: flex; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--line2); align-items: center; color: inherit; } a.list-item:hover { background: var(--sky); text-decoration: none; }
.list-item:last-child, .alert-item:last-child { border-bottom: 0; }

/* ----- Calendario ----- */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line2); border-left: 1px solid var(--line2); }
.cal .dow { padding: 8px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--sage); font-weight: 600; background: var(--sky2); border-right: 1px solid var(--line2); border-bottom: 1px solid var(--line2); }
.cal .cell { min-height: 112px; padding: 5px; border-right: 1px solid var(--line2); border-bottom: 1px solid var(--line2); cursor: pointer; background: #fff; } .cal .cell:hover { background: #f8fbfe; } .cal .cell.out { background: var(--sky2); color: #9aa6b2; } .cal .cell.today { background: #eaf3fc; }
.cal .cell .d { font-size: 12.5px; font-weight: 600; margin-bottom: 3px; color: var(--navy); } .cal .cell.today .d { background: var(--navy); color: #fff; border-radius: 99px; display: inline-grid; place-items: center; width: 24px; height: 24px; }
.ev { display: block; font-size: 11.5px; padding: 2px 6px; border-radius: 5px; margin-bottom: 3px; background: var(--info-bg); color: var(--blue-h); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border: 0; width: 100%; text-align: left; cursor: pointer; font-family: inherit; }
.ev.done { text-decoration: line-through; opacity: .55; } .ev.urgente, .ev.alta { background: var(--danger-bg); color: var(--danger); } .ev.sys { background: var(--warn-bg); color: var(--warn); } .ev.overdue { box-shadow: inset 3px 0 var(--danger); }
.timeline { display: grid; grid-template-columns: 64px 1fr; gap: 0 10px; }
.tl-block { border-left: 4px solid var(--blue); background: var(--info-bg); border-radius: 8px; padding: 8px 12px; margin-bottom: 8px; } .tl-block.fijo { border-left-color: var(--navy); background: #dbe8f6; } .tl-block.over { border-left-color: #d98a00; background: var(--warn-bg); }

/* ----- Login ----- */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; background: #fff; }
.login .hero { background: linear-gradient(160deg, #002048 0%, #0b3a6b 55%, #085030 140%); color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login .hero::after { content: ''; position: absolute; width: 520px; height: 520px; border-radius: 50%; right: -180px; bottom: -180px; background: radial-gradient(circle, rgba(143, 208, 176, .28), transparent 65%); }
.login .hero .wordmark { font-family: var(--serif); font-size: 46px; font-weight: 600; } .login .hero .wordmark i { color: #8fd0b0; font-style: normal; }
.login .hero h2 { color: #fff; font-size: 40px; font-weight: 500; max-width: 16ch; line-height: 1.08; }
.login .hero p { color: #b9d0e6; max-width: 44ch; font-size: 15.5px; }
.login .panel { display: grid; place-items: center; padding: 32px; } .login form { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 16px; }
.login h1 { font-size: 38px; }

/* ----- Varios ----- */
.legend-dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: 6px; }
.chart-box { position: relative; height: 290px; } .chart-box.sm { height: 230px; }
.kv { display: grid; grid-template-columns: 170px 1fr; gap: 7px 14px; } .kv dt { color: var(--sage); font-weight: 500; font-size: 13px; } .kv dd { margin: 0; color: var(--ink); word-break: break-word; }
.sum-row { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px dashed var(--line); } .sum-row.total { border-bottom: 0; font-weight: 700; color: var(--navy); border-top: 2px solid var(--navy); margin-top: 4px; }
.money-split { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; } .money-split > div { background: var(--sky2); border: 1px solid var(--line2); border-radius: 10px; padding: 10px 12px; } .money-split b { display: block; font-family: var(--serif); font-size: 22px; color: var(--navy); }
.switch { position: relative; width: 42px; height: 24px; flex: none; } .switch input { opacity: 0; position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 2; } .switch i { position: absolute; inset: 0; background: #b8c6d4; border-radius: 99px; transition: .15s; } .switch i::after { content: ''; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 99px; background: #fff; transition: .15s; } .switch input:checked + i { background: var(--green); } .switch input:checked + i::after { transform: translateX(18px); }
.score { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--green); }
.sub-editor .row { margin-bottom: 6px; }
.drop { border: 2px dashed #b8cde0; border-radius: 12px; padding: 22px; text-align: center; background: var(--sky2); }
code.k { background: var(--sky); border-radius: 5px; padding: 1px 6px; font-size: 12.5px; color: var(--blue-h); }

@media (max-width: 1100px) { .g-main, .g3, .g4 { grid-template-columns: 1fr 1fr; } .g-main > :first-child { grid-column: 1 / -1; } .money-split { grid-template-columns: 1fr 1fr; } }
@media (max-width: 860px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s; box-shadow: 0 0 40px rgba(0, 0, 0, .4); } .sidebar.open { transform: none; } .main { margin-left: 0; }
  .topbar { padding: 8px 14px; } .content { padding: 18px 14px 50px; } h1 { font-size: 28px; } .only-mobile { display: inline-grid !important; } .hide-mobile { display: none !important; }
  .g2, .g3, .g4, .g-main, .form-grid, .login { grid-template-columns: 1fr; } .kv { grid-template-columns: 1fr; gap: 2px; } .kv dd { margin-bottom: 8px; }
  .login .hero { padding: 28px; min-height: 220px; } .login .hero h2 { font-size: 28px; } .modal-body { padding: 16px; } .modal-head, .modal-foot { padding-left: 16px; padding-right: 16px; }
  .overlay { padding: 0; } .modal { border-radius: 0; min-height: 100vh; } .cal .cell { min-height: 74px; } .ev { font-size: 10.5px; } .timeline { grid-template-columns: 48px 1fr; }
  .kpis { grid-template-columns: 1fr 1fr; } .kpi .value { font-size: 25px; } .toolbar select, .toolbar .q { max-width: none; flex: 1 1 140px; } .scrim { position: fixed; inset: 0; background: rgba(0, 24, 56, .45); z-index: 35; }
}
@media print { .sidebar, .topbar, .btn, .toolbar, .pager { display: none !important; } .main { margin: 0; } body { background: #fff; } }

/* Ajustes móvil adicionales */
.main, .content { min-width: 0; }
@media (max-width: 860px) {
  .toolbar > div, .toolbar .row { flex-wrap: wrap; width: 100%; }
  .toolbar input[type=date] { width: auto !important; flex: 1 1 130px; min-width: 0; }
  .toolbar select { max-width: 100%; }
  .page-head { flex-direction: column; align-items: flex-start; }
  .card-head { align-items: flex-start; }
}
