:root{
  --bg:#11161D; --panel:#1A222C; --panel2:#222C38; --line:#2C3845;
  --ink:#EAF0F6; --muted:#8A98A8; --red:#E0584A; --reddark:#C0392B;
  --green:#27AE60; --green2:#2ECC71; --amber:#E5A53B; --blue:#4A90D9;
  --queue:#4A90D9; --prep:#E5A53B; --load:#27AE60;
}
*{box-sizing:border-box; -webkit-tap-highlight-color:transparent;}
html,body{margin:0;height:100%;}
body{font-family:'Inter',system-ui,sans-serif; background:var(--bg); color:var(--ink); overflow:hidden;}
.kds{height:100vh; display:flex; flex-direction:column;}

/* top bar */
.kds-top{display:flex; align-items:center; justify-content:space-between; padding:14px 24px; background:var(--panel); border-bottom:1px solid var(--line); flex:0 0 auto;}
.kds-brand{font-family:'Fraunces',serif; font-weight:700; font-size:26px; display:flex; align-items:baseline; gap:12px;}
.kds-brand .r{color:var(--red);}
.kds-sub{font-family:'Inter',sans-serif; font-size:12px; font-weight:600; letter-spacing:.2em; text-transform:uppercase; color:var(--muted);}
.kds-meta{display:flex; align-items:center; gap:22px;}
.locker-gauge{display:flex; align-items:center; gap:9px; background:var(--panel2); padding:8px 16px; border-radius:12px; font-size:16px;}
.locker-gauge svg{width:20px;height:20px;color:var(--muted);}
.locker-gauge b{font-size:20px; color:var(--green2); font-weight:800;}
.lang-switch{display:flex; gap:2px; background:var(--panel2); border-radius:10px; padding:3px;}
.lang-btn{border:none; background:transparent; color:var(--muted); font-size:13px; font-weight:700; padding:7px 13px; border-radius:8px; cursor:pointer;}
.lang-btn.active{background:var(--blue); color:#fff;}
.ws{display:flex; align-items:center; gap:7px; font-size:12px; color:var(--muted);}
.ws .dot{width:9px;height:9px;border-radius:50%;background:#566; transition:background .3s;}
.ws .dot.on{background:var(--green2); box-shadow:0 0 8px var(--green2);}

/* help banner */
.help-banner{display:none; align-items:center; gap:14px; padding:14px 24px; background:linear-gradient(90deg,var(--reddark),var(--red)); color:#fff; font-size:17px; font-weight:700; flex:0 0 auto; animation:helpIn .3s ease;}
.help-banner.show{display:flex;}
.help-banner svg{width:24px;height:24px; animation:ring .6s ease infinite;}
@keyframes ring{0%,100%{transform:rotate(0);} 25%{transform:rotate(-14deg);} 75%{transform:rotate(14deg);}}
@keyframes helpIn{from{transform:translateY(-100%);} to{transform:translateY(0);}}
.help-dismiss{margin-left:auto; background:rgba(255,255,255,.2); border:none; color:#fff; width:34px;height:34px;border-radius:50%; font-size:22px; cursor:pointer; line-height:1;}

/* board */
.board{flex:1; display:grid; grid-template-columns:repeat(3,1fr); gap:18px; padding:18px 24px; min-height:0;}
.col{display:flex; flex-direction:column; background:var(--panel); border-radius:16px; min-height:0; border:1px solid var(--line);}
.col-head{display:flex; align-items:center; justify-content:space-between; padding:15px 18px; border-bottom:1px solid var(--line);}
.col-title{font-size:14px; font-weight:700; letter-spacing:.12em; text-transform:uppercase;}
.col-count{min-width:28px; height:28px; padding:0 8px; border-radius:14px; display:flex; align-items:center; justify-content:center; font-size:15px; font-weight:800; background:var(--panel2);}
.col-queue .col-title{color:var(--queue);} .col-queue .col-count{color:var(--queue);}
.col-prep .col-title{color:var(--prep);} .col-prep .col-count{color:var(--prep);}
.col-load .col-title{color:var(--load);} .col-load .col-count{color:var(--load);}
.col-body{flex:1; overflow-y:auto; padding:14px; display:flex; flex-direction:column; gap:14px;}
.col-body::-webkit-scrollbar{width:8px;} .col-body::-webkit-scrollbar-thumb{background:var(--line); border-radius:4px;}

/* order card */
.ocard{background:var(--panel2); border-radius:14px; padding:16px; border-left:5px solid var(--line); animation:cardIn .35s cubic-bezier(.2,.8,.2,1);}
@keyframes cardIn{from{opacity:0; transform:translateY(-10px) scale(.97);} to{opacity:1; transform:none;}}
.ocard.q{border-left-color:var(--queue);}
.ocard.p{border-left-color:var(--prep);}
.ocard.l{border-left-color:var(--load);}
.ocard.waiting{border-left-color:var(--amber); background:#2A2418;}
.ocard-top{display:flex; align-items:baseline; justify-content:space-between; margin-bottom:10px;}
.ocard-num{font-family:'Fraunces',serif; font-weight:700; font-size:30px; line-height:1;}
.ocard-time{font-size:12px; color:var(--muted); font-variant-numeric:tabular-nums;}
.ocard-items{margin:0 0 14px;}
.oitem{padding:7px 0; border-bottom:1px solid var(--line);}
.oitem:last-child{border-bottom:none;}
.oitem .nm{font-size:16px; font-weight:700;}
.oitem .dt{font-size:13px; color:var(--muted); margin-top:2px; line-height:1.4;}
.ocard-act{display:flex; gap:10px;}
.kbtn{flex:1; border:none; border-radius:11px; padding:15px; font-size:16px; font-weight:700; cursor:pointer; color:#fff; transition:transform .1s, filter .1s;}
.kbtn:active{transform:scale(.97);}
.kbtn.start{background:var(--queue);}
.kbtn.ready{background:var(--prep); color:#1A222C;}
.kbtn.collect{background:var(--load);}
.kbtn.void{flex:0 0 auto; width:50px; background:transparent; border:1.5px solid var(--line); color:var(--muted); font-size:20px; padding:0;}
.kbtn:hover{filter:brightness(1.08);}

/* locker reveal (chef only) */
.locker-reveal{display:flex; align-items:center; gap:14px; background:#10241A; border:1.5px solid var(--load); border-radius:12px; padding:12px 16px; margin-bottom:14px;}
.locker-reveal .lr-label{font-size:12px; letter-spacing:.1em; text-transform:uppercase; color:var(--muted);}
.locker-reveal .lr-num{font-family:'Fraunces',serif; font-weight:700; font-size:38px; line-height:1; color:var(--green2);}
.locker-reveal .lr-eye{margin-left:auto; font-size:11px; color:var(--muted); display:flex; align-items:center; gap:5px; max-width:110px; text-align:right;}
.locker-reveal .lr-eye svg{width:15px;height:15px; flex:0 0 auto;}

.waiting-badge{display:flex; align-items:center; gap:10px; background:#332A14; border:1.5px solid var(--amber); border-radius:12px; padding:12px 16px; margin-bottom:14px; color:var(--amber); font-weight:700; font-size:15px;}
.waiting-badge svg{width:20px;height:20px; flex:0 0 auto;}

.empty-state{position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; pointer-events:none; opacity:0; transition:opacity .4s;}
.empty-state.show{opacity:1;}
.empty-logo{font-family:'Fraunces',serif; font-weight:700; font-size:48px; opacity:.25;}
.empty-logo .r{color:var(--red);}
.empty-state p{color:var(--muted); font-size:16px; margin-top:12px; max-width:380px; text-align:center;}

/* PIN lookup button + panel */
.pinlook-btn{display:flex; align-items:center; gap:7px; background:var(--panel2); border:1px solid var(--line); color:var(--ink); font-size:13px; font-weight:700; padding:8px 14px; border-radius:10px; cursor:pointer;}
.pinlook-btn svg{width:16px;height:16px; color:var(--amber);}
.pinlook-btn:active{transform:scale(.96);}
.pin-backdrop{position:fixed; inset:0; background:rgba(0,0,0,.5); opacity:0; pointer-events:none; transition:.25s; z-index:40;}
.pin-backdrop.open{opacity:1; pointer-events:auto;}
.pin-panel{position:fixed; top:0; right:0; width:400px; max-width:90vw; height:100vh; background:#141A22; border-left:1px solid var(--line); transform:translateX(100%); transition:transform .3s ease; z-index:41; display:flex; flex-direction:column;}
.pin-panel.open{transform:translateX(0);}
.pp-head{display:flex; align-items:center; justify-content:space-between; padding:22px 24px 8px; font-size:18px; font-weight:800;}
.pp-head button{background:none; border:none; color:var(--muted); font-size:28px; cursor:pointer; line-height:1;}
.pp-note{padding:0 24px 16px; margin:0; font-size:13px; color:var(--muted); border-bottom:1px solid var(--line);}
.pp-list{flex:1; overflow-y:auto; padding:16px 24px;}
.pp-row{display:flex; align-items:center; justify-content:space-between; padding:16px; margin-bottom:12px; background:var(--panel2); border-radius:12px; border-left:4px solid var(--load);}
.pp-row .pp-locker{font-family:'Fraunces',serif; font-weight:700; font-size:26px; color:var(--green2);}
.pp-row .pp-order{font-size:14px; color:var(--muted); margin-top:2px;}
.pp-row .pp-pin{font-family:'Fraunces',serif; font-weight:700; font-size:30px; letter-spacing:6px; color:var(--ink);}
.pp-empty{text-align:center; color:var(--muted); padding:40px 0; font-size:15px;}
