/* CafeCloud POS — Sistema visual operativo 2026 */
:root{
  color-scheme:dark;
  --bg:#11110F;--bg2:#191815;--bg3:#22201C;--bg4:#292620;
  --surface-main:#191815;--surface-elevated:#22201C;--surface-interactive:#292620;
  --text:#F8F5EF;--muted:#B9B2A7;--text-muted:#B9B2A7;--text-faint:#898277;--faint:#302D27;
  --border:rgba(255,255,255,.08);--border2:rgba(255,255,255,.14);
  --amber:#D99045;--amber-lt:#E6A45E;--amber-pressed:#BE7735;--amber-bg:rgba(217,144,69,.13);--amber-border:rgba(217,144,69,.42);
  --green:#42B883;--green-bg:rgba(66,184,131,.13);--red:#E06464;--red-bg:rgba(224,100,100,.13);
  --blue:#5B9CF5;--blue-bg:rgba(91,156,245,.13);--yellow:#E8B44B;--yellow-bg:rgba(232,180,75,.13);--pending:#9A94A8;
  --topbar-h:72px;--bottom-nav-h:76px;--radius:16px;--radius-sm:12px;--radius-xs:9px;
  --space-1:.25rem;--space-2:.5rem;--space-3:.75rem;--space-4:1rem;--space-5:1.25rem;--space-6:1.5rem;--space-8:2rem;
  --shadow-sm:0 2px 10px rgba(0,0,0,.18);--shadow-md:0 14px 40px rgba(0,0,0,.28);--focus:0 0 0 3px rgba(217,144,69,.32);
  --control-h:44px;--touch-h:48px;--motion-fast:140ms;--motion-normal:190ms;
}
html,body{background:var(--bg);font-family:Inter,Manrope,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:15px;color:var(--text)}
body{letter-spacing:-.005em}button,input,select,textarea{font:inherit}button{min-height:var(--control-h)}
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,[tabindex]:focus-visible{outline:none;box-shadow:var(--focus);border-color:var(--amber)!important}
button:active{transform:translateY(1px)}
.cc-icon{display:inline-block;flex:0 0 auto;vertical-align:-.18em}
.hidden{display:none!important}.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
#app{display:block;height:100dvh;background:var(--bg)}
#main-wrapper{height:100dvh;padding-top:var(--topbar-h)}
#topbar{position:fixed;inset:0 0 auto 0;height:var(--topbar-h);z-index:120;display:grid;grid-template-columns:minmax(190px,1fr) auto minmax(300px,1fr);align-items:center;gap:1rem;padding:0 clamp(1rem,2vw,2rem);background:rgba(25,24,21,.94);border-bottom:1px solid var(--border);backdrop-filter:blur(18px);box-shadow:0 1px 0 rgba(0,0,0,.15)}
.cc-brand{display:flex;align-items:center;gap:.72rem;min-width:0}.cc-brand-mark{width:40px;height:40px;border-radius:13px;background:var(--amber);color:#21150A;display:grid;place-items:center;box-shadow:inset 0 1px rgba(255,255,255,.25)}
.cc-brand-copy{display:flex;flex-direction:column;line-height:1.05}.cc-brand-name{font-weight:750;font-size:1.06rem}.cc-brand-name span{color:var(--amber)}.cc-brand-business{font-size:.74rem;color:var(--text-muted);margin-top:.27rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:190px}
#desktop-primary-nav{display:flex;align-items:center;justify-content:center;gap:.25rem;background:var(--bg3);padding:.32rem;border-radius:14px;border:1px solid var(--border)}
.top-nav-item{position:relative;display:inline-flex;align-items:center;gap:.48rem;min-height:42px;padding:.55rem .82rem;border-radius:10px;color:var(--text-muted);font-size:.86rem;font-weight:620;white-space:nowrap;transition:background var(--motion-fast),color var(--motion-fast)}
.top-nav-item:hover{background:var(--bg4);color:var(--text)}.top-nav-item.active{background:var(--surface-main);color:var(--text);box-shadow:var(--shadow-sm)}.top-nav-item.active::after{content:"";position:absolute;left:34%;right:34%;bottom:2px;height:3px;border-radius:999px;background:var(--amber)}
#topbar-right{justify-self:end;display:flex;align-items:center;gap:.5rem}.cc-status-pill,.topbar-shift-btn,.cc-icon-btn,.cc-user-btn{display:inline-flex;align-items:center;justify-content:center;gap:.48rem;min-height:42px;padding:.5rem .72rem;border-radius:11px;background:transparent;border:1px solid transparent;color:var(--text-muted);font-size:.79rem;font-weight:600;transition:all var(--motion-fast)}
.cc-status-pill{background:var(--bg3);border-color:var(--border);cursor:default}.cc-status-dot{width:8px;height:8px;border-radius:50%;background:var(--green);box-shadow:0 0 0 3px rgba(66,184,131,.13)}.cc-status-pill.offline .cc-status-dot{background:var(--red);box-shadow:0 0 0 3px rgba(224,100,100,.13)}
.topbar-shift-btn{background:var(--bg3);border-color:var(--border);color:var(--text)}.topbar-shift-btn:hover,.cc-icon-btn:hover,.cc-user-btn:hover{background:var(--bg4);border-color:var(--border2);color:var(--text)}.topbar-shift-btn.shift-open .s-dot{background:var(--green)}
.cc-icon-btn{width:42px;padding:0}.cc-user-btn{padding:.35rem .45rem .35rem .7rem}.cc-avatar{width:31px;height:31px;border-radius:10px;background:var(--amber-bg);color:var(--amber);display:grid;place-items:center;font-size:.72rem;font-weight:800}
#page-title{display:none}.online-dot{display:none}
#view-container{height:calc(100dvh - var(--topbar-h));overflow:auto;overscroll-behavior:contain;background:radial-gradient(circle at 8% 0%,rgba(217,144,69,.035),transparent 32%),var(--bg)}.view{padding:clamp(1rem,2.2vw,2rem);max-width:1600px;margin:0 auto}
#no-shift-banner{position:sticky;top:0;z-index:80;display:flex;align-items:center;justify-content:center;gap:.8rem;min-height:48px;padding:.55rem 1rem;background:#2B2418;border-bottom:1px solid rgba(232,180,75,.28);color:#F5DDA9;font-size:.85rem}.no-shift-copy{display:flex;align-items:center;gap:.55rem}.no-shift-banner-action{min-height:34px;padding:.35rem .75rem;border-radius:9px;background:var(--amber);color:#21150A;font-weight:750}
#sidebar{position:fixed;z-index:500;display:flex;flex-direction:column;width:min(430px,100vw);max-height:min(720px,calc(100dvh - 88px));top:78px;left:50%;bottom:auto;transform:translate(-50%,-10px) scale(.985);opacity:0;visibility:hidden;pointer-events:none;background:var(--surface-elevated);border:1px solid var(--border2);border-radius:20px;box-shadow:var(--shadow-md);overflow:hidden;transition:opacity var(--motion-normal),transform var(--motion-normal),visibility var(--motion-normal)}
#sidebar.open{transform:translate(-50%,0) scale(1);opacity:1;visibility:visible;pointer-events:auto}.sb-logo{display:flex;align-items:center;justify-content:space-between;padding:1rem 1.1rem;border-bottom:1px solid var(--border)}.sb-logo-icon{display:none}.sb-logo-text{font-size:1rem;font-weight:720}.sb-logo-text span{color:var(--amber)}.cc-sheet-close{width:38px;min-height:38px;border-radius:10px;color:var(--text-muted)}.cc-sheet-close:hover{background:var(--bg4);color:var(--text)}.sb-biz{padding:.8rem 1.1rem;background:rgba(255,255,255,.018);border-bottom:1px solid var(--border)}.sb-biz strong{font-size:.86rem}.sb-biz span{font-size:.74rem;color:var(--text-muted)}.sb-nav{padding:.8rem;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.45rem;overflow:auto}.sb-label{grid-column:1/-1;padding:.62rem .45rem .15rem;color:var(--text-faint);font-size:.68rem;text-transform:uppercase;letter-spacing:.09em;font-weight:750}.nav-item{display:flex;align-items:center;gap:.65rem;min-height:50px;padding:.7rem .8rem;margin:0;border-radius:12px;background:transparent;color:var(--text-muted);font-size:.86rem;font-weight:600;cursor:pointer;transition:all var(--motion-fast)}.nav-item:hover{background:var(--bg4);color:var(--text)}.nav-item.active{background:var(--amber-bg);color:var(--amber)}.nav-item.primary{background:transparent;color:var(--text-muted);font-weight:600}.nav-item.primary:hover{background:var(--bg4);color:var(--text)}.nav-item.primary.active{background:var(--amber-bg);color:var(--amber)}.nav-icon{width:24px;height:24px;display:grid;place-items:center;color:currentColor}.nav-badge{margin-left:auto;background:var(--red);color:white;min-width:20px;padding:.12rem .4rem;text-align:center;border-radius:999px;font-size:.67rem}.sb-footer{display:grid;grid-template-columns:1fr auto;align-items:center;gap:.5rem;padding:.75rem .8rem;border-top:1px solid var(--border)}.shift-status{min-height:44px;padding:.55rem .65rem;font-size:.76rem}.sb-footer .nav-item{min-height:44px;color:var(--red)}
#sb-overlay{position:fixed;inset:0;z-index:490;background:rgba(0,0,0,.44);backdrop-filter:blur(1px);display:block;opacity:0;visibility:hidden;pointer-events:none;transition:opacity var(--motion-normal),visibility var(--motion-normal)}#sb-overlay.show{opacity:1;visibility:visible;pointer-events:auto}
#bottom-nav{display:none}.cc-user-menu{position:fixed;z-index:510;right:1.25rem;top:64px;width:245px;padding:.5rem;background:var(--surface-elevated);border:1px solid var(--border2);border-radius:14px;box-shadow:var(--shadow-md);opacity:0;visibility:hidden;transform:translateY(-6px);transition:all var(--motion-fast)}.cc-user-menu.open{opacity:1;visibility:visible;transform:none}.cc-user-meta{padding:.7rem .75rem;border-bottom:1px solid var(--border);margin-bottom:.35rem}.cc-user-meta strong{display:block;font-size:.85rem}.cc-user-meta span{display:block;color:var(--text-muted);font-size:.72rem;margin-top:.2rem}.cc-menu-action{display:flex;align-items:center;gap:.6rem;width:100%;min-height:42px;padding:.55rem .7rem;border-radius:9px;color:var(--text-muted);font-size:.82rem;text-align:left}.cc-menu-action:hover{background:var(--bg4);color:var(--text)}
.page-hdr{align-items:center;margin-bottom:1.35rem}.page-hdr h1{font-size:clamp(1.5rem,2.3vw,1.78rem);font-weight:760;letter-spacing:-.035em;line-height:1.15}.page-hdr p{font-size:.86rem;color:var(--text-muted);margin-top:.3rem}.page-hdr>div:first-child>.cc-icon{color:var(--amber)}
.card,.stat-card,.order-card,.inv-card,.kds-card{background:var(--surface-main);border:1px solid var(--border);border-radius:var(--radius);box-shadow:none}.card{padding:1.25rem}.card:hover,.order-card:hover,.inv-card:hover{border-color:var(--border2)}
.stats-grid{grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:.8rem}.stat-card{position:relative;padding:1.05rem 1.1rem;min-height:118px}.stat-icon{width:38px;height:38px;border-radius:11px;background:var(--bg3);display:grid;place-items:center;color:var(--text-muted);margin-bottom:.75rem}.stat-label{font-size:.76rem;color:var(--text-muted)}.stat-value{font-size:1.65rem;color:var(--text);font-weight:750}.stat-sub{font-size:.72rem;color:var(--text-faint)}
.btn{min-height:42px;padding:.58rem .95rem;border-radius:11px;font-size:.84rem;font-weight:650;transition:background var(--motion-fast),border var(--motion-fast),color var(--motion-fast),transform var(--motion-fast)}.btn-sm{min-height:36px;padding:.4rem .7rem;font-size:.76rem}.btn-lg{min-height:50px}.btn-primary,.pay-btn{background:var(--amber);color:#21150A;font-weight:760}.btn-primary:hover,.pay-btn:hover{background:var(--amber-lt)}.btn-primary:active,.pay-btn:active{background:var(--amber-pressed)}.btn-outline{border:1px solid var(--border2);color:var(--text-muted);background:transparent}.btn-outline:hover{background:var(--bg3);color:var(--text)}.btn-ghost{background:transparent;color:var(--text-muted)}.btn-ghost:hover{background:var(--bg3);color:var(--text)}.btn-danger{background:var(--red-bg);color:#F3A1A1;border:1px solid rgba(224,100,100,.22)}.btn-danger:hover{background:var(--red);color:white}.btn-success{background:var(--green-bg);color:#83D5B2;border:1px solid rgba(66,184,131,.2)}.btn-blue{background:var(--blue-bg);color:#9DC2FA;border:1px solid rgba(91,156,245,.2)}.btn:disabled,.pay-btn:disabled{opacity:.48;cursor:not-allowed;transform:none!important}
.input{min-height:44px;padding:.62rem .8rem;background:var(--bg3);border:1px solid var(--border);border-radius:11px;color:var(--text);font-size:.86rem}.input::placeholder{color:var(--text-faint)}.field-label{font-size:.76rem;color:var(--text-muted);font-weight:650}.field-hint,.payment-ref-help{color:var(--text-faint);font-size:.72rem}
.badge{min-height:25px;padding:.2rem .55rem;border-radius:999px;font-size:.7rem;font-weight:680}.badge-gray{color:#C7C1CE;background:rgba(154,148,168,.13)}
th{font-size:.69rem;color:var(--text-faint);padding:.7rem .85rem}td{font-size:.82rem;padding:.8rem .85rem}.tbl-wrap{border:1px solid var(--border);border-radius:13px;overflow:auto}
.alert{padding:.75rem .9rem;border-radius:12px;color:var(--text);align-items:flex-start}.alert-icon{width:23px;display:grid;place-items:center}.alert-warn{color:#F5DDA9}.alert-info{color:#BAD4FB}
/* POS */
#view-pos-wrap{grid-template-columns:minmax(0,1fr) minmax(330px,390px);height:calc(100dvh - var(--topbar-h));padding:1rem;gap:1rem}.pos-products,.pos-order{background:var(--surface-main);border:1px solid var(--border);border-radius:18px}.pos-products{overflow:hidden}.pos-toolbar{padding:.9rem 1rem .45rem;display:grid;grid-template-columns:minmax(220px,1fr) auto;gap:.75rem;align-items:center}.pos-search{position:relative}.pos-search .input{padding-left:2.55rem;background:var(--bg3)}.pos-search .cc-icon{position:absolute;left:.85rem;top:50%;transform:translateY(-50%);color:var(--text-faint);pointer-events:none}.pos-shift-strip{display:flex;align-items:center;gap:.5rem;font-size:.75rem;color:var(--text-muted)}
.pos-service-bar{padding:.45rem 1rem .7rem;border-bottom:0;gap:.5rem}.svc-btn{min-height:44px;padding:.55rem .75rem;border-radius:11px;background:var(--bg3);border:1px solid var(--border);color:var(--text-muted);font-weight:650}.svc-btn:hover{border-color:var(--border2);color:var(--text)}.svc-btn.active,.svc-btn[aria-pressed="true"]{background:var(--amber-bg);border-color:var(--amber-border);color:var(--amber)}#svc-extra{flex-basis:100%}.pos-cats{padding:.65rem 1rem;border-top:1px solid var(--border);border-bottom:1px solid var(--border);gap:.45rem}.cat-btn{min-height:38px;padding:.42rem .78rem;border-radius:10px;border-color:transparent;background:transparent;color:var(--text-muted);font-weight:600}.cat-btn:hover{background:var(--bg3);color:var(--text)}.cat-btn.active{background:var(--bg4);border-color:var(--border2);color:var(--text)}
.pos-grid{padding:1rem;grid-template-columns:repeat(auto-fill,minmax(145px,1fr));gap:.8rem}.prod-card{position:relative;min-height:174px;padding:.75rem;background:var(--bg3);border:1px solid transparent;border-radius:15px;align-items:stretch;text-align:left;gap:.55rem;overflow:hidden}.prod-card:hover{border-color:var(--border2);background:var(--bg4);transform:translateY(-2px);box-shadow:var(--shadow-sm)}.prod-card:active{transform:scale(.98)}.prod-card.just-added{animation:ccAddPulse .18s ease}.prod-media{height:92px;border-radius:11px;background:var(--surface-main);display:grid;place-items:center;overflow:hidden}.prod-img{width:100%;height:100%;margin:0;border-radius:0;object-fit:cover;box-shadow:none}.prod-emoji{width:42px;height:42px;border-radius:13px;background:var(--amber-bg);color:var(--amber);display:grid;place-items:center;margin:0 auto}.prod-name{font-size:.86rem;font-weight:680;line-height:1.25}.prod-price{font-size:.84rem;font-weight:660;color:var(--text-muted)}.prod-qty-badge{position:absolute;top:.55rem;right:.55rem;min-width:25px;height:25px;padding:0 .42rem;border-radius:999px;background:var(--amber);color:#21150A;display:grid;place-items:center;font-size:.72rem;font-weight:800;box-shadow:var(--shadow-sm)}
@keyframes ccAddPulse{50%{box-shadow:0 0 0 4px rgba(217,144,69,.22)}}
.pos-order{box-shadow:var(--shadow-sm)}.order-hdr{min-height:65px;padding:.8rem 1rem;border-bottom:1px solid var(--border)}.order-hdr h3{font-size:1.02rem}.order-actions{display:flex;gap:.35rem}.order-info{min-height:48px;padding:.65rem 1rem;background:rgba(255,255,255,.018);color:var(--text-muted);font-size:.79rem}.order-items{padding:.55rem .65rem}.oi{position:relative;align-items:flex-start;padding:.7rem .5rem;border-radius:11px;gap:.65rem}.oi:hover{background:var(--bg3)}.oi-media{width:38px;height:38px;border-radius:10px;background:var(--bg3);display:grid;place-items:center;overflow:hidden;color:var(--text-faint)}.oi-media .prod-img-sm{width:100%;height:100%;margin:0;border-radius:0}.oi-main{flex:1;min-width:0}.oi-name{font-size:.82rem;font-weight:660}.oi-modifiers{font-size:.7rem;color:var(--text-faint);margin-top:.18rem}.oi-row{display:flex;align-items:center;justify-content:space-between;margin-top:.45rem}.qty-wrap{gap:.35rem}.q-btn{width:30px;height:30px;min-height:30px;border-radius:9px;background:var(--bg3);border:1px solid var(--border);color:var(--text)}.q-btn:hover{background:var(--bg4);border-color:var(--border2);color:var(--text)}.q-num{width:25px}.oi-price{font-size:.82rem;color:var(--text);min-width:auto}.order-empty{min-height:260px;padding:2rem;text-align:center}.order-empty-icon{width:54px;height:54px;border-radius:17px;background:var(--bg3);display:grid;place-items:center;color:var(--text-faint);font-size:0}.order-summary{padding:.85rem 1rem 1rem;background:var(--surface-elevated);border-top:1px solid var(--border)}.sum-row{font-size:.8rem;color:var(--text-muted)}.sum-total{font-size:1.15rem;margin:.55rem 0 .75rem;padding-top:.65rem}.sum-total span:last-child{font-size:1.55rem;color:var(--amber)!important}.pay-btn{min-height:54px;border-radius:13px;font-size:.94rem}.order-secondary-actions{display:grid;grid-template-columns:1fr 1fr;gap:.5rem;margin-bottom:.65rem}.mobile-cart-btn{min-height:54px;border-radius:13px}
/* KDS */
.kds-board{display:grid;grid-template-columns:repeat(3,minmax(260px,1fr));gap:1rem;align-items:start}.kds-column{min-width:0;background:rgba(255,255,255,.018);border:1px solid var(--border);border-radius:16px;padding:.75rem}.kds-column-head{display:flex;align-items:center;justify-content:space-between;padding:.25rem .25rem .75rem;font-size:.86rem;font-weight:720}.kds-column-count{min-width:24px;height:24px;border-radius:999px;background:var(--bg4);display:grid;place-items:center;font-size:.7rem;color:var(--text-muted)}.kds-column-list{display:grid;gap:.7rem}.kds-card{overflow:hidden}.kds-card.urgent{border-color:rgba(232,180,75,.5)}.kds-card.late{border-color:rgba(224,100,100,.62)}.kds-hdr{padding:.75rem .85rem}.kds-num{font-size:.95rem}.kds-svc{font-size:.73rem;color:var(--text-muted)}.kds-timer{font-variant-numeric:tabular-nums;background:var(--green-bg);color:#83D5B2}.kds-items{padding:.75rem .85rem}.kds-qty{background:var(--bg4);color:var(--text);border-radius:8px}.kds-foot{padding:.65rem .85rem!important}.kds-foot .btn{min-height:46px}.kds-card.is-ready{border-color:rgba(66,184,131,.38)}
/* Mesas */
.tables-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(285px,1fr));gap:1rem}.table-card{padding:1rem 1.05rem}.table-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:.75rem}.table-card-title{display:flex;align-items:center;gap:.55rem;font-size:1.03rem;font-weight:750}.table-status-stack{display:flex;gap:.35rem;flex-wrap:wrap;margin:.7rem 0}.table-metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:.45rem;margin:.85rem 0}.table-metric{padding:.55rem;background:var(--bg3);border-radius:10px}.table-metric-label{font-size:.65rem;color:var(--text-faint)}.table-metric-value{font-size:.8rem;font-weight:680;margin-top:.18rem}.table-total{font-size:1.3rem;font-weight:760;color:var(--text)}.table-card-actions{display:grid;grid-template-columns:1fr 1fr;gap:.5rem;margin-top:.85rem}
/* Caja / reportes */
.cash-layout{grid-template-columns:minmax(300px,380px) minmax(0,1fr);gap:1rem}.cash-amount{font-size:clamp(2rem,4vw,2.8rem);color:var(--text);font-weight:780}.cash-primary-card{background:linear-gradient(145deg,rgba(217,144,69,.14),rgba(217,144,69,.035));border-color:rgba(217,144,69,.24)}.mv-icon{font-size:0;color:currentColor}.rep-grid{gap:1rem}.report-filters{display:flex;gap:.4rem;flex-wrap:wrap;padding:.35rem;background:var(--bg3);border-radius:13px;width:max-content;max-width:100%}.report-filter-btn{border:0!important;background:transparent!important}.report-filter-btn[aria-pressed="true"]{background:var(--surface-main)!important;color:var(--text)!important;box-shadow:var(--shadow-sm)}.bar-fill{background:var(--amber)}
/* Modal / sheets */
#modal-overlay{background:rgba(0,0,0,.68);backdrop-filter:blur(7px)}.modal{background:var(--surface-elevated);border-color:var(--border2);border-radius:18px;padding:1.35rem;box-shadow:var(--shadow-md);animation:mIn var(--motion-normal) ease}.modal-title{font-size:1.05rem;font-weight:740}.modal-close{width:38px;height:38px;min-height:38px;background:var(--bg4);border-radius:10px;color:var(--text-muted)}.modal-footer{gap:.55rem}.pay-method{min-height:86px;background:var(--bg3);border:1px solid var(--border);border-radius:12px}.pay-method:hover,.pay-method:focus-visible,.pay-method.selected,.pay-method[aria-pressed="true"]{border-color:var(--amber-border);background:var(--amber-bg)}.pm-icon{height:26px;display:grid;place-items:center;font-size:0}.change-box{background:var(--bg3)}
#toast-container{bottom:1rem;right:1rem}.toast{min-height:48px;max-width:380px;background:var(--surface-elevated);border:1px solid var(--border2);border-radius:12px;box-shadow:var(--shadow-md);animation:tIn var(--motion-normal) ease,tOut var(--motion-normal) ease 2.8s forwards}.toast-action{margin-left:auto;min-height:32px;padding:.3rem .55rem;border-radius:8px;background:var(--bg4);color:var(--text);font-size:.73rem;font-weight:700}
.cc-command-overlay{position:fixed;inset:0;z-index:800;background:rgba(0,0,0,.64);backdrop-filter:blur(7px);display:grid;place-items:start center;padding:10vh 1rem 1rem}.cc-command{width:min(620px,100%);background:var(--surface-elevated);border:1px solid var(--border2);border-radius:18px;box-shadow:var(--shadow-md);overflow:hidden}.cc-command-search{display:flex;align-items:center;gap:.7rem;padding:.9rem 1rem;border-bottom:1px solid var(--border)}.cc-command-search input{flex:1;background:transparent;border:0;outline:0;color:var(--text);font-size:1rem}.cc-command-kbd{font-size:.68rem;color:var(--text-faint);border:1px solid var(--border2);border-radius:6px;padding:.14rem .4rem}.cc-command-list{max-height:55vh;overflow:auto;padding:.5rem}.cc-command-item{width:100%;display:flex;align-items:center;gap:.75rem;min-height:48px;padding:.65rem .75rem;border-radius:11px;color:var(--text-muted);text-align:left}.cc-command-item:hover,.cc-command-item.active{background:var(--bg4);color:var(--text)}.cc-command-item small{margin-left:auto;color:var(--text-faint)}
.cc-skeleton{position:relative;overflow:hidden;background:var(--bg3);border-radius:10px}.cc-skeleton::after{content:"";position:absolute;inset:0;transform:translateX(-100%);background:linear-gradient(90deg,transparent,rgba(255,255,255,.055),transparent);animation:ccShimmer 1.2s infinite}.cc-loading-view{padding:clamp(1rem,2.2vw,2rem);display:grid;gap:1rem}.cc-loading-head{width:260px;height:34px}.cc-loading-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:.8rem}.cc-loading-card{height:118px}@keyframes ccShimmer{100%{transform:translateX(100%)}}
@media(max-width:1180px){#topbar{grid-template-columns:auto 1fr auto}.cc-brand-copy{display:none}#desktop-primary-nav{justify-self:center}.cc-status-pill span{display:none}.cash-layout{grid-template-columns:1fr}.kds-board{grid-template-columns:1fr 1fr}.kds-column:last-child{grid-column:1/-1}}
@media(max-width:820px){:root{--topbar-h:58px;--bottom-nav-h:76px}#main-wrapper{padding-top:var(--topbar-h);padding-bottom:calc(var(--bottom-nav-h) + env(safe-area-inset-bottom))}#topbar{height:var(--topbar-h);display:flex;justify-content:space-between;padding:0 .8rem}.cc-brand-mark{width:38px;height:38px}.cc-brand-copy,#desktop-primary-nav,.cc-status-pill,.cc-command-trigger{display:none}.topbar-shift-btn{min-height:38px;padding:.4rem .58rem}.cc-user-btn{min-height:38px;padding:.25rem}.cc-user-btn>span:not(.cc-avatar){display:none}#view-container{height:calc(100dvh - var(--topbar-h) - var(--bottom-nav-h) - env(safe-area-inset-bottom));padding-bottom:0}#bottom-nav{display:block;position:fixed;z-index:130;left:0;right:0;bottom:0;height:calc(var(--bottom-nav-h) + env(safe-area-inset-bottom));padding:.38rem .35rem max(.38rem,env(safe-area-inset-bottom));background:rgba(25,24,21,.97);border-top:1px solid var(--border);backdrop-filter:blur(18px)}.bn-inner{height:var(--bottom-nav-h);display:flex;gap:.15rem}.bn-btn{position:relative;flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.24rem;min-height:60px;border-radius:12px;color:var(--text-muted);font-size:.65rem;font-weight:650}.bn-btn:hover{background:transparent}.bn-btn.active{background:var(--bg3);color:var(--text)}.bn-btn.active::before{content:"";position:absolute;top:4px;width:22px;height:3px;background:var(--amber);border-radius:999px}.bn-icon{height:23px;display:grid;place-items:center}.bn-btn.bn-sell{background:transparent;color:var(--text-muted)}.bn-btn.bn-sell.active{background:var(--bg3);color:var(--text)}#sidebar{top:auto;left:0;right:0;bottom:0;width:100%;max-height:min(82dvh,720px);border-radius:22px 22px 0 0;transform:translateY(105%);opacity:1;visibility:visible}.sidebar-handle{display:block;width:42px;height:4px;border-radius:999px;background:var(--border2);margin:.55rem auto 0}#sidebar.open{transform:none}.sb-logo{padding:.55rem 1rem .85rem}.sb-nav{grid-template-columns:repeat(3,minmax(0,1fr));padding:.7rem}.nav-item{flex-direction:column;justify-content:center;text-align:center;gap:.35rem;min-height:78px;padding:.55rem;font-size:.75rem}.nav-badge{position:absolute;margin:0;top:.45rem;right:.45rem}.sb-label{font-size:.64rem}.sb-footer{padding-bottom:calc(.75rem + env(safe-area-inset-bottom))}.cc-user-menu{right:.7rem;top:53px}#no-shift-banner{font-size:.76rem;justify-content:space-between}.no-shift-copy span{display:none}.view{padding:1rem}.page-hdr h1{font-size:1.45rem}#view-pos-wrap{display:flex!important;flex-direction:column!important;height:auto!important;min-height:100%;padding:.7rem!important;gap:.7rem}.pos-products{overflow:visible!important}.pos-toolbar{grid-template-columns:1fr;padding:.75rem .75rem .35rem}.pos-shift-strip{display:none}.pos-service-bar{padding:.4rem .75rem .65rem}.pos-cats{padding:.55rem .75rem}.pos-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;padding:.75rem!important;gap:.65rem}.prod-card{min-height:160px}.pos-order{position:fixed!important;z-index:600!important;inset:auto 0 0 0!important;top:auto!important;max-height:88dvh;border-radius:22px 22px 0 0!important;transform:translateY(105%);display:flex!important;visibility:hidden;transition:transform var(--motion-normal),visibility var(--motion-normal)}.pos-order::before{content:"";width:44px;height:4px;border-radius:99px;background:var(--border2);margin:.55rem auto 0}.pos-order.mob-show{transform:none;visibility:visible}.order-items{min-height:120px}.mobile-cart-bar{display:flex;position:sticky;bottom:0;padding:.65rem .75rem calc(.65rem + env(safe-area-inset-bottom));background:linear-gradient(180deg,transparent,var(--surface-main) 28%);border-top:0}.mobile-cart-btn{display:flex}.kds-board{grid-template-columns:1fr}.kds-column:last-child{grid-column:auto}.tables-grid{grid-template-columns:1fr}.table-metrics{grid-template-columns:repeat(3,1fr)}.cc-loading-grid{grid-template-columns:1fr 1fr}#toast-container{left:.7rem;right:.7rem;bottom:calc(var(--bottom-nav-h) + env(safe-area-inset-bottom) + .7rem);align-items:stretch}.toast{max-width:none}.modal{max-height:90dvh}.modal-footer{position:sticky;bottom:-1.35rem;background:var(--surface-elevated);padding:.8rem 0 1.1rem}.pay-methods{grid-template-columns:1fr}.pay-method{min-height:60px;display:flex;align-items:center;justify-content:flex-start;gap:.75rem;padding:.75rem}.pm-icon{width:28px}.cash-layout{grid-template-columns:1fr}.report-filters{width:100%;overflow-x:auto;flex-wrap:nowrap}.report-filter-btn{flex:0 0 auto}}
@media(max-width:470px){.sb-nav{grid-template-columns:repeat(2,minmax(0,1fr))}.pos-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.prod-card{min-height:148px;padding:.62rem}.prod-media{height:76px}.table-metrics{grid-template-columns:1fr}.table-card-actions{grid-template-columns:1fr}.stats-grid{grid-template-columns:1fr 1fr}.stat-card{min-height:105px}.stat-value{font-size:1.35rem}.cc-loading-grid{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important;transition-duration:.01ms!important}}

.table-account-grid{display:grid;gap:1rem;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));padding-bottom:100px}.table-account-card{padding:1rem}.table-account-head{display:flex;justify-content:space-between;align-items:flex-start;gap:.75rem}.table-account-head h2{font-size:1.08rem;margin:0}.table-account-head p{font-size:.76rem;color:var(--text-muted);margin:.22rem 0 0}.table-account-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.5rem}.table-account-actions .btn-primary{grid-column:1/-1}.mesa-order-detail{padding:.45rem 0}.mesa-order-label{display:flex;justify-content:space-between;align-items:center;gap:.5rem;font-size:.72rem;color:var(--text-muted);font-weight:650;border-top:1px dashed var(--border);padding-top:.45rem}.mesa-item-row{display:flex;justify-content:space-between;gap:.75rem;font-size:.82rem;padding:.18rem 0}.report-local-skeleton{display:flex;align-items:center;gap:.65rem;padding:.7rem .85rem;margin-bottom:.8rem;border:1px solid var(--border);border-radius:12px;background:var(--surface-interactive);font-size:.78rem;color:var(--text-secondary)}.report-local-skeleton .cc-skeleton{width:110px;height:8px;margin-left:auto}.cc-spin{animation:cc-spin .8s linear infinite}@keyframes cc-spin{to{transform:rotate(360deg)}}@media(max-width:520px){.table-account-grid{grid-template-columns:1fr}.table-account-actions{grid-template-columns:1fr}.table-account-actions .btn-primary{grid-column:auto}}@media(prefers-reduced-motion:reduce){.cc-spin{animation:none}}

/* ================================================================
   Apariencia configurable — Regression 5
   El tema claro reutiliza los mismos componentes y tokens del POS.
================================================================ */
:root{
  --brand-fill:#D99045;
  --brand-fill-hover:#E6A45E;
  --brand-fill-pressed:#BE7735;
  --brand-on:#21150A;
  --chrome-bg:rgba(25,24,21,.94);
  --chrome-bg-solid:#191815;
  --subtle-fill:rgba(255,255,255,.018);
  --overlay-bg:rgba(0,0,0,.64);
  --modal-overlay-bg:rgba(0,0,0,.68);
  --skeleton-sheen:rgba(255,255,255,.055);
  --warning-banner-bg:#2B2418;
  --warning-banner-text:#F5DDA9;
  --warning-banner-border:rgba(232,180,75,.28);
  --danger-text:#F3A1A1;
  --success-text:#83D5B2;
  --info-text:#9DC2FA;
  --table-hover:rgba(255,255,255,.018);
}

html[data-theme="light"]{
  color-scheme:light;
  --bg:#F5F1EA;
  --bg2:#FFFEFC;
  --bg3:#EEE8DF;
  --bg4:#E3DBCF;
  --surface-main:#FFFEFC;
  --surface-elevated:#FFFFFF;
  --surface-interactive:#F1EAE1;
  --text:#241F1A;
  --muted:#625B52;
  --text-muted:#625B52;
  --text-faint:#6E655B;
  --faint:#DDD5CA;
  --border:rgba(55,44,34,.12);
  --border2:rgba(55,44,34,.20);
  --amber:#A95F25;
  --amber-lt:#C8752E;
  --amber-pressed:#8F4B1B;
  --amber-bg:rgba(201,117,46,.13);
  --amber-border:rgba(169,95,37,.42);
  --green:#2D7D5C;
  --green-bg:rgba(45,125,92,.12);
  --red:#B54F4F;
  --red-bg:rgba(181,79,79,.11);
  --blue:#356FBE;
  --blue-bg:rgba(53,111,190,.11);
  --yellow:#8A6818;
  --yellow-bg:rgba(176,132,29,.12);
  --pending:#6F6877;
  --brand-fill:#D99045;
  --brand-fill-hover:#E6A45E;
  --brand-fill-pressed:#BE7735;
  --brand-on:#21150A;
  --chrome-bg:rgba(255,254,252,.95);
  --chrome-bg-solid:#FFFEFC;
  --subtle-fill:rgba(80,61,43,.035);
  --overlay-bg:rgba(47,38,29,.34);
  --modal-overlay-bg:rgba(47,38,29,.42);
  --skeleton-sheen:rgba(255,255,255,.68);
  --warning-banner-bg:#FFF3D8;
  --warning-banner-text:#684B0E;
  --warning-banner-border:rgba(138,104,24,.24);
  --danger-text:#9B3F3F;
  --success-text:#246D4F;
  --info-text:#2C66AE;
  --table-hover:rgba(102,80,58,.045);
  --shadow-sm:0 2px 12px rgba(55,44,34,.09);
  --shadow-md:0 18px 48px rgba(55,44,34,.16);
  --focus:0 0 0 3px rgba(169,95,37,.24);
}

/* Componentes que necesitan distinguir color de marca como fondo y como texto. */
.cc-brand-mark,.no-shift-banner-action,.prod-qty-badge,.btn-primary,.pay-btn,.mobile-cart-btn,.svc-btn.active{
  background:var(--brand-fill);
  color:var(--brand-on);
}
.btn-primary:hover,.pay-btn:hover,.mobile-cart-btn:hover,.svc-btn.active:hover{background:var(--brand-fill-hover)}
.btn-primary:active,.pay-btn:active,.mobile-cart-btn:active,.svc-btn.active:active{background:var(--brand-fill-pressed)}

#topbar{background:var(--chrome-bg)}
#bottom-nav{background:var(--chrome-bg)}
#view-container{background:radial-gradient(circle at 8% 0%,rgba(217,144,69,.045),transparent 32%),var(--bg)}
#no-shift-banner{background:var(--warning-banner-bg);border-bottom-color:var(--warning-banner-border);color:var(--warning-banner-text)}
.sb-biz,.order-info,.kds-column{background:var(--subtle-fill)}
#sb-overlay,.cc-command-overlay{background:var(--overlay-bg)}
#modal-overlay{background:var(--modal-overlay-bg)}
.cc-skeleton::after{background:linear-gradient(90deg,transparent,var(--skeleton-sheen),transparent)}
tr:hover td{background:var(--table-hover)}
.btn-danger{color:var(--danger-text)}
.btn-success{color:var(--success-text)}
.btn-blue{color:var(--info-text)}

html[data-theme="light"] body,
html[data-theme="light"] #app,
html[data-theme="light"] #main-wrapper{background:var(--bg);color:var(--text)}
html[data-theme="light"] .card,
html[data-theme="light"] .stat-card,
html[data-theme="light"] .order-card,
html[data-theme="light"] .inv-card,
html[data-theme="light"] .kds-card,
html[data-theme="light"] .pos-order,
html[data-theme="light"] .modal,
html[data-theme="light"] .cc-command,
html[data-theme="light"] .cc-user-menu,
html[data-theme="light"] #sidebar{background:var(--surface-elevated)}
html[data-theme="light"] #desktop-primary-nav,
html[data-theme="light"] .cc-status-pill,
html[data-theme="light"] .topbar-shift-btn,
html[data-theme="light"] .input,
html[data-theme="light"] .pay-method,
html[data-theme="light"] .change-box,
html[data-theme="light"] .report-filters,
html[data-theme="light"] .prod-card,
html[data-theme="light"] .prod-media,
html[data-theme="light"] .oi-media,
html[data-theme="light"] .q-btn,
html[data-theme="light"] .order-empty-icon,
html[data-theme="light"] .pm-preview,
html[data-theme="light"] .pm-dropzone,
html[data-theme="light"] .img-card{background:var(--bg3)}
html[data-theme="light"] .prod-card:hover,
html[data-theme="light"] .q-btn:hover,
html[data-theme="light"] .top-nav-item:hover,
html[data-theme="light"] .nav-item:hover,
html[data-theme="light"] .cc-menu-action:hover,
html[data-theme="light"] .cc-command-item:hover,
html[data-theme="light"] .cc-command-item.active{background:var(--bg4)}
html[data-theme="light"] .top-nav-item.active,
html[data-theme="light"] .report-filter-btn[aria-pressed="true"]{background:var(--surface-elevated)!important}
html[data-theme="light"] .cash-primary-card{background:linear-gradient(145deg,rgba(217,144,69,.18),rgba(255,255,255,.75))}
html[data-theme="light"] .ticket{background:#FFFFFF;color:#17130F;border:1px solid rgba(55,44,34,.16);box-shadow:var(--shadow-sm)}
html[data-theme="light"] .ticket-sub{color:#5F574E}
html[data-theme="light"] .btn-danger:hover,
html[data-theme="light"] .btn-success:hover,
html[data-theme="light"] .btn-blue:hover{color:#FFFFFF}
html[data-theme="light"] .prod-add-btn{background:var(--brand-fill);color:var(--brand-on)}
html[data-theme="light"] .nav-badge{color:#FFFFFF}
html[data-theme="light"] .pm-img-del{background:rgba(36,31,26,.82)}
html[data-theme="light"] ::-webkit-scrollbar-thumb{background:#C8BEB1}

/* Selector de tema en Configuración. */
.cc-theme-intro{display:flex;align-items:flex-start;gap:.65rem;margin:-.2rem 0 .9rem;color:var(--text-muted);font-size:.82rem;line-height:1.45}
.cc-theme-intro .cc-icon{color:var(--amber);margin-top:.1rem}
.cc-theme-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem}
.cc-theme-card{position:relative;display:flex;flex-direction:column;align-items:stretch;gap:.75rem;min-height:170px;padding:.75rem;border:1px solid var(--border2);border-radius:14px;background:var(--surface-main);color:var(--text);text-align:left;transition:border-color var(--motion-fast),background var(--motion-fast),box-shadow var(--motion-fast),transform var(--motion-fast)}
.cc-theme-card:hover{border-color:var(--amber-border);background:var(--surface-interactive)}
.cc-theme-card.selected{border-color:var(--amber);box-shadow:0 0 0 2px var(--amber-bg)}
.cc-theme-card-check{position:absolute;top:.55rem;right:.55rem;width:25px;height:25px;border-radius:999px;display:grid;place-items:center;background:var(--surface-elevated);border:1px solid var(--border2);color:transparent}
.cc-theme-card.selected .cc-theme-card-check{background:var(--brand-fill);border-color:var(--brand-fill);color:var(--brand-on)}
.cc-theme-preview{height:90px;border:1px solid var(--border);border-radius:11px;padding:.6rem;display:grid;grid-template-columns:26px 1fr;grid-template-rows:18px 1fr;gap:.45rem;overflow:hidden}
.cc-theme-preview::before{content:"";grid-row:1/-1;border-radius:7px}
.cc-theme-preview::after{content:"";grid-column:2;border-radius:6px}
.cc-theme-preview-bars{grid-column:2;display:grid;grid-template-columns:1fr .65fr;gap:.35rem;align-items:end}
.cc-theme-preview-bars span{display:block;border-radius:5px;min-height:32px}
.cc-theme-preview-dark{background:#11110F}.cc-theme-preview-dark::before{background:#22201C}.cc-theme-preview-dark::after{background:#292620}.cc-theme-preview-dark .cc-theme-preview-bars span{background:#191815;border:1px solid rgba(255,255,255,.08)}.cc-theme-preview-dark .cc-theme-preview-bars span:last-child{background:#D99045}
.cc-theme-preview-light{background:#F5F1EA}.cc-theme-preview-light::before{background:#E3DBCF}.cc-theme-preview-light::after{background:#EEE8DF}.cc-theme-preview-light .cc-theme-preview-bars span{background:#FFFFFF;border:1px solid rgba(55,44,34,.12)}.cc-theme-preview-light .cc-theme-preview-bars span:last-child{background:#D99045}
.cc-theme-card-copy{display:flex;align-items:center;gap:.55rem;padding:0 .1rem}.cc-theme-card-copy .cc-icon{color:var(--amber)}.cc-theme-card-copy span{display:flex;flex-direction:column;gap:.1rem}.cc-theme-card-copy strong{font-size:.86rem}.cc-theme-card-copy small{font-size:.72rem;color:var(--text-muted);font-weight:500}
.cc-theme-status{margin-top:.7rem;font-size:.74rem;color:var(--text-muted)}

@media(max-width:520px){
  .cc-theme-options{grid-template-columns:1fr}
  .cc-theme-card{min-height:148px}
  .cc-theme-preview{height:76px}
}

/* Ajustes finos de contraste semántico para ambos temas. */
:root{--text-secondary:var(--text-muted)}
html[data-theme="light"] .badge-gray{color:#5F5865;background:rgba(111,104,119,.12)}
html[data-theme="light"] .alert-warn{color:var(--warning-banner-text)}
html[data-theme="light"] .alert-info{color:var(--info-text)}
html[data-theme="light"] .kds-timer{color:var(--success-text)}
html[data-theme="light"] .kds-card.urgent .kds-timer{color:#71530F}
html[data-theme="light"] .kds-card.late .kds-timer{color:#963E3E}
html[data-theme="light"] .badge-green{color:var(--success-text)}
html[data-theme="light"] .badge-red{color:var(--danger-text)}
html[data-theme="light"] .badge-blue{color:var(--info-text)}
html[data-theme="light"] .badge-yellow{color:#71530F}
html[data-theme="light"] .toast{background:var(--surface-elevated);color:var(--text)}
body{-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
