/* Fuentes alojadas en el propio servidor (sin llamadas a Google: mejor para RGPD) */
@font-face { font-family: "Jost"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/jost-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Jost"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/jost-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Jost"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/jost-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/inter-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/inter-latin-600-normal.woff2") format("woff2"); }

/* =====================================================================
   CSB Gestión · Clínica San Bartolomé
   ===================================================================== */
:root {
  --brand: #538672;
  --brand-600: #43705e;
  --brand-700: #355a4b;
  --brand-50: #eef4f1;
  --brand-100: #dce9e3;
  --ink: #2b333c;
  --ink-2: #5b6670;
  --ink-3: #8a949c;
  --charcoal: #373f4a;
  --line: #e2e7e9;
  --line-2: #eef1f2;
  --bg: #f4f6f5;
  --card: #ffffff;
  --danger: #b5544a;
  --danger-50: #fbefed;
  --warn: #b7782f;
  --warn-50: #fbf3e8;
  --ok: #3d8a5f;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(30, 40, 50, .05), 0 1px 1px rgba(30, 40, 50, .03);
  --shadow-lg: 0 12px 32px rgba(30, 40, 50, .14);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Jost", "Inter", system-ui, sans-serif;
  --nav-w: 236px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.5 var(--font); }
a { color: var(--brand-600); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 500; color: var(--charcoal); margin: 0; }
h1 { font-size: 26px; letter-spacing: .2px; }
h2 { font-size: 16.5px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
h3 { font-size: 14px; font-weight: 600; margin: 12px 0 6px; }
h2 .ico { color: var(--brand); }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; }
.muted { color: var(--ink-3); }
.small { font-size: 12.5px; }
.hint { font-size: 12.5px; color: var(--ink-3); margin: 6px 0; }
.right { text-align: right; } .center { text-align: center; } .nowrap { white-space: nowrap; }
.mt { margin-top: 18px; }
.ico { flex: none; vertical-align: -3px; }

/* ---------------------------------------------------------- layout */
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--nav-w); background: #fff; border-right: 1px solid var(--line);
  display: flex; flex-direction: column; z-index: 40;
}
.brand { display: block; padding: 20px 20px 14px; }
.brand img { width: 100%; max-width: 180px; display: block; }
.sidebar nav { flex: 1; overflow-y: auto; padding: 4px 10px; }
.sidebar nav a {
  display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 8px; color: var(--ink-2);
  font-weight: 500; margin-bottom: 2px;
}
.sidebar nav a:hover { background: var(--line-2); text-decoration: none; color: var(--ink); }
.sidebar nav a.active { background: var(--brand-50); color: var(--brand-700); }
.sidebar nav a.active .ico { color: var(--brand); }
.nav-sep { font-size: 10.5px; text-transform: uppercase; letter-spacing: 1.1px; color: var(--ink-3); padding: 16px 12px 6px; font-weight: 600; }
.side-foot { border-top: 1px solid var(--line); padding: 12px; display: flex; align-items: center; gap: 8px; }
.side-foot .me { flex: 1; display: flex; align-items: center; gap: 10px; color: var(--ink); min-width: 0; }
.side-foot .me:hover { text-decoration: none; }
.side-foot .me span:last-child { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.side-foot .me small { color: var(--ink-3); font-size: 11.5px; }
.side-foot form { margin: 0; }
.topbar { display: none; }

.main { padding: 28px 32px 60px; max-width: 1360px; }
body.has-nav .main { margin-left: var(--nav-w); }
body.no-nav .main { margin: 0 auto; max-width: 560px; padding-top: 7vh; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head .sub { margin: 4px 0 0; color: var(--ink-2); }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.section-title { font-size: 15px; margin: 2px 0 12px; color: var(--ink-2); font-family: var(--font); font-weight: 600; }
.crumb { margin: -10px 0 14px; font-size: 13px; }

/* ---------------------------------------------------------- cards & grids */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); margin-bottom: 16px; }
.card.p0 { padding: 0; overflow-x: auto; }
.card.narrow { max-width: 760px; }
.scroll-x { overflow-x: auto; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 2fr 1.4fr; gap: 0 12px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 12px; }
.grid-8 { display: grid; grid-template-columns: repeat(8, 1fr); gap: 0 10px; }
.grid-2.top, .grid-main, .grid-side { align-items: start; }
.grid-2.top { gap: 16px; }
.grid-main > *, .grid-side > *, .grid-2 > * { min-width: 0; }
.grid-main { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; }
.grid-side { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 18px; }
.grid-side.rev { grid-template-columns: minmax(0, 1fr) 300px; }
.patron-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.patron-grid .card { margin: 0; }
.patron-grid .turno-h { margin: 6px 0 8px; }

/* ---------------------------------------------------------- dashboard */
.dash { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.dash .card { margin: 0; min-width: 0; }
.dash .table-wrap { overflow-x: auto; margin: 0 -4px; }
.dash .span-2 { grid-column: span 2; }
.search-card { display: flex; flex-direction: column; gap: 10px; }
.search-big { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 6px 6px 6px 14px; background: var(--bg); }
.search-big:focus-within { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px var(--brand-50); }
.search-big .ico { color: var(--ink-3); }
.search-big input { flex: 1; border: 0; background: transparent; font-size: 15px; padding: 8px 0; outline: none; min-width: 0; }
.quick { display: flex; gap: 8px; }
.fichar-card { text-align: center; background: linear-gradient(180deg, #fff 0%, var(--brand-50) 100%); }
.fichar-card h2 { justify-content: center; }
.fichar-card.is-in { background: linear-gradient(180deg, #fff 0%, #eaf3ee 100%); border-color: var(--brand-100); }
.clock { font-family: var(--font-head); font-size: 44px; font-weight: 500; color: var(--charcoal); line-height: 1; margin: 4px 0 8px; font-variant-numeric: tabular-nums; }
.estado { color: var(--ink-2); margin: 0 0 14px; }
.tramos { list-style: none; padding: 0; margin: 12px 0 0; font-size: 13px; color: var(--ink-2); }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.stat { display: flex; flex-direction: column; padding: 4px 2px; }
.stat .n { font-family: var(--font-head); font-size: 30px; font-weight: 500; color: var(--brand-700); line-height: 1.1; }
.stat .l { color: var(--ink-3); font-size: 12.5px; }
.turno-hoy { margin-bottom: 12px; }
.link-more { font-size: 13px; font-weight: 500; }

/* ---------------------------------------------------------- forms */
.form label { display: block; font-size: 12.5px; font-weight: 500; color: var(--ink-2); margin-bottom: 12px; }
.form label > input, .form label > select, .form label > textarea, .form label .input-group { margin-top: 5px; }
input, select, textarea {
  font: inherit; color: var(--ink); background: #fff; border: 1px solid #d3dadd; border-radius: 8px; padding: 8px 10px; width: 100%;
  transition: border-color .12s, box-shadow .12s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-50); }
input:disabled { background: var(--line-2); color: var(--ink-2); }
textarea { resize: vertical; line-height: 1.45; }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--brand); margin: 0; }
input[type=color] { padding: 2px; height: 38px; cursor: pointer; }
.form label.check, label.check { display: flex; align-items: flex-start; gap: 8px; font-weight: 400; color: var(--ink); font-size: 13.5px; cursor: pointer; }
label.check input { margin-top: 3px; }
label.check.mt { margin-top: 26px; }
.input-group { display: flex; gap: 6px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }
.form-actions.sticky { position: sticky; bottom: 0; background: linear-gradient(transparent, var(--bg) 30%); padding: 18px 0 8px; z-index: 5; }
.form.inline, form.inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.form.inline input, .form.inline select, form.inline select { width: auto; }
.select-sm, .input-sm { padding: 6px 8px; font-size: 13px; width: auto; }
.input-sm { width: 100%; }
.warn-box { background: var(--warn-50); border: 1px solid #efd9b9; padding: 10px 12px; border-radius: 8px; }
.row-form { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.row-form input[name=nombre] { flex: 1; }
.row-form input[type=color] { width: 44px; flex: none; }
.row-form .check { white-space: nowrap; font-size: 12.5px; }
.turno-form { border-bottom: 1px solid var(--line-2); padding-bottom: 12px; margin-bottom: 12px; }
.turno-form.new { border: 1px dashed var(--line); border-radius: 8px; padding: 12px; }
.turno-form h3 { margin-top: 0; }
.days { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.day input { display: none; }
.day span { display: inline-block; padding: 5px 10px; border: 1px solid var(--line); border-radius: 20px; font-size: 12.5px; cursor: pointer; color: var(--ink-2); }
.day input:checked + span { background: var(--brand); color: #fff; border-color: var(--brand); }
.days .check { margin: 0 6px; }
.inline-label { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); }
.inline-label input { width: auto; }

/* ---------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; font: 500 13.5px var(--font);
  padding: 8px 14px; border-radius: 8px; border: 1px solid #cfd7da; background: #fff; color: var(--ink); cursor: pointer;
  white-space: nowrap; transition: background .12s, border-color .12s, transform .05s;
}
.btn:hover { background: var(--line-2); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-600); border-color: var(--brand-600); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink-2); }
.btn-ghost:hover { background: #fff; color: var(--ink); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #9c463d; }
.btn-out { background: var(--charcoal); border-color: var(--charcoal); color: #fff; }
.btn-out:hover { background: #262c34; }
.btn-sm { padding: 5px 10px; font-size: 12.5px; }
.btn-xl { padding: 14px 26px; font-size: 16px; border-radius: 10px; min-width: 200px; }
.btn-block { width: 100%; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 8px; border: 0; background: transparent; color: var(--ink-2); cursor: pointer; }
.icon-btn:hover { background: var(--line-2); color: var(--ink); text-decoration: none; }

/* ---------------------------------------------------------- tables */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .6px; color: var(--ink-3); font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--line); background: #fafbfb; }
.table td { padding: 10px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table.compact th, .table.compact td { padding: 7px 10px; }
.card:not(.p0) .table th { background: transparent; }
.card:not(.p0) .table.compact th:first-child, .card:not(.p0) .table.compact td:first-child { padding-left: 0; }
.card:not(.p0) .table.compact th:last-child, .card:not(.p0) .table.compact td:last-child { padding-right: 0; }
.row-link { cursor: pointer; }
.row-link:hover td { background: #f8faf9; }
tr.dim td { opacity: .55; }
tr.warn td { background: #fffaf2; }
.empty-row { text-align: center; color: var(--ink-3); padding: 34px !important; }
tfoot td { border-top: 1px solid var(--line); background: #fafbfb; }
.matrix td, .matrix th { padding: 8px 12px; }
.matrix tr.group td { background: var(--brand-50); color: var(--brand-700); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .7px; padding: 6px 12px; }
.matrix input[type=checkbox] { width: 17px; height: 17px; }
.ml-av { margin-left: 34px; }

/* ---------------------------------------------------------- tags, chips, avatars */
.tag { --c: var(--ink-3); display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 11.5px; font-weight: 600; color: var(--c); background: color-mix(in srgb, var(--c) 12%, #fff); border: 1px solid color-mix(in srgb, var(--c) 24%, #fff); white-space: nowrap; }
.tag-medico { --c: #538672; } .tag-enfermeria { --c: #3e7cb1; } .tag-fisioterapia { --c: #8a6bb8; }
.tag-estetica { --c: #c25b7a; } .tag-administracion { --c: #b7782f; } .tag-direccion { --c: #373f4a; } .tag-otro { --c: #7a8691; }
.tag-warn { --c: var(--warn); } .tag-hoy { --c: var(--brand); }
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip { --c: var(--brand); display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 6px; font-size: 12.5px; background: color-mix(in srgb, var(--c) 11%, #fff); color: var(--ink); border-left: 3px solid var(--c); white-space: nowrap; }
.chip.mine { background: var(--c); color: #fff; font-weight: 600; }
.solo-yo .chip:not(.mine) { opacity: .35; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; vertical-align: 0; margin-right: 4px; }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; color: #fff; font-size: 12.5px; font-weight: 600; flex: none; letter-spacing: .3px; }
.avatar.sm { width: 28px; height: 28px; font-size: 11px; vertical-align: middle; margin-right: 6px; }
.ok-dot::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); margin-right: 6px; }
.turno-h { --c: var(--brand); display: inline-flex; align-items: baseline; gap: 8px; border-left: 3px solid var(--c); padding-left: 8px; margin-bottom: 6px; }
.turno-h span { color: var(--ink-3); font-size: 12.5px; }

/* ---------------------------------------------------------- pills, tabs, toolbar */
.pills { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.pill { padding: 5px 12px; border-radius: 20px; background: #fff; border: 1px solid var(--line); color: var(--ink-2); font-size: 13px; }
.pill small { color: var(--ink-3); margin-left: 3px; }
.pill:hover { text-decoration: none; border-color: var(--brand-100); }
.pill.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.pill.on small { color: rgba(255,255,255,.8); }
.spacer { flex: 1; }
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar select, .toolbar input { width: auto; }
.toolbar .search { flex: 1; min-width: 240px; display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid #d3dadd; border-radius: 8px; padding: 0 10px; }
.toolbar .search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-50); }
.toolbar .search input { border: 0; box-shadow: none; flex: 1; padding: 9px 0; }
.toolbar .search .ico { color: var(--ink-3); }
.month-nav { display: flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 3px; }
.month-nav strong { min-width: 130px; text-align: center; font-family: var(--font-head); font-weight: 500; font-size: 15px; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs a { padding: 10px 16px; color: var(--ink-2); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; font-weight: 500; }
.tabs a:hover { text-decoration: none; color: var(--ink); }
.tabs a.on { color: var(--brand-700); border-bottom-color: var(--brand); }
.pager { display: flex; gap: 4px; justify-content: center; margin-top: 14px; align-items: center; }
.pager a { padding: 5px 11px; border-radius: 6px; background: #fff; border: 1px solid var(--line); }
.pager a.on { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ---------------------------------------------------------- flashes */
.flash { padding: 11px 14px; border-radius: 8px; margin-bottom: 14px; font-size: 13.5px; border: 1px solid; display: flex; gap: 8px; align-items: flex-start; }
.flash-ok { background: #edf6f0; border-color: #cfe5d7; color: #2c6a47; }
.flash-error { background: var(--danger-50); border-color: #efcfca; color: #8f3d34; }
.flash-warn { background: var(--warn-50); border-color: #efd9b9; color: #87591f; }
.alert-allergy { font-size: 14px; }

/* ---------------------------------------------------------- definition list */
.dl { display: grid; grid-template-columns: 110px 1fr; gap: 7px 10px; margin: 0; font-size: 13.5px; }
.dl dt { color: var(--ink-3); }
.dl dd { margin: 0; word-break: break-word; }
.list-plain { list-style: none; margin: 0; padding: 0; }
.list-plain li { padding: 5px 0; }

/* ---------------------------------------------------------- historial */
.timeline { display: flex; flex-direction: column; gap: 12px; }
.visit-card { --c: var(--brand); background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--c); border-radius: var(--radius); padding: 14px 18px; box-shadow: var(--shadow); }
.visit-card header { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 6px; }
.visit-card .date { margin-left: 8px; font-family: var(--font-head); font-weight: 500; font-size: 15px; }
.visit-card .by { color: var(--ink-2); font-size: 13px; }
.visit-card p { margin: 5px 0; }
.visit-card footer { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.visit-detail .vsec { padding: 4px 0 12px; border-bottom: 1px solid var(--line-2); margin-bottom: 10px; }
.visit-detail .vsec:last-child { border-bottom: 0; margin-bottom: 0; }
.visit-detail h3 { color: var(--brand-700); font-size: 12px; text-transform: uppercase; letter-spacing: .8px; margin: 4px 0 6px; }
.visit-detail p { margin: 0; font-size: 14.5px; line-height: 1.6; }
.visit-detail .internal { background: var(--warn-50); margin: 6px -20px -18px; padding: 12px 20px 16px; border-radius: 0 0 var(--radius) var(--radius); }
details.constantes { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-bottom: 14px; background: #fafbfb; }
details.constantes summary { cursor: pointer; font-weight: 500; color: var(--ink-2); font-size: 13px; }
details.constantes[open] summary { margin-bottom: 10px; }
details.constantes label { margin-bottom: 4px; }

/* ---------------------------------------------------------- fichaje */
.jornada td { vertical-align: top; }
.marca { display: flex; align-items: center; gap: 8px; padding: 2px 0; flex-wrap: wrap; position: relative; }
.marca.anulada strong, .marca.anulada .tipo { text-decoration: line-through; opacity: .5; }
.tipo { font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 4px; }
.tipo-entrada { background: #e3f1e9; color: #2c6a47; }
.tipo-salida { background: #ebedf0; color: var(--charcoal); }

/* ---------------------------------------------------------- popovers */
details.pop { position: relative; display: inline-block; }
details.pop > summary { list-style: none; cursor: pointer; color: var(--ink-3); display: inline-flex; padding: 3px; border-radius: 5px; }
details.pop > summary::-webkit-details-marker { display: none; }
details.pop > summary:hover { background: var(--line-2); color: var(--ink); }
details.pop[open] > summary { background: var(--brand-50); color: var(--brand-700); }
details.pop > form, details.pop > div { position: absolute; z-index: 30; top: 100%; right: 0; margin-top: 4px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-lg); padding: 14px; width: 280px; }
.pop-title { font-weight: 600; margin-bottom: 8px; font-size: 13px; }

/* ---------------------------------------------------------- cuadrante */
.cuadrante td.c-dia, .cuadrante th.c-dia { width: 92px; white-space: nowrap; }
.cuadrante td.cell { position: relative; padding-right: 36px; min-width: 220px; }
.cuadrante .cell-edit { position: absolute; top: 8px; right: 8px; }
.cuadrante tr.week-start td { border-top: 2px solid var(--line); }
.cuadrante tr.today td { background: #f3f8f6; }
.cuadrante tr.festivo td { background: repeating-linear-gradient(-45deg, #fafbfb, #fafbfb 6px, #f2f4f5 6px, #f2f4f5 12px); }
.closed, .empty-cell { color: var(--ink-3); font-size: 12.5px; }
.empty-cell { font-style: italic; }
.pick { max-height: 320px; overflow-y: auto; margin-bottom: 10px; }
.pick-g { margin-bottom: 6px; }
.pick-t { font-size: 10.5px; text-transform: uppercase; letter-spacing: .9px; color: var(--ink-3); font-weight: 600; margin: 4px 0 2px; }
.pick-i { display: flex; align-items: center; gap: 7px; padding: 3px 4px; border-radius: 5px; cursor: pointer; font-size: 13px; font-weight: 400 !important; color: var(--ink) !important; margin: 0 !important; }
.pick-i:hover { background: var(--line-2); }
.pick-i .dot { margin: 0; }

/* ---------------------------------------------------------- auth / install */
.auth-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 34px 34px 28px; box-shadow: var(--shadow-lg); }
.auth-card.wide { max-width: 640px; margin: 0 auto; }
.auth-logo { width: 220px; display: block; margin: 0 auto 22px; }
.auth-card h1 { font-size: 22px; text-align: center; }
.auth-card .sub { text-align: center; color: var(--ink-3); margin: 4px 0 20px; }
.checks { list-style: none; padding: 0; margin: 16px 0; columns: 2; font-size: 13px; }
.checks li { padding: 2px 0; }
.checks .ok { color: var(--ok); } .checks .ko { color: var(--danger); font-weight: 600; }
.empty { text-align: center; padding: 40px 20px; }
.debug { text-align: left; background: #1e2329; color: #e6e6e6; padding: 14px; border-radius: 8px; overflow: auto; font-size: 12px; }

/* ---------------------------------------------------------- responsive */
@media (max-width: 1100px) {
  .dash { grid-template-columns: 1fr 1fr; }
  .grid-main, .grid-side, .grid-side.rev { grid-template-columns: 1fr; }
  .grid-8 { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 820px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; box-shadow: var(--shadow-lg); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(20, 28, 34, .35); z-index: 35; }
  .topbar { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 30; background: #fff; border-bottom: 1px solid var(--line); padding: 8px 12px; }
  body.has-nav .main { margin-left: 0; }
  .main { padding: 18px 16px 50px; }
  .dash { grid-template-columns: 1fr; }
  .dash .span-2 { grid-column: auto; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .grid-8 { grid-template-columns: repeat(2, 1fr); }
  .hide-sm { display: none; }
  h1 { font-size: 22px; }
  .auth-card { padding: 26px 20px; }
  .checks { columns: 1; }
  .table td, .table th { padding: 9px 10px; }
  .cuadrante td.cell { min-width: 160px; }
  .dl { grid-template-columns: 100px 1fr; }
}

/* ---------------------------------------------------------- print */
@media print {
  .sidebar, .topbar, .page-head .actions, .toolbar, .cell-edit, aside, .form-actions, .flash { display: none !important; }
  body.has-nav .main { margin: 0; padding: 0; max-width: none; }
  body { background: #fff; font-size: 11px; }
  .card { box-shadow: none; border: 0; padding: 0; }
  .grid-main { display: block; }
  .chip { border: 1px solid #ccc; border-left: 3px solid var(--c); }
  .cuadrante tr { page-break-inside: avoid; }
}
