/* =====================================================================
   Potich Rentals — interfaz
   Paleta tomada del logo: tinta (#0E2A5A), azul Potich (#2563EB),
   celeste red (#9FBDFF). Tipografía Nunito, la misma familia redondeada
   del logotipo, para títulos; Nunito Sans para lectura.
   ===================================================================== */
:root {
  --ink: #0E2A5A;
  --ink-2: #16366F;
  --blue: #2563EB;
  --blue-600: #1D4FD0;
  --blue-50: #EEF3FF;
  --sky: #9FBDFF;
  --mist: #F3F6FB;
  --paper: #FFFFFF;
  --line: #DFE6F1;
  --line-2: #EBF0F7;
  --text: #1B2538;
  --muted: #5B6B85;
  --ok: #0F8A5F;   --ok-bg: #E6F6EF;
  --warn: #A55F00; --warn-bg: #FFF3DF;
  --bad: #C2362F;  --bad-bg: #FDECEA;
  --info: #1D4FD0; --info-bg: #EEF3FF;

  --r-panel: 16px;
  --r-control: 10px;
  --r-pill: 999px;
  --sidebar: 252px;

  --f-head: "Nunito", ui-rounded, "Segoe UI", system-ui, sans-serif;
  --f-body: "Nunito Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --shadow: 0 1px 2px rgba(14, 42, 90, .06), 0 8px 24px -12px rgba(14, 42, 90, .18);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font: 15px/1.55 var(--f-body); color: var(--text); background: var(--mist);
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--f-head); color: var(--ink); margin: 0; line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: 1.75rem; font-weight: 900; }
h2 { font-size: 1.15rem; font-weight: 800; }
h3 { font-size: 1rem; font-weight: 800; }
p { margin: 0 0 .75em; }
small { font-size: .82rem; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; border-radius: 6px; }
.icon { width: 18px; height: 18px; stroke-width: 2; flex: none; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
.inline { display: inline; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ------------------------------------------------------------ layout */
.app { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: var(--ink); color: #C9D6F2; display: flex; flex-direction: column; padding: 22px 14px;
}
.sidebar__logo { padding: 4px 10px 22px; }
.sidebar__logo img { width: 158px; height: auto; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav__group { margin: 18px 10px 6px; font-size: .78rem; color: #7F95C2; font-weight: 700; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px;
  color: #C9D6F2; font-weight: 600; text-decoration: none;
}
.nav a:hover { background: rgba(159, 189, 255, .10); color: #fff; }
.nav a.is-active { background: var(--blue); color: #fff; }
.nav a .badge { margin-left: auto; }
.sidebar__foot { margin-top: auto; padding-top: 18px; border-top: 1px solid rgba(159,189,255,.15); }
.sidebar__user { display: flex; align-items: center; gap: 10px; padding: 8px 10px; color: #fff; }
.sidebar__user small { display: block; color: #8FA4CF; }
.sidebar__user button { margin-left: auto; background: none; border: 0; color: #8FA4CF; cursor: pointer; padding: 6px; border-radius: 8px; }
.sidebar__user button:hover { color: #fff; background: rgba(159,189,255,.12); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 16px; padding: 20px 36px 0;
}
.topbar__menu { display: none; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 8px; cursor: pointer; }
.page { padding: 18px 36px 56px; max-width: 1320px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head p { margin: 6px 0 0; color: var(--muted); max-width: 70ch; }
.page-head__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.crumb { display: inline-flex; align-items: center; gap: 6px; font-size: .88rem; color: var(--muted); margin-bottom: 6px; }

/* ------------------------------------------------------------ panels */
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-panel); }
.panel__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px 0; }
.panel__head h2 { display: flex; align-items: center; gap: 10px; }
.panel__head h2 .icon { color: var(--blue); }
.panel__body { padding: 16px 22px 22px; }
.panel--flush .panel__body { padding: 8px 0 4px; }
.grid { display: grid; gap: 20px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--main { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
.stack { display: grid; gap: 20px; align-content: start; }

/* KPIs del administrador: número + contexto, sin decoración */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-panel); margin-bottom: 20px; }
.kpi { padding: 18px 22px; border-left: 1px solid var(--line-2); }
.kpi:first-child { border-left: 0; }
.kpi__label { color: var(--muted); font-size: .86rem; font-weight: 600; }
.kpi__value { font: 900 1.6rem/1.2 var(--f-head); color: var(--ink); margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi__note { font-size: .84rem; color: var(--muted); }
.kpi--alert .kpi__value { color: var(--bad); }

/* ------------------------------------------------------------ ventana de pago (tablero inquilino) */
.paywin { background: var(--ink); color: #DDE7FF; border-radius: 20px; padding: 26px 28px 24px; position: relative; overflow: hidden; }
.paywin__top { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: flex-start; }
.paywin__label { font-weight: 700; color: var(--sky); }
.paywin__amount { font: 900 clamp(2.2rem, 5vw, 3.3rem)/1 var(--f-head); color: #fff; margin: 8px 0 6px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.paywin__meta { color: #AFC2EA; }
.paywin__state { text-align: right; }
.paywin__state strong { display: block; font: 800 1.15rem var(--f-head); color: #fff; }
.paywin__state.is-late strong { color: #FFB4AC; }
.paywin__actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; justify-content: flex-end; }

.track { margin-top: 26px; }
.track__days { display: grid; grid-template-columns: repeat(var(--days), 1fr); gap: 3px; }
.track__day { height: 34px; border-radius: 6px; background: rgba(159, 189, 255, .12); position: relative; }
.track__day.is-window { background: var(--blue); }
.track__day.is-window.is-past { background: #3F68C9; }
.track__day.is-late { background: rgba(242, 109, 97, .55); }
.track__day.is-today { box-shadow: 0 0 0 2px #fff inset; }
.track__day.is-today::after {
  content: "Hoy"; position: absolute; top: -22px; left: 50%; transform: translateX(-50%);
  font: 800 .72rem var(--f-head); color: #fff; white-space: nowrap;
}
.track__legend { display: flex; justify-content: space-between; margin-top: 8px; font-size: .8rem; color: #93A8D6; }
.track__legend b { color: #fff; font-weight: 700; }

/* ------------------------------------------------------------ listas y tablas */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table th { text-align: left; font-weight: 700; color: var(--muted); font-size: .82rem; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #FAFBFE; }
.table .right, .right { text-align: right; }
.table td.actions { white-space: nowrap; text-align: right; }
.cell-title { font-weight: 700; color: var(--ink); }
.cell-sub { display: block; font-size: .84rem; color: var(--muted); }

.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; gap: 14px; align-items: flex-start; padding: 13px 22px; border-top: 1px solid var(--line-2); }
.list > li:first-child { border-top: 0; }
.list__icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--blue-50); color: var(--blue); flex: none; }
.list__main { flex: 1; min-width: 0; }
.list__main b { color: var(--ink); }
.list__end { text-align: right; flex: none; }

.period { margin-bottom: 18px; }
.period__title { font: 800 1rem var(--f-head); color: var(--ink); margin: 0 0 8px 4px; }

/* ------------------------------------------------------------ pills, badges, avisos */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--r-pill); font-size: .8rem; font-weight: 700; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill--ok { color: var(--ok); background: var(--ok-bg); }
.pill--warn { color: var(--warn); background: var(--warn-bg); }
.pill--bad { color: var(--bad); background: var(--bad-bg); }
.pill--info { color: var(--info); background: var(--info-bg); }
.pill--neutral { color: var(--muted); background: var(--line-2); }
.badge { min-width: 22px; height: 22px; padding: 0 7px; border-radius: var(--r-pill); background: #F26D61; color: #fff; font-size: .75rem; font-weight: 800; display: inline-grid; place-items: center; }

.alert { display: flex; gap: 12px; align-items: flex-start; padding: 13px 16px; border-radius: 12px; margin-bottom: 14px; font-weight: 600; border: 1px solid transparent; }
.alert--success { background: var(--ok-bg); color: #0B5E41; border-color: #BFE6D5; }
.alert--danger { background: var(--bad-bg); color: #8E241E; border-color: #F5C9C4; }
.alert--info { background: var(--info-bg); color: #173E9E; border-color: #CFDCFB; }
.alert--warning { background: var(--warn-bg); color: #7A4500; border-color: #F4D9A9; }
.alert .icon { margin-top: 2px; }
.alert button { margin-left: auto; background: none; border: 0; color: inherit; cursor: pointer; opacity: .6; }

.note { padding: 14px 16px; border-radius: 12px; background: var(--mist); border: 1px dashed var(--line); color: var(--muted); }
.note--late { background: var(--bad-bg); border: 1px solid #F5C9C4; color: #8E241E; }
.note--late strong { color: var(--bad); }

/* ------------------------------------------------------------ noticias */
.news { list-style: none; margin: 0; padding: 0; }
.news li { padding: 14px 22px; border-top: 1px solid var(--line-2); border-left: 3px solid transparent; }
.news li:first-child { border-top: 0; }
.news li.is-important { border-left-color: var(--blue); }
.news li.is-urgent { border-left-color: var(--bad); background: #FFF9F8; }
.news h3 { margin-bottom: 3px; }
.news p { margin: 0; color: var(--text); white-space: pre-line; }
.news time { font-size: .8rem; color: var(--muted); }

/* ------------------------------------------------------------ medios de pago */
.pay-method { padding: 14px 22px; border-top: 1px solid var(--line-2); }
.pay-method:first-child { border-top: 0; }
.pay-method h3 { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.kv { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 12px; font-size: .9rem; align-items: center; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 700; color: var(--ink); word-break: break-all; font-variant-numeric: tabular-nums; }
.copy { background: none; border: 1px solid var(--line); border-radius: 8px; padding: 3px 8px; font-size: .78rem; color: var(--blue); cursor: pointer; font-weight: 700; }
.copy:hover { background: var(--blue-50); }
.copy.is-done { color: var(--ok); border-color: #BFE6D5; }

/* ------------------------------------------------------------ propiedad e inventario */
.address { display: flex; gap: 18px; align-items: center; }
.address__mark { width: 56px; height: 56px; border-radius: 14px; background: var(--blue-50); display: grid; place-items: center; color: var(--blue); }
.address__mark .icon { width: 26px; height: 26px; }
.facts { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 16px; }
.facts div span { display: block; font-size: .82rem; color: var(--muted); }
.facts div b { font: 800 1.05rem var(--f-head); color: var(--ink); }

.inventory { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.item { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--paper); display: flex; flex-direction: column; }
.item__photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; background: var(--line-2); aspect-ratio: 16 / 9; }
.item__photos a:first-child { grid-column: 1 / -1; grid-row: span 1; }
.item__photos.count-1 a { grid-column: 1 / -1; }
.item__photos img { width: 100%; height: 100%; object-fit: cover; }
.item__photos--empty { display: grid; place-items: center; color: var(--muted); font-size: .85rem; }
.item__body { padding: 12px 14px 14px; }
.item__body h3 { margin-bottom: 2px; }
.item__meta { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; gap: 8px; }

.video { border-radius: 14px; overflow: hidden; background: #000; }
.video video { width: 100%; max-height: 520px; }
.pdf-frame { width: 100%; height: 78vh; border: 1px solid var(--line); border-radius: 12px; background: var(--mist); }

.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.media-grid a, .media-grid video { border-radius: 10px; overflow: hidden; aspect-ratio: 1; background: var(--line-2); display: block; }
.media-grid img, .media-grid video { width: 100%; height: 100%; object-fit: cover; }
.media-grid .doc { display: grid; place-items: center; color: var(--blue); }

/* ------------------------------------------------------------ línea de tiempo (incidentes) */
.timeline { list-style: none; margin: 0; padding: 0 0 0 8px; }
.timeline li { position: relative; padding: 0 0 20px 28px; border-left: 2px solid var(--line); }
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 3px; width: 12px; height: 12px; border-radius: 50%; background: var(--paper); border: 2px solid var(--sky); }
.timeline li.is-status::before { background: var(--blue); border-color: var(--blue); }
.timeline li.is-internal { opacity: .8; }
.timeline li.is-internal .timeline__body { background: #FFFBEF; border-color: #F4E3B5; }
.timeline__meta { font-size: .84rem; color: var(--muted); }
.timeline__meta b { color: var(--ink); }
.timeline__body { margin-top: 6px; padding: 10px 12px; background: var(--mist); border: 1px solid var(--line-2); border-radius: 10px; white-space: pre-line; }

/* ------------------------------------------------------------ formularios */
.form { display: grid; gap: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.form-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid .span-2, .form-grid .field.span-2 { grid-column: 1 / -1; }
.form-section { padding-top: 6px; }
.form-section > h3 { margin-bottom: 4px; }
.form-section > p { color: var(--muted); font-size: .9rem; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 700; font-size: .9rem; color: var(--ink); }
.field input, .field select, .field textarea, .input {
  width: 100%; font: inherit; color: var(--text); background: var(--paper);
  border: 1px solid #CBD5E5; border-radius: var(--r-control); padding: 10px 12px; min-height: 42px;
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { resize: vertical; min-height: 96px; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { outline: 0; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, .15); }
.field__hint { color: var(--muted); }
.field__error { color: var(--bad); font-weight: 600; }
.field--error input, .field--error select, .field--error textarea { border-color: var(--bad); }
.input-affix { display: flex; align-items: stretch; }
.input-affix span { display: grid; place-items: center; padding: 0 12px; border: 1px solid #CBD5E5; border-right: 0; border-radius: var(--r-control) 0 0 var(--r-control); background: var(--mist); color: var(--muted); font-weight: 700; }
.input-affix input { border-radius: 0 var(--r-control) var(--r-control) 0 !important; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-weight: 600; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--blue); }
.check small { display: block; color: var(--muted); font-weight: 400; }
.dropzone {
  display: grid; justify-items: center; gap: 6px; text-align: center; padding: 22px 16px; cursor: pointer;
  border: 1.5px dashed #B9C6DD; border-radius: 12px; background: #FAFCFF; color: var(--muted);
}
.dropzone:hover, .dropzone.is-over { border-color: var(--blue); background: var(--blue-50); color: var(--ink); }
.dropzone .icon { width: 26px; height: 26px; color: var(--blue); }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dropzone__files { font-weight: 700; color: var(--ink); font-size: .88rem; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; padding-top: 6px; flex-wrap: wrap; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.filters .input, .filters select { width: auto; min-width: 180px; }
.seg { display: inline-flex; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.seg a { padding: 6px 12px; border-radius: 8px; color: var(--muted); font-weight: 700; font-size: .88rem; text-decoration: none; }
.seg a.is-active { background: var(--ink); color: #fff; }

/* ------------------------------------------------------------ botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px;
  border-radius: var(--r-control); border: 1px solid transparent; font: 700 .93rem var(--f-body); cursor: pointer;
  text-decoration: none !important; white-space: nowrap; transition: background .15s, border-color .15s;
}
.btn--primary { background: var(--blue); color: #fff; }
.btn--primary:hover { background: var(--blue-600); }
.btn--light { background: #fff; color: var(--ink); border-color: var(--line); }
.btn--light:hover { border-color: #C3CFE3; background: #FAFBFE; }
.btn--ghost { background: transparent; color: var(--blue); }
.btn--ghost:hover { background: var(--blue-50); }
.btn--danger { color: var(--bad); }
.btn--danger.btn--primary { background: var(--bad); color: #fff; }
.btn--sm { min-height: 32px; padding: 0 10px; font-size: .85rem; border-radius: 8px; }
.btn--on-dark { background: #fff; color: var(--ink); }
.btn--on-dark:hover { background: #E6EDFF; }
.btn--outline-dark { border-color: rgba(159,189,255,.4); color: #fff; background: transparent; }
.btn--outline-dark:hover { background: rgba(159,189,255,.12); }
.btn--block { width: 100%; }

/* ------------------------------------------------------------ avatar y vacíos */
.avatar { border-radius: 50%; object-fit: cover; background: var(--sky); color: var(--ink); display: inline-grid; place-items: center; font: 800 .85rem var(--f-head); flex: none; }
.avatar--sm { width: 30px; height: 30px; font-size: .72rem; }
.avatar--md { width: 38px; height: 38px; }
.avatar--lg { width: 84px; height: 84px; font-size: 1.4rem; }
.empty { text-align: center; padding: 34px 20px; color: var(--muted); }
.empty .icon { width: 34px; height: 34px; color: var(--sky); margin: 0 auto 10px; }
.empty h3 { margin-bottom: 4px; }
.empty .btn { margin-top: 12px; }

.pagination { display: flex; gap: 6px; justify-content: center; padding: 16px; }
.pagination a, .pagination span { min-width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; border: 1px solid var(--line); background: #fff; font-weight: 700; color: var(--ink); text-decoration: none; }
.pagination span { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ------------------------------------------------------------ autenticación */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
.auth__brand { background: var(--ink); color: #C9D6F2; padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth__brand img { width: 210px; }
.auth__brand h1 { color: #fff; font-size: clamp(1.9rem, 3.2vw, 2.6rem); max-width: 16ch; line-height: 1.12; }
.auth__brand p { max-width: 42ch; color: #AFC2EA; margin-top: 14px; }
.auth__brand ul { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; }
.auth__brand li { display: flex; gap: 12px; align-items: center; color: #DDE7FF; }
.auth__brand li .icon { color: var(--sky); }
.auth__net { position: absolute; right: -60px; bottom: -40px; width: 340px; opacity: .14; pointer-events: none; }
.auth__panel { display: grid; place-items: center; padding: 40px 24px; background: var(--paper); }
.auth__card { width: 100%; max-width: 440px; }
.auth__card h2 { font-size: 1.6rem; font-weight: 900; margin-bottom: 4px; }
.auth__card > p { color: var(--muted); margin-bottom: 22px; }
.auth__alt { margin-top: 20px; text-align: center; color: var(--muted); }
.auth__mobile-logo { display: none; margin-bottom: 26px; }
.avatar-pick { display: flex; align-items: center; gap: 14px; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 1180px) {
  .grid--main { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .kpi:nth-child(3) { border-left: 0; }
  .kpi:nth-child(n+3) { border-top: 1px solid var(--line-2); }
}
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 40; inset: 0 auto 0 0; width: 272px; transform: translateX(-100%); transition: transform .2s ease; }
  .app.nav-open .sidebar { transform: none; box-shadow: 0 0 0 100vmax rgba(14,42,90,.45); }
  .topbar { padding: 14px 18px 0; }
  .topbar__menu { display: inline-grid; place-items: center; }
  .page { padding: 14px 18px 48px; }
  .grid--2, .grid--3, .form-grid, .form-grid--3 { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth__brand { display: none; }
  .auth__mobile-logo { display: block; }
  .paywin { padding: 22px 18px; }
  .paywin__state { text-align: left; }
  .paywin__actions { justify-content: flex-start; }
  .track__day { height: 26px; }
  .table-stack thead { display: none; }
  .table-stack tr { display: grid; grid-template-columns: 1fr auto; padding: 10px 4px; border-bottom: 1px solid var(--line-2); }
  .table-stack td { border: 0; padding: 4px 12px; }
}
@media (max-width: 560px) {
  .kpis { grid-template-columns: 1fr; }
  .kpi { border-left: 0 !important; border-top: 1px solid var(--line-2); }
  .kpi:first-child { border-top: 0; }
  h1 { font-size: 1.45rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media print {
  .sidebar, .topbar, .page-head__actions, .form-actions { display: none !important; }
  .app { display: block; }
  body { background: #fff; }
}

/* visor de fotos */
dialog.lightbox { border: 0; padding: 0; background: transparent; max-width: 94vw; max-height: 92vh; }
dialog.lightbox::backdrop { background: rgba(8, 20, 45, .86); }
dialog.lightbox img { max-height: 88vh; border-radius: 10px; }
dialog.lightbox button { position: fixed; top: 16px; right: 20px; background: #fff; border: 0; width: 38px; height: 38px; border-radius: 50%; font-size: 22px; cursor: pointer; }
[hidden] { display: none !important; }
