/* Ugandan Dishes Restaurant OS R2.1 — approved visual authority layer.
   Functional selectors remain in app.css. This file changes presentation only. */
:root{
  --ud-ink:#111318;
  --ud-nav:#15181d;
  --ud-paper:#f4f5f6;
  --ud-card:#ffffff;
  --ud-red:#d52b24;
  --ud-red-deep:#ad211c;
  --ud-gold:#f2b51d;
  --ud-gold-soft:#fff5d8;
  --ud-green:#0aa154;
  --ud-blue:#1673cf;
  --ud-purple:#6b47c8;
  --ud-orange:#ef7d24;
  --ud-line:#dfe3e8;
  --ud-muted:#667181;
  --ud-shadow:0 12px 32px rgba(17,24,39,.075);
}
html,body{background:var(--ud-paper);color:var(--ud-ink)}
body{font-size:14px;letter-spacing:-.008em}
.app{grid-template-columns:232px minmax(0,1fr)}
.sidebar{
  background:var(--ud-nav);
  padding:24px 12px 150px;
  border-right:1px solid #262b31;
  overflow:hidden;
}
.sidebar:after{width:10px;background:url('brand/uganda-pattern.svg') top center/42px 126px repeat-y;opacity:1}
.brand{margin:2px 12px 28px;line-height:1;padding-right:14px}
.brand .brand-main{display:block;color:#fff;font-size:20px;line-height:1.02;font-weight:950;letter-spacing:.015em;max-width:160px}
.brand>span:last-child{display:block;color:var(--ud-gold);font-size:10px;letter-spacing:.28em;margin-top:8px;font-weight:900}
.nav{gap:4px}
.nav a{padding:11px 12px;border-radius:10px;color:#eef1f4;font-weight:700;min-height:44px}
.nav a b{width:22px;font-size:15px;color:#fff;opacity:.95}
.nav a:hover{background:#22272e}
.nav a.active{background:var(--ud-red);box-shadow:inset 3px 0 0 #ffcd37}
.sidebar-food{
  position:absolute;left:0;right:10px;bottom:52px;height:86px;
  background:
    linear-gradient(180deg,rgba(21,24,29,.05),rgba(21,24,29,.96)),
    url('brand/hero-platter.webp') center/cover no-repeat;
  border-top:4px solid var(--ud-gold);
}
.sidebar-foot{left:20px;bottom:12px;color:#d5d8dd;font-size:10px;line-height:1.45}
.topbar{height:72px;padding:0 22px 0 26px;box-shadow:0 1px 0 rgba(12,18,28,.03);z-index:20}
.topbar-title{display:flex;align-items:baseline;gap:12px;min-width:0}
.topbar h1{font-size:20px;font-weight:900;letter-spacing:-.025em}
.topbar-title small{color:#8a929d;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.userchip{gap:10px}.avatar{width:38px;height:38px;background:#ffe8e5;color:var(--ud-red);font-weight:950}
.content{max-width:1600px;padding:16px 24px 28px}
.brand-hero{
  min-height:134px;border-radius:14px;margin-bottom:17px;overflow:hidden;position:relative;
  display:flex;align-items:center;justify-content:space-between;padding:20px 28px;
  color:#fff;background:
    linear-gradient(90deg,rgba(9,11,13,.96) 0%,rgba(9,11,13,.78) 36%,rgba(9,11,13,.14) 64%,rgba(9,11,13,.42) 100%),
    url('brand/hero-platter.webp') center right/cover no-repeat;
  box-shadow:0 10px 28px rgba(16,24,40,.14);
}
.brand-hero:before{content:"";position:absolute;left:0;right:0;bottom:0;height:7px;background:url('brand/uganda-pattern.svg') center/240px 72px repeat-x}
.brand-hero-copy{position:relative;z-index:2;display:grid;gap:2px;max-width:470px}
.brand-hero-copy>span{font-family:Georgia,"Times New Roman",serif;font-size:24px;line-height:1;color:#fff}
.brand-hero-copy>strong{font-family:Georgia,"Times New Roman",serif;font-size:36px;line-height:1.08;color:#f5cc55;font-weight:700}
.brand-hero-copy>small{margin-top:7px;color:#f5f6f7;font-size:13px;letter-spacing:.02em}
.brand-hero-mark{position:relative;z-index:2;padding:13px 18px;border:1px solid rgba(255,255,255,.34);background:rgba(10,11,13,.76);font-family:Georgia,"Times New Roman",serif;font-size:18px;font-style:italic;line-height:1.15;text-align:center;min-width:170px;box-shadow:inset 0 -3px 0 var(--ud-gold)}
.page-head{align-items:center;margin:0 0 14px}.page-head h2{font-size:22px;font-weight:900;letter-spacing:-.025em}.page-head p{font-size:13px;color:var(--ud-muted)}
.card{border:1px solid var(--ud-line);border-radius:14px;box-shadow:var(--ud-shadow)}
.pad{padding:16px}
.btn{border-radius:9px;min-height:40px;padding:10px 14px;font-weight:850;box-shadow:none}
.btn.primary{background:var(--ud-red)}.btn.primary:hover{background:var(--ud-red-deep)}
.btn.success{background:var(--ud-green)}.btn.gold{background:var(--ud-gold);color:#171717}.btn.blue{background:var(--ud-blue)}
.btn.light{background:#f0f2f4;color:#15181d}.btn.ghost{border:1px solid #d9dde2;background:#fff}
.input{min-height:42px;border-color:#d8dde3;border-radius:9px}.input:focus{border-color:#8ca9c2;box-shadow:0 0 0 3px rgba(23,115,207,.11)}
.badge{padding:5px 9px;font-weight:850}
.quick-grid{grid-template-columns:repeat(4,minmax(150px,1fr));gap:10px;margin-bottom:18px}
.quick{min-height:76px;padding:14px 15px;border-radius:12px;box-shadow:0 8px 20px rgba(17,24,39,.04);transition:transform .12s ease,box-shadow .12s ease}
.quick:hover{transform:translateY(-1px);box-shadow:0 10px 24px rgba(17,24,39,.09)}
.quick .ico{width:40px;height:40px;background:#f1f3f5;font-size:18px;border-radius:10px}
.quick strong{font-size:14px}.quick small{font-size:11px}
.quick[href*="page=invoices"]{border-top:3px solid var(--ud-gold)}
.quick[href*="page=production"]{border-top:3px solid var(--ud-purple)}
.quick[href*="page=accounts"]{border-top:3px solid var(--ud-blue)}
.quick[href*="section=menu"]{border-top:3px solid var(--ud-green)}
.grid.tables{grid-template-columns:repeat(auto-fill,minmax(205px,1fr));gap:14px}
.table-card{min-height:194px;padding:15px;border-top-width:4px;box-shadow:0 10px 24px rgba(17,24,39,.055)}
.table-card h3{font-size:25px;letter-spacing:-.04em;display:flex;align-items:center;gap:9px}.table-card h3:before{content:"▰";font-size:18px;color:#1b2026;transform:rotate(90deg)}
.table-card.free{border-top-color:var(--ud-green)}.table-card.busy{border-top-color:var(--ud-gold)}.table-card.bill{border-top-color:var(--ud-blue)}
.table-card.free .table-meta span:first-child{color:#087c43;font-weight:850}.table-card.busy .table-meta span:first-child{color:#936500;font-weight:850}.table-card.bill .table-meta span:first-child{color:#0b65ae;font-weight:850}
.invoice-chip{background:#f0f2f4;border:1px solid #e1e5e9}
.order-layout{grid-template-columns:minmax(0,1fr) 370px;gap:15px}
.tabs{gap:6px}.tab{padding:8px 12px}.tab.active{background:var(--ud-red)}
.grid.menu{grid-template-columns:repeat(auto-fill,minmax(165px,1fr));gap:12px}
.menu-card{padding:10px;box-shadow:none;transition:border-color .12s ease,box-shadow .12s ease}.menu-card:hover{border-color:#bfc7d0;box-shadow:0 8px 22px rgba(17,24,39,.07)}
.menu-photo{height:102px;background:linear-gradient(135deg,#efe4d4,#f8f4ed)}
.menu-card h4{font-weight:850}.price{font-size:14px}
.order-panel{top:88px;border-top:4px solid var(--ud-red)}
.kds{gap:14px}.ticket{border-radius:13px}.ticket-head{padding:12px 14px}.ticket.new .ticket-head{background:#e17d1c}.ticket.preparing .ticket-head{background:var(--ud-blue)}.ticket.ready .ticket-head{background:var(--ud-green)}
.payment-grid{grid-template-columns:minmax(0,1.12fr) minmax(330px,.88fr);gap:15px}
.pay-method{padding:14px;border-radius:12px;background:#fbfcfd}.pay-method h3{font-size:15px;font-weight:900}.pay-method:has(button.success){border-left:4px solid var(--ud-green)}.pay-method:has(button.primary){border-left:4px solid var(--ud-red)}.pay-method:has(button.blue){border-left:4px solid var(--ud-blue)}
.metric-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:11px}.metric{padding:16px;position:relative;overflow:hidden}.metric:before{content:"";position:absolute;left:0;right:0;top:0;height:4px;background:var(--ud-gold)}.metric:nth-child(2):before{background:var(--ud-green)}.metric:nth-child(3):before{background:var(--ud-purple)}.metric:nth-child(4):before{background:var(--ud-red)}
.metric span{font-size:11px;font-weight:750}.metric strong{font-size:23px;letter-spacing:-.03em}
.data-table th{background:#f7f8f9;color:#606b78;font-size:10px;font-weight:900}.data-table td{background:#fff}.data-table tbody tr:hover td{background:#fafbfc}
.setup-tabs{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:10px;margin-bottom:16px}
.setup-tabs a{min-height:64px;display:flex;align-items:center;justify-content:center;text-align:center;border:1px solid var(--ud-line);border-top:3px solid var(--ud-gold);background:#fff;border-radius:11px;font-weight:850;box-shadow:0 7px 18px rgba(17,24,39,.035)}
.setup-tabs a[href*="section=menu"]{border-top-color:var(--ud-green)}.setup-tabs a[href*="section=tables"]{border-top-color:var(--ud-blue)}.setup-tabs a[href*="section=staff"]{border-top-color:var(--ud-orange)}
.setup-tabs a.active{background:var(--ud-nav);border-color:var(--ud-nav);border-top-color:var(--ud-gold);color:#fff}
.list-row{padding:10px 0}.photo-mini{width:50px;height:50px}.audit-meta{font-size:10px}
.progress{height:7px}
.notice{background:#fff8e3}.danger-note{background:#fff1f0}
/* Login keeps the same identity as the approved render without adding complexity. */
.login-shell{grid-template-columns:minmax(330px,42%) 1fr}
.login-hero{padding:46px;background:
 linear-gradient(180deg,rgba(12,14,17,.08) 0%,rgba(12,14,17,.92) 82%),
 url('brand/hero-platter.webp') center/cover no-repeat;color:#fff}
.login-hero:before{height:10px;background:url('brand/uganda-pattern.svg') center/260px 78px repeat-x}
.login-hero h1{font-size:51px;text-shadow:0 3px 14px rgba(0,0,0,.36)}.login-hero h1 span{color:var(--ud-gold)}.login-hero p{color:#fff;font-size:18px}.login-hero small{color:#e5e8ec}
.login-box{max-width:520px}.user-option{background:#fff}.user-option:has(input:checked){border-color:var(--ud-red);box-shadow:0 0 0 2px rgba(213,43,36,.10)}
.pin-grid button:hover{border-color:#b7bec7;background:#fafafa}
/* Keep operational pages sparse. */
.page-kitchen .brand-hero,.page-invoices .brand-hero,.page-accounts .brand-hero,.page-production .brand-hero,.page-reports .brand-hero,.page-audit .brand-hero{display:none}
.page-production .content,.page-reports .content,.page-invoices .content,.page-kitchen .content{padding-top:20px}
@media(max-width:1180px){
  .app{grid-template-columns:82px minmax(0,1fr)}
  .brand{font-size:0;margin-left:7px}.brand .brand-main{font-size:0}.brand .brand-main:before{content:"UD";font-size:21px;color:#fff}.brand>span:last-child,.nav a span,.sidebar-foot,.sidebar-food{display:none}.nav a{justify-content:center}.nav a b{font-size:18px}.sidebar{padding-bottom:20px}
  .quick-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .order-layout,.payment-grid{grid-template-columns:1fr}.order-panel{position:static}
}
@media(max-width:760px){
  .app{display:block}.sidebar{position:fixed;z-index:40;left:0;right:0;top:auto;bottom:0;height:68px;padding:5px 6px;border-right:0;border-top:1px solid #2a2f36}.sidebar:after,.brand,.sidebar-food,.sidebar-foot{display:none}.nav{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(72px,1fr);overflow-x:auto;gap:3px}.nav a{padding:7px 5px;min-width:72px;display:grid;place-items:center;gap:1px}.nav a span{display:block;font-size:9px;white-space:nowrap}.nav a b{font-size:15px}.nav a.active{box-shadow:inset 0 3px 0 #ffcd37}
  .topbar{height:60px;padding:0 11px}.topbar-title small{display:none}.topbar h1{font-size:17px}.userchip>div:nth-child(2){display:none}.userchip .btn{min-height:34px;padding:8px 9px}
  .content{padding:11px 10px 82px}.brand-hero{min-height:104px;padding:14px 16px;margin-bottom:13px;background-position:center}.brand-hero-copy>span{font-size:18px}.brand-hero-copy>strong{font-size:27px}.brand-hero-copy>small{font-size:11px}.brand-hero-mark{display:none}
  .page-head{align-items:flex-start}.page-head h2{font-size:20px}.page-head p{font-size:12px}
  .quick-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.quick{min-height:70px;padding:10px}.quick .ico{width:34px;height:34px}
  .grid.tables{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.table-card{min-height:177px;padding:11px}.table-card h3{font-size:22px}
  .grid.menu{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.menu-photo{height:86px}
  .metric-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.metric{padding:12px}.metric strong{font-size:20px}
  .setup-tabs{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.setup-tabs a{min-height:54px;padding:8px}
  .login-shell{display:block}.login-hero{min-height:205px;padding:26px}.login-hero h1{font-size:40px}.login-main{padding:18px}
}
@media(max-width:440px){
  .content{padding-left:8px;padding-right:8px}.grid.tables{grid-template-columns:1fr 1fr}.quick-grid{grid-template-columns:1fr 1fr}.setup-tabs{grid-template-columns:1fr 1fr}.brand-hero-copy>strong{font-size:24px}
}

/* ================================================================
   R2.2 — APPROVED DESIGN-LAB AUTHORITY
   The live UI now follows the approved browser preview.
   Operational hierarchy first; African identity as architectural trim.
   ================================================================ */
body:before{
  content:"";position:fixed;left:0;right:0;top:0;height:8px;z-index:90;pointer-events:none;
  background:url('brand/uganda-pattern.svg') center 43%/320px 96px repeat-x;
}
.app{grid-template-columns:246px minmax(0,1fr)}
.sidebar{padding:28px 16px 164px;top:8px;height:calc(100vh - 8px)}
.sidebar:after{width:15px;background:url('brand/uganda-pattern.svg') center/45px 135px repeat-y}
.brand{padding-right:14px;margin:2px 10px 25px}
.brand .brand-main{font-size:22px;line-height:.98;max-width:175px}
.brand>span:last-child{font-size:10px;letter-spacing:.34em;margin-top:9px}
.nav a{padding:12px 13px;min-height:45px}
.sidebar-food{right:15px;height:100px;bottom:56px;background:linear-gradient(180deg,rgba(21,24,29,.08),rgba(21,24,29,.94)),url('brand/hero-platter.webp') 52% center/auto 100% no-repeat;background-color:#171a1f}
.sidebar-foot{left:24px;bottom:16px}
.topbar{height:76px;padding:0 28px;top:8px}
.topbar h1{font-size:22px}
.content{padding:18px 24px 30px}
.brand-hero{min-height:150px;border-radius:16px;padding:24px 28px;margin-bottom:15px;background:linear-gradient(90deg,rgba(8,10,12,.94) 0%,rgba(8,10,12,.74) 33%,rgba(8,10,12,.10) 66%,rgba(8,10,12,.34) 100%),url('brand/hero-platter.webp') center/cover no-repeat}
.brand-hero:before{height:9px;background:url('brand/uganda-pattern.svg') center 44%/320px 96px repeat-x}
.brand-hero:after{content:"";position:absolute;right:0;top:0;width:132px;height:54px;opacity:.96;background:url('brand/uganda-pattern.svg') center/180px 54px;clip-path:polygon(24% 0,100% 0,100% 100%,0 100%)}
.brand-hero-copy>span{font-size:24px}.brand-hero-copy>strong{font-size:38px}.brand-hero-copy>small{font-size:13px}
.brand-hero-mark{margin-right:105px;min-width:175px}

/* Approved Floor & Service page */
.floor-actions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:16px}
.floor-action{background:#fff;border:1px solid var(--ud-line);min-height:78px;border-radius:13px;padding:13px 14px;display:flex;gap:11px;align-items:center;box-shadow:0 7px 18px rgba(17,24,39,.04);transition:transform .12s ease,box-shadow .12s ease}
.floor-action:hover{transform:translateY(-1px);box-shadow:0 10px 24px rgba(17,24,39,.085)}
.floor-action-icon{width:42px;height:42px;border-radius:11px;display:grid;place-items:center;font-size:20px;font-weight:950;flex:0 0 auto}
.floor-action strong{display:block;font-size:14px}.floor-action small{display:block;font-size:10px;color:var(--ud-muted);margin-top:2px}
.floor-action.walkin{border-top:3px solid var(--ud-green)}.floor-action.walkin .floor-action-icon{background:#e8f8ef;color:var(--ud-green)}
.floor-action.invoices{border-top:3px solid var(--ud-gold)}.floor-action.invoices .floor-action-icon{background:#fff5d8;color:#8c6300}
.floor-action.production{border-top:3px solid var(--ud-purple)}.floor-action.production .floor-action-icon{background:#eee9fb;color:var(--ud-purple)}
.floor-action.patrons{border-top:3px solid var(--ud-blue)}.floor-action.patrons .floor-action-icon{background:#eaf3ff;color:var(--ud-blue)}
.floor-workspace{display:grid;grid-template-columns:minmax(0,1fr) 370px;gap:15px;align-items:start}
.floor-section-head{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;margin:1px 0 11px}
.floor-section-head h2{font-size:21px;margin:0;font-weight:920;letter-spacing:-.025em}.floor-section-head p{font-size:11px;color:var(--ud-muted);margin:4px 0 0}
.floor-states{display:flex;gap:5px;flex-wrap:wrap;justify-content:flex-end}
.state-pill{border:1px solid #e2e5e9;background:#fff;border-radius:20px;padding:7px 11px;font-size:10px;font-weight:850;white-space:nowrap}
.state-pill.all{background:#1a1e23;color:#fff;border-color:#1a1e23}.state-pill.free{color:#087d43}.state-pill.open{color:#956600}.state-pill.bill{color:#0d65ab}
.approved-tables{grid-template-columns:repeat(4,minmax(150px,1fr));gap:11px}
.approved-tables .table-card{min-height:206px;padding:13px;border-radius:14px;border-top-width:4px;box-shadow:0 9px 24px rgba(17,24,39,.05);position:relative;overflow:hidden}
.approved-tables .table-card.selected{outline:2px solid var(--ud-gold);outline-offset:0}
.approved-tables .table-card.selected:after{content:"";position:absolute;right:0;top:0;width:40px;height:40px;border-radius:0 10px 0 23px;background:url('brand/uganda-pattern.svg') center/122px 40px}
.approved-tables .table-card h3{font-size:24px;margin:8px 0 10px}.approved-tables .table-card h3:before{display:none}
.approved-tables .table-meta{align-items:center}.approved-tables .table-meta span:first-child{font-weight:850}
.approved-tables .table-card.free .table-meta span:first-child{color:#087d43}.approved-tables .table-card.busy .table-meta span:first-child{color:#956600}.approved-tables .table-card.bill .table-meta span:first-child{color:#0d65ab}
.table-details{display:grid;gap:4px;font-size:10px;color:#6d7682}.table-details b,.table-amount{color:#1b2026;font-weight:900}.invoice-chips{margin-top:9px}
.table-actions{display:grid;grid-template-columns:1fr auto;gap:7px;margin-top:11px}.table-actions .btn{min-height:38px}.seat-form{margin-top:12px}.guest-count{width:64px!important;min-height:38px}.seat-form .btn{flex:1;min-height:38px}
.floor-side{display:grid;gap:12px;position:sticky;top:96px}
.glance-card,.live-bill{overflow:hidden}.pattern-cap{height:8px;background:url('brand/uganda-pattern.svg') center 44%/260px 78px repeat-x}
.glance-head{padding:14px 15px;border-bottom:1px solid #eceef1;display:flex;justify-content:space-between;align-items:center}.glance-head h3{margin:0;font-size:15px;font-weight:920}.glance-head span{font-size:9px;text-transform:uppercase;letter-spacing:.09em;color:#8a6500;font-weight:900}
.glance-grid{display:grid;grid-template-columns:1fr 1fr}.glance-kpi{padding:13px 14px;border-bottom:1px solid #edf0f2;min-height:86px}.glance-kpi:nth-child(odd){border-right:1px solid #edf0f2}.glance-kpi small{font-size:9px;color:var(--ud-muted);display:block}.glance-kpi strong{display:block;font-size:18px;margin-top:3px;letter-spacing:-.025em}.glance-kpi span{display:block;font-size:9px;color:#8a929d;margin-top:2px}.glance-kpi .good{color:var(--ud-green)}.glance-kpi .warn{color:var(--ud-red)}
.live-bill-head{padding:13px 15px;background:#fff7de;border-bottom:1px solid #f2df9a;display:flex;align-items:center;justify-content:space-between;gap:10px}.live-bill-head strong{font-size:14px}.live-bill-head small{display:block;color:#806516;font-size:9px;margin-top:2px}.live-bill-body{padding:10px 15px 14px}.live-line{display:grid;grid-template-columns:1fr auto;gap:12px;padding:9px 0;border-bottom:1px solid #edf0f2;font-size:11px}.live-line strong{font-size:11px}.live-line small{color:var(--ud-muted);display:block;margin-top:2px}.live-total{display:flex;justify-content:space-between;align-items:center;font-size:17px;padding:13px 0 10px}.live-total strong{font-size:19px}.live-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}.live-actions .btn{font-size:11px;padding:10px 8px;min-height:40px}.floor-empty-side{padding:20px;text-align:center}.floor-empty-side p{margin:5px 0 0;color:var(--ud-muted);font-size:11px}.empty.compact{padding:14px}

/* Keep the rest of the system authoritative and sparse. */
.page-head{margin-bottom:14px}.card{box-shadow:0 10px 26px rgba(17,24,39,.055)}
.page-order .brand-hero{display:none}
.order-layout{grid-template-columns:minmax(0,1fr) 370px;gap:15px}.order-panel{top:96px}
.menu-photo{height:106px}.menu-photo img{image-rendering:auto}
.ticket{box-shadow:0 8px 20px rgba(17,24,39,.05)}
.payment-grid{gap:15px}.pay-method{background:#fbfcfd}
.metric{min-height:105px}
.setup-tabs a{font-size:12px}

/* Sharper login: the platter is never stretched over the full viewport. */
.login-shell{grid-template-columns:minmax(380px,42%) 1fr;background:#fff}
.login-hero{background:#12151a;padding:46px;isolation:isolate;justify-content:flex-end;min-width:0}
.login-hero:before{height:10px;background:url('brand/uganda-pattern.svg') center 44%/320px 96px repeat-x;z-index:3}
.login-hero:after{content:"";position:absolute;left:0;right:0;top:10px;height:min(36vh,330px);min-height:245px;background:linear-gradient(180deg,rgba(13,15,18,.02),rgba(13,15,18,.50)),url('brand/hero-platter.webp') center/cover no-repeat;z-index:-1;border-bottom:4px solid var(--ud-gold)}
.login-hero h1{position:relative;font-size:50px;margin-bottom:18px;text-shadow:none}.login-hero h1 span{color:var(--ud-gold)}.login-hero p{font-size:17px;margin-bottom:10px}.login-hero small{color:#dce0e4}
.login-main{padding:36px 42px}.login-box{max-width:540px}.pin-grid{max-width:310px}.pin-grid button{height:52px}

@media(max-width:1280px){
  .approved-tables{grid-template-columns:repeat(3,minmax(160px,1fr))}
  .floor-workspace{grid-template-columns:minmax(0,1fr) 340px}
}
@media(max-width:1120px){
  .app{grid-template-columns:88px minmax(0,1fr)}
  .brand .brand-main{font-size:0}.brand .brand-main:after{content:"UD";font-size:22px}.brand>span:last-child,.nav a span,.sidebar-food,.sidebar-foot{display:none}.nav a{justify-content:center}.sidebar:after{width:10px}
  .brand-hero-mark{margin-right:60px}
  .approved-tables{grid-template-columns:repeat(2,minmax(160px,1fr))}
  .floor-workspace{grid-template-columns:minmax(0,1fr) 320px}
}
@media(max-width:820px){
  body:before{height:6px}
  .app{display:block}.sidebar{position:fixed;z-index:50;left:0;right:0;bottom:0;top:auto;height:66px;padding:5px;border-top:1px solid #2a2f36}.sidebar:after,.brand,.sidebar-food,.sidebar-foot{display:none}.nav{grid-auto-flow:column;grid-auto-columns:minmax(78px,1fr);display:grid;overflow:auto}.nav a{display:grid;place-items:center;gap:1px;padding:6px;font-size:9px}.nav a span{display:block}.nav a b{font-size:16px}
  .topbar{top:6px;height:62px;padding:0 12px}.topbar-title small,.userchip>div:nth-child(2){display:none}.topbar h1{font-size:17px}
  .content{padding:11px 10px 80px}.brand-hero{min-height:118px;padding:16px;background-position:center}.brand-hero-copy>span{font-size:17px}.brand-hero-copy>strong{font-size:27px}.brand-hero-copy>small{display:none}.brand-hero-mark{display:none}.brand-hero:after{width:78px;height:38px}
  .floor-actions{grid-template-columns:1fr 1fr}.floor-workspace{grid-template-columns:1fr}.floor-side{position:static;order:-1}.floor-section-head{align-items:flex-start;flex-direction:column}.floor-states{justify-content:flex-start}.approved-tables{grid-template-columns:1fr 1fr}.glance-card{display:none}
  .order-layout,.payment-grid{grid-template-columns:1fr}.order-panel{position:static}
  .login-shell{display:block}.login-hero{min-height:300px;padding:24px 26px 28px}.login-hero:after{height:175px;min-height:175px;background-size:cover}.login-hero h1{font-size:38px}.login-hero p{font-size:15px}.login-main{padding:20px}.user-select{grid-template-columns:1fr 1fr}
}
@media(max-width:480px){
  .floor-actions{gap:8px}.floor-action{min-height:70px;padding:10px}.floor-action-icon{width:36px;height:36px}.approved-tables{gap:8px}.approved-tables .table-card{min-height:188px;padding:10px}.approved-tables .table-card h3{font-size:21px}.floor-states{gap:4px}.state-pill{padding:6px 8px}.live-actions{grid-template-columns:1fr 1fr}
  .user-select{grid-template-columns:1fr}
}

/* ================================================================
   R3 — WAITER-CENTRIC SERVICE AUTHORITY
   The waiter owns service. Tables are physical locations only.
   ================================================================ */

/* Brand authority: never render UD and UGANDAN together. */
.brand .brand-main:before,.brand .brand-main:after{content:none!important}
@media(min-width:981px){
  .app{grid-template-columns:246px minmax(0,1fr)}
  .brand{font-size:inherit;margin:2px 10px 25px}
  .brand .brand-main{font-size:22px!important;line-height:.98!important;display:block!important;max-width:175px!important}
  .brand>span:last-child,.nav a span,.sidebar-foot,.sidebar-food{display:block}
  .nav a{justify-content:flex-start}
  .sidebar:after{width:15px}
}
@media(min-width:821px) and (max-width:980px){
  .app{grid-template-columns:88px minmax(0,1fr)}
  .brand .brand-main{font-size:0!important}
  .brand .brand-main:after{content:"UD"!important;font-size:22px!important;color:#fff!important}
  .brand>span:last-child,.nav a span,.sidebar-foot,.sidebar-food{display:none!important}
  .nav a{justify-content:center}.sidebar:after{width:10px}
}

.page-service .brand-hero{display:block}
.service-actions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:14px}
.service-view-tabs{display:flex;gap:6px;margin:2px 0 15px;padding-bottom:10px;border-bottom:1px solid var(--ud-line)}
.service-view-tabs a{min-height:38px;padding:9px 15px;border-radius:9px;background:#fff;border:1px solid var(--ud-line);font-size:11px;font-weight:900;color:#49515c}
.service-view-tabs a.active{background:var(--ud-nav);border-color:var(--ud-nav);color:#fff;box-shadow:inset 0 -3px 0 var(--ud-gold)}

.waiter-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:14px}
.waiter-card{min-width:0;background:#fff;border:1px solid var(--ud-line);border-top:3px solid #cfd5dc;border-radius:13px;padding:12px 13px;display:grid;grid-template-columns:42px minmax(0,1fr) auto;align-items:center;gap:10px;box-shadow:0 7px 18px rgba(17,24,39,.04);transition:border-color .12s ease,transform .12s ease}
.waiter-card:hover{transform:translateY(-1px);border-color:#bcc4cd}.waiter-card.selected{border-top-color:var(--ud-gold);outline:1px solid rgba(239,181,30,.35)}
.waiter-avatar{width:42px;height:42px;border-radius:50%;display:grid;place-items:center;background:#171a1f;color:#fff;font-size:17px;font-weight:950;box-shadow:inset 0 -3px 0 var(--ud-gold)}
.waiter-name,.waiter-money{min-width:0}.waiter-name strong,.waiter-money strong{display:block;font-size:13px}.waiter-name small,.waiter-money small{display:block;color:var(--ud-muted);font-size:9px;margin-top:3px}.waiter-money{text-align:right}.waiter-money strong{font-size:14px;color:#087d43}

.service-summary{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;margin:0 0 15px}
.service-summary>div{background:#fff;border:1px solid var(--ud-line);border-radius:11px;padding:10px 12px;min-height:66px}
.service-summary span{display:block;color:var(--ud-muted);font-size:9px;text-transform:uppercase;letter-spacing:.04em}.service-summary strong{display:block;font-size:18px;margin-top:5px;letter-spacing:-.025em}

.service-party-list{display:grid;gap:9px}.service-party-card{background:#fff;border:1px solid var(--ud-line);border-left:4px solid var(--ud-green);border-radius:13px;padding:12px 13px;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px;align-items:center;box-shadow:0 8px 20px rgba(17,24,39,.045)}
.service-party-main{min-width:0}.service-party-top{display:flex;align-items:center;justify-content:space-between;gap:10px}.service-party-top small{font-size:9px;color:var(--ud-muted)}.service-party-card h3{font-size:19px;margin:8px 0 6px;letter-spacing:-.02em}.service-party-meta{display:flex;gap:12px;flex-wrap:wrap;font-size:10px;color:#68727f}.service-party-meta span:last-child{font-weight:900;color:#1d232a}
.service-party-actions{display:flex;gap:7px;align-items:center;flex-wrap:wrap;justify-content:flex-end}.service-party-actions form{margin:0}.service-party-actions .btn{min-height:39px}

.service-create-card{max-width:820px;margin:0 auto}.service-type-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-bottom:16px}.service-type-choice{position:relative;background:#fff;border:1px solid var(--ud-line);border-top:3px solid #cfd5dc;border-radius:11px;padding:13px 12px;cursor:pointer;min-height:58px;display:flex;align-items:center;gap:8px}.service-type-choice:has(input:checked){border-color:var(--ud-red);border-top-color:var(--ud-gold);box-shadow:0 0 0 2px rgba(213,43,36,.07)}.service-type-choice input{width:18px;height:18px}.service-type-choice strong{font-size:12px}
.party-layout{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:14px;align-items:start}.party-layout aside{position:sticky;top:96px}
.service-table-grid .table-card{display:flex;flex-direction:column}.service-table-grid .table-card .btn{margin-top:auto}

/* Waiter phones: service first, metrics compact, no desktop noise. */
@media(max-width:1120px){.waiter-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.service-summary{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:820px){
  .service-actions{grid-template-columns:1fr 1fr;gap:8px}.waiter-grid{grid-template-columns:1fr}.waiter-card{grid-template-columns:40px minmax(0,1fr) auto;padding:10px}.service-summary{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.service-summary>div{min-height:59px;padding:9px 10px}.service-summary strong{font-size:16px}
  .service-party-card{grid-template-columns:1fr;padding:11px}.service-party-actions{justify-content:stretch;display:grid;grid-template-columns:1fr 1fr}.service-party-actions .btn,.service-party-actions form,.service-party-actions form .btn{width:100%}.party-layout{grid-template-columns:1fr}.party-layout aside{position:static}.service-type-grid{grid-template-columns:1fr 1fr}
}
@media(max-width:480px){
  .service-actions{grid-template-columns:1fr 1fr}.service-summary{grid-template-columns:1fr 1fr}.service-party-meta{gap:7px}.service-type-grid{grid-template-columns:1fr 1fr}.waiter-money strong{font-size:12px}.waiter-card{grid-template-columns:38px minmax(0,1fr);}.waiter-money{grid-column:2;text-align:left;margin-top:-4px}.waiter-avatar{width:38px;height:38px}
}

/* ================================================================
   R3.1 — FLEXIBLE PAYMENT AUTHORITY
   Waiter-friendly M-PESA + cash + mixed payment controls.
   ================================================================ */
.payment-card{border-top:4px solid var(--ud-red);overflow:hidden}
.payment-title{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:12px}
.payment-title h3{margin:0;font-size:18px;font-weight:950}.payment-title small{display:block;margin-top:4px;color:var(--ud-muted);line-height:1.45}
.payment-balance{text-align:right;flex:0 0 auto}.payment-balance span{display:block;font-size:10px;text-transform:uppercase;letter-spacing:.08em;color:var(--ud-muted);font-weight:850}.payment-balance strong{display:block;font-size:24px;line-height:1.1;margin-top:3px}
.payment-lock{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 13px;margin-bottom:12px;border:1px solid #f0d38a;background:#fff8e3;border-radius:11px}.payment-lock strong{display:block}.payment-lock small{display:block;color:#725b1e;margin-top:3px}.payment-lock-actions{display:flex;gap:7px;flex-wrap:wrap}.payment-lock-actions form{margin:0}
.payment-mix-note{display:flex;gap:8px;align-items:flex-start;padding:10px 12px;margin-bottom:11px;border-radius:10px;background:#eef7f2;border:1px solid #d3e9dc;font-size:11px}.payment-mix-note strong{white-space:nowrap;color:#087c43}.payment-mix-note span{color:#4f5e56;line-height:1.45}
.payment-method-grid{display:grid;grid-template-columns:1fr;gap:10px}.pay-method{border:1px solid #e0e4e8;border-left-width:4px;padding:13px;border-radius:12px;background:#fff}.pay-method.mpesa{border-left-color:var(--ud-green)}.pay-method.cash{border-left-color:var(--ud-red)}.pay-method.till{border-left-color:var(--ud-blue)}
.pay-method-head{display:flex;align-items:center;gap:10px;margin-bottom:10px}.pay-method-head h3{margin:0;font-size:15px;font-weight:950}.pay-method-head small{display:block;color:var(--ud-muted);font-size:10px;margin-top:2px}.pay-icon{width:35px;height:35px;border-radius:10px;display:grid;place-items:center;font-weight:950;background:#eef1f4;color:#15181d;flex:0 0 auto}.pay-method.mpesa .pay-icon{background:#e7f7ee;color:#087c43}.pay-method.cash .pay-icon{background:#fff0ef;color:var(--ud-red)}.pay-method.till .pay-icon{background:#eaf3ff;color:var(--ud-blue)}
.field-help{display:block;color:var(--ud-muted);font-size:10px;line-height:1.4;margin:5px 0 9px}.cash-result{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:8px 0 9px}.cash-result>div{padding:9px 10px;border-radius:9px;background:#f5f7f8;border:1px solid #e5e8eb}.cash-result span{display:block;font-size:9px;color:var(--ud-muted);text-transform:uppercase;letter-spacing:.04em;font-weight:800}.cash-result strong{display:block;margin-top:3px;font-size:15px}.cash-result>div:last-child strong{color:var(--ud-red)}
.payment-authority-note{padding:10px 12px;border:1px dashed #ccd2d8;border-radius:10px;color:var(--ud-muted);font-size:10px;line-height:1.45}.payment-refresh{width:100%;margin-top:10px}.invoice-ready{padding:10px 12px;margin-bottom:9px;border-radius:10px;background:#eef7f2;border:1px solid #d3e9dc}.invoice-ready strong{display:block;color:#087c43}.invoice-ready small{display:block;color:#56665d;margin-top:2px}
.pay-method input:disabled,.pay-method button:disabled{opacity:.55;cursor:not-allowed}.pay-method:has(input:disabled){background:#f6f7f8}
@media(max-width:520px){.payment-title{align-items:flex-end}.payment-title small{max-width:220px}.payment-balance strong{font-size:20px}.payment-lock{align-items:stretch;flex-direction:column}.payment-lock-actions{display:grid;grid-template-columns:1fr 1fr}.payment-lock-actions .btn{width:100%}.payment-mix-note{display:block}.payment-mix-note strong{display:block;margin-bottom:3px}.cash-result{grid-template-columns:1fr 1fr}}
/* ================================================================
   R3.2 — SIMPLE MOBILE PAYMENT CONSOLE
   One decision at a time. One main input per payment method.
   ================================================================ */
.payment-console{border-top:4px solid var(--ud-red)}
.simple-pay-head{display:flex;align-items:flex-end;justify-content:space-between;gap:14px;padding-bottom:12px;border-bottom:1px solid #eceff2;margin-bottom:12px}
.simple-pay-head span{display:block;font-size:9px;font-weight:900;letter-spacing:.10em;color:var(--ud-muted)}
.simple-pay-head strong{display:block;font-size:28px;line-height:1.05;margin-top:3px;letter-spacing:-.035em}
.simple-pay-head small{color:var(--ud-muted);font-size:10px;text-align:right}
.payment-switch{display:grid;grid-template-columns:repeat(auto-fit,minmax(90px,1fr));gap:6px;margin:0 0 12px}
.pay-switch-btn{min-height:46px;border:1px solid #dfe4e8;border-radius:10px;background:#f4f6f7;color:#20262d;font-weight:900;padding:9px 7px;cursor:pointer}
.pay-switch-btn.active{background:#171b20;color:#fff;border-color:#171b20;box-shadow:inset 0 -3px 0 var(--ud-gold)}
.simple-pay-panel{border:1px solid #e2e6e9;border-radius:12px;padding:13px;background:#fff;margin-top:8px}
.payment-console.js-ready .simple-pay-panel{display:none}.payment-console.js-ready .simple-pay-panel.active{display:block}
.simple-label{display:block;font-size:11px;font-weight:900;margin:0 0 6px;color:#293039}
.big-input{min-height:54px!important;font-size:18px!important;font-weight:850!important;padding:12px 14px!important;border-radius:11px!important}
.uppercase-input{text-transform:uppercase;letter-spacing:.04em}
.pay-main-button{width:100%;min-height:52px;margin-top:10px;font-size:14px!important;font-weight:950!important}
.pay-amount-choice{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:9px}
.amount-chip{min-height:42px;border:1px solid #dfe4e8;border-radius:9px;background:#f5f7f8;font-weight:850;color:#38414b;padding:8px;cursor:pointer}
.amount-chip.active{border-color:#91c9aa;background:#edf8f2;color:#087b43}
.partial-amount{display:none;margin-top:10px}.partial-amount.show{display:block}
.cash-simple-result{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin:9px 0 2px}.cash-simple-result>div{padding:10px 11px;border-radius:10px;background:#f5f7f8;border:1px solid #e4e8eb}.cash-simple-result span{display:block;font-size:9px;font-weight:850;text-transform:uppercase;letter-spacing:.06em;color:var(--ud-muted)}.cash-simple-result strong{display:block;font-size:17px;margin-top:2px}.cash-simple-result>div:last-child strong{color:var(--ud-red)}
.simple-lock{align-items:center}.simple-lock form{margin:0}.simple-lock .btn{min-width:110px}
.mpesa-state{display:flex;align-items:center;justify-content:space-between;gap:10px;border-radius:10px;padding:10px 11px;margin-bottom:10px}.mpesa-state strong,.mpesa-state small{display:block}.mpesa-state small{margin-top:2px;font-size:10px}.mpesa-state.waiting{background:#fff7df;border:1px solid #f0d387}.mpesa-state.failed{background:#fff0ef;border:1px solid #efc8c5}.mpesa-state.failed strong{color:#a3211b}
.part-paid-strip{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:10px;padding:10px 11px;background:#eef7f2;border-radius:10px;font-size:11px}.part-paid-strip strong{color:#087b43;font-size:13px}
@media(max-width:820px){
  .page-invoices .payment-grid aside{display:flex;flex-direction:column}.page-invoices .payment-grid .payment-card{order:1}.page-invoices .payment-grid .invoice-actions-card{order:2;margin-top:10px!important;margin-bottom:0!important}
  .payment-card{padding:12px!important}.simple-pay-head strong{font-size:26px}.simple-pay-head small{max-width:118px;line-height:1.3}
  .payment-switch{position:sticky;top:70px;z-index:8;background:#fff;padding:4px 0}.pay-switch-btn{min-height:48px;font-size:13px}
  .big-input{font-size:19px!important;min-height:56px!important}.pay-main-button{min-height:55px;font-size:15px!important}
  .payment-mix-note,.payment-title{display:none!important}
}
@media(max-width:420px){
  .payment-switch{gap:5px}.pay-switch-btn{font-size:12px;padding:8px 5px}.simple-pay-panel{padding:11px}.simple-pay-head strong{font-size:24px}.cash-simple-result strong{font-size:16px}
  .invoice-actions-card h3{font-size:14px}.invoice-actions-card .actions{display:grid;grid-template-columns:1fr 1fr}
}
/* ================================================================
   R3.3 — THERMAL POS DOCUMENTS
   80mm first, 58mm supported. Monochrome-safe for thermal printing.
   ================================================================ */
.page-document{margin:0;background:#eef0f2;color:#000;font-family:Arial,Helvetica,sans-serif}
.doc-toolbar{max-width:760px;margin:18px auto 10px;padding:0 12px;display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.paper-choice{display:flex;border:1px solid #cfd4d8;border-radius:10px;overflow:hidden;background:#fff}.paper-choice a{display:block;padding:10px 14px;text-decoration:none;color:#30363d;font-weight:850;font-size:12px;border-right:1px solid #dfe3e6}.paper-choice a:last-child{border-right:0}.paper-choice a.active{background:#171b20;color:#fff}
.doc-toolbar-actions{display:flex;gap:8px}.thermal-shell{padding:12px 12px 36px}.thermal-doc{box-sizing:border-box;margin:0 auto;background:#fff;color:#000;border:1px solid #dadddf;box-shadow:0 10px 28px rgba(0,0,0,.08);padding:4mm 3mm 5mm;font-family:Arial,Helvetica,sans-serif;font-size:11px;line-height:1.25;overflow-wrap:anywhere}
.paper-80 .thermal-doc{width:72mm}.paper-58 .thermal-doc{width:48mm;padding-left:2.2mm;padding-right:2.2mm}
.thermal-head{text-align:center}.thermal-brand{font-size:18px;line-height:1.05;font-weight:950;text-transform:uppercase;letter-spacing:.01em}.paper-58 .thermal-brand{font-size:16px}.thermal-small{font-size:9px;margin-top:2px}.thermal-rule{height:0;border-top:1px dashed #000;margin:8px 0}.thermal-rule.strong{border-top:2px solid #000}
.thermal-docmeta{text-align:center}.thermal-docmeta>strong{display:block;font-size:14px;letter-spacing:.12em}.thermal-docmeta>span{display:block;font-size:11px;font-weight:900;margin-top:3px}.thermal-docmeta small{display:block;font-size:9px;margin-top:2px}
.thermal-service{display:grid;grid-template-columns:1fr 1fr;gap:6px 8px}.thermal-service .wide{grid-column:1/-1}.thermal-service span{display:block;font-size:8px;text-transform:uppercase;letter-spacing:.06em}.thermal-service strong{display:block;font-size:10px;margin-top:1px}
.thermal-items{display:grid;gap:7px}.thermal-item>strong{display:block;font-size:10.5px}.thermal-item>div{display:flex;justify-content:space-between;gap:8px;margin-top:2px;font-size:9px}.thermal-item b{white-space:nowrap}
.thermal-totals{display:grid;gap:4px}.thermal-totals>div{display:flex;justify-content:space-between;gap:10px;align-items:baseline}.thermal-totals .grand{font-size:13px;font-weight:950;border-top:1px solid #000;padding-top:5px;margin-top:2px}.thermal-totals .grand strong{font-size:14px}
.thermal-payments h3{font-size:9px;letter-spacing:.09em;margin:0 0 5px}.thermal-payline{display:flex;justify-content:space-between;gap:8px;padding:3px 0}.thermal-payline>div strong{font-size:9.5px}.thermal-payline small{display:block;font-size:8px;margin-top:1px}.thermal-payline>b{font-size:9.5px;white-space:nowrap}.thermal-subline{display:flex;justify-content:space-between;gap:8px;font-size:8.5px;padding:1px 0}.thermal-subline strong{font-size:8.5px}
.thermal-qr{text-align:center}.doc-qr-svg{display:block;width:30mm;height:30mm;margin:0 auto 4px;background:#fff}.paper-58 .doc-qr-svg{width:27mm;height:27mm}.thermal-qr strong{display:block;font-size:9px}.thermal-qr small{display:block;font-size:8px;margin-top:2px}.thermal-foot{text-align:center;display:grid;gap:3px}.thermal-foot>strong{font-size:10px}.thermal-foot>span{font-size:8.5px}.thermal-foot>small{font-size:7.5px;margin-top:3px;letter-spacing:.03em}
@media(max-width:520px){.doc-toolbar{margin-top:10px}.doc-toolbar,.doc-toolbar-actions{width:100%}.doc-toolbar-actions .btn{flex:1}.paper-choice{width:100%}.paper-choice a{flex:1;text-align:center}.thermal-shell{padding:8px 4px 24px}.thermal-doc{max-width:100%;box-shadow:none}}
@media print{
  @page{margin:0}
  html,body.page-document{margin:0!important;padding:0!important;background:#fff!important;width:auto!important;min-height:0!important}
  .no-print,.doc-toolbar{display:none!important}
  .thermal-shell{margin:0!important;padding:0!important;width:auto!important}
  .thermal-doc{margin:0!important;border:0!important;box-shadow:none!important;color:#000!important;background:#fff!important;break-inside:avoid-page;page-break-inside:avoid}
  body.paper-80 .thermal-doc{width:72mm!important;padding:3mm 2.5mm 4mm!important}
  body.paper-58 .thermal-doc{width:48mm!important;padding:3mm 2mm 4mm!important}
  .doc-qr-svg{filter:none!important}
}
/* ================================================================
   R3.5 — SIMPLE WAITER ORDER WORKSPACE
   One tap to start. Menu in the middle. Waiter orders left, bill right.
   ================================================================ */
.service-create-simple{max-width:720px}.service-create-simple .simple-service-types{grid-template-columns:repeat(4,minmax(0,1fr));margin-bottom:14px}.simple-service-types .service-type-choice{min-height:82px;padding:14px;align-items:flex-start}.simple-service-types .service-type-choice span{display:block}.simple-service-types .service-type-choice strong{display:block;font-size:14px}.simple-service-types .service-type-choice small{display:block;color:var(--ud-muted);font-size:10px;margin-top:4px}.simple-service-actions{display:grid;grid-template-columns:130px 1fr;gap:8px}.simple-service-actions .btn{width:100%;min-height:50px}.service-waiter-select{margin-bottom:12px}

.page-order .content{max-width:none}.order-workspace{display:grid;grid-template-columns:220px minmax(0,1fr) 350px;gap:12px;align-items:start}.waiter-order-rail,.order-panel{position:sticky;top:94px;max-height:calc(100vh - 112px);overflow:auto}.waiter-order-rail{background:#fff;border:1px solid var(--ud-line);border-top:4px solid var(--ud-gold);border-radius:13px;padding:11px;box-shadow:0 8px 22px rgba(17,24,39,.05)}.order-rail-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:1px 2px 9px;border-bottom:1px solid #eceff2}.order-rail-head small{display:block;font-size:8px;letter-spacing:.10em;color:var(--ud-muted);font-weight:900}.order-rail-head strong{display:block;font-size:14px;margin-top:2px}.rail-new-service{width:100%;margin:9px 0;min-height:42px}.waiter-order-list{display:grid;gap:6px}.waiter-order-link{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center;border:1px solid #e4e7ea;border-radius:10px;padding:9px;background:#fff;color:#1a2026}.waiter-order-link:hover{border-color:#c6ccd2}.waiter-order-link.active{border-color:#e1ad1b;background:#fff8e1;box-shadow:inset 3px 0 0 var(--ud-gold)}.waiter-order-link strong{display:block;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.waiter-order-link small{display:block;font-size:8px;color:var(--ud-muted);margin-top:2px}.waiter-order-value{text-align:right}.waiter-order-value strong{font-size:10px}.waiter-order-value small{font-size:8px}.order-menu-pane{min-width:0}.order-menu-tabs{position:sticky;top:88px;z-index:8;background:#fff;padding:3px 0 8px;margin-top:-3px}.order-current-head>div{display:flex;align-items:center;gap:7px}.drawer-close{display:none;border:0;background:#eef1f4;color:#222;border-radius:8px;width:36px;height:36px;font-size:22px;line-height:1;cursor:pointer}.order-primary-actions{display:grid;gap:8px;margin-top:11px}.order-primary-actions form,.order-primary-actions .btn{width:100%}.mobile-order-dock{display:none}.order-drawer-overlay{display:none}

@media(max-width:1180px){
  .order-workspace{grid-template-columns:minmax(0,1fr)}.waiter-order-rail,.order-panel{position:fixed;z-index:71;top:72px;bottom:68px;width:min(88vw,360px);max-height:none;overflow:auto;background:#fff;transition:transform .18s ease;box-shadow:0 20px 50px rgba(0,0,0,.22)}.waiter-order-rail{left:0;border-radius:0 14px 14px 0;transform:translateX(-104%)}.order-panel{right:0;border-radius:14px 0 0 14px;transform:translateX(104%);margin:0!important}.waiter-order-rail.drawer-open,.order-panel.drawer-open{transform:translateX(0)}.drawer-close{display:grid;place-items:center}.mobile-order-dock{display:grid;grid-template-columns:1fr 1fr;gap:7px;position:sticky;top:68px;z-index:20;background:var(--ud-bg);padding:4px 0 9px;margin-top:-3px}.mobile-order-dock button{border:1px solid #dfe3e7;background:#fff;border-radius:10px;min-height:50px;padding:8px 10px;text-align:left;display:flex;align-items:center;justify-content:space-between;gap:8px;font-weight:900}.mobile-order-dock button:last-child{background:#171b20;color:#fff;border-color:#171b20;box-shadow:inset 0 -3px 0 var(--ud-gold)}.mobile-order-dock span{font-size:10px}.mobile-order-dock strong{font-size:12px;white-space:nowrap}.order-drawer-overlay{display:block;position:fixed;z-index:70;inset:0;background:rgba(10,13,16,.44);opacity:0;pointer-events:none;transition:opacity .16s ease}.order-drawer-overlay.show{opacity:1;pointer-events:auto}.order-drawer-active{overflow:hidden}.order-menu-tabs{top:127px}.order-menu-pane{padding-top:10px!important}
}
@media(max-width:820px){
  .service-create-simple{padding:12px!important}.service-create-simple .simple-service-types{grid-template-columns:1fr 1fr;gap:8px}.simple-service-types .service-type-choice{min-height:72px;padding:12px}.simple-service-actions{grid-template-columns:96px 1fr}.simple-service-actions .btn{min-height:52px}.page-order .page-head{margin-bottom:7px}.page-order .page-head p{font-size:10px}.page-order .content{padding-left:8px;padding-right:8px}.order-menu-pane{border-radius:12px;padding:9px!important}.grid.menu{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.menu-card{padding:7px}.menu-card h4{font-size:13px;margin-top:7px}.menu-photo{height:82px}.mobile-order-dock{top:62px}.waiter-order-rail,.order-panel{top:62px;bottom:66px}.order-menu-tabs{top:121px}.order-primary-actions .btn{min-height:54px;font-size:14px}.order-line{padding:10px 0}.waiter-order-link{min-height:58px}
}
@media(max-width:420px){
  .simple-service-types .service-type-choice strong{font-size:13px}.simple-service-types .service-type-choice small{font-size:9px}.mobile-order-dock button{padding:7px 8px}.mobile-order-dock span{font-size:9px}.mobile-order-dock strong{font-size:11px}.grid.menu{gap:6px}.menu-photo{height:76px}
}
/* ================================================================
   R3.6 — MOBILE EDGE RAILS + EDITABLE CURRENT ORDER
   Desktop stays three-column. Phone keeps menu central with true side rails.
   ================================================================ */
.mobile-edge-launchers{display:none}.current-order-number{display:block;font-size:9px;letter-spacing:.04em;color:var(--ud-muted);font-weight:900;margin-bottom:2px}.current-order-lines{min-height:0}.current-order-footer{background:#fff}.order-line-controls{display:grid;justify-items:end;gap:5px}.remove-line-form{margin:0}.remove-line{border:0;background:#fff0ef;color:#b42318;border-radius:7px;padding:5px 8px;font-size:9px;font-weight:900;min-height:28px}.remove-line:active{transform:translateY(1px)}.ticket-item-void{opacity:.68;text-decoration:line-through;background:#fff1f0;border-left:3px solid #c62f28;padding-left:7px}.item-qty-readonly{text-align:right}

@media(max-width:1180px){
  .mobile-order-dock{display:none!important}
}
@media(max-width:820px){
  .page-order{overflow-x:hidden}
  .page-order .content{padding-left:10px;padding-right:10px;padding-bottom:82px}
  .page-order .page-head{padding-left:34px;padding-right:38px}
  .page-order .page-head h1,.page-order .page-head h2{font-size:17px}
  .page-order .page-head p{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .mobile-edge-launchers{display:block}
  .edge-launch{position:fixed;z-index:69;top:46%;width:38px;min-height:112px;border:0;color:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:8px 4px;box-shadow:0 10px 26px rgba(0,0,0,.22);font-weight:950;touch-action:manipulation}
  .edge-launch span{writing-mode:vertical-rl;font-size:10px;letter-spacing:.06em}.edge-launch strong{font-size:10px;writing-mode:vertical-rl;max-height:64px;overflow:hidden}
  .edge-left{left:0;border-radius:0 11px 11px 0;background:#171b20;box-shadow:inset 0 3px 0 var(--ud-gold),0 10px 26px rgba(0,0,0,.22)}
  .edge-left span,.edge-left strong{transform:rotate(180deg)}
  .edge-right{right:0;border-radius:11px 0 0 11px;background:var(--ud-red);box-shadow:inset 0 3px 0 var(--ud-gold),0 10px 26px rgba(0,0,0,.22)}
  .order-workspace{grid-template-columns:minmax(0,1fr);gap:0}
  .order-menu-pane{padding:8px!important;margin:0 18px 0 18px;border-radius:12px}
  .order-menu-tabs{top:62px;padding-top:5px;overflow-x:auto;white-space:nowrap;scrollbar-width:none}.order-menu-tabs::-webkit-scrollbar{display:none}
  .grid.menu{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
  .menu-card{padding:6px}.menu-photo{height:78px}.menu-card h4{font-size:13px;line-height:1.15;margin:7px 0 2px}.menu-card .price{font-size:12px}
  .waiter-order-rail,.order-panel{position:fixed!important;z-index:71;top:62px;bottom:64px;width:min(92vw,390px);max-height:none!important;margin:0!important;background:#fff;overflow:hidden!important;display:flex;flex-direction:column;transition:transform .18s ease;box-shadow:0 20px 50px rgba(0,0,0,.26)}
  .waiter-order-rail{left:0;border-radius:0 14px 14px 0;transform:translateX(-104%)}
  .order-panel{right:0;border-radius:14px 0 0 14px;transform:translateX(104%);padding:12px!important}
  .waiter-order-rail.drawer-open,.order-panel.drawer-open{transform:translateX(0)}
  .order-rail-head,.order-current-head{flex:0 0 auto}
  .rail-new-service{flex:0 0 auto;margin:9px 0}
  .waiter-order-list{flex:1 1 auto;min-height:0;overflow-y:auto;padding-bottom:12px}
  .current-order-lines{flex:1 1 auto;min-height:0;overflow-y:auto;padding-right:2px;overscroll-behavior:contain}
  .current-order-footer{flex:0 0 auto;border-top:1px solid #e8ebee;padding-top:8px;box-shadow:0 -7px 18px rgba(17,24,39,.05)}
  .order-primary-actions{display:grid;grid-template-columns:1fr;gap:7px;margin-top:8px}.order-primary-actions .btn{min-height:52px;font-size:13px}
  .order-line{grid-template-columns:minmax(0,1fr) auto;align-items:start;padding:9px 0}.order-line-main strong{font-size:12px}.order-line-main small{font-size:9px}.order-line-controls>strong{font-size:11px}
  .qty-tools .mini{min-width:34px;min-height:34px}.remove-line{min-height:32px;padding:6px 9px}
  .drawer-close{display:grid!important;place-items:center}
  .order-drawer-overlay{display:block;position:fixed;z-index:70;inset:0;background:rgba(10,13,16,.44);opacity:0;pointer-events:none;transition:opacity .16s ease}.order-drawer-overlay.show{opacity:1;pointer-events:auto}.order-drawer-active{overflow:hidden}
}
@media(max-width:420px){
  .page-order .content{padding-left:5px;padding-right:5px}.order-menu-pane{margin-left:16px;margin-right:16px;padding:6px!important}.grid.menu{gap:6px}.menu-photo{height:72px}.edge-launch{width:34px;min-height:102px}.waiter-order-rail,.order-panel{width:94vw}.order-panel{padding:10px!important}
}
/* ================================================================
   R3.7 — WAITER END-TO-END ORDER FLOW
   Order number, multiple running orders, read-only kitchen, split billing.
   ================================================================ */
.r37-order-board{display:grid;gap:9px}.r37-order-card{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:center;background:#fff;border:1px solid #e2e5e8;border-radius:13px;padding:13px 14px;color:#1b2025;text-decoration:none}.r37-order-card:hover{border-color:#d6aa2f}.r37-order-card>div:first-child small,.r37-order-card>div:first-child span{display:block;color:var(--ud-muted);font-size:9px}.r37-order-card>div:first-child strong{display:block;font-size:15px;margin:2px 0}.r37-order-card-right{text-align:right}.r37-order-card-right strong,.r37-order-card-right small{display:block}.r37-order-card-right strong{font-size:14px;margin-top:4px}.r37-order-card-right small{font-size:9px;color:var(--ud-muted);margin-top:2px}
.mobile-order-edge{display:none}.r37-workspace .order-current-head h3{margin:1px 0 0;font-size:15px}.r37-workspace .order-current-head small{display:block;font-size:8px;letter-spacing:.09em;color:var(--ud-muted);font-weight:900}.current-order-scroll{min-height:80px}.order-line-tools{text-align:right;display:grid;justify-items:end;gap:4px}.remove-line-form{margin:0}.line-remove{border:0;background:transparent;color:#a52a24;font-size:9px;font-weight:900;padding:2px 0;cursor:pointer}.order-bottom-stick{margin-top:10px}.order-bottom-stick .summary{margin-top:0}
.billing-choice-wrap{display:grid;grid-template-columns:minmax(0,760px);gap:12px}.billing-choice-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:12px}.billing-choice{border:1px solid #dfe3e6;border-radius:13px;background:#fff;min-height:150px;padding:0;text-decoration:none;color:#20252b;overflow:hidden}.billing-choice button{border:0;background:transparent;width:100%;height:100%;padding:18px;text-align:left;color:inherit;cursor:pointer}.billing-choice.split{display:flex;flex-direction:column;padding:18px}.billing-choice strong,.billing-choice span,.billing-choice b{display:block}.billing-choice strong{font-size:18px}.billing-choice span{font-size:11px;color:var(--ud-muted);margin-top:5px;line-height:1.35}.billing-choice b{margin-top:auto;padding-top:20px;font-size:13px}.billing-choice.one{border-top:4px solid var(--ud-gold)}.billing-choice.split{border-top:4px solid var(--ud-red)}
.split-bill-layout{display:grid;grid-template-columns:minmax(0,700px) 300px;gap:12px;align-items:start}.split-bill-items{display:grid;gap:7px;margin-bottom:12px}.split-bill-item{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center;border-bottom:1px solid #eceff1;padding:10px 0}.split-bill-item strong,.split-bill-item small{display:block}.split-bill-item small{color:var(--ud-muted);font-size:9px;margin-top:3px}.split-stepper{display:grid;grid-template-columns:36px 34px 36px;align-items:center}.split-stepper button{height:36px;border:1px solid #d8dde1;background:#f5f6f7;font-size:19px;font-weight:900;cursor:pointer}.split-stepper button:first-child{border-radius:8px 0 0 8px}.split-stepper button:nth-of-type(2){border-radius:0 8px 8px 0}.split-stepper b{height:36px;display:grid;place-items:center;border-top:1px solid #d8dde1;border-bottom:1px solid #d8dde1;font-size:13px}.split-side{position:sticky;top:92px}.split-created-link{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:9px 0;border-bottom:1px solid #eceff1;text-decoration:none;color:#20252b}.split-created-link span strong,.split-created-link span small{display:block}.split-created-link span small{font-size:9px;color:var(--ud-muted);margin-top:2px}
.kitchen-filter{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;margin-bottom:12px}.kitchen-filter a{display:flex;align-items:center;justify-content:center;gap:7px;min-height:46px;padding:8px;border:1px solid #dfe3e6;border-radius:10px;background:#fff;text-decoration:none;color:#252a30;font-size:11px;font-weight:900}.kitchen-filter a.active{background:#171b20;color:#fff;border-color:#171b20;box-shadow:inset 0 -3px 0 var(--ud-gold)}.kitchen-filter b{min-width:20px;height:20px;padding:0 5px;border-radius:10px;display:grid;place-items:center;background:#edf0f2;color:#222;font-size:9px}.kitchen-filter a.active b{background:#fff;color:#111}.kitchen-monitor-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.kitchen-monitor-card{overflow:hidden}.kitchen-monitor-card>header{display:flex;justify-content:space-between;gap:10px;padding:11px 12px;background:#171b20;color:#fff;border-bottom:3px solid var(--ud-gold)}.kitchen-monitor-card>header>div:last-child{text-align:right}.kitchen-monitor-card header strong,.kitchen-monitor-card header small{display:block}.kitchen-monitor-card header small{font-size:8px;opacity:.76}.kitchen-monitor-items{padding:6px 12px 10px}.kitchen-monitor-item{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 0;border-bottom:1px solid #eceff1}.kitchen-monitor-item:last-child{border-bottom:0}.kitchen-monitor-item strong,.kitchen-monitor-item small{display:block}.kitchen-monitor-item small{font-size:8px;color:var(--ud-muted);margin-top:2px}
@media(max-width:1180px){
  .r37-workspace{grid-template-columns:minmax(0,1fr)!important}.r37-workspace .waiter-order-rail,.r37-workspace .order-panel{position:fixed!important;z-index:91!important;top:0!important;bottom:0!important;width:min(88vw,370px)!important;max-height:none!important;overflow:auto!important;background:#fff!important;transition:transform .18s ease!important;margin:0!important}.r37-workspace .waiter-order-rail{left:0!important;border-radius:0 14px 14px 0!important;transform:translateX(-104%)}.r37-workspace .order-panel{right:0!important;border-radius:14px 0 0 14px!important;transform:translateX(104%)}.r37-workspace .waiter-order-rail.drawer-open,.r37-workspace .order-panel.drawer-open{transform:translateX(0)!important}.mobile-order-dock{display:none!important}.mobile-order-edge{display:flex;position:fixed;z-index:68;top:46%;width:38px;min-height:92px;border:0;background:#171b20;color:#fff;align-items:center;justify-content:center;gap:5px;font-weight:950;box-shadow:0 6px 18px rgba(0,0,0,.2);writing-mode:vertical-rl;cursor:pointer}.mobile-order-edge span{font-size:10px}.mobile-order-edge b{background:var(--ud-gold);color:#111;border-radius:9px;padding:4px 2px;font-size:9px;writing-mode:horizontal-tb}.mobile-order-edge.edge-left{left:0;border-radius:0 10px 10px 0}.mobile-order-edge.edge-right{right:0;border-radius:10px 0 0 10px}.order-drawer-overlay{z-index:90!important}.drawer-close{display:grid!important;place-items:center}.order-menu-tabs{top:66px!important}.order-bottom-stick{position:sticky;bottom:0;background:#fff;border-top:1px solid #e5e8ea;padding-top:8px;padding-bottom:max(8px,env(safe-area-inset-bottom));z-index:4}.current-order-scroll{padding-bottom:4px}.split-bill-layout{grid-template-columns:1fr}.split-side{position:static}.kitchen-monitor-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:700px){
  .page-order .content{padding-left:7px!important;padding-right:7px!important}.page-order .page-head{padding-left:34px;padding-right:34px}.r37-workspace .order-menu-pane{padding:8px!important;border-radius:10px}.grid.menu{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important}.menu-photo{height:78px!important}.menu-card h4{font-size:12px!important}.mobile-order-edge{width:34px;min-height:82px}.billing-choice-grid{grid-template-columns:1fr}.billing-choice{min-height:112px}.split-bill-card,.split-side{padding:11px!important}.split-bill-item{padding:9px 0}.kitchen-filter{grid-template-columns:1fr 1fr}.kitchen-monitor-grid{grid-template-columns:1fr}.r37-order-card{padding:11px}.r37-order-card>div:first-child strong{font-size:14px}
}
/* R4.0 OPEN ORDER + CATERING */
.catering-tabs,.catering-filter{display:flex;gap:8px;margin:0 0 14px;flex-wrap:wrap}.catering-tabs a,.catering-filter a{padding:10px 14px;border-radius:10px;background:#fff;border:1px solid #dde1e4;text-decoration:none;color:#202428;font-weight:900}.catering-tabs a.active,.catering-filter a.active{background:#171b20;color:#fff;border-color:#171b20}.catering-meal-form,.catering-client-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.catering-meal-form label,.catering-client-form label{display:grid;gap:5px;font-size:10px;font-weight:900;text-transform:uppercase;letter-spacing:.04em}.catering-meal-form .wide,.catering-client-form .wide{grid-column:1/-1}.catering-total{display:flex;align-items:center;justify-content:space-between;border:1px solid #e0e3e5;border-radius:10px;padding:9px 12px;background:#faf7ed}.catering-total small,.catering-total strong{display:block}.catering-client-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);gap:14px}.catering-client-list{display:grid;gap:7px}.catering-client-list a{display:flex;justify-content:space-between;gap:10px;padding:10px;border:1px solid #e2e5e7;border-radius:10px;text-decoration:none;color:inherit}.catering-client-list a span strong,.catering-client-list a span small{display:block}.catering-table-wrap{overflow:auto}.catering-account{margin-top:14px}.catering-account-actions{display:flex;gap:10px;align-items:flex-start;flex-wrap:wrap;margin-bottom:12px}.catering-pay-form{display:grid;grid-template-columns:140px 120px minmax(120px,1fr) auto;gap:7px;flex:1}.catering-doc-actions{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:12px}.catering-doc-actions form{margin:0}.catering-invoice-doc{background:#fff;border:1px solid #dde1e4;max-width:900px;margin:auto;padding:34px}.catering-invoice-doc>header{display:flex;justify-content:space-between;gap:20px;border-bottom:3px solid #171b20;padding-bottom:15px}.catering-invoice-doc>header h2{margin:0;font-size:28px}.catering-invoice-doc>header>div:last-child{text-align:right}.catering-billto{display:grid;gap:3px;margin:20px 0}.catering-billto small{font-size:9px;font-weight:900;letter-spacing:.1em}.catering-billto strong{font-size:18px}.catering-doc-table{width:100%;border-collapse:collapse}.catering-doc-table th,.catering-doc-table td{padding:9px 6px;border-bottom:1px solid #e4e6e8;text-align:left}.catering-doc-table th{font-size:9px;text-transform:uppercase}.catering-doc-table th:nth-last-child(-n+3),.catering-doc-table td:nth-last-child(-n+3){text-align:right}.catering-carry{margin-top:24px;padding-top:12px;border-top:2px dashed #c4c7ca}.catering-carry h4{margin:0 0 8px}.catering-carry-balance{text-align:right;padding:9px 0}.catering-doc-totals{margin:20px 0 0 auto;max-width:380px}.catering-doc-totals div{display:flex;justify-content:space-between;padding:7px 0}.catering-doc-totals .grand{border-top:2px solid #171b20;font-size:16px}.catering-invoice-doc footer{margin-top:38px;padding-top:12px;border-top:1px solid #ddd;text-align:center;font-size:10px}.cancel-order-form{margin-top:7px}.cancel-order-form .btn{width:100%}
@media(max-width:720px){.catering-meal-form,.catering-client-form,.catering-client-grid{grid-template-columns:1fr}.catering-pay-form{grid-template-columns:1fr}.catering-invoice-doc{padding:16px;border-radius:0}.catering-invoice-doc>header{display:block}.catering-invoice-doc>header>div:last-child{text-align:left;margin-top:10px}.catering-doc-table{font-size:11px}.catering-doc-table th,.catering-doc-table td{padding:7px 4px}}
@media print{.page-catering .sidebar,.page-catering .topbar,.page-catering .catering-no-print,.page-catering .pwa-install-banner{display:none!important}.page-catering .app,.page-catering .main,.page-catering .content{display:block!important;margin:0!important;padding:0!important}.page-catering .catering-invoice-doc{border:0!important;max-width:none!important;margin:0!important;padding:0!important}}

/* ================================================================
   R4.2.1 SIDEBAR SCROLL + TOUCH KEYBOARD
   ================================================================ */
@media (min-width:821px){
  .sidebar{
    display:flex!important;
    flex-direction:column!important;
    overflow:hidden!important;
    padding-bottom:14px!important;
  }
  .sidebar>.brand{flex:0 0 auto}
  .sidebar>.nav{
    flex:1 1 auto;
    min-height:0;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    overscroll-behavior:contain;
    scrollbar-width:thin;
    padding-right:4px;
    padding-bottom:8px;
  }
  .sidebar>.nav::-webkit-scrollbar{width:6px}
  .sidebar>.nav::-webkit-scrollbar-thumb{background:#454b53;border-radius:999px}
  .sidebar>.sidebar-food{
    position:relative!important;
    left:auto!important;right:auto!important;bottom:auto!important;
    flex:0 0 86px;
    width:auto!important;height:86px!important;
    margin:9px -16px 0!important;
  }
  .sidebar>.sidebar-foot{
    position:relative!important;
    left:auto!important;right:auto!important;bottom:auto!important;
    flex:0 0 auto;
    margin:8px 8px 0!important;
  }
}

.ud-kb-toggle{
  position:fixed;right:18px;bottom:18px;z-index:12020;width:54px;height:54px;border:0;border-radius:50%;
  background:#171b20;color:#fff;font-size:23px;box-shadow:0 10px 28px rgba(0,0,0,.28);cursor:pointer;display:none;
}
.ud-kb-toggle.show{display:grid;place-items:center}
.ud-touch-keyboard{
  position:fixed;left:50%;bottom:12px;transform:translateX(-50%);z-index:12010;
  width:min(920px,calc(100vw - 24px));background:#171b20;color:#fff;border:1px solid #343a42;border-radius:16px;
  box-shadow:0 22px 60px rgba(0,0,0,.38);padding:10px;display:none;user-select:none;-webkit-user-select:none;
}
.ud-touch-keyboard.open{display:block}
.ud-kb-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:2px 3px 9px}
.ud-kb-head strong{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ud-kb-head button{border:0;border-radius:8px;background:#30363d;color:#fff;min-width:42px;min-height:36px;font-weight:900}
.ud-kb-rows{display:grid;gap:6px}
.ud-kb-row{display:flex;justify-content:center;gap:6px}
.ud-kb-key{flex:1 1 0;min-width:42px;max-width:82px;min-height:48px;border:0;border-radius:9px;background:#f4f5f6;color:#15181c;font-size:17px;font-weight:850;touch-action:manipulation}
.ud-kb-key.wide{max-width:180px;flex-grow:2}.ud-kb-key.space{max-width:360px;flex-grow:5}.ud-kb-key.action{background:#343a42;color:#fff}.ud-kb-key.danger{background:#74231f;color:#fff}
body.ud-keyboard-open .ud-kb-toggle{display:none!important}
@media(max-width:699px){.ud-touch-keyboard,.ud-kb-toggle{display:none!important}}

/* R4.4E BRAND MEDIA COMPLETION */
.sidebar .ugd-global-brand{display:grid;grid-template-columns:58px minmax(0,1fr);gap:10px;align-items:center;margin:0 8px 18px!important;min-height:66px}
.sidebar .global-brand-logo{width:58px;height:58px;object-fit:contain;background:#fff;border-radius:10px;display:block}
.sidebar .global-brand-copy{min-width:0}.sidebar .global-brand-copy .brand-main{font-size:15px;line-height:1.02}.sidebar .global-brand-copy>span:last-child{display:block;color:#efb51e;font-size:8px;line-height:1.15;letter-spacing:.13em;font-weight:900;margin-top:5px}
.thermal-logo-4ts{display:block;width:70px;height:70px;object-fit:contain;margin:0 auto 5px;border-radius:9px;background:#fff}.paper-58 .thermal-logo-4ts{width:58px;height:58px}.paper-80 .thermal-logo-4ts{width:72px;height:72px}
.catering-brand-head{display:flex;align-items:center;gap:10px}.catering-brand-head>img{width:68px;height:68px;object-fit:contain;border-radius:10px;background:#fff;flex:0 0 auto}.catering-brand-head h2{margin:0}.r436-pos-brand{text-align:center;margin:0 0 6px}.r436-pos-brand img{width:72px;height:72px;object-fit:contain;border-radius:9px;background:#fff}.public-catering-brand{display:flex;align-items:center;gap:12px}
@media(max-width:820px){.sidebar .ugd-global-brand{grid-template-columns:48px minmax(0,1fr)}.sidebar .global-brand-logo{width:48px;height:48px}}
@media print{.thermal-logo-4ts,.catering-brand-head>img,.r436-pos-brand img{print-color-adjust:exact;-webkit-print-color-adjust:exact}}


/* R4.4F — render stability, login identity, mobile navigation */
.page-login .login-shell{position:relative}
.page-login .login-shell::before{content:"";display:block;width:126px;height:126px;background:#fff url('/assets/brand/4ts-logo-r44f.png') center/contain no-repeat;border-radius:16px;margin:14px auto 4px;box-shadow:0 10px 28px rgba(0,0,0,.08)}
.ugd-mobile-nav-toggle,.ugd-mobile-nav-backdrop{display:none}
@media(max-width:820px){
  .app{display:block!important;min-height:100dvh}
  .sidebar{display:flex!important;position:fixed!important;inset:0 auto 0 0!important;width:min(84vw,310px)!important;height:100dvh!important;z-index:260!important;transform:translateX(-105%);transition:transform .2s ease;box-shadow:18px 0 44px rgba(0,0,0,.24);overflow:auto!important}
  .sidebar.ugd-mobile-open{transform:translateX(0)}
  .sidebar .ugd-global-brand{grid-template-columns:58px minmax(0,1fr)!important}
  .sidebar .global-brand-logo{width:58px!important;height:58px!important}
  .sidebar .global-brand-copy,.sidebar .nav span,.sidebar .sidebar-foot{display:block!important;font-size:inherit!important}
  .sidebar .nav a{justify-content:flex-start!important}
  .ugd-mobile-nav-toggle{display:inline-grid!important;place-items:center;width:40px;height:40px;border:1px solid #dce2e7;background:#fff;border-radius:10px;font-size:20px;font-weight:900;cursor:pointer;flex:0 0 auto}
  .ugd-mobile-nav-backdrop{display:block;position:fixed;inset:0;background:rgba(8,13,18,.52);z-index:250;opacity:0;pointer-events:none;transition:opacity .2s ease}
  .ugd-mobile-nav-backdrop.show{opacity:1;pointer-events:auto}
  .main{width:100%!important;min-width:0!important}
  .topbar{gap:8px!important;padding-left:10px!important;padding-right:10px!important}
  .content{padding-left:10px!important;padding-right:10px!important}
}
@media(max-width:480px){.page-login .login-shell::before{width:108px;height:108px;margin-top:8px}.page-login .login-shell{padding-left:12px!important;padding-right:12px!important}}


/* R4.4G — Catering A4/PDF page authority */
.catering-invoice-doc{page:cateringA4}
@page cateringA4{size:A4 portrait;margin:12mm 14mm 14mm}
@media print{
  .page-catering .catering-invoice-doc{
    page:cateringA4!important;
    box-sizing:border-box!important;
    width:100%!important;
    max-width:none!important;
    margin:0!important;
    padding:4mm 3mm 5mm!important;
    border:0!important;
    border-radius:0!important;
    box-shadow:none!important;
  }
  .page-catering .catering-invoice-doc>header{margin:0!important;padding-top:0!important;padding-bottom:5mm!important}
  .page-catering .catering-billto{margin:6mm 0 5mm!important}
  .page-catering .catering-doc-table th,.page-catering .catering-doc-table td{padding:3mm 2mm!important}
  .page-catering .catering-doc-table tr{break-inside:avoid-page;page-break-inside:avoid}
  .page-catering .catering-doc-totals{margin-top:7mm!important;break-inside:avoid-page;page-break-inside:avoid}
  .page-catering .catering-invoice-doc footer{margin-top:10mm!important;padding-top:4mm!important}
  .page-catering .dsantos-tech-credit{display:none!important}
}


/* ======================================================================
   R4.4H — CANONICAL PRESENTATION AUTHORITY
   This block intentionally overrides legacy mobile bottom-nav rules.
   ====================================================================== */
.login-4ts-logo{display:block;width:118px;height:118px;object-fit:contain;background:#fff;border-radius:16px;padding:4px;margin:0 0 18px;box-shadow:0 12px 30px rgba(0,0,0,.12)}
.page-login .login-shell::before{display:none!important;content:none!important}

@media (max-width:820px){
  html,body{max-width:100%;overflow-x:hidden}
  body:not(.page-login) .app{display:block!important;min-height:100dvh!important}
  body:not(.page-login) .main{width:100%!important;min-width:0!important;margin:0!important;padding:0!important}

  /* One mobile navigation model only: left slide-out drawer. */
  body:not(.page-login) .sidebar{
    display:flex!important;flex-direction:column!important;
    position:fixed!important;left:0!important;top:0!important;right:auto!important;bottom:0!important;
    width:min(86vw,320px)!important;height:100dvh!important;min-height:100dvh!important;
    padding:12px 10px 14px!important;border:0!important;border-right:1px solid #2a3037!important;
    background:#15191f!important;z-index:260!important;overflow:hidden!important;
    transform:translateX(-105%)!important;transition:transform .20s ease!important;
    box-shadow:18px 0 44px rgba(0,0,0,.28)!important;
  }
  body:not(.page-login) .sidebar.ugd-mobile-open{transform:translateX(0)!important}
  body:not(.page-login) .sidebar:after{display:none!important;content:none!important}

  body:not(.page-login) .sidebar .brand.ugd-global-brand{
    display:grid!important;grid-template-columns:64px minmax(0,1fr)!important;align-items:center!important;gap:10px!important;
    margin:0 0 10px!important;padding:4px 4px 12px!important;border-bottom:1px solid #2b3138!important;
    font-size:inherit!important;line-height:1.1!important;
  }
  body:not(.page-login) .sidebar .global-brand-logo{display:block!important;width:64px!important;height:64px!important;object-fit:contain!important;background:#fff!important;border-radius:11px!important}
  body:not(.page-login) .sidebar .global-brand-copy{display:block!important;min-width:0!important}
  body:not(.page-login) .sidebar .brand .brand-main{display:block!important;font-size:17px!important;line-height:1!important;color:#fff!important;max-width:none!important}
  body:not(.page-login) .sidebar .brand .brand-main:before,
  body:not(.page-login) .sidebar .brand .brand-main:after{content:none!important;display:none!important}
  body:not(.page-login) .sidebar .brand>div>span:last-child{display:block!important;color:#f0b91f!important;font-size:8px!important;letter-spacing:.12em!important;margin-top:5px!important}

  body:not(.page-login) .sidebar .nav{
    display:flex!important;flex:1 1 auto!important;flex-direction:column!important;
    grid-auto-flow:unset!important;grid-auto-columns:unset!important;grid-template-columns:none!important;
    gap:4px!important;width:100%!important;padding:2px 0 12px!important;margin:0!important;
    overflow-x:hidden!important;overflow-y:auto!important;overscroll-behavior:contain!important;
  }
  body:not(.page-login) .sidebar .nav a{
    display:flex!important;align-items:center!important;justify-content:flex-start!important;
    width:100%!important;min-width:0!important;min-height:44px!important;height:auto!important;
    padding:10px 11px!important;margin:0!important;gap:8px!important;border-radius:9px!important;
    flex:0 0 auto!important;white-space:normal!important;font-size:12px!important;
    background:transparent!important;color:#eef1f4!important;box-sizing:border-box!important;
  }
  body:not(.page-login) .sidebar .nav a b{display:block!important;width:22px!important;min-width:22px!important;font-size:15px!important;text-align:center!important;color:#fff!important}
  body:not(.page-login) .sidebar .nav a span{display:block!important;min-width:0!important;font-size:12px!important;line-height:1.25!important;white-space:normal!important;color:inherit!important}
  body:not(.page-login) .sidebar .nav a.active{background:#df2a25!important;color:#fff!important;box-shadow:inset 3px 0 0 #f1b91c!important}
  body:not(.page-login) .sidebar .nav a.active b{color:#fff!important}
  body:not(.page-login) .sidebar .sidebar-food{display:none!important}
  body:not(.page-login) .sidebar .sidebar-foot{display:block!important;position:static!important;left:auto!important;right:auto!important;bottom:auto!important;margin-top:auto!important;padding:11px 5px 0!important;border-top:1px solid #2b3138!important;color:#cfd5db!important;font-size:9px!important;line-height:1.45!important}

  .ugd-mobile-nav-toggle{display:inline-grid!important;place-items:center!important;flex:0 0 40px!important;width:40px!important;height:40px!important;padding:0!important;border:1px solid #dce2e7!important;border-radius:10px!important;background:#fff!important;color:#15191f!important;font-size:20px!important;font-weight:900!important}
  .ugd-mobile-nav-backdrop{display:block!important;position:fixed!important;inset:0!important;z-index:250!important;background:rgba(7,11,16,.56)!important;opacity:0!important;pointer-events:none!important;transition:opacity .20s ease!important}
  .ugd-mobile-nav-backdrop.show{opacity:1!important;pointer-events:auto!important}

  body:not(.page-login) .topbar{position:sticky!important;top:6px!important;height:58px!important;min-height:58px!important;padding:0 10px!important;gap:8px!important;z-index:120!important;background:#fff!important}
  body:not(.page-login) .topbar-title{min-width:0!important;flex:1 1 auto!important}
  body:not(.page-login) .topbar h1{font-size:17px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
  body:not(.page-login) .topbar-title small{display:none!important}
  body:not(.page-login) .userchip{gap:6px!important;flex:0 0 auto!important}
  body:not(.page-login) .userchip>div:nth-child(2){display:none!important}
  body:not(.page-login) .userchip .avatar{width:34px!important;height:34px!important}
  body:not(.page-login) .userchip .btn{min-height:34px!important;padding:7px 9px!important}
  body:not(.page-login) .content{padding:10px!important;max-width:none!important;width:100%!important;box-sizing:border-box!important}
}

@media(max-width:480px){
  .login-4ts-logo{width:94px;height:94px;margin:0 auto 14px}
  .page-login .login-hero{text-align:center!important}
  body:not(.page-login) .sidebar{width:min(89vw,315px)!important}
}

/* Documents stay presentation-isolated from application navigation. */
@media print{
  .ugd-mobile-nav-toggle,.ugd-mobile-nav-backdrop{display:none!important}
}

/* UGD_R46_MENU_IMAGE_AUTHORITY_BESPOKE_BEGIN */
/*
  Single menu-image authority for normal ordering + Rush POS.
  Same complete image at every screen size. No crop. No stretch. No distortion.
*/
.menu-photo,
.page-order .menu-photo,
.r37-workspace .menu-photo,
.rush-grid .menu-photo,
.rush-grid[data-mobile-pane="menu"] .menu-photo{
  width:100%!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  aspect-ratio:16 / 9!important;
  box-sizing:border-box!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  overflow:hidden!important;
  padding:0!important;
  border:1px solid rgba(20,24,30,.08)!important;
  border-radius:14px!important;
  background:linear-gradient(145deg,#fbf8f2,#eee6da)!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.65)!important;
}
.menu-photo img,
.page-order .menu-photo img,
.r37-workspace .menu-photo img,
.rush-grid .menu-photo img,
.rush-grid[data-mobile-pane="menu"] .menu-photo img{
  display:block!important;
  width:100%!important;
  height:100%!important;
  min-width:0!important;
  min-height:0!important;
  max-width:100%!important;
  max-height:100%!important;
  object-fit:contain!important;
  object-position:center center!important;
  transform:none!important;
  margin:0!important;
  padding:0!important;
}
.menu-card,
.page-order .menu-card,
.rush-grid .menu-card,
.rush-grid[data-mobile-pane="menu"] .menu-card{
  height:auto!important;
  min-height:0!important;
  align-self:start!important;
  border-radius:15px!important;
  border-color:#e1e4e7!important;
  background:#fff!important;
  box-shadow:0 5px 16px rgba(20,24,30,.055)!important;
  transition:border-color .15s ease,box-shadow .15s ease,transform .15s ease!important;
}
.menu-card:hover,
.rush-grid .menu-card:hover{
  border-color:#e4b52e!important;
  box-shadow:0 10px 25px rgba(20,24,30,.09)!important;
}
.menu-card h4,.menu-card strong{line-height:1.22!important;}
.menu-card .price{font-weight:900!important;}
.grid.menu,.menu-grid{align-items:start!important;align-content:start!important;}
@media(max-width:650px){
  .menu-photo,
  .page-order .menu-photo,
  .r37-workspace .menu-photo,
  .rush-grid .menu-photo,
  .rush-grid[data-mobile-pane="menu"] .menu-photo{
    height:auto!important;
    aspect-ratio:16 / 9!important;
    border-radius:11px!important;
  }
  .menu-card,
  .page-order .menu-card,
  .rush-grid .menu-card,
  .rush-grid[data-mobile-pane="menu"] .menu-card{
    height:auto!important;
    min-height:0!important;
    border-radius:12px!important;
  }
}
/* UGD_R46_MENU_IMAGE_AUTHORITY_BESPOKE_END */

/* UGD_R46A_FULL_IMAGE_CARD_FIX */
/* Full-image cards: no crop, no distortion, image first, text below */

.grid.menu,
.menu-grid{
  align-items:start!important;
}

.grid.menu{
  grid-template-columns:repeat(auto-fill,minmax(220px,1fr))!important;
  gap:12px!important;
}

.menu-grid{
  grid-template-columns:repeat(auto-fill,minmax(210px,1fr))!important;
  gap:12px!important;
}

.card.menu-card,
.menu-card,
.rush-grid[data-mobile-pane="menu"] .menu-card{
  min-height:auto!important;
  height:auto!important;
  padding:10px!important;
  display:block!important;
  overflow:hidden!important;
  border-radius:14px!important;
}

.card.menu-card .add,
.menu-card .add{
  display:flex!important;
  flex-direction:column!important;
  align-items:stretch!important;
  justify-content:flex-start!important;
  gap:0!important;
  width:100%!important;
  min-height:0!important;
  background:transparent!important;
  border:0!important;
  padding:0!important;
  text-align:left!important;
}

.menu-photo,
.grid.menu .menu-photo,
.menu-grid .menu-photo,
.rush-grid[data-mobile-pane="menu"] .menu-photo{
  width:100%!important;
  height:auto!important;
  min-height:0!important;
  aspect-ratio:16 / 9!important;
  border-radius:12px!important;
  overflow:hidden!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  background:#f3ede4!important;
  margin:0 0 10px 0!important;
}

.menu-photo img,
.grid.menu .menu-photo img,
.menu-grid .menu-photo img,
.rush-grid[data-mobile-pane="menu"] .menu-photo img{
  display:block!important;
  width:100%!important;
  height:100%!important;
  max-width:100%!important;
  max-height:100%!important;
  object-fit:contain!important;
  object-position:center center!important;
  background:#f3ede4!important;
}

.menu-card h4,
.menu-card strong{
  margin:0 0 4px 0!important;
  line-height:1.2!important;
}

.menu-card .price{
  margin-top:6px!important;
}

.menu-card .cat,
.menu-card small,
.menu-card .muted{
  display:block!important;
}

@media (max-width:1100px){
  .grid.menu{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .menu-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}

@media (max-width:650px){
  .card.menu-card,
  .menu-card,
  .rush-grid[data-mobile-pane="menu"] .menu-card{
    padding:8px!important;
  }

  .grid.menu{gap:8px!important}
  .menu-grid{gap:8px!important}

  .grid.menu{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .menu-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}

  .menu-photo,
  .grid.menu .menu-photo,
  .menu-grid .menu-photo,
  .rush-grid[data-mobile-pane="menu"] .menu-photo{
    aspect-ratio:16 / 9!important;
    height:auto!important;
  }
}
