/* ==========================================================
   Odontología Integral — sistema de diseño
   Mobile-first. Claro / oscuro. Sin dependencias de framework.
   ========================================================== */
:root {
  --bg: #f3f6f7;
  --surface: #ffffff;
  --surface-2: #f7fafa;
  --line: #e3e9ec;
  --text: #14282e;
  --muted: #62777f;
  --brand: #0e7c86;
  --brand-600: #0a646c;
  --brand-50: #e3f4f5;
  --brand-ink: #ffffff;
  --ok: #148a54;   --ok-bg: #e2f5ec;
  --warn: #b7791f; --warn-bg: #fdf1d9;
  --bad: #c53030;  --bad-bg: #fde8e8;
  --info: #2563a8; --info-bg: #e4eefa;
  --nav: #0b2a30;
  --nav-text: #b9d0d4;
  --shadow: 0 1px 2px rgba(15, 40, 46, .06), 0 4px 14px rgba(15, 40, 46, .06);
  --radius: 14px;
  --bar-h: 58px;
  --tab-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0c1a1e;
  --surface: #12262b;
  --surface-2: #163037;
  --line: #234149;
  --text: #e6f0f2;
  --muted: #8fa8af;
  --brand: #2fb7c2;
  --brand-600: #54cbd5;
  --brand-50: #12383d;
  --brand-ink: #062a2e;
  --ok: #4cc58b;   --ok-bg: #12352a;
  --warn: #e3b25a; --warn-bg: #3a2f14;
  --bad: #f08585;  --bad-bg: #3d1d1d;
  --info: #7db4ee; --info-bg: #14283f;
  --nav: #08151a;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 4px 14px rgba(0,0,0,.3);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.5 "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
img { max-width: 100%; }
button { font: inherit; cursor: pointer; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.fw { font-weight: 700; }
.mono { font-variant-numeric: tabular-nums; }
.right { text-align: right; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.stack { display: grid; gap: 14px; }
.mt { margin-top: 16px; } .mb { margin-bottom: 16px; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Layout ---------- */
.app { min-height: 100vh; }
.sidebar { display: none; }
.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--bar-h);
  display: flex; align-items: center; gap: 10px; padding: 0 14px;
  background: var(--nav); color: #fff;
}
.topbar .brand-name { font-weight: 800; font-size: 1.02rem; }
.main { padding: 16px 14px calc(var(--tab-h) + var(--safe-b) + 28px); max-width: 1180px; margin: 0 auto; }

.brand { display: flex; align-items: center; gap: 10px; color: inherit; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px; flex: none;
  display: grid; place-items: center; background: var(--brand); color: #fff; overflow: hidden;
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.brand-mark svg { width: 22px; height: 22px; }

/* Barra inferior (celular) */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  height: calc(var(--tab-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: var(--surface); border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(5, 1fr);
}
.tabbar a, .tabbar button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  background: none; border: 0; color: var(--muted); font-size: .68rem; font-weight: 700; text-decoration: none;
}
.tabbar i { font-size: 1.35rem; line-height: 1; }
.tabbar .on { color: var(--brand); }
.tabbar .fab-wrap { position: relative; }
.tabbar .fab {
  position: absolute; top: -20px; width: 56px; height: 56px; border-radius: 50%;
  background: var(--brand); color: var(--brand-ink); display: grid; place-items: center;
  box-shadow: 0 6px 16px rgba(14, 124, 134, .45); font-size: 1.7rem;
}
.tabbar .fab-label { margin-top: 30px; }

@media (min-width: 900px) {
  .sidebar {
    display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; width: 250px;
    background: var(--nav); color: var(--nav-text); padding: 18px 12px; overflow-y: auto; z-index: 20;
  }
  .sidebar .brand { color: #fff; padding: 4px 8px 18px; }
  .sidebar .brand-name { font-weight: 800; font-size: 1.05rem; line-height: 1.15; }
  .navgroup { font-size: .68rem; letter-spacing: .09em; text-transform: uppercase; font-weight: 800; padding: 16px 12px 6px; color: #6f9299; }
  .navlink {
    display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
    color: var(--nav-text); font-weight: 600; text-decoration: none; margin-bottom: 2px;
  }
  .navlink i { font-size: 1.15rem; width: 22px; text-align: center; }
  .navlink:hover { background: rgba(255,255,255,.07); text-decoration: none; color: #fff; }
  .navlink.on { background: var(--brand); color: #fff; }
  .navlink .count { margin-left: auto; background: var(--bad); color: #fff; border-radius: 99px; font-size: .7rem; padding: 1px 7px; }
  .sidebar-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.1); display: grid; gap: 6px; }
  .topbar, .tabbar { display: none; }
  .app { padding-left: 250px; }
  .main { padding: 28px 32px 48px; }
}

/* ---------- Encabezado de página ---------- */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head h1 { font-size: 1.45rem; }
.page-head .sub { color: var(--muted); font-size: .9rem; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; margin-bottom: 8px; font-size: .9rem; }

/* ---------- Tarjetas ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.card-head h2, .card-head h3 { font-size: 1rem; }
.card-sub { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 16px; border-radius: 11px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); font-weight: 700; font-size: .92rem; text-decoration: none;
  transition: transform .06s, background .15s, border-color .15s; white-space: nowrap;
}
.btn:hover { text-decoration: none; border-color: var(--brand); }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { background: var(--brand-600); border-color: var(--brand-600); }
.btn-ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn-danger { background: var(--bad-bg); border-color: transparent; color: var(--bad); }
.btn-danger:hover { border-color: var(--bad); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-wa { background: #25d366; border-color: #25d366; color: #05381b; }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: .85rem; border-radius: 10px; }
.btn-icon { width: 40px; min-height: 40px; padding: 0; }
.btn-block { width: 100%; }
.btn-lg { min-height: 50px; font-size: 1rem; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ---------- Formularios ---------- */
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field > label, .label { font-weight: 700; font-size: .85rem; }
.hint { color: var(--muted); font-size: .8rem; }
.form-control, .form-select, input[type=text], input[type=search], input[type=number], input[type=date], input[type=time], input[type=email], input[type=password], input[type=tel], select, textarea {
  width: 100%; min-height: 46px; padding: 10px 13px; border-radius: 11px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-size: 16px;
}
textarea { min-height: 90px; resize: vertical; }
.form-control:focus, .form-select:focus, input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--brand); outline-offset: -1px; border-color: var(--brand);
}
input[type=file] { padding: 9px; }
.grid2 { display: grid; gap: 0 14px; grid-template-columns: 1fr; }
.grid3 { display: grid; gap: 0 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid2 { grid-template-columns: 1fr 1fr; } .grid3 { grid-template-columns: 1fr 1fr 1fr; } }
.errorlist { list-style: none; padding: 0; margin: 0; color: var(--bad); font-size: .85rem; font-weight: 600; }
.alert-form { background: var(--bad-bg); color: var(--bad); border-radius: 11px; padding: 10px 14px; margin-bottom: 14px; font-weight: 600; }
.switch { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input { width: 22px; height: 22px; min-height: 0; accent-color: var(--brand); }
.search {
  position: relative; display: flex; align-items: center;
}
.search i { position: absolute; left: 14px; color: var(--muted); pointer-events: none; }
.search input { padding-left: 40px; }

/* Selector de paciente con búsqueda (combobox) */
.combo { position: relative; }
.combo-list {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 50; max-height: 260px; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
}
.combo-item { padding: 11px 14px; cursor: pointer; border-bottom: 1px solid var(--line); }
.combo-item:last-child { border: 0; }
.combo-item:hover, .combo-item.hl { background: var(--brand-50); }
.combo-empty { padding: 12px 14px; color: var(--muted); }

/* ---------- Chips, badges ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 99px; font-size: .78rem; font-weight: 700;
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--line);
}
.chip-ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.chip-warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.chip-bad { background: var(--bad-bg); color: var(--bad); border-color: transparent; }
.chip-info { background: var(--info-bg); color: var(--info); border-color: transparent; }
.chip-brand { background: var(--brand-50); color: var(--brand); border-color: transparent; }
.avatar {
  width: 42px; height: 42px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--brand-50); color: var(--brand); font-weight: 800; font-size: .95rem;
}
.avatar-lg { width: 64px; height: 64px; font-size: 1.4rem; }

/* ---------- Mensajes (toasts) ---------- */
.toasts { position: fixed; z-index: 100; left: 12px; right: 12px; top: 12px; display: grid; gap: 8px; pointer-events: none; }
@media (min-width: 900px) { .toasts { left: auto; width: 380px; top: 18px; right: 18px; } }
.toast {
  pointer-events: auto; display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); font-weight: 600;
  animation: in .25s ease-out;
}
.toast.success { border-left: 5px solid var(--ok); }
.toast.error, .toast.danger { border-left: 5px solid var(--bad); }
.toast.warning { border-left: 5px solid var(--warn); }
.toast.info { border-left: 5px solid var(--info); }
@keyframes in { from { transform: translateY(-10px); opacity: 0; } }

/* ---------- Modales (dialog nativo) ---------- */
dialog { border: 0; padding: 0; background: transparent; max-width: 100vw; color: var(--text); }
dialog::backdrop { background: rgba(5, 20, 24, .55); backdrop-filter: blur(2px); }
.sheet {
  background: var(--surface); border-radius: 20px 20px 0 0; width: 100vw; padding: 18px 18px calc(18px + var(--safe-b));
  position: fixed; bottom: 0; left: 0; max-height: 92vh; overflow-y: auto;
}
.sheet h3 { font-size: 1.1rem; margin-bottom: 4px; }
.sheet .actions { display: flex; gap: 10px; margin-top: 8px; }
.sheet .actions .btn { flex: 1; }
@media (min-width: 640px) {
  .sheet { position: relative; width: 460px; border-radius: 18px; bottom: auto; left: auto; padding: 24px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
  dialog[open] { display: grid; place-items: center; width: 100vw; height: 100vh; }
}
.menu-list { display: grid; gap: 4px; margin-top: 10px; }
.menu-list a, .menu-list button { display: flex; align-items: center; gap: 12px; padding: 13px 12px; border-radius: 12px; background: var(--surface-2); border: 0; color: var(--text); font-weight: 700; text-align: left; text-decoration: none; width: 100%; }
.menu-list i { color: var(--brand); font-size: 1.2rem; width: 24px; text-align: center; }

/* ---------- Agenda ---------- */
.daynav { display: flex; align-items: center; gap: 8px; }
.daynav .title { flex: 1; text-align: center; min-width: 0; }
.daynav .title .big { font-size: 1.2rem; font-weight: 800; text-transform: capitalize; }
.weekstrip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin: 14px 0; }
.wd {
  display: flex; flex-direction: column; align-items: center; padding: 8px 0; border-radius: 12px; background: var(--surface);
  border: 1px solid var(--line); color: var(--text); text-decoration: none; position: relative;
}
.wd:hover { text-decoration: none; border-color: var(--brand); }
.wd .n { font-weight: 800; font-size: 1.05rem; }
.wd .d { font-size: .68rem; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.wd .dot { height: 5px; width: 5px; border-radius: 50%; background: var(--brand); margin-top: 3px; opacity: 0; }
.wd.has .dot { opacity: 1; }
.wd.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.wd.on .d { color: inherit; opacity: .85; } .wd.on .dot { background: #fff; }
.wd.today:not(.on) { border-color: var(--brand); }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 14px; }
@media (min-width: 700px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 13px; }
.stat .v { font-size: 1.4rem; font-weight: 800; line-height: 1.2; }
.stat .l { font-size: .75rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }

.turnos { display: grid; gap: 10px; }
@media (min-width: 900px) { .turnos { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1280px) { .turnos { grid-template-columns: repeat(3, 1fr); } }
.turno { display: flex; gap: 12px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); border-left: 5px solid var(--warn); }
.turno.done { border-left-color: var(--ok); }
.turno.cancel { border-left-color: var(--muted); opacity: .6; }
.turno .hora { font-weight: 800; font-size: 1.25rem; min-width: 56px; line-height: 1.1; }
.turno .hora small { display: block; font-size: .68rem; color: var(--muted); font-weight: 700; }
.turno .who { font-weight: 800; font-size: 1.02rem; color: var(--text); }
.turno-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.tgl {
  display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); font-weight: 700; font-size: .82rem;
}
.tgl.on-ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.tgl.on-warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }

.empty { text-align: center; padding: 44px 16px; color: var(--muted); }
.empty i { font-size: 2.6rem; display: block; margin-bottom: 6px; opacity: .6; }

/* ---------- Listas ---------- */
.list { display: grid; }
.item { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--line); color: var(--text); }
.item:last-child { border-bottom: 0; }
a.item:hover { background: var(--surface-2); text-decoration: none; }
.item .t { font-weight: 700; }
.pgrid { display: grid; gap: 0; }
@media (min-width: 900px) { .pgrid { grid-template-columns: 1fr 1fr; } .pgrid .item { border-right: 1px solid var(--line); } }

/* Tablas (se vuelven tarjetas en celular) */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .right { text-align: right; }
@media (max-width: 719px) {
  .tbl thead { display: none; }
  .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; width: 100%; }
  .tbl tr { padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .tbl td { padding: 2px 0; border: 0; }
  .tbl td[data-l]::before { content: attr(data-l) ": "; color: var(--muted); font-size: .78rem; font-weight: 700; }
  .tbl .right { text-align: left; }
}

/* ---------- Ficha del paciente ---------- */
.ficha-head { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.tabs { display: flex; gap: 4px; overflow-x: auto; margin: 16px -14px 14px; padding: 0 14px; scrollbar-width: none; position: sticky; top: var(--bar-h); z-index: 10; background: var(--bg); padding-top: 6px; padding-bottom: 6px; }
.tabs::-webkit-scrollbar { display: none; }
@media (min-width: 900px) { .tabs { margin: 18px 0 16px; padding: 0; top: 0; } }
.tab { flex: none; padding: 10px 16px; border-radius: 11px; font-weight: 700; color: var(--muted); background: transparent; border: 0; display: inline-flex; gap: 8px; align-items: center; }
.tab.on { background: var(--brand); color: var(--brand-ink); }
.pane { display: none; } .pane.on { display: block; }
.kv { display: grid; grid-template-columns: 1fr; gap: 0; }
.kv > div { display: flex; justify-content: space-between; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.kv > div:last-child { border-bottom: 0; }
.kv dt, .kv .k { color: var(--muted); font-weight: 600; }
.kv .v { font-weight: 700; text-align: right; }
.cols2 { display: grid; gap: 14px; }
@media (min-width: 900px) { .cols2 { grid-template-columns: 1fr 1fr; align-items: start; } }

/* Cuestionario de antecedentes */
.checks { display: grid; gap: 8px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .checks { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .checks { grid-template-columns: 1fr 1fr 1fr; } }
.chk { display: flex; gap: 10px; align-items: center; padding: 11px 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); cursor: pointer; font-weight: 600; }
.chk input { width: 22px; height: 22px; min-height: 0; accent-color: var(--brand); flex: none; }
.chk:has(input:checked) { background: var(--brand-50); border-color: var(--brand); color: var(--brand); }
.chk.risk:has(input:checked) { background: var(--bad-bg); border-color: var(--bad); color: var(--bad); }

/* ---------- Odontograma ---------- */
.odo-tools { display: flex; gap: 8px; flex-wrap: wrap; position: sticky; top: calc(var(--bar-h) + 46px); z-index: 9; background: var(--bg); padding: 8px 0; }
@media (min-width: 900px) { .odo-tools { top: 0; } }
.tool { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 12px; border-radius: 10px; border: 2px solid var(--line); background: var(--surface); font-weight: 700; font-size: .82rem; color: var(--text); }
.tool .sw { width: 14px; height: 14px; border-radius: 4px; flex: none; }
.tool.on { border-color: var(--brand); background: var(--brand-50); }
.odo-block { margin-top: 14px; }
.odo-block h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-bottom: 8px; }
.odo-arch { display: grid; gap: 10px 22px; grid-template-columns: 1fr; margin-bottom: 10px; }
@media (min-width: 900px) { .odo-arch { grid-template-columns: 1fr 1fr; } }
.odo-quad { display: flex; gap: 4px; justify-content: space-between; }
.odo-quad.temp { justify-content: flex-start; gap: 6px; }
.tooth { display: flex; flex-direction: column; align-items: center; gap: 3px; flex: 1; min-width: 0; max-width: 64px; }
.tooth .num { font-size: .72rem; font-weight: 800; color: var(--muted); }
.tooth svg { width: 100%; height: auto; aspect-ratio: 1; touch-action: manipulation; display: block; }
.tooth svg .face { fill: var(--surface); stroke: var(--muted); stroke-width: 2; cursor: pointer; transition: fill .1s; }
.tooth svg .face:hover { fill: var(--brand-50); }
.tooth svg .outer { fill: none; stroke: var(--muted); stroke-width: 3; }
.tooth svg .mark { fill: none; stroke-width: 7; stroke-linecap: round; pointer-events: none; }
.tooth svg .state-txt { font: 800 30px "Manrope", sans-serif; pointer-events: none; text-anchor: middle; dominant-baseline: central; }
.tooth.sel .num { color: var(--brand); }
.tooth.ausente svg { opacity: .35; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .78rem; color: var(--muted); font-weight: 600; margin-top: 10px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.savestate { font-size: .8rem; font-weight: 700; color: var(--muted); }
.savestate.ok { color: var(--ok); } .savestate.err { color: var(--bad); }

/* ---------- Login ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; background:
  radial-gradient(900px 500px at 10% -10%, var(--brand-50), transparent), var(--bg); }
.login-card { width: 100%; max-width: 400px; padding: 30px 26px; }
.login-card .brand-mark { width: 64px; height: 64px; border-radius: 18px; margin: 0 auto 14px; }
.login-card .brand-mark svg { width: 36px; height: 36px; }

/* ---------- Finanzas ---------- */
.kpis { display: grid; gap: 12px; grid-template-columns: 1fr; margin-bottom: 16px; }
@media (min-width: 700px) { .kpis { grid-template-columns: repeat(3, 1fr); } }
.kpi { padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--brand); box-shadow: var(--shadow); }
.kpi.in { border-left-color: var(--ok); } .kpi.out { border-left-color: var(--bad); }
.kpi .v { font-size: 1.7rem; font-weight: 800; }
.kpi .l { color: var(--muted); font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; }
.money-in { color: var(--ok); font-weight: 800; } .money-out { color: var(--bad); font-weight: 800; }

/* ---------- Utilidades ---------- */
.sticky-actions { position: sticky; bottom: calc(var(--tab-h) + var(--safe-b)); background: linear-gradient(transparent, var(--bg) 30%); padding: 18px 0 8px; display: grid; gap: 10px; }
@media (min-width: 900px) { .sticky-actions { position: static; background: none; display: flex; justify-content: flex-end; padding: 8px 0; } }
.hide-m { display: none; } @media (min-width: 720px) { .hide-m { display: initial; } }
.only-m { display: initial; } @media (min-width: 720px) { .only-m { display: none; } }
.spin { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; display: inline-block; animation: sp .7s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }

@media print { .sidebar, .topbar, .tabbar, .no-print { display: none !important; } .app { padding: 0 !important; } .main { padding: 0 !important; max-width: none; } body { background: #fff; } }
