:root {
  --ink:#142a34; --muted:#526670; --paper:#f3f5f6; --surface:#fff; --line:#dce4e8;
  --accent:#b94113; --accent-soft:#fff0e7; --green:#246346; --blue:#235c9c; --radius:16px; --nav-height:68px;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; color:var(--ink); background:var(--paper);
  font-synthesis:none; -webkit-font-smoothing:antialiased;
}
* { box-sizing:border-box; }
body { margin:0; }
button,input,select,textarea { font:inherit; }
button,a,input,select,textarea { -webkit-tap-highlight-color:transparent; }
button { min-height:44px; border:0; border-radius:10px; padding:10px 16px; font-weight:650; cursor:pointer; transition:background 160ms,border-color 160ms,box-shadow 160ms; }
button:active { filter:brightness(.94); }
button:disabled { opacity:.48; cursor:not-allowed; }
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible { outline:3px solid #4384b8; outline-offset:3px; }
.primary { background:var(--accent); color:white; }
.primary:hover { background:#9c3510; }
.secondary { background:#eaf0f2; color:var(--ink); }
.secondary:hover { background:#dfe8ec; }
.ghost { background:transparent; color:inherit; border:1px solid var(--line); }
.danger { color:#a72b26; background:#fff0ee; }
.icon { width:20px; height:20px; flex:none; vertical-align:middle; }
header { min-height:76px; background:var(--ink); color:white; display:flex; align-items:center; gap:24px; padding:12px max(24px,calc((100vw - 1200px)/2)); }
.brand { display:flex; align-items:center; gap:10px; color:inherit; text-decoration:none; font-size:24px; font-weight:750; letter-spacing:-.7px; }
.brand-mark { display:grid; place-items:center; width:38px; height:38px; border:1px solid #69808a; border-radius:11px; color:#ffb181; }
.header-context { flex:1; min-width:0; }
#header-task { display:block; font-size:16px; }
#header-subtitle { display:block; color:#c2d0d7; font-size:12px; margin-top:4px; }
.header-right { margin-left:auto; display:flex; align-items:center; gap:16px; font-size:12px; }
.account-button { display:inline-flex; align-items:center; justify-content:center; gap:8px; color:white; background:#ffffff0c; border-color:#ffffff25; min-width:44px; }
.online::before,.offline::before { content:""; display:inline-block; width:6px; height:6px; margin-right:6px; border-radius:50%; background:#8cd6aa; }
.offline { color:#ffd2a9; }
.offline::before { background:#ffb177; }
main { max-width:1200px; margin:auto; padding:24px 24px 64px; }
#navigation { display:flex; gap:6px; padding-bottom:16px; margin-bottom:22px; border-bottom:1px solid var(--line); }
#navigation button { display:inline-flex; align-items:center; justify-content:center; gap:8px; color:var(--muted); background:transparent; }
#navigation button[aria-current=page] { color:var(--ink); background:#e1eaee; }
#navigation button[aria-current=page] .icon { color:var(--accent); }
.eyebrow { font-size:12px; font-weight:650; color:var(--muted); margin:0 0 8px; letter-spacing:.1px; }
h1 { font-size:clamp(26px,3vw,34px); letter-spacing:-1px; line-height:1.15; margin:0 0 8px; }
h2 { font-size:19px; letter-spacing:-.4px; margin:0 0 14px; }
h3 { font-size:16px; margin:0 0 8px; }
p { line-height:1.5; margin:0 0 16px; }
small,.muted { color:var(--muted); }
.mobile-title { display:none; }
.page-heading { display:flex; align-items:center; justify-content:space-between; gap:20px; margin-bottom:20px; }
.page-heading p { color:var(--muted); max-width:650px; font-size:14px; }
.page-heading p:last-child { margin-bottom:0; }
.price-label { white-space:nowrap; font-size:12px; color:var(--muted); text-align:right; }
.price-label strong { display:block; margin-top:3px; font-size:22px; color:var(--ink); }
.revenue-kpi { display:flex; justify-content:space-between; align-items:center; gap:24px; padding:24px 28px; margin-bottom:16px; border-radius:18px; background:var(--ink); color:white; }
.revenue-meta > span { display:block; font-size:13px; color:#c7d7de; }
.revenue-meta > strong { display:block; font-size:clamp(32px,5vw,46px); letter-spacing:-1.2px; font-variant-numeric:tabular-nums; margin:5px 0; }
.revenue-meta > small,.revenue-progress small { display:block; font-size:12px; color:#c7d7de; }
.revenue-progress { width:220px; max-width:40%; font-size:13px; }
.revenue-progress .progress { margin:10px 0; }
.revenue-progress .progress::-webkit-progress-bar { background:#ffffff25; }
.revenue-progress .progress::-webkit-progress-value { background:#9ed2b2; }
.metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-bottom:20px; }
.metric { background:white; border:1px solid var(--line); border-radius:12px; padding:16px; min-width:0; }
.metric .value { display:block; font-size:30px; font-weight:750; letter-spacing:-.7px; margin:8px 0 4px; font-variant-numeric:tabular-nums; }
.metric small { font-size:12px; line-height:1.35; }
.metric-label { display:flex; align-items:center; gap:6px; font-size:13px; font-weight:600; }
.section-head { display:flex; justify-content:space-between; align-items:center; gap:12px; margin:24px 0 12px; }
.section-head h2 { margin:0; }
.tables { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:10px; }
.table-card { min-width:0; background:white; border:1px solid var(--line); border-radius:12px; padding:16px; text-align:left; }
.table-card:hover { border-color:#8babb9; box-shadow:0 3px 12px #142a3408; }
.table-card-top { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.table-card-top h3 { margin:0; font-size:17px; }
.table-card-top > span { font-size:12px; color:var(--green); }
.table-card > p { font-size:12px; font-weight:400; color:var(--muted); margin:5px 0 12px; }
.table-progress-label { display:block; font-size:11px; font-weight:400; color:var(--muted); margin:6px 0 12px; }
.table-stats { border-top:1px solid var(--line); padding-top:4px; }
.mini-count { display:flex; justify-content:space-between; gap:8px; margin-top:7px; font-size:12px; font-weight:400; }
.mini-count strong { font-variant-numeric:tabular-nums; }
progress.progress { display:block; width:100%; height:5px; border:0; border-radius:5px; margin-top:12px; appearance:none; color:var(--green); overflow:hidden; background:#eaf0f2; }
progress.progress::-webkit-progress-bar { background:#eaf0f2; border-radius:5px; }
progress.progress::-webkit-progress-value { background:var(--green); border-radius:5px; }
progress.progress::-moz-progress-bar { background:var(--green); border-radius:5px; }
.lower-grid { display:grid; grid-template-columns:1fr 1.4fr; gap:20px; margin-top:20px; }
.panel { background:white; border:1px solid var(--line); border-radius:var(--radius); padding:22px; min-width:0; }
.stock-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.stock-card { background:#edf4f0; border-radius:12px; padding:18px; }
.stock-card strong { display:block; font-size:32px; font-variant-numeric:tabular-nums; margin:7px 0; }
.stock-card span { font-size:12px; color:var(--muted); }
.stock-warning { font-size:12px; color:var(--muted); margin:12px 0 0; }
.activity { list-style:none; padding:0; margin:0; }
.activity li { padding:12px 0; border-bottom:1px solid var(--line); font-size:13px; line-height:1.4; }
.activity li:last-child { border:0; }
.activity small { display:block; margin-top:4px; font-size:12px; overflow-wrap:anywhere; }
.history-detail { margin-top:4px; font-size:12px; line-height:1.45; color:var(--muted); overflow-wrap:anywhere; }
.technical-detail { margin-top:6px; }
.technical-detail summary { font-size:12px; color:var(--muted); min-height:44px; }
.technical-detail pre { margin:4px 0; padding:10px; border-radius:8px; background:var(--paper); font-size:11px; white-space:pre-wrap; overflow-wrap:anywhere; }
.selection-help { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:6px 8px; background:#edf3f7; border-radius:9px; font-size:12px; margin:8px 0; }
.selection-help button { min-width:44px; min-height:44px; padding:8px; background:transparent; }
.dispatch-state { font-size:12px; color:var(--muted); align-self:center; }
.stock-empty { padding:10px 12px; background:#fff0d0; border:1px solid #e0bd82; border-radius:9px; color:#704509; font-size:13px; margin:8px 0; }
.assign-table { font-size:12px; padding:8px 10px; }
.badge { display:inline-flex; align-items:center; gap:5px; border-radius:6px; padding:5px 7px; font-size:12px; font-weight:650; line-height:1.25; }
.PENDIENTE { background:#edf0f2; color:#52616b; }
.PAGADO { background:#e8f0fc; color:#245790; }
.ENTREGADO { background:#fff0d6; color:#805310; }
.DESPACHADO { background:#e5f2e9; color:#256144; }
label { display:flex; flex-direction:column; gap:6px; font-size:13px; font-weight:600; margin-bottom:16px; }
input,select,textarea { width:100%; min-width:0; min-height:46px; border:1px solid #bbcbd3; border-radius:10px; padding:10px 12px; font-size:16px; background:white; color:var(--ink); }
textarea { min-height:80px; resize:vertical; }
input::placeholder,textarea::placeholder { color:#6b7a82; font-weight:400; }
input[type=checkbox] { width:20px; min-height:20px; margin:2px 0 0; accent-color:var(--blue); flex:none; }
.check-label { flex-direction:row; align-items:start; gap:9px; font-weight:400; font-size:13px; line-height:1.5; }
.filters { display:flex; align-items:end; flex-wrap:wrap; gap:10px; margin-bottom:16px; }
.filters label { flex:1; min-width:130px; margin:0; }
.filters .search { flex:2; min-width:190px; }
#search-form { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:end; }
.ticket-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(100px,1fr)); gap:8px; }
.ticket-cell { position:relative; min-width:0; min-height:76px; padding:12px 5px; border:1px solid var(--line); border-radius:10px; background:white; text-align:center; }
.ticket-cell strong { display:block; font-size:21px; font-variant-numeric:tabular-nums; letter-spacing:-.5px; margin-bottom:7px; }
.ticket-state { display:inline-flex; align-items:center; gap:4px; font-size:11px; font-weight:600; background:transparent; }
.state-dot { display:inline-block; width:5px; height:5px; background:currentColor; border-radius:50%; flex:none; }
.ticket-cell:has(.ticket-state.PENDIENTE) { background:#f3f5f6; border-color:#cbd5db; }
.ticket-cell:has(.ticket-state.PAGADO) { background:#e4efff; border-color:#91b6ec; color:#163d72; }
.ticket-cell:has(.ticket-state.ENTREGADO) { background:#fff0d0; border-color:#deb368; color:#704509; }
.ticket-cell:has(.ticket-state.DESPACHADO) { background:#def3e5; border-color:#87c59d; color:#185335; }
.ticket-cell:hover { box-shadow:inset 0 0 0 1px currentColor; }
.ticket-cell.selected { border-color:var(--blue); background:#dce9ff; box-shadow:inset 0 0 0 2px var(--blue); }
.selection-check { position:absolute; right:5px; top:5px; width:14px; height:14px; border-radius:50%; color:white; background:var(--blue); display:none; align-items:center; justify-content:center; }
.selection-check .icon { width:10px; height:10px; }
.ticket-cell.selected .selection-check { display:flex; }
.ticket-cell:disabled { cursor:default; opacity:.45; }
.pagination { display:flex; align-items:center; justify-content:space-between; gap:12px; font-size:13px; margin-top:16px; }
.pagination span { text-align:center; }
.button-row { display:flex; gap:10px; align-items:center; }
.button-row > * { flex:1; }
.empty { padding:26px 12px; text-align:center; color:var(--muted); }
.login-card { width:min(100%,420px); margin:40px auto; padding:28px; border:1px solid var(--line); border-radius:20px; background:white; box-shadow:0 16px 48px #142a3410; }
.login-card h1 { margin:24px 0 8px; font-size:27px; letter-spacing:-.8px; color:var(--ink); }
.login-brand { display:flex; align-items:center; gap:10px; font-weight:750; font-size:20px; }
.login-brand .brand-mark { background:var(--ink); color:#ffb383; width:40px; height:40px; }
.login-brand small { display:block; font-size:12px; color:var(--muted); font-weight:400; margin-top:2px; }
.login-brand > div > span { display:block; font-size:12px; color:var(--muted); font-weight:400; margin-top:2px; }
.login-intro p { margin:0; }
.login-intro { font-size:14px; line-height:1.5; color:var(--muted); margin-bottom:24px; }
#login-submit { width:100%; margin-top:4px; }
#login-form > label { margin:14px 0 6px; }
#login-form > label:first-child { margin-top:0; }
#login-form .password-field { margin-bottom:14px; }
.login-footer { display:flex; align-items:center; justify-content:center; gap:7px; padding-top:20px; margin:20px 0 0; border-top:1px solid var(--line); font-size:12px; color:var(--muted); }
.login-footer svg { width:15px; height:15px; flex:none; }
.password-field { position:relative; display:flex; align-items:center; }
.password-field input { padding-right:88px; }
.password-field .password-toggle { position:absolute; right:2px; top:2px; bottom:2px; padding:4px 12px; min-height:42px; min-width:74px; background:transparent; color:var(--blue); font-size:12px; border-radius:8px; }
body[data-auth=out] { background:#edf2f5; }
body[data-auth=out] > header { display:none; }
body[data-auth=out] main { min-height:100dvh; display:grid; place-items:center; padding:24px 16px; }
body[data-auth=out] .login-card { margin:0; }
.admin-layout { display:grid; gap:14px; }
.admin-price h2,.admin-users h2 { font-size:17px; margin:0; }
.admin-price .price-inline { display:flex; align-items:end; gap:10px; margin-top:12px; }
.price-inline label { flex:1; margin:0; max-width:220px; }
.price-inline button { flex:none; }
.admin-price .muted { font-size:12px; margin:10px 0 0; }
.admin-section-head { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:12px; }
.admin-section-head button { font-size:13px; padding:9px 12px; }
.admin-section-head p { font-size:12px; color:var(--muted); margin:4px 0 0; }
.user-status { margin-left:6px; font-size:11px; }
.user-status.active { color:var(--green); }
.field-help { display:block; font-size:12px; color:var(--muted); margin:5px 0 12px; }
.user-form-intro { font-size:13px; color:var(--muted); margin:0 0 14px; }
.user-form-grid { margin-bottom:12px; }
.admin-user-list { list-style:none; padding:0; margin:0; }
.admin-user-list li { display:flex; align-items:center; gap:10px; padding:12px 0; border-top:1px solid var(--line); }
.user-avatar { width:36px; height:36px; display:grid; place-items:center; flex:none; background:#e9eff3; color:var(--ink); border-radius:10px; font-weight:700; }
.user-identity { flex:1; min-width:0; overflow-wrap:anywhere; }
.user-identity strong { display:block; font-size:14px; }
.user-meta { display:block; color:var(--muted); font-size:12px; margin-top:3px; }
.user-role { font-size:11px; padding:5px 8px; border-radius:6px; background:#edf2f7; color:var(--blue); }
.user-actions { display:flex; align-items:center; gap:8px; flex:none; }
.user-actions button { min-height:44px; padding:8px 10px; font-size:12px; }
.current-user-label { display:inline-block; color:var(--muted); font-size:11px; font-weight:400; }
.deleted-users { margin-top:10px; border-top:1px solid var(--line); }
.deleted-users > summary { font-size:13px; color:var(--muted); min-height:44px; }
@media(max-width:600px) {
  .admin-user-list li { flex-wrap:wrap; }
  .admin-user-list .user-identity { flex-basis:calc(100% - 150px); }
  .user-actions { margin-left:46px; width:calc(100% - 46px); }
  .user-actions button { flex:1; }
}
.assign-table { font-size:12px; padding:8px 10px; flex:none; }
.mesa-scope { font-size:13px; color:var(--muted); margin:0 0 8px; }
.user-form-grid { display:grid; gap:12px; }
.user-form-grid label { margin:0; }
.user-form-grid label small { font-size:12px; font-weight:400; }
.role-help { margin:0; padding:10px 12px; font-size:12px; color:var(--muted); background:var(--paper); border-radius:9px; }
.form-actions { display:flex; gap:10px; margin-top:6px; }
.form-actions button { flex:1; }
#user-dialog { width:min(480px,calc(100% - 24px)); }
#user-feedback:empty { display:none; }
.error { color:#a52d26; font-size:13px; line-height:1.45; margin-top:10px; }
.form-grid { display:grid; grid-template-columns:1fr 1fr; gap:20px; }
.form-grid .panel form { max-width:500px; }
#notice { position:sticky; top:0; z-index:45; padding:12px max(16px,calc((100vw - 1152px)/2)); background:#e8f4ec; color:#24513b; border-bottom:1px solid #b4cebc; font-size:13px; line-height:1.5; }
#notice.error-notice { background:#fff0e5; color:#823e12; border-color:#e7bd9c; }
#notice button { margin-top:6px; }
dialog { width:min(540px,calc(100% - 32px)); max-height:90dvh; padding:24px; color:var(--ink); background:white; border:1px solid var(--line); border-radius:20px; box-shadow:0 24px 80px #0c243533; }
dialog::backdrop { background:#10212a99; backdrop-filter:blur(2px); }
.dialog-top { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:14px; }
.dialog-top .eyebrow,.dialog-top h2 { margin:0; }
.dialog-top .ghost { flex:none; padding:8px 12px; }
.ticket-heading { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
#ticket-title { font-size:34px; line-height:1.15; letter-spacing:-1px; margin:0; }
.ticket-meta { margin:7px 0 16px; color:var(--muted); font-size:13px; }
.ticket-actions { padding:16px; background:#f3f6f7; border-radius:12px; margin-bottom:14px; }
.ticket-actions p { font-size:13px; margin-bottom:12px; }
.ticket-actions label { margin-bottom:8px; }
.ticket-actions button { width:100%; margin-top:7px; }
.ticket-history { border-top:1px solid var(--line); }
summary { cursor:pointer; min-height:44px; display:flex; align-items:center; gap:8px; font-size:14px; font-weight:600; list-style:none; }
summary::-webkit-details-marker { display:none; }
summary::after { content:"+"; font-size:20px; font-weight:400; margin-left:auto; color:var(--muted); }
details[open] > summary::after { content:"−"; }
.ticket-history summary span { margin-left:auto; font-size:12px; font-weight:400; color:var(--muted); }
.ticket-history summary::after { margin-left:0; }
.ticket-history .empty { font-size:13px; padding:12px 0; margin:0; }
.admin-correction { margin-top:12px; padding-top:8px; border-top:1px solid var(--line); }
.admin-correction summary { color:#8f382a; font-size:13px; }
.user-list { list-style:none; padding:0; margin:0; }
.user-list li { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:12px 0; border-top:1px solid var(--line); font-size:14px; }
.user-list small { display:block; font-size:12px; margin-top:3px; }
.bulk-tools { display:flex; align-items:start; gap:10px; flex-wrap:wrap; border-top:1px solid var(--line); padding:10px 0 0; margin:10px 0 14px; }
.bulk-toolbar { display:flex; align-items:center; gap:10px; }
.bulk-toolbar span,.bulk-tools p { font-size:12px; color:var(--muted); }
.bulk-tools details { flex:1; min-width:0; }
.selection-hint { margin:0; align-self:center; }
@media(max-width:600px) { .selection-hint { display:none; } }
.bulk-tools summary { border:1px solid var(--line); border-radius:10px; min-height:44px; padding:8px 12px; }
.bulk-tools details[open] { flex-basis:100%; }
.range-form { display:grid; grid-template-columns:1fr 1fr auto; align-items:end; gap:10px; margin-top:12px; }
.range-form label { margin:0; }
#range-feedback { flex-basis:100%; margin:0; }
#selection-bar { position:fixed; left:50%; bottom:20px; transform:translateX(-50%); z-index:35; width:min(700px,calc(100% - 32px)); display:flex; align-items:center; gap:12px; padding:10px 12px; border:1px solid #ffffff25; border-radius:14px; background:var(--ink); color:white; box-shadow:0 8px 32px #142a3429; }
#selection-bar > div { flex:1; min-width:0; }
#selection-bar strong,#selection-bar small,.bulk-total strong,.bulk-total small { display:block; }
#selection-bar small { font-size:12px; color:#cddde5; margin-top:3px; }
#selection-bar .ghost { border-color:#ffffff40; }
.has-selection main { padding-bottom:150px; }
.bulk-total { border-bottom:1px solid var(--line); padding-bottom:16px; margin-bottom:16px; }
.bulk-total strong { font-size:25px; font-variant-numeric:tabular-nums; letter-spacing:-.6px; }
.bulk-total small { font-size:13px; color:var(--muted); margin-top:6px; }
.selected-ranges { background:#f1f5f7; border-radius:10px; padding:12px; margin:14px 0; font-size:13px; overflow-wrap:anywhere; max-height:144px; overflow:auto; }
.selected-ranges p { margin:6px 0 0; }
#bulk-payment-form > button { width:100%; }
.bulk-finish { display:grid; gap:8px; margin-top:12px; }
.bulk-finish > p { margin:0; font-size:13px; font-weight:700; }
.bulk-finish button { width:100%; }
.bulk-finish small { color:var(--muted); font-size:12px; line-height:1.45; }
#account-dialog { max-width:390px; }
.account-profile { display:flex; align-items:center; gap:12px; padding:6px 0 18px; border-bottom:1px solid var(--line); margin-bottom:12px; }
.account-profile > div,.user-list li > span { min-width:0; overflow-wrap:anywhere; }
.account-avatar { display:grid; place-items:center; width:46px; height:46px; border-radius:50%; background:#e8f0f4; color:var(--ink); flex:none; }
.account-name { display:block; font-size:18px; font-weight:700; }
.account-role { display:block; font-size:12px; color:var(--muted); margin-top:4px; }
.account-actions { display:grid; gap:8px; }
.account-actions button { display:flex; align-items:center; gap:10px; text-align:left; width:100%; }
.spaced-panel { margin-top:20px; }
.section-spacing { margin-top:28px; }
.skip { position:fixed; left:12px; top:-100px; padding:12px; background:white; z-index:100; color:var(--ink); }
.skip:focus { top:12px; }
[hidden] { display:none !important; }
@media (max-width:900px) {
  .tables { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .form-grid { grid-template-columns:1fr; }
  .lower-grid { gap:14px; }
  .header-right { gap:10px; }
  .metric { padding:14px; }
}
@media (max-width:600px) {
  header { min-height:60px; padding:calc(8px + env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) 8px max(12px,env(safe-area-inset-left)); gap:10px; }
  .brand-word { display:none; }
  .brand-mark { width:32px; height:32px; font-size:19px; border-radius:10px; }
  .header-context { display:block; }
  #header-task { font-size:15px; }
  #header-subtitle { font-size:11px; margin-top:3px; max-width:170px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .header-right { gap:8px; font-size:10px; }
  .account-button { padding:8px; }
  .account-button .icon { width:20px; height:20px; }
  main { padding:12px 12px calc(var(--nav-height) + 20px + env(safe-area-inset-bottom)); }
  #navigation { position:fixed; bottom:0; left:0; right:0; z-index:40; display:flex; flex-wrap:nowrap; justify-content:space-around; gap:4px; height:calc(var(--nav-height) + env(safe-area-inset-bottom)); padding:6px 8px calc(6px + env(safe-area-inset-bottom)); margin:0; border-top:1px solid var(--line); border-bottom:0; background:white; box-shadow:0 -3px 16px #142a3405; }
  #navigation button { position:relative; flex:1; min-width:0; max-width:130px; min-height:52px; padding:5px 8px; flex-direction:column; gap:4px; font-size:11px; border-radius:10px; }
  #navigation .icon { width:21px; height:21px; }
  #navigation button[aria-current=page] { background:#edf3f6; }
  #navigation button[aria-current=page]::before { content:""; width:18px; height:3px; background:var(--accent); border-radius:2px; position:absolute; top:0; }
  .page-heading { gap:10px; margin-bottom:12px; }
  .page-heading h1 { font-size:22px; letter-spacing:-.5px; margin:0; }
  .full-title { display:none; }
  .mobile-title { display:inline; }
  .page-heading .eyebrow,.page-heading > div > p:last-child { display:none; }
  .page-heading.context-only { justify-content:flex-end; margin-bottom:8px; }
  .page-heading.context-only > h1, .page-heading.context-only > div:first-child:not(.price-label) { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
  .page-heading.context-only:not(:has(.price-label)) { height:0; margin:0; }
  #search-form + .dispatch-filters { grid-template-columns:minmax(0,1fr) minmax(0,1.4fr) 44px; }
  .price-label { font-size:11px; }
  .price-label strong { font-size:17px; margin-top:2px; }
  .panel { padding:14px; border-radius:14px; }
  body[data-view=caja] .panel,body[data-view=despacho] .panel { padding:10px; }
  .revenue-kpi { padding:18px 20px; border-radius:16px; gap:16px; margin-bottom:10px; }
  .revenue-meta > span { font-size:12px; }
  .revenue-meta > strong { font-size:34px; }
  .revenue-meta > small { font-size:11px; }
  .revenue-progress { width:105px; font-size:11px; }
  .revenue-progress small { font-size:11px; }
  .metrics { gap:0; background:white; border:1px solid var(--line); border-radius:12px; overflow:hidden; margin-bottom:18px; }
  .metric { border:0; border-radius:0; padding:12px 5px; text-align:center; }
  .metric + .metric { border-left:1px solid var(--line); }
  .metric-label { justify-content:center; font-size:11px; }
  .metric .value { font-size:23px; margin:5px 0 0; }
  .metric small { display:none; }
  .metric:has(.ENTREGADO) small { display:block; font-size:11px; margin-top:4px; }
  .section-head { margin:18px 0 10px; }
  .section-head h2 { font-size:18px; }
  .tables { grid-template-columns:1fr; gap:0; border:1px solid var(--line); border-radius:14px; overflow:hidden; background:white; }
  .table-card { border:0; border-radius:0; padding:13px 14px; display:grid; grid-template-columns:110px minmax(0,1fr); gap:0 12px; align-items:center; }
  .table-card + .table-card { border-top:1px solid var(--line); }
  .table-card-top { grid-column:1; }
  .table-card-top h3 { font-size:15px; }
  .table-card-top > span { display:none; }
  .table-card > p { grid-column:1; margin:4px 0 0; font-size:10px; }
  .table-card > .progress { grid-column:1; margin-top:7px; height:3px; }
  .table-progress-label { display:none; }
  .table-stats { grid-column:2; grid-row:1 / span 3; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px 10px; border:0; padding:0; }
  .table-stats .mini-count { min-width:0; margin:0; align-items:center; gap:4px; font-size:11px; }
  .table-stats .mini-count strong { font-size:14px; }
  .lower-grid { grid-template-columns:1fr; gap:12px; margin-top:16px; }
  .lower-grid .panel h2 { font-size:17px; }
  .stock-card { padding:14px; }
  .stock-card strong { font-size:28px; margin:5px 0; }
  .filters { gap:6px; margin-bottom:10px; }
  .filters label { min-width:0; font-size:11px; gap:4px; }
  #search-form { position:sticky; top:0; z-index:15; padding:3px 0 8px; background:white; gap:7px; }
  #search-form .search { min-width:0; font-size:0; gap:0; }
  #search-form input { font-size:16px; }
  #search-form button { font-size:13px; padding:8px 11px; }
  #search-form + .filters { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.3fr) 44px; align-items:end; }
  #search-form + .filters select { padding:8px 5px; font-size:14px; }
  #reload-board { width:44px; height:46px; padding:0; font-size:0; }
  #reload-board:not(:has(svg))::after { content:"↻"; font-size:25px; }
  #search-form + .filters + .muted { font-size:12px; margin-bottom:6px; }
  .ticket-grid { grid-template-columns:repeat(4,minmax(0,1fr)); gap:6px; }
  .ticket-cell { min-height:66px; padding:10px 2px 8px; border-radius:9px; }
  .ticket-cell strong { font-size:19px; margin-bottom:5px; }
  .ticket-state { font-size:11px; gap:3px; }
  .state-dot { width:4px; height:4px; }
  .selection-check { top:4px; right:4px; width:13px; height:13px; }
  .bulk-tools { gap:8px; margin:8px 0 10px; padding-top:9px; }
  .bulk-toolbar { gap:0; }
  .bulk-toolbar button { padding:8px 10px; font-size:13px; }
  .bulk-toolbar > span,.bulk-tools details > p { display:none; }
  .bulk-tools summary { font-size:12px; padding:8px 10px; }
  .range-form { grid-template-columns:1fr 1fr; gap:8px; }
  .range-form button { grid-column:1 / -1; }
  .pagination { font-size:12px; gap:6px; margin-top:12px; }
  .pagination button { padding:8px 11px; font-size:12px; }
  .login-card { margin:24px auto; padding:24px; }
  .login-card h1 { font-size:26px; }
  .admin-layout { gap:12px; }
  .admin-price .price-inline { gap:8px; }
  .admin-section-head { gap:8px; }
  .admin-user-list li { padding:10px 0; }
  #user-dialog { width:100%; max-width:100%; margin:auto 0 0; border-radius:22px 22px 0 0; padding:16px 16px calc(16px + env(safe-area-inset-bottom)); max-height:92dvh; }
  #user-dialog .form-actions { position:sticky; bottom:0; padding:8px 0 0; background:white; z-index:2; }
  .form-grid { gap:12px; }
  .form-grid .panel h2 { font-size:18px; }
  #notice { padding:10px 12px; font-size:12px; }
  dialog { width:calc(100% - 24px); padding:20px; border-radius:18px; max-height:88dvh; }
  #ticket-dialog,#bulk-dialog,#account-dialog { margin:auto 0 0; width:100%; max-width:100%; padding:14px 16px calc(18px + env(safe-area-inset-bottom)); border-radius:22px 22px 0 0; }
  #ticket-dialog::before,#bulk-dialog::before,#account-dialog::before { content:""; display:block; height:4px; width:32px; border-radius:3px; background:#ccd6dc; margin:-4px auto 10px; }
  .dialog-top { margin-bottom:10px; }
  .dialog-top .eyebrow { font-size:12px; }
  .dialog-top h2 { font-size:19px; }
  .dialog-top .ghost { font-size:13px; padding:8px 11px; }
  #ticket-title { font-size:30px; }
  .ticket-heading { gap:10px; }
  .ticket-meta { font-size:12px; margin:6px 0 12px; }
  .ticket-actions { padding:12px; margin-bottom:10px; }
  .ticket-actions p { margin-bottom:10px; }
  .ticket-actions label { gap:4px; margin-bottom:6px; font-size:12px; }
  .ticket-actions button { margin-top:6px; padding:9px 11px; font-size:14px; }
  .ticket-history summary { font-size:13px; }
  .ticket-history summary span { font-size:11px; }
  .admin-correction { margin-top:8px; padding-top:4px; }
  #confirm-dialog h2 { font-size:20px; margin-bottom:10px; }
  #confirm-dialog p { font-size:14px; margin-bottom:18px; }
  .button-row { flex-direction:column; align-items:stretch; gap:8px; }
  .button-row > * { flex:auto; }
  #selection-bar { bottom:calc(var(--nav-height) + 8px + env(safe-area-inset-bottom)); width:calc(100% - 16px); gap:6px; padding:8px; border-radius:12px; }
  #selection-bar strong { font-size:14px; }
  #selection-bar small { font-size:11px; }
  #selection-bar #review-bulk { white-space:nowrap; padding:8px 10px; font-size:13px; }
  #selection-bar #clear-selection { width:44px; min-width:44px; padding:0; font-size:0; }
  #selection-bar #clear-selection::after { content:"×"; font-size:24px; }
  .has-selection main { padding-bottom:calc(var(--nav-height) + 96px + env(safe-area-inset-bottom)); }
  .bulk-total { padding-bottom:12px; margin-bottom:12px; }
  .bulk-total strong { font-size:24px; }
  .selected-ranges { padding:11px; margin:12px 0; }
  #account-dialog { max-width:100%; }
}
.recent-payment { margin:8px 0; padding:0; border:1px solid var(--line); border-radius:10px; background:white; }
.recent-payment-summary { padding:8px 10px; min-height:44px; font-size:12px; }
.recent-payment-summary::after { content:'Ver'; margin-left:auto; color:var(--blue); }
.recent-payment details[open] > .recent-payment-summary::after { content:'Cerrar'; }
.recent-payment-body { padding:10px; border-top:1px solid var(--line); }
.recent-payment-body > p { font-size:13px; margin:8px 0; }
.recent-payment-body > small { display:block; color:var(--muted); font-size:12px; margin-top:7px; }
.recent-payment-heading { display:flex; justify-content:space-between; gap:12px; align-items:start; }
.recent-payment-heading > div { min-width:0; }
.recent-payment-heading strong,.recent-payment-heading span { display:block; overflow-wrap:anywhere; }
.recent-payment-heading strong { font-size:15px; }
.recent-payment-heading span { color:var(--muted); font-size:12px; margin-top:4px; }
.recent-payment-heading button { padding:8px 10px; min-height:44px; font-size:12px; }
.recent-payment > p { font-size:13px; margin:8px 0; }
.recent-payment-tickets summary { font-size:12px; min-height:44px; overflow-wrap:anywhere; }
.receipt-ticket-list { display:flex; flex-wrap:wrap; gap:6px; max-height:180px; overflow:auto; padding:4px 0 8px; }
.receipt-ticket { display:flex; flex-direction:column; align-items:start; gap:2px; border:1px solid var(--line); min-height:44px; padding:7px 10px; }
.receipt-ticket strong { font-size:14px; font-variant-numeric:tabular-nums; }
.receipt-ticket span { font-size:11px; }
#deliver-recent-payment { width:100%; margin-top:6px; font-size:14px; }
.recent-payment > small,.receipt-complete { display:block; margin-top:7px; font-size:12px; line-height:1.4; color:var(--muted); }
@media (max-width:600px) { .recent-payment { padding:0; } .recent-payment-heading { gap:8px; } }
@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after { transition:none !important; scroll-behavior:auto !important; }
}
