/* ==========================================================================
   BLAU · Panel de la clínica
   ========================================================================== */
:root {
  --white: #FFFFFF; --bg: #F3F7FB; --ice: #EEF6FC; --mist: #E1EEF9; --sky: #C4E0F5;
  --blue-300: #93C6EC; --blue-400: #5FA8E0; --blue: #2C78C0; --blue-700: #1D5E9C;
  --navy: #0B2540; --ink-2: #3D5670; --ink-3: #6A8098; --line: #DCE7F1; --line-2: #EAF1F8;
  --ok: #23946B; --ok-bg: #E4F5EE; --amber: #C77C12; --amber-bg: #FFF3DF; --violet: #5D69D9; --violet-bg: #ECEEFD;
  --red: #D14A46; --red-bg: #FCEBEA; --grey-bg: #EEF1F4;
  --shadow: 0 1px 2px rgba(11, 37, 64, .05), 0 10px 30px -14px rgba(44, 120, 192, .25);
  --r: 16px; --r-lg: 22px;
  --f-display: 'Fraunces', Georgia, serif; --f-text: 'Figtree', system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { font: 400 15px/1.5 var(--f-text); color: var(--navy); background: var(--bg); display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; -webkit-font-smoothing: antialiased; }
a { color: var(--blue); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--blue-400); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; }
p { margin: 0 0 .8em; }
.eyebrow { font: 600 11.5px/1 var(--f-text); letter-spacing: .14em; text-transform: uppercase; color: var(--blue); margin: 0 0 6px; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }

/* Lateral */
.side { background: var(--white); border-right: 1px solid var(--line); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; padding: 18px 14px; z-index: 30; }
.side-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); padding: 4px 8px 20px; }
.brand-mark { width: 36px; height: 36px; flex: none; }
.brand-mark rect { fill: var(--blue); } .brand-mark path { fill: #fff; }
.side-brand b { font: 500 23px/1 var(--f-display); display: block; }
.side-brand small { font-size: 12px; color: var(--ink-3); }
.side-nav { display: grid; gap: 2px; }
.side-nav a { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 12px; color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 14.5px; }
.side-nav a:hover { background: var(--ice); }
.side-nav a.is-on { background: var(--mist); color: var(--blue-700); font-weight: 600; }
.side-nav svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.badge { margin-left: auto; font-style: normal; font-size: 11.5px; font-weight: 700; background: var(--blue); color: #fff; border-radius: 999px; padding: 1px 7px; }
.badge:empty { display: none; }
.side-foot { margin-top: auto; display: grid; gap: 8px; padding: 14px 8px 0; border-top: 1px solid var(--line-2); font-size: 13px; color: var(--ink-3); }
.side-foot p { margin: 4px 0 0; }
.side-link { text-decoration: none; font-weight: 600; font-size: 13.5px; }

/* Cabecera */
.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 14px 28px; background: rgba(243, 247, 251, .9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top-title h1 { font: 450 26px/1.1 var(--f-display); letter-spacing: -.01em; }
.top-title .eyebrow { text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--ink-3); font-weight: 500; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.clock { font: 500 20px var(--f-display); color: var(--ink-2); margin-right: 6px; font-variant-numeric: tabular-nums; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--white); display: grid; place-items: center; position: relative; }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: var(--ink-2); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.bell i { position: absolute; top: -5px; right: -5px; font-style: normal; font-size: 11px; font-weight: 700; background: var(--red); color: #fff; border-radius: 999px; min-width: 18px; height: 18px; display: grid; place-items: center; padding: 0 4px; }
.bell i:empty { display: none; }
.menu-btn { display: none; }
.feed-pop { position: absolute; right: 28px; top: 66px; width: 380px; max-height: 70vh; overflow: auto; background: var(--white); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 8px; }
.feed-item { padding: 10px 12px; border-radius: 12px; display: grid; gap: 2px; }
.feed-item.unread { background: var(--ice); }
.feed-item b { font-size: 14px; }
.feed-item span { font-size: 13px; color: var(--ink-2); }
.feed-item small { font-size: 12px; color: var(--ink-3); }

.demo-banner { margin: 14px 28px 0; padding: 10px 16px; border-radius: 12px; background: var(--white); border: 1px dashed var(--sky); color: var(--ink-2); font-size: 13.5px; display: flex; gap: 14px; align-items: center; justify-content: space-between; }
.view { padding: 22px 28px 60px; outline: none; }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--white); font-weight: 600; font-size: 14px; color: var(--navy); text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, transform .15s; }
.btn:hover { background: var(--ice); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn--primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn--primary:hover { background: var(--blue-700); }
.btn--ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn--ok:hover { background: #1c7a58; }
.btn--danger { color: var(--red); border-color: #F1C9C7; }
.btn--danger:hover { background: var(--red-bg); }
.btn--sm { min-height: 32px; padding: 0 11px; font-size: 13px; border-radius: 10px; }
.btn--xs { min-height: 28px; padding: 0 9px; font-size: 12.5px; border-radius: 9px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--blue); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.seg { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.seg button { border: 0; background: none; padding: 6px 12px; border-radius: 9px; font-weight: 600; font-size: 13.5px; color: var(--ink-3); }
.seg button.is-on { background: var(--mist); color: var(--blue-700); }

/* Tarjetas */
.card { background: var(--white); border: 1px solid var(--line-2); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 20px; }
.card h3 { font: 500 19px var(--f-display); margin-bottom: 12px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.toolbar .grow { flex: 1; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { background: var(--white); border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: 16px 18px; box-shadow: var(--shadow); }
.kpi span { font-size: 13px; color: var(--ink-3); font-weight: 500; }
.kpi b { display: block; font: 450 32px/1.15 var(--f-display); margin: 4px 0 2px; }
.kpi small { font-size: 12.5px; color: var(--ink-3); }
.kpi small.up { color: var(--ok); font-weight: 600; }

/* Pastillas de estado */
.st { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.st::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st--free { background: var(--ok-bg); color: var(--ok); }
.st--busy { background: var(--mist); color: var(--blue-700); }
.st--cleaning { background: var(--violet-bg); color: var(--violet); }
.st--preparing { background: var(--amber-bg); color: var(--amber); }
.st--blocked { background: var(--grey-bg); color: var(--ink-3); }
.st--confirmed { background: var(--mist); color: var(--blue-700); }
.st--arrived { background: var(--amber-bg); color: var(--amber); }
.st--in_room { background: var(--mist); color: var(--blue-700); }
.st--completed { background: var(--ok-bg); color: var(--ok); }
.st--cancelled, .st--void { background: var(--grey-bg); color: var(--ink-3); }
.st--no_show { background: var(--red-bg); color: var(--red); }
.st--draft { background: var(--grey-bg); color: var(--ink-3); }
.st--sent, .st--queued, .st--offered { background: var(--amber-bg); color: var(--amber); }
.st--accepted, .st--booked, .st--done { background: var(--ok-bg); color: var(--ok); }
.st--needs_provider { background: var(--violet-bg); color: var(--violet); }
.st--waiting { background: var(--mist); color: var(--blue-700); }
.alert-tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 8px; background: var(--red-bg); color: var(--red); font-size: 12px; font-weight: 600; }
.tag { display: inline-flex; padding: 2px 8px; border-radius: 8px; background: var(--ice); color: var(--ink-2); font-size: 12px; font-weight: 600; }

/* Tablero de gabinetes */
.board-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 18px; align-items: start; }
.board-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.board-head .grow { flex: 1; }
.sim-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--amber-bg); color: var(--amber); font-weight: 600; font-size: 13px; }
.rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.room { background: var(--white); border-radius: var(--r-lg); border: 1.5px solid var(--line-2); box-shadow: var(--shadow); padding: 16px; display: flex; flex-direction: column; gap: 12px; min-height: 250px; transition: border-color .3s, box-shadow .3s; position: relative; overflow: hidden; }
.room::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--line); }
.room--busy::before { background: var(--blue); }
.room--cleaning::before { background: var(--violet); }
.room--preparing::before { background: var(--amber); }
.room--free::before { background: var(--ok); }
.room--blocked { background: repeating-linear-gradient(135deg, #fff 0 10px, #F5F7FA 10px 20px); }
.room-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.room-h h3 { font: 500 21px/1.1 var(--f-display); }
.room-h p { margin: 2px 0 0; font-size: 12.5px; color: var(--ink-3); }
.room-body { flex: 1; display: grid; gap: 6px; align-content: start; }
.room-patient { font-weight: 700; font-size: 17px; }
.room-line { font-size: 13.5px; color: var(--ink-2); }
.bar { height: 8px; border-radius: 6px; background: var(--ice); overflow: hidden; margin-top: 4px; }
.bar i { display: block; height: 100%; border-radius: 6px; background: var(--blue); transition: width .6s ease; }
.room--cleaning .bar i { background: var(--violet); }
.bar.over i { background: var(--red); }
.room-time { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.room-time b { color: var(--navy); }
.room-time .late { color: var(--red); }
.room-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.tl { position: relative; height: 22px; border-radius: 6px; background: var(--ice); overflow: hidden; }
.tl span { position: absolute; top: 3px; bottom: 3px; border-radius: 4px; background: var(--blue-300); }
.tl span.done { background: var(--sky); }
.tl span.urg { background: repeating-linear-gradient(135deg, #F8D9D7 0 4px, #fff 4px 8px); }
.tl span.cur { background: var(--blue); }
.tl em { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--red); }
.room-foot { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-3); }
.side-panel { display: grid; gap: 14px; position: sticky; top: 92px; }
.wait-list { display: grid; gap: 8px; }
.wait-item { display: grid; gap: 6px; padding: 12px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--white); }
.wait-item .row1 { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.wait-item b { font-size: 15px; }
.wait-item .acts { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.wait-item select { min-height: 32px; border-radius: 10px; border: 1px solid var(--line); padding: 0 8px; background: #fff; font-size: 13px; }
.empty { padding: 18px; text-align: center; color: var(--ink-3); background: var(--white); border: 1px dashed var(--line); border-radius: 14px; font-size: 14px; }
.calls { display: grid; gap: 6px; }
.call { display: flex; justify-content: space-between; font-size: 13.5px; padding: 8px 10px; border-radius: 10px; background: var(--ice); }
.call b { font-weight: 700; }
.qr-box { display: grid; place-items: center; padding: 12px; background: #fff; border-radius: 14px; border: 1px solid var(--line); }

/* Agenda */
.ag-wrap { background: var(--white); border-radius: var(--r-lg); border: 1px solid var(--line-2); box-shadow: var(--shadow); overflow: auto; max-height: calc(100vh - 230px); position: relative; }
.ag { display: grid; position: relative; min-width: 760px; }
.ag-h { position: sticky; top: 0; z-index: 5; background: var(--white); border-bottom: 1px solid var(--line); padding: 10px 8px; font-weight: 700; font-size: 13.5px; display: flex; align-items: center; gap: 8px; min-height: 52px; }
.ag-h small { display: block; font-weight: 500; color: var(--ink-3); font-size: 11.5px; }
.ag-h .dotc { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.ag-times { position: relative; border-right: 1px solid var(--line); }
.ag-times span { position: absolute; right: 8px; font-size: 11.5px; color: var(--ink-3); transform: translateY(-50%); font-variant-numeric: tabular-nums; }
.ag-col { position: relative; border-right: 1px solid var(--line-2); }
.ag-col:last-child { border-right: 0; }
.ag-col .hr { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line-2); }
.ag-col .hr.half { border-top-style: dashed; border-color: #F1F5F9; }
.ag-col .closed { position: absolute; left: 0; right: 0; background: repeating-linear-gradient(135deg, #F7F9FB 0 8px, #fff 8px 16px); }
.ag-col .hold { position: absolute; left: 0; right: 0; background: rgba(209, 74, 70, .06); border-top: 1px dashed #F1C9C7; border-bottom: 1px dashed #F1C9C7; }
.ag-col .hold i { position: absolute; top: 3px; right: 6px; font-style: normal; font-size: 10.5px; font-weight: 700; color: var(--red); opacity: .7; }
.ag-col .blk { position: absolute; left: 3px; right: 3px; border-radius: 8px; background: repeating-linear-gradient(135deg, #EEF1F4 0 6px, #F7F8FA 6px 12px); border: 1px solid #DDE3EA; font-size: 11.5px; color: var(--ink-3); padding: 4px 8px; font-weight: 600; }
.ag-col .now { position: absolute; left: 0; right: 0; border-top: 2px solid var(--red); z-index: 3; pointer-events: none; }
.ag-col .now::before { content: ''; position: absolute; left: -5px; top: -6px; width: 10px; height: 10px; border-radius: 50%; background: var(--red); }
.appt { position: absolute; left: 4px; right: 4px; border-radius: 10px; padding: 5px 8px; font-size: 12px; line-height: 1.3; overflow: hidden; cursor: grab; border-left: 4px solid var(--c, var(--blue)); background: var(--bgc, var(--ice)); color: var(--navy); z-index: 2; box-shadow: 0 1px 2px rgba(11, 37, 64, .06); user-select: none; touch-action: none; }
.appt:hover { box-shadow: 0 6px 18px -6px rgba(11, 37, 64, .3); z-index: 4; }
.appt b { display: block; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appt span { display: block; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appt .ic { position: absolute; top: 4px; right: 6px; display: flex; gap: 3px; }
.appt .ic i { font-style: normal; font-size: 10px; font-weight: 800; padding: 0 4px; border-radius: 5px; background: #fff; color: var(--red); }
.appt.is-completed { opacity: .62; }
.appt.is-no_show { opacity: .5; background: var(--red-bg); border-left-color: var(--red); text-decoration: line-through; }
.appt.is-in_room { box-shadow: 0 0 0 2px var(--blue) inset; }
.appt.is-arrived { box-shadow: 0 0 0 2px var(--amber) inset; }
.appt.is-new { animation: flash 1.6s ease 2; }
@keyframes flash { 0%, 100% { box-shadow: 0 0 0 0 rgba(44, 120, 192, 0); } 50% { box-shadow: 0 0 0 6px rgba(44, 120, 192, .35); } }
.appt.dragging { opacity: .85; cursor: grabbing; z-index: 10; box-shadow: 0 14px 30px -10px rgba(11, 37, 64, .45); }
.appt.bad { outline: 2px dashed var(--red); }
.ag-col.drop-ok { background: rgba(95, 168, 224, .06); }
.ghost-slot { position: absolute; left: 4px; right: 4px; border-radius: 10px; border: 2px dashed var(--blue-400); background: rgba(95, 168, 224, .1); pointer-events: none; z-index: 1; }
.week { width: 100%; border-collapse: separate; border-spacing: 6px; }
.week th { font-size: 12.5px; color: var(--ink-3); font-weight: 600; text-align: left; padding: 4px; text-transform: capitalize; }
.week td { background: var(--ice); border-radius: 12px; padding: 10px; cursor: pointer; vertical-align: top; }
.week td:hover { outline: 2px solid var(--blue-300); }
.week td b { font: 500 20px var(--f-display); display: block; }
.week td small { color: var(--ink-3); font-size: 12px; }
.week td .bar { margin-top: 6px; background: #fff; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12.5px; color: var(--ink-3); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 10px; border-radius: 3px; display: inline-block; }

/* Tablas */
.table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--r-lg); overflow: hidden; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-weight: 600; padding: 12px 14px; border-bottom: 1px solid var(--line); background: #FBFDFF; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; font-size: 14px; }
.table tr:last-child td { border-bottom: 0; }
.table tr.click { cursor: pointer; }
.table tr.click:hover td { background: var(--ice); }
.table input[type=number], .table input[type=text] { width: 100%; min-height: 34px; border: 1px solid var(--line); border-radius: 9px; padding: 0 8px; background: #fff; }
.table input[type=number] { width: 80px; }
.tbl-wrap { border-radius: var(--r-lg); border: 1px solid var(--line-2); box-shadow: var(--shadow); overflow: auto; background: var(--white); }

/* Formularios */
.form { display: grid; gap: 12px; }
.field { display: grid; gap: 5px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field input, .field select, .field textarea, input.inp, select.inp { width: 100%; min-height: 40px; border: 1px solid var(--line); border-radius: 11px; padding: 8px 11px; background: #fff; }
.field textarea { min-height: 80px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, input.inp:focus { outline: none; border-color: var(--blue-400); box-shadow: 0 0 0 3px rgba(95, 168, 224, .2); }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.chk { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; margin-right: 10px; }
.chk input { accent-color: var(--blue); width: 16px; height: 16px; }
.switch { position: relative; width: 42px; height: 24px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--line); transition: background .2s; cursor: pointer; }
.switch span::after { content: ''; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.switch input:checked + span { background: var(--blue); }
.switch input:checked + span::after { transform: translateX(18px); }
.times { display: flex; flex-wrap: wrap; gap: 6px; }
.time { border: 1px solid var(--line); background: #fff; border-radius: 10px; min-height: 34px; padding: 0 10px; font-weight: 600; font-size: 13px; }
.time.is-on { background: var(--blue); color: #fff; border-color: var(--blue); }
.hint { font-size: 12.5px; color: var(--ink-3); }
.err { color: var(--red); font-weight: 600; font-size: 13.5px; min-height: 1px; margin: 0; }

/* Ficha de paciente / detalle */
.dl { display: grid; grid-template-columns: 130px 1fr; gap: 8px 14px; margin: 0; font-size: 14px; }
.dl dt { color: var(--ink-3); }
.dl dd { margin: 0; font-weight: 500; }
.alerts { display: flex; flex-wrap: wrap; gap: 6px; }
.timeline { display: grid; gap: 6px; }
.timeline div { display: flex; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--ice); font-size: 13.5px; }
.phase-ed { border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: grid; gap: 8px; background: #FBFDFF; }
.item-ed { display: grid; grid-template-columns: minmax(0, 1fr) 110px 70px 34px; gap: 6px; align-items: center; }
.rule { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; padding: 14px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--white); }
.rule .ico { width: 40px; height: 40px; border-radius: 12px; background: var(--mist); display: grid; place-items: center; font-size: 18px; }
.rule b { display: block; }
.rule small { color: var(--ink-3); font-size: 13px; }
.msg-text { font-size: 12.5px; color: var(--ink-2); max-width: 520px; white-space: pre-line; }
.bars { display: grid; gap: 10px; }
.bars .b { display: grid; grid-template-columns: 110px 1fr 46px; gap: 10px; align-items: center; font-size: 13.5px; }
.bars .b .bar { margin: 0; height: 12px; }
.bars .b em { font-style: normal; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }

/* Diálogo */
.dlg { border: 0; border-radius: 22px; padding: 0; width: min(640px, calc(100vw - 24px)); max-height: calc(100vh - 40px); box-shadow: 0 30px 80px -20px rgba(11, 37, 64, .45); color: var(--navy); }
.dlg--wide { width: min(900px, calc(100vw - 24px)); }
.dlg::backdrop { background: rgba(11, 37, 64, .35); backdrop-filter: blur(3px); }
.dlg-x { position: absolute; top: 12px; right: 12px; margin: 0; }
.dlg-x button { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font-size: 20px; line-height: 1; }
.dlg [data-modal-body] { padding: 24px; }
.dlg h2 { font: 500 24px var(--f-display); margin: 0 40px 4px 0; }
.dlg .sub { color: var(--ink-3); margin-bottom: 16px; }
.dlg-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 14px; font-weight: 500; z-index: 100; transition: opacity .25s, transform .25s; box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .5); max-width: calc(100vw - 32px); }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1250px) { .board-wrap { grid-template-columns: 1fr; } .side-panel { position: static; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); } }
@media (max-width: 960px) {
  body { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 270px; transform: translateX(-100%); transition: transform .3s; box-shadow: 0 0 40px rgba(0, 0, 0, .15); }
  .side.is-open { transform: none; }
  .menu-btn { display: grid; }
  .top { padding: 12px 16px; }
  .clock { display: none; }
  .view { padding: 16px 16px 60px; }
  .demo-banner { margin: 12px 16px 0; flex-direction: column; align-items: flex-start; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .feed-pop { right: 12px; left: 12px; width: auto; }
  .top-title h1 { font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
