/* Las Tapas: dominant opaque pixel sampled from the supplied original logo. */
:root{
  --brand:#a21217;
  --brand-dark:#790e12;
  --brand-hover:#8d1014;
  --brand-light:#c54549;
  --brand-partial:#dda2a5;
  --brand-soft:#fff0f0;
  --brand-border:#e8c6c7;
  --brand-rgb:162,18,23;
  --ink:#302729;
  --muted:#75696b;
  --line:#e8dddd;
  --bg:#f8f5f4;
  /* Compatibility aliases for the existing components. */
  --green:var(--brand);
  --mint:var(--brand-soft);
  --red:#b42318;
  --redbg:#fff0ee;
  --success:#176b52;
  --success-bg:#e6f3ed;
  --amber:#a96813;
  --amberbg:#fff4df;
  --shadow:0 8px 24px #30272908;
}
body{background:var(--bg);color:var(--ink)}
a{color:var(--brand)}
button,input,select,textarea{accent-color:var(--brand)}
.primary,.auth-primary{background:var(--brand);color:#fff}
.primary:hover:not(:disabled),.auth-primary:hover:not(:disabled){background:var(--brand-hover)}
.secondary,.auth-secondary{border-color:var(--line);color:var(--ink)}
.secondary:hover:not(:disabled),.auth-secondary:hover:not(:disabled){border-color:var(--brand-border);background:#fff8f8}
.smallbtn{background:var(--brand-soft);color:var(--brand)}
.smallbtn:hover:not(:disabled){background:#f9dfe0}
.tab.active,.filter-pill.active,.module-nav button[aria-selected=true]{background:var(--brand-soft);color:var(--brand);border-color:var(--brand-border)}
.tabs{background:#f2ecec}
.queue-head{background:var(--brand-soft);color:var(--brand)}
.waitnum,.table-action{color:var(--brand)}
.list td,.admin-table th,.admin-table td{border-bottom-color:var(--line)}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,
.modal :focus-visible,.app :focus-visible,.shared-save :focus-visible,
#analyticsView button:focus-visible,#analyticsView select:focus-visible,#analyticsView input:focus-visible,
.module-nav button:focus-visible{outline:3px solid var(--brand);outline-offset:3px}
/* Source logos keep their pixels, transparency and original proportions. */
.brand-main-logo,.brand-page-logo{display:block;width:76px;height:59px;object-fit:contain;flex:0 0 auto}
.brand{gap:16px}
.branded-heading{display:flex;gap:16px;align-items:center}
.branded-heading h1{margin:0 0 6px}
.account-brand-heading{margin:24px 0}
.login-brand-logo{display:block;box-sizing:content-box;width:108px;height:84px;object-fit:contain;background:#fff;padding:10px 14px;border-radius:12px;flex:0 0 auto}
.login-story{background:linear-gradient(145deg,var(--brand) 0%,#8c1015 60%,#6f0c10 100%);color:#fff8f8}
.wordmark{gap:18px;color:#fff8f8}
.story-eyebrow{color:#f3bfc2}
.story-copy{color:#f6dcde}
.story-flow{color:#f9e8e9}
.story-flow i{color:#ecc0c3}
.login-story small{color:#efcdd0}
.login-panel{background:#fcf9f8}
.login-foot{color:var(--muted)}
.mobile-brand-logo{display:block;width:76px;height:59px;object-fit:contain}
.auth-notice,.credential-box{background:var(--brand-soft);color:var(--brand-dark);border-color:var(--brand-border)}
.login-tabs button[aria-selected=true]{color:var(--brand);border-bottom-color:var(--brand)}
.admin-summary b{color:var(--brand)}
.account-toolbar{border-bottom-color:var(--line)}
/* Reporting uses the red family; signed negative values remain distinct. */
#analyticsView{--analysis-blue:var(--brand-dark);--analysis-orange:var(--brand-light);--analysis-negative:#49383b}
.shop-check:has(input:checked){background:var(--brand-soft);border-color:var(--brand-border);color:var(--brand)}
.analysis-field input,.analysis-field select,.operation-settings input,.operation-settings select{border-color:var(--line)}
.analysis-status{background:var(--brand-soft);color:var(--brand-dark)}
.analysis-status.loading{background:#f8e7e8;color:var(--brand-dark)}
.analysis-status.error{background:var(--redbg);color:var(--red)}
.analysis-status.warning{background:var(--amberbg);color:#825b27}
.analysis-empty{border-color:var(--brand-border)}
.analysis-table td{border-bottom-color:var(--line)}
.analysis-table tbody tr:hover{background:#fff7f7}
.analysis-table tfoot td,.nonincome-matrix .analysis-table tfoot td{background:#fbefef}
.analysis-bar-track{background:#f1e8e8}
.analysis-bar-fill{background:var(--brand)}
.analysis-bar-row[data-negative=true] .analysis-bar-fill{background:var(--analysis-negative)!important}
.analysis-bar-row[data-unknown=true] .analysis-bar-track{background:repeating-linear-gradient(135deg,#f4eeee 0px,#f4eeee 5px,#e8dddd 5px,#e8dddd 10px)}
.analysis-trend text{fill:var(--muted)}
.analysis-reconcile{background:#fcf0f0}
.analysis-pill{background:var(--brand-soft);color:var(--brand)}
.nonincome-cell{background:rgba(var(--brand-rgb),var(--cell-strength))}
/* Operational colors retain their original meaning. */
.table-card.free{background:#fbfefc;border-color:#d9e9df}
.status.free{background:var(--success-bg);color:var(--success)}
.table-card.busy{background:#fff3f2;border-color:#e9aaa5}
.status.busy{background:var(--redbg);color:var(--red)}
.table-card.served{background:#fff8ec;border-color:#efc180}
.status.served{background:var(--amberbg);color:var(--amber)}
.table-card.reserved{background:#f4f7fc;border-color:#cbd6e8}
.status.reserved{background:#edf3ff;color:#42639e}
.save-status.saved{color:var(--success)}
@media(max-width:760px){
  .mobile-brand{display:flex;align-items:center;gap:14px;color:var(--brand);margin-bottom:28px}
  .brand-main-logo,.brand-page-logo{width:64px;height:50px}
  .branded-heading{gap:12px}
}

/* PINTXOS: original logo, red primary actions, and the logo's supporting colors. */
:root[data-brand=pintxos]{
  --bg:#faf7f1;
  --ink:#393631;
  --muted:#756e65;
  --line:#e8e0d5;
  --shadow:0 5px 20px #53432d06;
  --pintxos-yellow:#e4a33b;
  --pintxos-blue:#4495c6;
  --pintxos-orange:#bf672e;
}
[data-brand=pintxos] .app{padding-top:24px}
[data-brand=pintxos] .account-toolbar{background:#fff;border-bottom:1px solid var(--line)}
[data-brand=pintxos] .top{padding:20px 24px;background:#fff;border:1px solid var(--line);border-top:3px solid var(--brand);border-radius:18px;gap:24px}
[data-brand=pintxos] .top .brand{gap:20px;flex-shrink:0}
[data-brand=pintxos] .brand-main-logo,[data-brand=pintxos] .brand-page-logo{width:124px;height:114px;object-fit:contain;background:#fff;border-radius:10px}
[data-brand=pintxos] .brand-eyebrow{font-size:11px;font-weight:650;letter-spacing:1.3px;color:var(--brand);margin-bottom:7px}
[data-brand=pintxos] .title{font-size:22px;line-height:1.4;letter-spacing:.2px}
[data-brand=pintxos] .top .brand .sub{margin-top:7px;font-size:12px}
[data-brand=pintxos] .datebox{gap:8px;max-width:780px}
[data-brand=pintxos] .module-nav{gap:8px;border:0;margin-bottom:18px;padding:0}
[data-brand=pintxos] .module-nav button{border:1px solid var(--line);background:#fff;color:var(--muted);border-radius:10px;padding:11px 20px}
[data-brand=pintxos] .module-nav button[aria-selected=true]{background:var(--brand);border-color:var(--brand);color:#fff}
[data-brand=pintxos] .metric,[data-brand=pintxos] .panel{border-radius:16px}
[data-brand=pintxos] .metric{padding:18px 20px;border-top:3px solid var(--brand)}
[data-brand=pintxos] .metric:nth-child(2){border-top-color:var(--pintxos-blue)}
[data-brand=pintxos] .metric:nth-child(3){border-top-color:var(--pintxos-yellow)}
[data-brand=pintxos] .metric:nth-child(4){border-top-color:var(--pintxos-orange)}
[data-brand=pintxos] .metric-value{font-size:28px;line-height:1.3;margin:8px 0 4px;font-variant-numeric:tabular-nums}
[data-brand=pintxos] .panel{padding:20px}
[data-brand=pintxos] .panel-title{font-size:16px}
[data-brand=pintxos] .filter-pill{border-radius:8px}
[data-brand=pintxos] .filter-pill.active{border-color:var(--brand);background:var(--brand-soft);color:var(--brand)}
[data-brand=pintxos] .table-card{border-radius:10px;box-shadow:none}
[data-brand=pintxos] .table-name{font-size:16px;letter-spacing:.3px}
[data-brand=pintxos] .tabletop{gap:6px;flex-wrap:wrap}
[data-brand=pintxos] .capacity{font-size:10px}
[data-brand=pintxos] .queue-head{background:#faf3e8;color:var(--ink);border-left:3px solid var(--brand);border-radius:0 8px 8px 0}
[data-brand=pintxos] .queue-group:nth-child(2) .queue-head{border-left-color:var(--pintxos-blue)}
[data-brand=pintxos] .queue-group:nth-child(3) .queue-head{border-left-color:var(--pintxos-orange)}
[data-brand=pintxos] .list th{background:#fbf8f3;padding-top:12px;padding-bottom:12px}
[data-brand=pintxos] .analysis-card,[data-brand=pintxos] .analysis-controls,[data-brand=pintxos] .analysis-kpi{border-radius:16px}
[data-brand=pintxos] .analysis-heading{padding-top:4px}
[data-brand=pintxos] #analyticsView .analysis-heading h1{font-size:24px;line-height:1.4}
[data-brand=pintxos] .analysis-kpi{border-top:3px solid var(--brand)}
[data-brand=pintxos] .shop-check{border-radius:8px}
[data-brand=pintxos] .analysis-table th{background:#fbf8f3}
[data-brand=pintxos] .admin-heading,[data-brand=pintxos] .account-brand-heading{padding:16px 22px;background:#fff;border:1px solid var(--line);border-top:3px solid var(--brand);border-radius:16px}
@media(max-width:1100px){
  [data-brand=pintxos] .top{align-items:stretch;gap:16px}
  [data-brand=pintxos] .datebox{max-width:none;padding-top:16px;border-top:1px solid var(--line)}
}
@media(max-width:760px){
  [data-brand=pintxos] .app{padding-top:16px}
  [data-brand=pintxos] .top{padding:14px 16px;border-radius:14px}
  [data-brand=pintxos] .top .brand{gap:14px;flex-shrink:1;min-width:0}
  [data-brand=pintxos] .brand-main-logo,[data-brand=pintxos] .brand-page-logo{width:92px;height:85px}
  [data-brand=pintxos] .title{font-size:19px;overflow-wrap:anywhere}
  [data-brand=pintxos] .brand-eyebrow{font-size:10px;letter-spacing:.7px}
  [data-brand=pintxos] .metric{padding:14px}
  [data-brand=pintxos] .metric-value{font-size:25px}
  [data-brand=pintxos] .panel{padding:14px}
  [data-brand=pintxos] .branded-heading{gap:12px}
  [data-brand=pintxos] .admin-heading,[data-brand=pintxos] .account-brand-heading{padding:12px 16px}
}

/* 主工作台的品牌 Logo 位于最上方账号工具栏。 */
.account-toolbar .account-identity{gap:10px;min-width:0}
.account-toolbar .brand-main-logo{width:52px;height:40px;object-fit:contain;border-radius:0;background:transparent}
[data-brand=pintxos] .account-toolbar .brand-main-logo{width:52px;height:48px;border-radius:0;background:transparent}
@media(max-width:760px){.account-toolbar .brand-main-logo{width:46px;height:36px}[data-brand=pintxos] .account-toolbar .brand-main-logo{width:46px;height:43px}}

/* Logo、工作台标题与说明集中在页首，账号信息随宽度换行。 */
.account-toolbar.has-brand .account-identity{display:flex;gap:18px;align-items:center;flex-wrap:wrap;flex:0 1 auto}
.account-toolbar .brand{display:flex;align-items:center;gap:12px;min-width:0}
.account-toolbar .brand .title{font-size:17px;line-height:1.4;letter-spacing:0}
.account-toolbar .brand .sub{font-size:11px;line-height:1.5;margin-top:3px}
.account-toolbar .account-user{display:flex;flex-direction:column;gap:2px;font-size:11px}
@media(max-width:760px){.account-toolbar.has-brand .account-identity{width:100%;justify-content:space-between;gap:10px}.account-toolbar .brand .title{font-size:16px}.account-toolbar .brand .sub{font-size:10px}.account-toolbar .brand{gap:9px}}

/* 保存状态与异常处理随工作台账号信息置顶。 */
.account-toolbar .shared-save{margin:0;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;gap:6px;max-width:100%;flex:0 1 auto;font-size:11px}
.account-toolbar .shared-save #sharedStatus{padding:4px 8px;border:1px solid var(--line);border-radius:7px;overflow-wrap:anywhere}
.account-toolbar .shared-save .smallbtn{font-size:11px;padding:7px 9px}
.account-toolbar .shared-save small{font-size:11px;line-height:1.5;overflow-wrap:anywhere}
.account-toolbar .shared-save small:empty{display:none}

/* Compact branding and readable, touch-friendly primary navigation. */
.brand-main-logo,.brand-page-logo{width:48px;height:38px}
[data-brand=pintxos] .brand-main-logo,[data-brand=pintxos] .brand-page-logo{width:48px;height:44px;border-radius:0;background:transparent}
.account-toolbar .brand-main-logo,[data-brand=pintxos] .account-toolbar .brand-main-logo{width:42px;height:36px}
.branded-heading,.account-toolbar .brand{gap:10px}
.account-toolbar{padding:10px 20px;gap:10px 18px}
.account-toolbar .account-actions{gap:10px;flex:1 1 auto;justify-content:flex-end}
.account-toolbar .workspace-nav{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.account-toolbar .workspace-nav a{display:inline-flex;align-items:center;justify-content:center;min-height:46px;padding:10px 16px;border:1px solid var(--brand-border);border-radius:10px;background:var(--brand-soft);color:var(--brand-dark);font-size:15px;font-weight:700;line-height:1.4;white-space:nowrap}
.account-toolbar .workspace-nav a:hover{border-color:var(--brand);background:#f9dfe0}
.account-toolbar .workspace-nav a[aria-current=page]{background:var(--brand);border-color:var(--brand);color:#fff}
.account-toolbar .account-actions .ai-toolbar-button{min-height:46px;font-size:14px;padding:10px 14px}
.account-toolbar .account-actions>a,.account-toolbar .account-actions>button:not(.ai-toolbar-button){display:inline-flex;align-items:center;min-height:44px;font-size:13px;padding:8px}
.account-toolbar .account-actions select{font-size:14px;min-height:44px}
@media(max-width:1100px){.account-toolbar .account-actions{justify-content:flex-start;flex-basis:100%}.account-toolbar .account-identity{width:100%}}
@media(max-width:600px){.account-toolbar{padding:10px 12px}.account-toolbar .workspace-nav{width:100%;display:grid;grid-template-columns:repeat(auto-fit,minmax(100px,1fr));gap:6px}.account-toolbar .workspace-nav a{padding:10px 8px;font-size:14px}.account-toolbar .account-actions label{order:2}.account-toolbar.has-brand .account-identity{gap:8px}.account-toolbar .brand .sub{font-size:10px}.brand-page-logo,[data-brand=pintxos] .brand-page-logo{width:40px;height:36px}}
/* Shared navigation: each destination appears once; account actions stay together. */
.account-toolbar .account-identity{display:flex;gap:10px;align-items:center;min-width:0}.account-toolbar .workspace-name{font-size:15px;font-weight:650;color:var(--ink)}.account-toolbar .account-menu{position:relative;font-size:13px;flex-shrink:0}.account-menu>summary{padding:10px 12px;min-height:44px;cursor:pointer;border:1px solid var(--line);border-radius:9px;white-space:nowrap;background:#fff;color:var(--ink)}.account-menu>div{position:absolute;right:0;top:calc(100% + 6px);min-width:170px;background:#fff;border:1px solid var(--line);padding:8px;border-radius:10px;box-shadow:0 8px 24px #30272918;z-index:60}.account-menu>div p{font-size:12px;color:var(--muted);padding:6px 10px;margin:0}.account-toolbar .account-menu a,.account-toolbar .account-menu button{display:block;width:100%;text-align:left;padding:10px 12px;min-height:44px;font-size:14px;color:var(--ink);border:0;background:#fff;border-radius:7px}.account-menu a:hover,.account-menu button:hover{background:var(--brand-soft)}.account-toolbar .active-shop-label{font-size:12px}.account-toolbar .active-shop-label select{max-width:260px}.account-toolbar .account-actions{gap:8px}.account-toolbar .workspace-nav a{font-size:14px;padding:9px 14px;min-height:44px}.account-toolbar .account-actions .ai-toolbar-button{font-size:14px;min-height:44px;padding:9px 12px}.account-toolbar.has-brand .account-identity{gap:12px}.auth-pending .assistant{visibility:hidden}
@media(max-width:1100px){.account-toolbar .account-actions{flex-basis:auto}.account-toolbar .account-identity{width:auto}.account-toolbar.has-brand .account-identity{width:100%}.account-toolbar .active-shop-label{margin-left:auto}}
@media(max-width:760px){.account-toolbar{padding:10px 12px}.account-toolbar .account-identity{width:100%}.account-toolbar .account-actions{width:100%;display:flex;flex-wrap:wrap}.account-toolbar .workspace-nav{width:auto;display:flex;flex-wrap:nowrap;flex:1;gap:5px}.account-toolbar .workspace-nav a{font-size:13px;padding:9px 10px;flex:1}.account-toolbar .account-menu{margin-left:auto}.account-toolbar .account-menu>summary{font-size:12px;max-width:140px;overflow:hidden;text-overflow:ellipsis}.account-toolbar .account-actions .active-shop-label{width:100%;order:2}.account-toolbar .active-shop-label select{max-width:none;flex:1}.account-toolbar .account-actions .ai-toolbar-button{font-size:13px;padding:9px 10px}.account-toolbar .brand .title{font-size:16px}.account-toolbar .brand .sub{font-size:10px}}
/* The phone layout shares navigation and permissions with the full workspace. */
.workspace-dock{display:contents}

/* Phone workspace: short header, reachable navigation, safe-area space. */
@media(max-width:600px){
  body.has-workspace-navigation{padding-bottom:calc(72px + env(safe-area-inset-bottom,0px))}
  html{scroll-padding-bottom:90px}
  .account-toolbar,.console-topbar .account-toolbar{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;padding:10px 12px}
  .account-toolbar .account-actions,.account-toolbar.has-brand .account-identity{display:contents}
  .account-toolbar .account-identity,.account-toolbar .brand{grid-column:1;grid-row:1;min-width:0;width:auto}
  .account-toolbar .account-identity{gap:8px}
  .account-toolbar .brand .title{font-size:15px;line-height:1.4}
  .account-toolbar .brand .sub{display:none}
  .account-toolbar .brand-main-logo,.account-toolbar .brand-page-logo,[data-brand=pintxos] .account-toolbar .brand-main-logo,[data-brand=pintxos] .account-toolbar .brand-page-logo{width:36px;height:32px;flex-shrink:0}
  .account-toolbar .workspace-name{font-size:15px;white-space:nowrap}
  .account-toolbar .account-menu{grid-column:2;grid-row:1;margin:0;max-width:110px}
  .account-toolbar .account-menu>summary{max-width:110px;padding:10px 8px;font-size:12px;min-height:44px}
  .account-toolbar .shared-save{grid-column:1/-1;grid-row:2;margin:0;gap:6px;font-size:12px}
  .account-toolbar .shared-save #sharedStatus{padding:3px 8px;font-size:12px}
  .account-toolbar .shared-save #undoAction:disabled{display:none}
  .account-toolbar .shared-save .smallbtn{min-height:44px}
  .account-toolbar .shared-save small{flex-basis:100%;font-size:12px}
  .account-toolbar .active-shop-label{grid-column:1/-1;grid-row:3;width:100%;margin:0;display:flex;font-size:12px}
  .account-toolbar .active-shop-label select{flex:1;min-width:0;width:100%;font-size:16px;min-height:44px}
  .account-toolbar .shop-directory-warning{grid-column:1/-1}
  .account-toolbar .workspace-dock{display:flex;position:fixed;inset:auto 0 0;z-index:15;gap:2px;align-items:stretch;padding:6px max(8px,env(safe-area-inset-right,0px)) calc(6px + env(safe-area-inset-bottom,0px)) max(8px,env(safe-area-inset-left,0px));background:#fff;border-top:1px solid var(--line);box-shadow:0 -3px 16px #30282a08}
  .account-toolbar .workspace-dock .workspace-nav{display:flex;flex:1;min-width:0;gap:2px;width:auto}
  .account-toolbar .workspace-dock .workspace-nav a,.account-toolbar .workspace-dock .ai-toolbar-button{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:4px;min-height:54px;padding:6px 4px;margin:0;border:0;background:transparent;color:var(--muted);border-radius:8px;font-size:12px;font-weight:650;line-height:1.4;white-space:nowrap}
  .account-toolbar .workspace-dock .workspace-nav a{flex:1;min-width:0}
  .account-toolbar .workspace-dock .ai-toolbar-button{flex:0 0 64px}
  .account-toolbar .workspace-dock .workspace-nav a[aria-current=page]{background:var(--brand-soft);color:var(--brand)}
  .workspace-dock a::before,.workspace-dock .ai-toolbar-button::before{content:'';width:20px;height:20px;background:currentColor;mask:center/contain no-repeat url('/icons/calendar-event.svg');-webkit-mask:center/contain no-repeat url('/icons/calendar-event.svg')}
  .workspace-dock a[href='/assistant']::before{mask-image:url('/icons/layout-dashboard.svg');-webkit-mask-image:url('/icons/layout-dashboard.svg')}
  .workspace-dock a[href='/admin']::before{mask-image:url('/icons/building-store.svg');-webkit-mask-image:url('/icons/building-store.svg')}
  .workspace-dock .ai-toolbar-button::before{mask-image:url('/icons/search.svg');-webkit-mask-image:url('/icons/search.svg')}
  body:has(.overlay.open) .workspace-dock{visibility:hidden}
  body:has(.overlay.open){overflow:hidden}
  .overlay{z-index:100}
  input:not([type=checkbox]):not([type=radio]),select,textarea{font-size:16px}
  .login-panel{padding:24px 20px;justify-content:center}
  .login-card .mobile-brand{margin-bottom:22px}
  .login-card h2{font-size:25px}
  .login-tabs{margin:22px 0 18px}
  .login-remember{min-height:44px}
  .login-foot{margin-top:24px}
  .account-wrap{padding:18px 14px 24px}
  .account-wrap .admin-card{padding:16px}
  .account-wrap .form-actions{flex-wrap:wrap}
}
