:root {
  --bg: #f2f7fb;
  --surface: #ffffff;
  --surface-2: #f5f9fc;
  --ink: #10202e;
  --muted: #566a7b;
  --line: #dce7f0;
  --brand: #1a76bd;
  --brand-600: #135f9b;
  --brand-50: #e4f1fb;
  --brand-ink: #ffffff;
  --accent: #f29b1d;
  --ok: #1a8f5b;
  --ok-bg: #e3f5ec;
  --warn: #b7791f;
  --warn-bg: #fdf3dc;
  --danger: #cf3f3f;
  --danger-bg: #fdeaea;
  --info: #2a62c9;
  --info-bg: #e8effc;
  --shadow: 0 1px 2px rgba(16, 32, 46, .06), 0 6px 20px rgba(16, 32, 46, .07);
  --radius: 14px;
  --radius-sm: 10px;
  --sidebar: 252px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0a131b;
  --surface: #112029;
  --surface-2: #162a37;
  --ink: #e7f0f7;
  --muted: #8fa6b7;
  --line: #223645;
  --brand: #5db6f0;
  --brand-600: #86cdf6;
  --brand-50: #12304a;
  --brand-ink: #04243d;
  --ok: #4fd08f; --ok-bg: #12301f;
  --warn: #f0b95a; --warn-bg: #33270f;
  --danger: #ff7b7b; --danger-bg: #381818;
  --info: #7ea6f5; --info-bg: #15233f;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a131b; --surface: #112029; --surface-2: #162a37; --ink: #e7f0f7; --muted: #8fa6b7; --line: #223645;
    --brand: #5db6f0; --brand-600: #86cdf6; --brand-50: #12304a; --brand-ink: #04243d;
    --ok: #4fd08f; --ok-bg: #12301f; --warn: #f0b95a; --warn-bg: #33270f; --danger: #ff7b7b; --danger-bg: #381818;
    --info: #7ea6f5; --info-bg: #15233f;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.5 var(--font); background: var(--bg); color: var(--ink); }
h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -.01em; }
h1 { font-size: 1.55rem; } h2 { font-size: 1.15rem; } h3 { font-size: 1rem; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.muted { color: var(--muted); } .small { font-size: .86rem; } .right { text-align: right; }
.nowrap { white-space: nowrap; } .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .86em; }
.hide { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
svg.i { width: 1.15em; height: 1.15em; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: -.2em; }

/* ---------- Shell ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--surface); border-right: 1px solid var(--line); padding: 18px 14px; display: flex; flex-direction: column; gap: 6px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; font-weight: 700; font-size: 1.05rem; }
.brand .logo { width: 38px; height: 38px; border-radius: 12px; background: #fff; color: #fff; display: grid; place-items: center; font-size: 1.2rem; }
.brand small { display: block; font-weight: 500; color: var(--muted); font-size: .75rem; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 6px 10px; border-radius: var(--radius-sm); color: var(--ink); font-weight: 500; }
.nav a:hover { background: var(--surface-2); text-decoration: none; }
.nav a.active { background: var(--brand-50); color: var(--brand-600); font-weight: 600; }
.nav .group { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 14px 12px 4px; }
.sidebar .spacer { flex: 1; }
.userbox { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--brand-50); color: var(--brand-600); display: grid; place-items: center; font-weight: 700; flex: none; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; position: sticky; top: 0; z-index: 20; align-items: center; gap: 10px; padding: 10px clamp(12px, 3vw, 28px); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.content { padding: 28px clamp(16px, 3vw, 40px) 60px; max-width: 1280px; width: 100%; }
.page-head { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.page-head p { margin: 4px 0 0; }
.scrim { display: none; }

@media (max-width: 960px) {
  .shell, .shell.collapsed { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; z-index: 40; inset: 0 auto 0 0; width: min(84vw, 300px); transform: translateX(-102%); transition: transform .2s ease; box-shadow: var(--shadow); }
  .nav-open .sidebar { transform: none; }
  .nav-open .scrim { display: block; position: fixed; inset: 0; z-index: 30; background: rgba(0, 0, 0, .45); }
  .content { padding-top: 20px; }
}

/* ---------- Componentes ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.card.flat { box-shadow: none; }
.card > h2, .card > .card-head { margin-bottom: 14px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.grid { display: grid; gap: 16px; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.auto { grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.split { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 1100px) { .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .split { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 700px) { .cols-2, .cols-3, .cols-4 { grid-template-columns: minmax(0, 1fr); } }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }

.stat { display: flex; flex-direction: column; gap: 6px; }
.stat .label { color: var(--muted); font-size: .85rem; display: flex; gap: 8px; align-items: center; }
.stat .value { font-size: 1.9rem; font-weight: 700; letter-spacing: -.02em; }
.stat .ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand-600); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); background: var(--surface); padding: 9px 16px; border-radius: var(--radius-sm); font-weight: 600; cursor: pointer; min-height: 40px; transition: background .12s, border-color .12s, transform .05s; }
.btn:hover { background: var(--surface-2); border-color: #c9d4cf; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.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.danger { color: var(--danger); } .btn.danger:hover { background: var(--danger-bg); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.sm { padding: 5px 11px; min-height: 32px; font-size: .88rem; }
.btn.icon { padding: 8px; min-width: 40px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.badge.ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.badge.warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.badge.danger { background: var(--danger-bg); color: var(--danger); border-color: transparent; }
.badge.info { background: var(--info-bg); color: var(--info); border-color: transparent; }
.badge.brand { background: var(--brand-50); color: var(--brand-600); border-color: transparent; }

/* Formularios */
.form { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form { grid-template-columns: minmax(0, 1fr); } }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > label, .field > .lbl { font-size: .84rem; font-weight: 600; color: var(--muted); }
.field .hint { font-size: .8rem; color: var(--muted); }
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time], input[type=datetime-local], input[type=search], input[type=tel], input[type=url], select, textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); min-height: 40px;
}
input:focus, select:focus, textarea:focus { border-color: var(--brand); outline: 2px solid var(--brand-50); }
textarea { min-height: 84px; resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--brand); }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); }
.switch input { width: 42px; height: 24px; accent-color: var(--brand); }
.secret-state { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* Tablas → tarjetas en móvil */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:hover { background: var(--surface-2); }
.table tr.clickable { cursor: pointer; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 720px) {
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 10px; padding: 6px 4px; background: var(--surface); }
  .table td { border: 0; padding: 6px 12px; display: flex; justify-content: space-between; gap: 14px; text-align: right; }
  .table td::before { content: attr(data-label); color: var(--muted); font-size: .8rem; font-weight: 600; text-align: left; }
  .table td:not([data-label])::before { content: none; }
}

.empty { text-align: center; padding: 36px 16px; color: var(--muted); }
.empty .big { font-size: 2.2rem; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 10px 14px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; }
.tabs button.active { color: var(--brand-600); border-color: var(--brand); }
.searchbar { position: relative; flex: 1 1 260px; max-width: 420px; }
.searchbar svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.searchbar input { padding-left: 38px; }
.list { display: flex; flex-direction: column; }
.list > .item { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); }
.list > .item:last-child { border: 0; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 6px 14px; margin: 0; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; }
@media (max-width: 520px) { .kv { grid-template-columns: minmax(0, 1fr); } .kv dt { margin-top: 6px; } }
.alert { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--info-bg); color: var(--info); display: flex; gap: 10px; align-items: flex-start; }
.alert.warn { background: var(--warn-bg); color: var(--warn); } .alert.danger { background: var(--danger-bg); color: var(--danger); } .alert.ok { background: var(--ok-bg); color: var(--ok); }
.copy-box { display: flex; flex-wrap: wrap; gap: 8px; } .copy-box input { flex: 1 1 180px; min-width: 0; font-family: ui-monospace, monospace; font-size: .85rem; }

/* Modal & toasts */
.modal-back { position: fixed; inset: 0; z-index: 60; background: rgba(8, 16, 13, .55); display: grid; place-items: center; padding: 16px; overflow-y: auto; }
.modal { background: var(--surface); border-radius: 18px; width: min(680px, 100%); max-height: calc(100vh - 32px); overflow: auto; box-shadow: 0 24px 60px rgba(0, 0, 0, .35); }
.modal.wide { width: min(960px, 100%); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.modal-body { padding: 22px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding-top: 18px; }
@media (max-width: 640px) { .modal-back { align-items: end; padding: 0; } .modal { border-radius: 18px 18px 0 0; max-height: 92vh; } }
.toasts { position: fixed; z-index: 80; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; max-width: min(380px, calc(100vw - 32px)); }
.toast { background: var(--ink); color: var(--bg); padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow); animation: pop .18s ease; }
.toast.error { background: var(--danger); color: #fff; } .toast.ok { background: var(--ok); color: #fff; }
@keyframes pop { from { transform: translateY(8px); opacity: 0; } }

/* Login */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.login-hero { background: linear-gradient(150deg, #0f4f83 0%, #1a76bd 55%, #4fb0ec 100%); color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login-hero::after { content: "🐾"; position: absolute; font-size: 22rem; right: -60px; bottom: -80px; opacity: .08; }
.login-hero h1 { font-size: 2.3rem; max-width: 14ch; }
.login-hero ul { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; opacity: .92; }
.login-panel { display: grid; place-items: center; padding: 32px 20px; }
.login-card { width: min(400px, 100%); }
@media (max-width: 860px) { .login { grid-template-columns: minmax(0, 1fr); } .login-hero { padding: 28px 24px; } .login-hero h1 { font-size: 1.6rem; } .login-hero ul, .login-hero::after { display: none; } }

/* POS */
.pos { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(320px, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1000px) { .pos { grid-template-columns: minmax(0, 1fr); } }
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.prod { text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius-sm); padding: 12px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; min-height: 92px; }
.prod:hover { border-color: var(--brand); background: var(--brand-50); }
.prod b { font-size: .92rem; } .prod .price { color: var(--brand-600); font-weight: 700; margin-top: auto; }
.cart-line { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.cart-line input { width: 70px; min-height: 34px; padding: 4px 8px; }
.totals { display: grid; gap: 6px; margin-top: 12px; } .totals div { display: flex; justify-content: space-between; } .totals .grand { font-size: 1.4rem; font-weight: 800; border-top: 1px solid var(--line); padding-top: 10px; }

/* Cola / agenda */
.queue-item { display: flex; gap: 14px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); flex-wrap: wrap; }
.queue-item .pos-n { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--brand-50); color: var(--brand-600); flex: none; }
.queue-item.called { border-color: var(--accent); } .queue-item.in_progress { border-color: var(--ok); background: var(--ok-bg); }
.queue-item .grow { flex: 1 1 200px; min-width: 0; }
.slots { display: flex; gap: 8px; flex-wrap: wrap; }
.slot { border: 1px solid var(--line); background: var(--surface); padding: 6px 12px; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: .88rem; }
.slot.taken { opacity: .4; text-decoration: line-through; cursor: not-allowed; }
.slot.sel, .slot:not(.taken):hover { border-color: var(--brand); background: var(--brand-50); color: var(--brand-600); }
.daynav { display: flex; align-items: center; gap: 8px; }
.timeline { display: flex; flex-direction: column; gap: 8px; }
.appt { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: var(--radius-sm); background: var(--surface); }
.appt.cancelled, .appt.no_show { opacity: .55; border-left-color: var(--muted); } .appt.done { border-left-color: var(--ok); } .appt.waiting, .appt.in_progress { border-left-color: var(--accent); }
.appt .time { font-weight: 700; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .appt { grid-template-columns: 54px 1fr; } .appt .actions { grid-column: 1 / -1; } }

/* Integraciones */
.integration-head { display: flex; gap: 14px; align-items: center; }
.integration-head .logo { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-weight: 800; color: #fff; font-size: 1.2rem; }
.logo.gcal { background: linear-gradient(135deg, #1a73e8, #34a853); }
.logo.lioren { background: linear-gradient(135deg, #2b59c3, #4f86f7); } .logo.wa { background: linear-gradient(135deg, #1faa59, #25d366); }
.steps { counter-reset: s; display: grid; gap: 10px; padding: 0; list-style: none; margin: 0; }
.steps li { counter-increment: s; display: flex; gap: 12px; align-items: flex-start; }
.steps li::before { content: counter(s); width: 26px; height: 26px; border-radius: 50%; background: var(--brand-50); color: var(--brand-600); font-weight: 700; display: grid; place-items: center; flex: none; font-size: .85rem; }
.bubble { max-width: 80%; padding: 8px 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); white-space: pre-wrap; }
.bubble.out { margin-left: auto; background: var(--brand-50); }
.loading { padding: 40px; text-align: center; color: var(--muted); }

@media print { .sidebar, .topbar, .btn, .page-head .row { display: none !important; } .shell { display: block; } .card { box-shadow: none; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Manual de usuario */
.manual { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; align-items: start; }
.toc { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 2px; max-height: calc(100vh - 40px); overflow: auto; }
.toc a { padding: 7px 12px; border-radius: var(--radius-sm); color: var(--ink); font-size: .92rem; }
.toc a:hover { background: var(--surface-2); text-decoration: none; }
.manual section { scroll-margin-top: 16px; }
.manual section h2 { display: flex; gap: 10px; align-items: center; margin-bottom: 4px; }
.manual ol, .manual ul { padding-left: 22px; margin: 8px 0; display: grid; gap: 6px; }
.manual .tip { margin-top: 12px; }
.manual kbd { border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: 0 6px; background: var(--surface-2); font-size: .85em; }
@media (max-width: 900px) { .manual { grid-template-columns: minmax(0, 1fr); } .toc { position: static; flex-direction: row; flex-wrap: wrap; max-height: none; } .toc a { border: 1px solid var(--line); background: var(--surface); } }
@media print { .toc { display: none; } .manual { display: block; } .manual section { break-inside: avoid; } }

/* ---------- Marca, menú y topbar ---------- */
.shell { transition: grid-template-columns .2s ease; }
.brand-img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: none; background: #70c0f0; box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--line); }
.brand-img.sm { width: 34px; height: 34px; } .brand-img.lg { width: 96px; height: 96px; } .brand-img.xl { width: 120px; height: 120px; box-shadow: 0 0 0 4px rgba(255, 255, 255, .55); }
.brand { gap: 12px; padding: 2px 6px 16px; }
.brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.brand-text b { font-size: .95rem; } .brand-text small { font-weight: 500; color: var(--muted); font-size: .75rem; }
.drawer-close { display: none; margin-left: auto; }
.topbar-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.topbar-brand strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grow { flex: 1; }
.nav-ico { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); flex: none; transition: background .12s, color .12s; }
.nav-ico svg { width: 1.25rem; height: 1.25rem; }
.nav a:hover .nav-ico { background: color-mix(in srgb, var(--brand) 22%, var(--surface)); }
.nav a.active .nav-ico { background: var(--brand); color: var(--brand-ink); }
.nav a.active { background: var(--brand-50); }
.user-text { min-width: 0; } .user-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.no-scroll { overflow: hidden; }
.sidebar { transition: transform .22s ease; }
/* Menú compacto (solo iconos) en escritorio */
@media (min-width: 961px) {
  .shell.collapsed { grid-template-columns: 76px 1fr; }
  .shell.collapsed .sidebar { padding: 18px 10px; align-items: center; }
  .shell.collapsed .brand { padding: 2px 0 14px; }
  .shell.collapsed .brand-text, .shell.collapsed .nav-label, .shell.collapsed .nav .group, .shell.collapsed .user-text { display: none; }
  .shell.collapsed .nav a { padding: 4px; justify-content: center; }
  .shell.collapsed .nav .group + a { margin-top: 0; }
  .shell.collapsed .nav { align-items: center; }
  .shell.collapsed .userbox { border: 0; padding: 0; }
}
@media (max-width: 960px) {
  .drawer-close { display: inline-flex; }
  .brand { padding-top: 6px; }
  .nav a { padding: 8px 10px; }
}
@media (max-width: 560px) { .hide-sm { display: none; } .topbar-brand strong { max-width: 38vw; } }
.sidebar .nav a:focus-visible { outline-offset: -2px; }

/* Login */
.login-brand { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.login-brand h2 { font-size: 1.25rem; font-weight: 700; }
.login-mobile-logo { display: none; justify-content: center; }
.login-hero::after { content: none; }
@media (max-width: 860px) { .login-hero { display: none; } .login-mobile-logo { display: flex; } .login { background: linear-gradient(180deg, #e4f1fb, var(--bg) 45%); } }

/* Logo en configuración */
.logo-uploader { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.logo-uploader .brand-img { width: 120px; height: 120px; }
.drop { border: 2px dashed var(--line); border-radius: var(--radius); padding: 18px; text-align: center; color: var(--muted); cursor: pointer; flex: 1 1 260px; }
.drop:hover, .drop.over { border-color: var(--brand); background: var(--brand-50); color: var(--brand-600); }

/* Menú: se desplaza con rueda/táctil/teclado pero sin barra de scroll visible */
.sidebar { scrollbar-width: none; -ms-overflow-style: none; overscroll-behavior: contain; }
.sidebar::-webkit-scrollbar { display: none; width: 0; height: 0; }

/* ---------- Calendario ---------- */
.vc0 { --vc: #1a76bd; } .vc1 { --vc: #2e9d5b; } .vc2 { --vc: #dd8410; } .vc3 { --vc: #8a5cd0; } .vc4 { --vc: #d4467a; } .vc5 { --vc: #0f9aa8; } .vc6 { --vc: #6b7b88; }
.cal-card { padding: 16px; }
.cal-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.cal-title { flex: 1 1 220px; font-size: 1.2rem; } .cal-title::first-letter { text-transform: uppercase; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.seg button { border: 0; background: var(--surface); padding: 8px 14px; cursor: pointer; font-weight: 600; color: var(--muted); }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.active { background: var(--brand); color: var(--brand-ink); }
.cal-filters { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.cal-filters select { width: auto; min-width: 220px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .85rem; color: var(--muted); margin-left: auto; }
.legend span { display: inline-flex; align-items: center; gap: 6px; } .legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--vc); }

.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.month .dow { padding: 8px; text-align: center; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--surface-2); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cell { min-height: 118px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 4px; display: flex; flex-direction: column; gap: 3px; background: var(--surface); }
.cell.out { background: var(--surface-2); } .cell.out .daynum { color: var(--muted); opacity: .6; }
.cell.today { background: var(--brand-50); }
.cell-head { display: flex; justify-content: space-between; align-items: center; }
.daynum { border: 0; background: none; cursor: pointer; font-weight: 700; width: 28px; height: 28px; border-radius: 50%; }
.cell.today .daynum { background: var(--brand); color: var(--brand-ink); }
.daynum:hover { background: var(--brand-50); }
.add { border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 1.1rem; width: 24px; height: 24px; border-radius: 50%; opacity: 0; }
.cell:hover .add, .add:focus-visible { opacity: 1; } .add:hover { background: var(--brand); color: var(--brand-ink); }
.cell-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.chip { border: 0; border-left: 3px solid var(--vc); background: color-mix(in srgb, var(--vc) 15%, var(--surface)); color: var(--ink); border-radius: 5px; padding: 2px 6px; text-align: left; font-size: .78rem; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip:hover, .tg-ev:hover { filter: brightness(.96); outline: 1px solid var(--vc); }
.chip.st-done, .tg-ev.st-done { opacity: .65; } .chip.st-cancelled, .chip.st-no_show, .tg-ev.st-cancelled, .tg-ev.st-no_show { opacity: .5; text-decoration: line-through; }
.chip.st-in_progress, .tg-ev.st-in_progress { box-shadow: inset 0 0 0 1px var(--vc); }
.more { border: 0; background: none; color: var(--brand-600); font-size: .78rem; font-weight: 600; cursor: pointer; text-align: left; padding: 0 6px; }

.tg-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.tg { min-width: max(100%, calc(60px + var(--cols) * 130px)); }
.tg-head, .tg-body { display: grid; grid-template-columns: 56px repeat(var(--cols), minmax(0, 1fr)); }
.tg-head { position: sticky; top: 0; background: var(--surface-2); border-bottom: 1px solid var(--line); z-index: 2; }
.tg-colhead { padding: 8px 6px; text-align: center; border-left: 1px solid var(--line); display: flex; flex-direction: column; font-size: .88rem; }
.tg-colhead span { font-size: .75rem; color: var(--muted); } .tg-colhead.today b { color: var(--brand-600); }
.tg-hour { font-size: .72rem; color: var(--muted); text-align: right; padding: 0 6px; transform: translateY(-8px); }
.tg-col { position: relative; border-left: 1px solid var(--line); background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 55px, var(--line) 55px, var(--line) 56px); cursor: copy; }
.tg-col.today { background-color: color-mix(in srgb, var(--brand-50) 55%, transparent); }
.tg-ev { position: absolute; border: 0; border-left: 4px solid var(--vc); background: color-mix(in srgb, var(--vc) 18%, var(--surface)); color: var(--ink); border-radius: 6px; padding: 3px 6px; text-align: left; font-size: .78rem; overflow: hidden; cursor: pointer; line-height: 1.25; }
.tg-ev span { display: block; color: var(--muted); font-size: .72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 700px) {
  .cell { min-height: 74px; padding: 2px; } .chip { font-size: .68rem; padding: 1px 3px; } .chip b { display: none; }
  .cal-filters select { min-width: 0; flex: 1 1 100%; } .legend { margin-left: 0; }
  .seg button { padding: 8px 10px; }
}

/* ---------- Ficha del paciente ---------- */
[hidden] { display: none !important; }
.back-link { display: inline-block; margin-bottom: 10px; color: var(--muted); font-weight: 600; }
.pc-hero { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; padding: 22px; border-radius: 20px; border: 1px solid var(--line); box-shadow: var(--shadow);
  background: radial-gradient(120% 140% at 0% 0%, var(--brand-50) 0%, var(--surface) 62%); }
.pc-avatar { width: 84px; height: 84px; border-radius: 26px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); display: grid; place-items: center; font-size: 2.8rem; flex: none; }
.pc-id { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.pc-id h1 { font-size: 1.9rem; }
.pc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pc-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.pc-alert { margin-top: 12px; }
.pc-tabs { display: flex; gap: 6px; overflow-x: auto; margin: 18px 0 16px; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; scrollbar-width: none; }
.pc-tabs::-webkit-scrollbar { display: none; }
.pc-tabs button { position: relative; display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; padding: 9px 14px; border-radius: 10px; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap; }
.pc-tabs button:hover { background: var(--surface-2); color: var(--ink); }
.pc-tabs button.active { background: var(--brand); color: var(--brand-ink); }
.pc-tabs .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 0 2px var(--surface); }
.pc-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .pc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .pc-grid { grid-template-columns: minmax(0, 1fr); } .pc-hero { padding: 16px; } .pc-id h1 { font-size: 1.5rem; } .pc-actions .btn { flex: 1 1 140px; } }
.pc-card h3 { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 10px; }
.pc-big { font-size: 1.35rem; font-weight: 800; letter-spacing: -.01em; margin-bottom: 2px; }

.tl { list-style: none; margin: 0; padding: 0 0 0 4px; position: relative; display: flex; flex-direction: column; gap: 10px; }
.tl::before { content: ""; position: absolute; left: 21px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.tl-item { position: relative; display: flex; gap: 12px; align-items: flex-start; }
.tl-ico { z-index: 1; width: 36px; height: 36px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line); display: grid; place-items: center; flex: none; }
.tl-item details { flex: 1; min-width: 0; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 12px; }
.tl-item summary { display: flex; justify-content: space-between; gap: 12px; cursor: pointer; list-style: none; align-items: baseline; }
.tl-item summary::-webkit-details-marker { display: none; }
.tl-body { padding-top: 8px; }
.wchart { width: 100%; height: auto; max-height: 280px; color: var(--ink); }
.file { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.file-ico { font-size: 1.8rem; } .file > div:nth-child(2) { flex: 1 1 140px; } .file-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-stats .stat { justify-content: center; }
.acct-due { border-color: var(--brand); }

/* ---------- Selector con búsqueda ---------- */
.picker-box { position: relative; }
.picker-input { padding-right: 34px; }
.picker-clear { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: var(--surface-2); width: 24px; height: 24px; border-radius: 50%; cursor: pointer; color: var(--muted); }
.picker-list { position: absolute; z-index: 70; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px; list-style: none; max-height: 280px; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow); }
.picker-list li { padding: 8px 10px; border-radius: 8px; cursor: pointer; display: flex; flex-direction: column; }
.picker-list li span { font-size: .8rem; color: var(--muted); }
.picker-list li:hover, .picker-list li.active { background: var(--brand-50); }
.picker-list .empty-opt { color: var(--muted); cursor: default; }

/* ---------- Voucher / comprobante ---------- */
.v-stage { background: var(--surface-2); border-radius: var(--radius-sm); padding: 16px; display: flex; justify-content: center; overflow-x: auto; }
.voucher { background: #fff; color: #111; font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 12px; line-height: 1.45; padding: 16px; box-shadow: 0 2px 14px rgba(0, 0, 0, .15); }
.voucher.ticket { width: 302px; } .voucher.a4 { width: 720px; font-size: 13.5px; padding: 36px; font-family: var(--font); }
.v-head { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; padding-bottom: 8px; border-bottom: 1px dashed #999; }
.v-logo { width: 74px; height: 74px; border-radius: 50%; object-fit: cover; } .a4 .v-logo { width: 96px; height: 96px; }
.v-company { display: flex; flex-direction: column; } .v-company strong { font-size: 1.1em; }
.v-title { text-align: center; font-weight: 800; letter-spacing: .08em; padding: 10px 0 4px; } .v-title small { display: block; font-weight: 600; letter-spacing: 0; }
.v-meta { display: grid; grid-template-columns: auto 1fr; gap: 1px 10px; margin: 6px 0 10px; padding: 8px 0; border-top: 1px dashed #999; border-bottom: 1px dashed #999; } .v-meta dt { font-weight: 700; } .v-meta dd { margin: 0; text-align: right; }
.v-items { width: 100%; border-collapse: collapse; } .v-items th { text-align: left; border-bottom: 1px solid #111; padding: 3px 0; } .v-items td { padding: 3px 0; vertical-align: top; } .v-items .r { text-align: right; white-space: nowrap; padding-left: 6px; }
.v-totals { margin-top: 8px; padding-top: 8px; border-top: 1px dashed #999; display: grid; gap: 2px; } .v-totals > div { display: flex; justify-content: space-between; }
.v-totals .grand { font-weight: 800; font-size: 1.25em; padding: 2px 0; } .v-totals .grand.sub { border-top: 1px solid #111; }
.v-note { text-align: center; font-size: .9em; margin: 10px 0 0; } .v-footer { text-align: center; font-weight: 700; margin: 10px 0 0; padding-top: 8px; border-top: 1px dashed #999; }
@media print {
  body.printing > :not(.modal-back) { display: none !important; }
  body.printing .modal-back { position: static; background: none; padding: 0; display: block; overflow: visible; }
  body.printing .modal { box-shadow: none; max-height: none; width: auto; overflow: visible; border-radius: 0; background: none; }
  body.printing .modal-head, body.printing .no-print { display: none !important; }
  body.printing .modal-body { padding: 0; } body.printing .v-stage { background: none; padding: 0; overflow: visible; }
  body.printing .voucher { box-shadow: none; margin: 0 auto; }
}

/* Búsqueda y filtros del calendario */
.cal-search { display: flex; flex-direction: column; gap: 10px; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fchip { border: 1px solid var(--line); background: var(--surface); color: var(--muted); border-radius: 999px; padding: 4px 12px; font-size: .84rem; font-weight: 600; cursor: pointer; }
.fchip:hover { border-color: var(--brand); }
.fchip.on { background: var(--brand-50); border-color: var(--brand); color: var(--brand-600); }
.fchip.on::before { content: "✓ "; }
.cal-search .cal-filters select { min-width: 190px; flex: 0 1 auto; }
@media (max-width: 700px) { .cal-search .cal-filters select { flex: 1 1 100%; } }
.cal-search .searchbar { flex: none; max-width: none; }

/* ---------- Sala de espera en vivo ---------- */
.wboard { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 16px; align-items: start; }
.wcol { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.wcol-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 4px 4px 8px; border-bottom: 1px solid var(--line); }
.wempty { padding: 22px 10px; text-align: center; color: var(--muted); border: 2px dashed var(--line); border-radius: var(--radius-sm); }
.wfoot { text-align: center; }
.wcard { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.wcard.waiting { border-left-color: var(--warn); } .wcard.called { border-left-color: var(--info); background: var(--info-bg); } .wcard.in_progress { border-left-color: var(--ok); background: var(--ok-bg); }
.wcard-top { display: flex; gap: 10px; align-items: center; } .wcard .grow { flex: 1; min-width: 0; }
.pos-n { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--brand-50); color: var(--brand-600); flex: none; }
.pos-n.state { background: transparent; font-size: 1.3rem; }
.wact { gap: 6px; }
.wcard.flash { animation: wflash 1.6s ease-out 2; }
@keyframes wflash { 0% { box-shadow: 0 0 0 0 rgba(26, 118, 189, .7); transform: scale(1.02); } 100% { box-shadow: 0 0 0 16px rgba(26, 118, 189, 0); transform: none; } }
.expected { margin-bottom: 16px; }
.exp { display: flex; flex-direction: column; text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 8px 14px; cursor: pointer; min-width: 150px; }
.exp span { font-size: .78rem; color: var(--muted); } .exp:hover { border-color: var(--brand); background: var(--brand-50); } .exp.late { border-color: var(--warn); }
.qr { border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 6px; }
@media (prefers-reduced-motion: reduce) { .wcard.flash { animation: none; } }

/* Foto del paciente */
.pc-photo { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: none; }
.pc-avatar { position: relative; overflow: hidden; cursor: pointer; padding: 0; width: 104px; height: 104px; border-radius: 30px; }
.pc-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pc-avatar .cam { position: absolute; right: 6px; bottom: 6px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: .9rem; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); opacity: .92; }
.pc-avatar:hover .cam, .pc-avatar:focus-visible .cam { background: var(--brand); }
.link-danger { border: 0; background: none; color: var(--danger); font-size: .78rem; font-weight: 600; cursor: pointer; padding: 0; }
.mini-photo { width: 40px; height: 40px; border-radius: 12px; object-fit: cover; display: inline-grid; place-items: center; background: var(--brand-50); flex: none; font-size: 1.2rem; }
@media (max-width: 600px) { .pc-avatar { width: 84px; height: 84px; border-radius: 24px; } }

/* ---------- Portal del cliente ---------- */
[hidden] { display: none !important; }
.portal-hero { margin-bottom: 16px; }
.portal-hero h1 { margin: 0 0 4px; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin: 16px 0; }
@media (max-width: 860px) { .grid2 { grid-template-columns: minmax(0, 1fr); } }
.portal-line { padding: 10px 0; border-top: 1px solid var(--line); }
.portal-line:first-of-type { border-top: 0; }
.hosp-card { margin: 16px 0; border-left: 4px solid var(--brand); }
.hosp-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
@media (max-width: 860px) { .hosp-grid { grid-template-columns: minmax(0, 1fr); } }
.updates { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.cam-box { background: #0b1220; border-radius: 14px; padding: 10px; color: #cbd5e1; display: grid; gap: 8px; align-content: start; }
.cam-frame { aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; background: #111827; display: grid; place-items: center; }
.cam-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cam-ph { padding: 24px; text-align: center; color: #94a3b8; font-size: .9rem; }
.cam-state { min-height: 22px; }
.pets { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 14px; }
.pet-card { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: 14px; }
.pet-ph { width: 76px; height: 76px; border-radius: 14px; object-fit: cover; flex: none; }
.pet-ph.ph { display: grid; place-items: center; background: var(--brand-50); color: var(--brand-600); }
.vacc { margin: 6px 0 0; padding-left: 18px; font-size: .88rem; }
.order-list { display: grid; gap: 8px; max-height: 46vh; overflow: auto; margin-bottom: 12px; }
.order-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; }
.qty { display: flex; align-items: center; gap: 8px; } .qty output { min-width: 22px; text-align: center; font-weight: 700; }
.order-total { text-align: right; font-size: 1.1rem; margin-top: 8px; }

.price-in { width: 120px; text-align: right; font-weight: 600; }
.charge-cat { display: grid; gap: 6px; max-height: 240px; overflow: auto; margin: 8px 0 12px; }
.cat-row { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; text-align: left; width: 100%; font: inherit; color: inherit; }
.cat-row:hover:not(:disabled) { border-color: var(--brand); background: var(--brand-50); }
.cat-row:disabled { opacity: .55; cursor: not-allowed; }
.cl-line { display: grid; grid-template-columns: minmax(0, 1fr) 84px 110px 40px; gap: 8px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.cl-line .extra { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; }
.cl-line input { width: 100%; }
@media (max-width: 640px) {
  .cl-line { grid-template-columns: 96px minmax(0, 1fr) 40px; }
  .cl-line > div:first-child { grid-column: 1 / -1; }
  .cl-line .lt { text-align: right; }
}
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0; }
.chips button { border: 1px solid var(--line); background: var(--surface); padding: 4px 10px; border-radius: 999px; font-size: .82rem; cursor: pointer; }
.chips button.active { border-color: var(--brand); background: var(--brand-50); color: var(--brand-600); font-weight: 600; }
.cl-line .extra input { width: auto; flex: 1; min-width: 140px; }

/* ---------- Responsive: refuerzos generales ---------- */
html { -webkit-text-size-adjust: 100%; }
img, video, canvas, svg { max-width: 100%; }
.main, .content, .card, .grid > *, .grid2 > *, .stack > *, .row > *, .form > *, .split > *, .manual > *, .hosp-grid > *, .pos > *, .page-head > *, .card-head > *, .pc-hero > *, .cl-line > * { min-width: 0; }
h1, h2, h3, .card strong, .card .small, .field label, .hint, .badge, .alert, .page-head p, dd, li, p { overflow-wrap: anywhere; }
.btn { max-width: 100%; }
.badge { max-width: 100%; }
.mono, code, kbd { overflow-wrap: anywhere; word-break: break-word; }
input, select, textarea { max-width: 100%; }
.page-head > .row { min-width: 0; }
.tabs, .pc-tabs, .toc { max-width: 100%; }
.tabs { scrollbar-width: none; } .tabs::-webkit-scrollbar { display: none; }
.table td .cv { min-width: 0; }
@media (max-width: 720px) {
  .table td { align-items: flex-start; }
  .table td .cv { text-align: right; flex: 1 1 auto; overflow-wrap: anywhere; }
  .table td::before { flex: 0 0 38%; max-width: 38%; }
  .table td:not([data-label]) .cv { text-align: left; width: 100%; }
}
@media (max-width: 1100px) { .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) {
  .cols-4.stats, .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat .value { font-size: 1.45rem; }
  .card { padding: 16px; }
  .page-head { margin-bottom: 16px; }
  .page-head > .row { width: 100%; }
  .page-head > .row .btn { flex: 1 1 auto; justify-content: center; }
}
@media (max-width: 380px) {
  .cols-4 { grid-template-columns: minmax(0, 1fr); }
  .content { padding-left: 12px; padding-right: 12px; }
  h1 { font-size: 1.45rem; }
}
.seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; } .seg::-webkit-scrollbar { display: none; }
.cl-line > div:first-child .row > * { min-width: 0; flex: 1 1 120px; }
