/* =========================================================
   Reglamento al Día — panel
   ========================================================= */
:root {
  --bg: #F4F5F7;
  --surface: #FFFFFF;
  --surface-2: #EEF0F3;
  --border: #E1E4EA;
  --text: #111318;
  --muted: #6B7280;
  --primary: #0F172A;
  --gold: #1E3A8A;
  --gold-soft: #EAF0FB;
  --side: #0F172A;
  --side-text: #C3C7CD;
  --ok: #1F7A4D;  --ok-bg: #E2F3EA;
  --err: #B83A2E; --err-bg: #FBE7E4;
  --warn: #8A6100; --warn-bg: #FCF1D6;
  --info: #1C5F99; --info-bg: #E3EEF8;
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-full: 999px;
  --shadow: 0 1px 2px rgba(30,27,22,.06), 0 2px 8px rgba(30,27,22,.05);
}
* { box-sizing: border-box; }
body { margin: 0; font-family: 'Inter', system-ui, sans-serif; background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
[hidden] { display: none !important; }
.material-symbols-outlined { font-size: 20px; vertical-align: middle; user-select: none; }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 16px; border-radius: var(--r-sm); border: 1px solid transparent; font: inherit; font-weight: 600; font-size: .9rem; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, box-shadow .15s; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { box-shadow: 0 2px 10px rgba(0,0,0,.18); }
.btn-soft { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-soft:hover { background: var(--surface-2); }
.btn-danger-soft { background: var(--err-bg); color: var(--err); }
.btn-wa { background: #1FA855; color: #fff; }
.btn-wa:hover { background: #188a46; }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: .85rem; }
.btn-block { width: 100%; }
.btn.is-disabled { opacity: .45; pointer-events: none; }
.icon-btn { width: 36px; height: 36px; border-radius: 50%; border: 0; background: transparent; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; text-decoration: none; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }

/* ---------- Estructura ---------- */
.sidebar { position: fixed; inset: 0 auto 0 0; width: 236px; background: var(--side); color: var(--side-text); display: flex; flex-direction: column; padding: 18px 12px; z-index: 50; }
.side-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 20px; text-decoration: none; color: #fff; font-family: 'Manrope', sans-serif; font-size: 1.15rem;  letter-spacing: .04em; }
.side-brand img { border-radius: 8px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.side-nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-sm); text-decoration: none; font-weight: 500; }
.side-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.side-nav a.active { background: rgba(233,162,59,.18); color: #FCD34D; }
.side-foot { display: grid; gap: 2px; border-top: 1px solid rgba(255,255,255,.08); padding-top: 10px; }
.side-foot a, .side-foot button { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: var(--r-sm); color: var(--side-text); text-decoration: none; background: none; border: 0; font: inherit; font-size: .88rem; cursor: pointer; width: 100%; }
.side-foot a:hover, .side-foot button:hover { background: rgba(255,255,255,.06); color: #fff; }
.side-foot form { margin: 0; }

.main { margin-left: 236px; min-height: 100vh; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; padding: 14px 28px; background: rgba(244,245,247,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.topbar h1 { font-family: 'Manrope', sans-serif; font-weight: 600; font-size: 1.5rem;  letter-spacing: .02em; flex: 1; }
.topbar-actions { display: flex; gap: 8px; }
.menu-btn { display: none; }
.demo-note { display: flex; align-items: center; gap: 8px; margin: 14px 28px 0; padding: 8px 14px; border-radius: var(--r-sm); background: var(--gold-soft); color: #92400E; font-size: .85rem; }
.content { padding: 20px 28px 60px; display: grid; gap: 20px; }
.page-sub { margin: -6px 0 0; color: var(--muted); }
.back-link { text-decoration: none; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 20px; box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.card-head h2 { font-size: 1.05rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.subhead { font-size: .78rem;  letter-spacing: .08em; color: var(--muted); margin: 16px 0 6px; }
.empty { color: var(--muted); padding: 18px 0; text-align: center; }

.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-md); font-size: .9rem; }
.alert-ok { background: var(--ok-bg); color: var(--ok); }
.alert-err { background: var(--err-bg); color: var(--err); }

.chip { display: inline-block; padding: 2px 10px; border-radius: var(--r-full); font-size: .75rem; font-weight: 700; white-space: nowrap; }
.chip.tiny { font-size: .68rem; padding: 1px 7px; margin-left: 6px; }
.chip-ok { background: var(--ok-bg); color: var(--ok); }
.chip-err { background: var(--err-bg); color: var(--err); }
.chip-warn { background: var(--warn-bg); color: var(--warn); }
.chip-info { background: var(--info-bg); color: var(--info); }
.chip-muted { background: var(--surface-2); color: var(--muted); }
.dot { --c: var(--gold); display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--c); margin-right: 7px; }
.avatar { --c: var(--gold); width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--c) 18%, #fff); color: color-mix(in srgb, var(--c) 75%, #000); font-weight: 700; font-size: .82rem; flex-shrink: 0; }
.avatar-lg { width: 58px; height: 58px; font-size: 1.15rem; }

/* ---------- KPIs ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.kpi { display: flex; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 16px; box-shadow: var(--shadow); }
.kpi > .material-symbols-outlined { width: 42px; height: 42px; border-radius: 10px; background: var(--gold-soft); color: var(--gold); display: flex; align-items: center; justify-content: center; }
.kpi strong { display: block; font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.kpi span { font-size: .8rem; color: var(--muted); }
.kpi > .material-symbols-outlined { font-size: 22px; flex: none; }
.kpi > .avatar { flex: none; width: 42px; height: 42px; font-size: .85rem; color: #fff; }

/* ---------- Listas ---------- */
.timeline, .list { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 52px 14px 1fr auto; align-items: center; gap: 10px; padding: 10px 6px; border-radius: var(--r-sm); cursor: pointer; }
.timeline li:hover, .list li[data-appointment]:hover { background: var(--surface-2); }
.timeline li.is-past { opacity: .55; }
.tl-time { font-weight: 700; font-variant-numeric: tabular-nums; }
.tl-dot { --c: var(--gold); width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.tl-body { display: flex; flex-direction: column; min-width: 0; }
.list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 6px; border-bottom: 1px solid var(--surface-2); }
.list li:last-child { border-bottom: 0; }
.list li[data-appointment] { cursor: pointer; border-radius: var(--r-sm); }
.list li > div:first-child { display: flex; flex-direction: column; min-width: 0; }
.list-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.list form { margin: 0; }
.muted-list li { opacity: .7; }

/* ---------- Tablas ---------- */
.table-card { padding: 0; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: .72rem;  letter-spacing: .06em; color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--surface-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: #F8F9FB; }
.table.compact td, .table.compact th { padding: 8px 4px; }
.pager-nav { display: flex; align-items: center; justify-content: center; gap: 14px; }

/* edición en línea de servicios */
.row-form { padding: 10px 16px !important; }
.inline-form { display: flex; align-items: center; gap: 10px; margin: 0; }
.inline-form input { min-height: 36px; padding: 6px 10px; border: 1px solid transparent; border-radius: var(--r-sm); font: inherit; background: transparent; }
.inline-form input:hover { border-color: var(--border); }
.inline-form input:focus { outline: none; border-color: var(--gold); background: #fff; }
.if-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.if-main input:first-child { font-weight: 600; }
.muted-input { color: var(--muted); font-size: .85rem !important; min-height: 28px !important; }
.w-cat { width: 110px; } .w-min { width: 96px; } .w-price { width: 120px; } .w-count { width: 50px; }
.input-suffix, .input-prefix { display: flex; align-items: center; border: 1px solid var(--border); border-radius: var(--r-sm); background: #fff; overflow: hidden; }
.input-suffix input, .input-prefix input { border: 0 !important; min-width: 0; width: 100%; }
.input-suffix span, .input-prefix span { padding: 0 10px; color: var(--muted); font-size: .85rem; white-space: nowrap; }
.switch { position: relative; width: 40px; height: 22px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; border-radius: 22px; background: #D6D3D1; cursor: pointer; transition: background .2s; }
.switch span::after { content: ''; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::after { transform: translateX(18px); }

/* ---------- Formularios ---------- */
.field { display: flex; flex-direction: column; gap: 5px; }
.field > span { font-size: .8rem; font-weight: 600; color: var(--muted); }
.field input, .field select, .field textarea { min-height: 40px; padding: 8px 12px; border-radius: var(--r-sm); border: 1px solid var(--border); background: #fff; font: inherit; color: var(--text); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.field input[type=color] { padding: 4px; height: 40px; width: 70px; }
.field em, .field small { font-style: normal; font-weight: 400; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-wide { grid-column: 1 / -1; }
.form-stack { display: grid; gap: 14px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; font-size: .92rem; }
.check input { width: 17px; height: 17px; margin-top: 2px; accent-color: var(--primary); }
.check-list { display: grid; gap: 10px; }
.filters { display: grid; grid-template-columns: 2fr repeat(4, 1fr) auto; gap: 12px; align-items: end; }
.filters-actions { display: flex; gap: 8px; }
.sticky-save { position: sticky; bottom: 0; padding: 14px 0; background: linear-gradient(transparent, var(--bg) 40%); display: flex; justify-content: flex-end; }
.mini-stats { margin: 18px 0 0; display: grid; gap: 8px; padding-top: 14px; border-top: 1px solid var(--surface-2); }
.mini-stats div { display: flex; justify-content: space-between; }
.mini-stats dt { color: var(--muted); }
.mini-stats dd { margin: 0; font-weight: 600; }
.segmented { display: flex; border: 1px solid var(--border); border-radius: var(--r-sm); overflow: hidden; background: #fff; }
.segmented a { padding: 7px 14px; text-decoration: none; font-size: .85rem; font-weight: 600; color: var(--muted); }
.segmented a.active { background: var(--primary); color: #fff; }

.tone-info { --tone: var(--info); --tone-bg: var(--info-bg); }
.tone-ok { --tone: var(--ok); --tone-bg: var(--ok-bg); }
.tone-err { --tone: var(--err); --tone-bg: var(--err-bg); }
.tone-warn { --tone: var(--warn); --tone-bg: var(--warn-bg); }
.tone-violet { --tone: var(--gold); --tone-bg: var(--gold-soft); }
.tone-muted { --tone: var(--muted); --tone-bg: var(--surface-2); }
/* ---------- Panel lateral y modal ---------- */
.drawer-backdrop, .modal-backdrop { position: fixed; inset: 0; background: rgba(21,19,15,.35); z-index: 80; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100%); background: #fff; z-index: 90; box-shadow: -8px 0 30px rgba(0,0,0,.15); transform: translateX(105%); transition: transform .25s ease; display: flex; flex-direction: column; }
.drawer.open { transform: translateX(0); }
.drawer-head { display: flex; justify-content: space-between; gap: 10px; padding: 20px 20px 14px; border-bottom: 1px solid var(--border); }
.drawer-head h2 { font-size: 1.25rem; margin: 8px 0 2px; }
.drawer-head p { margin: 0; }
.drawer-body { padding: 16px 20px 30px; overflow-y: auto; display: grid; gap: 20px; }
.d-section h3 { font-size: .74rem;  letter-spacing: .08em; color: var(--muted); margin-bottom: 8px; }
.d-customer { display: flex; flex-direction: column; text-decoration: none; padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface-2); }
.d-customer:hover { background: var(--gold-soft); }
.d-contact { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; font-size: .88rem; }
.d-contact a { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; color: var(--info); }
.d-note { margin: 8px 0 0; padding: 8px 10px; border-radius: var(--r-sm); background: var(--warn-bg); color: var(--warn); font-size: .85rem; }
.d-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 12px; }
.d-grid dt { font-size: .72rem; color: var(--muted); }
.d-grid dd { margin: 0; font-weight: 600; }
.d-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0; }
.modal-backdrop { display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal { background: #fff; border-radius: var(--r-lg); width: min(640px, 100%); max-height: 92vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,.25); margin: 0; }
.modal-head, .modal-foot { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; }
.modal-head { border-bottom: 1px solid var(--border); }
.modal-foot { border-top: 1px solid var(--border); justify-content: flex-end; gap: 8px; }
.modal-body { padding: 18px 20px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--primary); color: #fff; padding: 11px 18px; border-radius: var(--r-sm); font-size: .88rem; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 120; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Reportes ---------- */
.bars { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; align-items: end; height: 240px; padding-top: 10px; }
.bar-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; }
.bar { width: 100%; max-width: 70px; background: linear-gradient(180deg, #FCD34D, var(--gold)); border-radius: 8px 8px 3px 3px; }
.bar-value { font-size: .74rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.bar-label { font-size: .78rem; color: var(--muted); }
.hbars { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.hbar-top { display: flex; justify-content: space-between; margin-bottom: 4px; }
.hbar { height: 10px; border-radius: 6px; background: var(--surface-2); overflow: hidden; margin-bottom: 3px; }
.hbar div { height: 100%; border-radius: 6px; }

/* ---------- Login ---------- */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; background: radial-gradient(700px 400px at 70% 0%, rgba(201,130,27,.35), transparent 70%), #0B0C0F; }
.login-card { width: min(400px, 100%); background: #fff; border-radius: var(--r-lg); padding: 32px 28px; display: grid; gap: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.login-card img { justify-self: center; border-radius: 14px; }
.login-card h1 { text-align: center; font-family: 'Manrope', sans-serif;  font-size: 1.5rem; }
.login-card > p { text-align: center; margin: -10px 0 0; }
.login-card > a { text-decoration: none; }
.demo-creds { background: var(--gold-soft); border-radius: var(--r-md); padding: 12px 14px; font-size: .88rem; display: grid; gap: 4px; color: #92400E; }
.demo-creds code { background: #fff; padding: 1px 6px; border-radius: 4px; }
.demo-creds .btn { justify-self: start; margin-top: 6px; }
.login-card .field span { font-size: .8rem; font-weight: 600; color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .grid-2 { grid-template-columns: 1fr; }
  .filters { grid-template-columns: 1fr 1fr; }
  .filters .field:first-child { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .sidebar { transform: translateX(-100%); transition: transform .25s; }
  .sidebar.open { transform: translateX(0); box-shadow: 10px 0 30px rgba(0,0,0,.3); }
  .main { margin-left: 0; }
  .menu-btn { display: inline-flex; }
  .topbar { padding: 12px 16px; }
  .content { padding: 16px 16px 50px; }
  .demo-note { margin: 12px 16px 0; }
  .form-grid, .form-row { grid-template-columns: 1fr; }
  .inline-form { flex-wrap: wrap; }
  .if-main { flex-basis: 100%; }
  .sched-row { grid-template-columns: 1fr 1fr; }
  .sched-row .check { grid-column: 1 / -1; }
  .sched-head { display: none; }
  .bars { gap: 8px; }
  .bar-value { font-size: .62rem; }
}

/* ---------- Capa3D ---------- */
.chip-violet { background: var(--gold-soft); color: #9A6414; }
.kpi .trend { font-size: .76rem; font-weight: 700; }
.trend.up { color: var(--ok); } .trend.down { color: var(--err); }
.todo { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.todo a { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--r-md); text-decoration: none; background: var(--tone-bg); color: var(--tone); }
.todo a strong { font-size: 1.5rem; font-family: 'Manrope', sans-serif; line-height: 1; }
.todo a span:last-child { font-size: .82rem; font-weight: 600; }
.chart { display: grid; grid-template-columns: repeat(30, 1fr); gap: 4px; align-items: end; height: 220px; padding-top: 10px; }
.chart-col { display: flex; flex-direction: column; justify-content: flex-end; height: 100%; position: relative; }
.chart-bar { background: linear-gradient(180deg, #FCD34D, #1E3A8A); border-radius: 4px 4px 2px 2px; min-height: 2px; }
.chart-col:hover .chart-bar { background: #10B981; }
.chart-col .tip { display: none; position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); background: var(--side); color: #fff; padding: 5px 8px; border-radius: 6px; font-size: .72rem; white-space: nowrap; z-index: 2; }
.chart-col:hover .tip { display: block; }
.chart-axis { display: flex; justify-content: space-between; font-size: .72rem; color: var(--muted); margin-top: 6px; }
.thumb { width: 44px; height: 44px; border-radius: 8px; background: var(--surface-2); flex-shrink: 0; }
.thumb-lg { width: 64px; height: 64px; border-radius: 10px; }
.cell-product { display: flex; align-items: center; gap: 12px; min-width: 0; }
.cell-product div { display: flex; flex-direction: column; min-width: 0; }
.stock-badge { display: inline-flex; min-width: 34px; justify-content: center; padding: 2px 8px; border-radius: var(--r-full); font-weight: 700; font-size: .8rem; font-variant-numeric: tabular-nums; }
.stock-ok { background: var(--ok-bg); color: var(--ok); } .stock-low { background: var(--warn-bg); color: var(--warn); } .stock-out { background: var(--err-bg); color: var(--err); }
.tabs-bar { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs-bar a { padding: 7px 14px; border-radius: var(--r-full); text-decoration: none; font-size: .85rem; font-weight: 600; color: var(--muted); background: var(--surface); border: 1px solid var(--border); }
.tabs-bar a.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.tabs-bar a span { opacity: .7; margin-left: 4px; }
.order-layout { display: grid; grid-template-columns: 1fr 360px; gap: 20px; align-items: start; }
.items-table td { padding: 10px 8px; }
.sum { display: grid; gap: 6px; margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--border); }
.sum div { display: flex; justify-content: space-between; }
.sum dt { color: var(--muted); } .sum dd { margin: 0; font-weight: 600; }
.sum .total { font-size: 1.15rem; padding-top: 6px; border-top: 1px solid var(--surface-2); }
.tl { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.tl li { display: grid; grid-template-columns: 12px 1fr; gap: 10px; font-size: .88rem; }
.tl li i { width: 10px; height: 10px; border-radius: 50%; background: var(--gold); margin-top: 6px; }
.tl small { color: var(--muted); display: block; }
.action-stack { display: grid; gap: 10px; }
.action-stack form { margin: 0; display: grid; gap: 8px; }
.variant-row { display: grid; grid-template-columns: 1.4fr 70px 1.2fr 110px 40px; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--surface-2); }
.variant-row input[type=text], .variant-row input[type=number] { min-height: 38px; padding: 6px 10px; border: 1px solid var(--border); border-radius: var(--r-sm); font: inherit; width: 100%; }
.variant-row input[type=color] { width: 100%; height: 38px; padding: 2px; border: 1px solid var(--border); border-radius: var(--r-sm); background: #fff; }
.variant-row.removed { opacity: .4; }
.variant-head span { font-size: .72rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.preview-img { width: 100%; max-width: 260px; border-radius: var(--r-md); border: 1px solid var(--border); }
.adjust-form { display: flex; gap: 6px; align-items: center; margin: 0; }
.adjust-form input { width: 72px; min-height: 34px; padding: 4px 8px; border: 1px solid var(--border); border-radius: var(--r-sm); font: inherit; }
.adjust-form select { min-height: 34px; border: 1px solid var(--border); border-radius: var(--r-sm); font: inherit; font-size: .82rem; padding: 0 6px; background: #fff; }
.change-pos { color: var(--ok); font-weight: 700; } .change-neg { color: var(--err); font-weight: 700; }
@media (max-width: 1100px) { .order-layout { grid-template-columns: 1fr; } .todo { grid-template-columns: 1fr 1fr; } }
@media (max-width: 860px) { .variant-row { grid-template-columns: 1fr 60px; } .variant-head { display: none; } .chart { gap: 2px; } }

/* ---------- Fogón Austral ---------- */
.chip-muted { background: var(--surface-2); color: var(--muted); }
.avail-btn { border: 0; border-radius: var(--r-full); padding: 4px 12px; font: inherit; font-size: .78rem; font-weight: 700; cursor: pointer; }
.avail-btn.on { background: var(--ok-bg); color: var(--ok); }
.avail-btn.off { background: var(--err-bg); color: var(--err); }
.dish-row { display: grid; grid-template-columns: 56px 1fr auto auto auto; gap: 14px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--surface-2); }
.dish-row:last-child { border-bottom: 0; }
.dish-row img { width: 56px; height: 44px; border-radius: 8px; object-fit: cover; }
.dish-row.is-hidden { opacity: .5; }
.group-box { border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px; display: grid; gap: 8px; }
.group-head, .opt-row { display: grid; gap: 8px; align-items: center; }
.group-head { grid-template-columns: 1fr 170px 36px; }
.opt-row { grid-template-columns: 1fr 120px 36px; }
.group-box input[type=text], .group-box input[type=number], .group-box select { min-height: 38px; padding: 6px 10px; border: 1px solid var(--border); border-radius: var(--r-sm); font: inherit; width: 100%; background: #fff; }
.chips-check { display: flex; flex-wrap: wrap; gap: 8px; }
.chips-check label { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--border); border-radius: var(--r-full); font-size: .85rem; cursor: pointer; background: #fff; }
.chips-check label:has(input:checked) { border-color: var(--gold); background: var(--gold-soft); color: #92400E; }
.chips-check input { accent-color: var(--gold); }
.tables-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.table-card { padding: 16px; }
.table-card.busy { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.hours-row { display: grid; grid-template-columns: 110px 1fr 1fr 110px; gap: 10px; align-items: center; }
.hours-row input[type=time] { min-height: 38px; border: 1px solid var(--border); border-radius: var(--r-sm); padding: 4px 8px; font: inherit; }
.hours-row.is-closed input[type=time] { opacity: .35; pointer-events: none; }
.hbars-v { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; align-items: end; height: 160px; }
.hbars-v div { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; gap: 4px; font-size: .7rem; color: var(--muted); }
.hbars-v i { width: 100%; background: linear-gradient(180deg, #FCD34D, #1E3A8A); border-radius: 5px 5px 2px 2px; min-height: 2px; }
.type-split { display: flex; height: 12px; border-radius: 6px; overflow: hidden; margin: 8px 0 12px; }
.type-split span { display: block; height: 100%; }
@media (max-width: 860px) { .dish-row { grid-template-columns: 48px 1fr auto; } .dish-row .hide-m { display: none; } .hours-row { grid-template-columns: 1fr 1fr; } }
.legend { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; font-size: .8rem; color: var(--muted); }
.legend-item { display: flex; align-items: center; gap: 6px; }

.btn-primary { background: #0F172A; color: #fff; }
.btn-amber { background: #1E3A8A; color: #0F172A; }
.occ { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; min-width: 80px; }
.occ i { display: block; height: 100%; border-radius: 4px; background: #1E3A8A; }
.occ i.full { background: #DC2626; } .occ i.high { background: #F59E0B; }
.session-row { display: grid; grid-template-columns: 70px 1fr 160px 120px auto; gap: 14px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--surface-2); text-decoration: none; color: inherit; border-left: 4px solid var(--c); }
.session-row:hover { background: #F8F9FB; }
.session-row time { font-family: 'Manrope', sans-serif; font-weight: 800; font-size: 1.15rem; }
.roster li { display: grid; grid-template-columns: 40px 1fr auto auto; gap: 12px; align-items: center; }
.checkin-big { display: grid; gap: 14px; justify-items: center; text-align: center; padding: 26px; }
.checkin-big .avatar { width: 84px; height: 84px; font-size: 1.8rem; }
.checkin-input { font-size: 1.6rem !important; letter-spacing: .14em; text-transform: uppercase; text-align: center; font-family: 'Manrope', monospace; }
.plan-row { display: grid; grid-template-columns: 1.4fr 1fr 110px 110px 90px 90px auto; gap: 8px; align-items: center; }
.slot-chip { display: flex; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 8px; background: var(--surface-2); border-left: 4px solid var(--c); font-size: .85rem; }
.week-admin { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; }
.week-admin h3 { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 8px; }
.week-admin details summary { list-style: none; cursor: pointer; }
.week-admin details[open] .slot-chip { background: #fff; outline: 1px solid var(--border); }
@media (max-width: 1100px) { .week-admin { grid-template-columns: repeat(2, 1fr); } .session-row { grid-template-columns: 60px 1fr auto; } .session-row .hide-m { display: none; } .plan-row { grid-template-columns: 1fr 1fr; } }

.chip-violet { background: #EDE9FE; color: #6D28D9; }
.board { display: grid; grid-template-columns: repeat(5, minmax(220px, 1fr)); gap: 12px; overflow-x: auto; align-items: start; }
.col { background: var(--surface-2); border-radius: var(--r-lg); padding: 10px; min-height: 200px; }
.col h3 { font-family: 'Inter', sans-serif; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); display: flex; justify-content: space-between; padding: 4px 6px 10px; }
.col.drop { outline: 2px dashed var(--gold); }
.lead-card { background: #fff; border: 1px solid var(--border); border-left: 4px solid var(--c, #CBD5E1); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; display: grid; gap: 4px; cursor: grab; text-decoration: none; color: inherit; font-size: .88rem; }
.lead-card:hover { box-shadow: var(--shadow); }
.lead-card strong { font-size: .95rem; }
.lead-card .late { color: #B91C1C; font-weight: 700; font-size: .78rem; }
.lead-layout { display: grid; grid-template-columns: 1fr 360px; gap: 20px; align-items: start; }
.stage-bar { display: flex; gap: 4px; flex-wrap: wrap; }
.stage-bar button { border: 1px solid var(--border); background: #fff; border-radius: 999px; padding: 6px 12px; font: inherit; font-size: .82rem; font-weight: 600; cursor: pointer; color: var(--muted); }
.stage-bar button.on { background: var(--primary); color: #fff; border-color: var(--primary); }
.tl-act { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.tl-act li { display: grid; grid-template-columns: 34px 1fr; gap: 10px; }
.tl-act .ic { width: 34px; height: 34px; border-radius: 50%; background: var(--surface-2); display: flex; align-items: center; justify-content: center; color: var(--primary); }
.tl-act .ic .material-symbols-outlined { font-size: 18px; }
.tl-act small { color: var(--muted); display: block; }
.funnel { display: grid; gap: 8px; }
.funnel div { display: grid; grid-template-columns: 130px 1fr 40px; gap: 10px; align-items: center; font-size: .9rem; }
.funnel i { display: block; height: 22px; border-radius: 6px; background: linear-gradient(90deg, #0F172A, #2C4A9A); }
.slot-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.slot-grid button { border: 1px solid var(--border); background: #fff; border-radius: 8px; padding: 6px 0; font: inherit; font-size: .85rem; cursor: pointer; }
.slot-grid button.on { background: var(--primary); color: #fff; }
.prop-thumb { width: 72px; height: 46px; border-radius: 8px; object-fit: cover; background: var(--surface-2); }
@media (max-width: 1100px) { .lead-layout { grid-template-columns: 1fr; } }

/* ── Taller ─────────────────────────────────────────── */
.btn-amber { color: #fff; }
.kpi > .material-symbols-outlined { font-size: 22px; flex: none; }
.stars { color: #F59E0B; letter-spacing: 1px; }
.low { color: #B91C1C; font-weight: 700; }
@media print { .sidebar, .topbar, .demo-note, .no-print { display: none !important; } .main { margin: 0 !important; } }
.content { grid-template-columns: minmax(0, 1fr); }

/* ── Cobranza ───────────────────────────────────────── */
.money { font-variant-numeric: tabular-nums; white-space: nowrap; }
.low { color: #B91C1C; font-weight: 700; }
.grid-2 > * { min-width: 0; }
.btn-file { white-space: normal; word-break: break-word; text-align: left; justify-content: flex-start; height: auto; min-height: 40px; padding: 8px 12px; width: 100%; }
