.kds-body{background:#f2f7fa;color:#17384b;padding:0;min-height:100dvh}
.kds-header{background:white;padding:20px 24px;margin:0;border-bottom:2px solid #a6c5d7;gap:16px;flex-wrap:wrap}
.kds-title{color:#21495d;font-size:1.35rem}.kds-clock{color:#21495d;font-size:1.2rem}
.kds-refresh{background:#f4f9fc;border:1px solid #b6cfde;border-radius:10px;padding:10px 16px;color:#21495d;box-shadow:0 3px #c5d8e1;cursor:pointer;font-weight:700}
.kds-setor-tabs{padding:16px 24px;background:#fff;border-bottom:1px solid #c2d6e2;gap:10px;margin:0;align-items:center}
.kds-sector-label{font-size:11px;font-weight:800;letter-spacing:.07em;margin-right:8px;color:#507086}
.kds-tab{border:1px solid #bdd3e1;border-radius:11px;background:#f7fbfd;color:#21495d;box-shadow:0 3px #c5d8e1;font-weight:750;height:44px}
.kds-tab.active{background:#ff8014;color:#fff;border-color:#ed730c;box-shadow:0 3px #c7630d}
.kds-grid{padding:20px 24px;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:16px;align-items:start}
.kds-card{background:#fff;border:1px solid #b9d0df;border-top:4px solid #4b95b2;border-radius:15px;padding:16px;box-shadow:0 4px 0 #d2e1e9,0 8px 20px #294d6010;min-width:0}
.kds-card.urgente{border-color:#e6b7a7;border-top-color:#d16a46}.kds-card-head{gap:10px;flex-wrap:wrap;margin-bottom:10px}
.kds-num{color:#21495d;font-size:1.22rem;overflow-wrap:anywhere}.kds-timer{color:#576e7d;background:#eef4f8;border-radius:7px;padding:5px 8px;white-space:nowrap}
.urgente .kds-timer{background:#fff0e9;color:#ad4924}.kds-tipo{display:block;background:#edf5fa;color:#315970;padding:8px 10px;font-size:.8rem;overflow-wrap:anywhere}
.kds-datahora{margin:10px 0;color:#677d8b;font-family:inherit;font-size:.75rem}
.kds-item{border-bottom:1px solid #dce7ed;padding:12px 0;gap:12px;color:#183a4f;align-items:flex-start}
.kds-item strong{font-size:1rem;line-height:1.4;overflow-wrap:anywhere}.kds-item-qtd{background:#eaf5fb;color:#1d6687;padding:4px 9px;border:1px solid #c4dfec;border-radius:8px;font-size:1rem}
.kds-item-obs{color:#985217;background:#fff6e8;padding:6px 8px;margin-top:6px;border-radius:6px;font-size:.8rem;overflow-wrap:anywhere}
.kds-item-state{display:block;font-size:.7rem;color:#657d8b;margin-top:3px}.kds-posicao-head{background:#fff0df;color:#a2530f;margin-top:12px;border-radius:6px;padding:5px 9px}
.kds-actions{gap:9px;margin-top:16px}.kds-btn{height:44px;font-size:.85rem}.kds-btn.preparar{background:#edf6fc;color:#246485;border:1px solid #b8d4e4;box-shadow:0 3px #c2d8e3}.kds-btn.pronto{background:#169e63;color:white;box-shadow:0 3px #117947}.kds-btn:disabled{opacity:.55;cursor:default}
.kds-empty{grid-column:1/-1;text-align:center;padding:64px 20px;color:#557285}.kds-empty strong{font-size:1.2rem;color:#21495d}.kds-empty p{margin-top:10px}
.kds-body button:focus-visible{outline:3px solid #278ac0;outline-offset:3px}
@media(max-width:600px){.kds-header{padding:16px}.kds-setor-tabs{padding:12px 16px}.kds-sector-label{width:100%}.kds-grid{padding:16px;grid-template-columns:1fr}}
.kf-item{padding:16px 0;border-bottom:1px solid #d7e6ef}.kf-item:last-child{border-bottom:0}.kf-item-head{display:flex;align-items:center;justify-content:space-between;gap:10px}.kf-item-head strong{font-size:16px;line-height:1.4}.kf-tags{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0}.kf-tags span{font-size:10px;font-weight:750;color:#3c708a;background:#edf6fa;padding:4px 7px;border-radius:5px}.kf-tags .kf-entry{background:#fff1de;color:#ad6414}.kf-time{font-size:11px;color:#6d8594;margin:10px 0}.kf-time.late{color:#b35226;font-weight:750}.kf-item .kds-actions{flex-wrap:wrap;margin-top:8px}.kf-item .kds-btn{min-width:105px;height:auto;min-height:42px;padding:8px;font-size:12px}.kf-standby{grid-column:1/-1;background:#f8fafc;border:1px dashed #a8c3d6;padding:16px 20px;border-radius:12px;color:#637f90}.kf-standby summary{font-weight:750;font-size:14px;cursor:pointer}.kf-standby p{font-size:12px;margin:10px 0}.kf-held{display:flex;justify-content:space-between;gap:12px;padding:10px 0;border-top:1px solid #e0e9ef;font-size:12px}.kf-held strong{font-size:11px}

/* Compact connected-screen header */
.kds-header{display:flex;align-items:center;justify-content:space-between;padding:16px 24px;gap:20px}
.kds-identity{display:flex;align-items:center;gap:14px;min-width:0}.kds-title{font-size:21px;font-weight:800}#kdsSubtitle{font-size:12px;color:#607e90;margin-top:5px}
.kds-menu-wrap{position:relative;flex-shrink:0}.kds-menu-button{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:4px;width:46px;height:46px;border-radius:50%;border:1px solid #aecfdf;background:#f1f9fd;box-shadow:0 3px #c4dbe6;cursor:pointer}.kds-menu-button span{width:18px;height:2px;background:#24617e;border-radius:2px}.kds-menu-button[aria-expanded=true]{background:#fff0e1;border-color:#ff8619}
.kds-menu{position:absolute;top:58px;left:0;width:270px;max-width:calc(100vw - 40px);max-height:70vh;overflow:auto;z-index:50;padding:16px;border:1px solid #b9d2df;border-radius:16px;background:#fff;box-shadow:0 12px 32px #24455830}.kds-menu[hidden]{display:none!important}.kds-menu>strong{display:block;font-size:13px;margin-bottom:12px}.kds-menu #setorTabs{display:grid;gap:9px;margin-bottom:16px}.kds-menu .kds-tab{width:100%;margin:0;text-align:left;padding:10px 14px}.kds-menu .kds-refresh{width:100%}
.kds-metrics{display:flex;gap:10px;min-width:0}.kds-metric{padding:10px 14px;border:1px solid #c6dce8;border-radius:12px;background:#f1f8fc;min-width:155px}.kds-metric span{display:block;font-size:10px;color:#527386;white-space:nowrap}.kds-metric strong{display:block;font-size:17px;margin-top:5px;font-variant-numeric:tabular-nums;color:#245a76}.kds-metric.release{background:#f0faf6;border-color:#b9dfcf}.kds-metric.release strong{color:#197858}.kds-metric.is-late{background:#fff0e8;border-color:#e4b69d}.kds-metric.is-late strong{color:#b34d21}.kds-clock{font-size:17px;white-space:nowrap;font-variant-numeric:tabular-nums}
@media(max-width:1150px){.kds-header{gap:14px}.kds-metrics{order:3;width:100%;overflow-x:auto;padding-bottom:3px}.kds-metric{flex:1}.kds-clock{margin-left:auto}}
@media(max-width:600px){.kds-header{padding:14px}.kds-title{font-size:18px}.kds-metric{min-width:160px}.kds-clock{font-size:14px}.kds-identity{flex:1}.kds-metrics{gap:8px}}

/* Compact cards: each next order uses the available height in its column. */
.kds-grid{grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:12px;padding:16px 20px;align-items:start}
.kds-card{padding:10px 12px;border-radius:12px;border-top-width:3px;box-shadow:0 3px 0 #d2e1e9,0 5px 12px #294d600b}
.kds-card-head{margin-bottom:6px;gap:6px}.kds-num{font-size:17px}.kds-timer{font-size:11px;padding:3px 6px}.kds-tipo{font-size:12px;padding:5px 8px;line-height:1.25}.kds-datahora{font-size:10px;margin:5px 0}
.kds-item{padding:7px 0;gap:8px}.kds-item strong{font-size:14px;line-height:1.25}.kds-item-qtd{font-size:13px;padding:3px 6px}.kds-item-state{font-size:10px;margin-top:2px}.kds-item-obs{font-size:11px;padding:4px 6px}.kds-posicao-head{font-size:10px;margin-top:6px;padding:3px 6px}
.kds-actions{margin-top:9px;gap:8px}.kds-btn{height:36px;min-height:36px;font-size:12px;padding:6px 8px}
.kf-item{padding:8px 0}.kf-item-head strong{font-size:14px;line-height:1.25}.kf-tags{margin:5px 0;gap:4px}.kf-tags span{padding:3px 5px}.kf-time{margin:5px 0;font-size:11px}.kf-item .kds-actions{margin-top:6px}.kf-item .kds-btn{min-height:36px;min-width:95px;font-size:11px;padding:6px}
@media(max-width:600px){.kds-grid{grid-template-columns:1fr;padding:12px}}

/* Orders read top to bottom, with compact fixed-width cards. */
.kds-grid{display:flex;flex-direction:column;align-items:flex-start;gap:12px}
.kds-grid>.kds-card{width:300px;max-width:100%;box-sizing:border-box;flex:none}
.kds-grid>.kds-empty,.kds-grid>.kf-standby{width:100%;box-sizing:border-box}

/* Fill each column vertically before moving to the right. */
.kds-grid{display:block;position:relative;overflow:auto;box-sizing:border-box;width:100%}
.kds-grid>.kds-card,.kds-grid>.kf-standby{position:absolute;width:300px;max-width:calc(100% - 40px);box-sizing:border-box;margin:0}
.kds-grid>.kds-card{overflow:auto}.kds-grid>.kds-empty{position:static}
.kds-body{overflow:hidden}

/* Status follows each product's configured preparation deadline. */
.kds-title{display:inline-flex;align-items:center;gap:9px;background:#fff0de;color:#b64c00;border:1px solid #ffc58e;border-radius:10px;padding:7px 12px;box-shadow:0 3px #efd1b3;letter-spacing:.02em;text-transform:uppercase;font-size:20px}
.kds-title::before{content:'';width:9px;height:9px;background:#f57812;border-radius:50%;box-shadow:0 0 0 4px #ffe0ba}
.kds-card[data-signal="0"]{border-color:#b9d0df;border-top-color:#7e9eb0;background:#fff}
.kds-card[data-signal="1"]{border-color:#8aceab;border-top-color:#17965a;background:#f0fbf4;box-shadow:0 3px #bcdcc9}
.kds-card[data-signal="2"]{border-color:#efba65;border-top-color:#e49713;background:#fff8e8;box-shadow:0 3px #ead2a5}
.kds-card[data-signal="3"]{border-color:#ea9393;border-top-color:#d53636;background:#fff0f0;box-shadow:0 3px #eabbbb}
.kds-signal{font-size:10px;font-weight:750;margin-top:5px;color:#607c8e}.kds-item[data-kds-item]{flex-wrap:wrap}.kds-item>.kds-signal{flex-basis:100%;margin-top:0}
[data-signal="1"]>.kds-signal{color:#137440}[data-signal="2"]>.kds-signal{color:#985900}[data-signal="3"]>.kds-signal{color:#bd2525}
.kf-item[data-signal="3"]{border-left:3px solid #d53636;padding-left:8px}.kf-item[data-signal="2"]{border-left:3px solid #e49713;padding-left:8px}
.kds-item[data-kds-item] .kds-item-state{display:none}

/* One aligned desktop toolbar. */
.kds-header{flex-wrap:nowrap;gap:14px;padding:14px 20px}
.kds-identity{gap:12px;flex:1;min-width:0}.kds-heading-inline{display:flex;align-items:center;gap:14px;min-width:0}
.kds-title{white-space:nowrap;flex-shrink:0;font-size:18px;height:44px;box-sizing:border-box;padding:7px 11px}
#kdsSubtitle{margin:0;font-size:11px;line-height:1.35;min-width:0}
.kds-menu-button{width:44px;height:44px}
.kds-metrics{order:0;width:auto;flex:none;overflow:visible;padding:0;gap:8px}
.kds-metric{min-width:0;padding:7px 10px}.kds-metric span{font-size:9px}.kds-metric strong{font-size:15px;margin-top:3px}.kds-clock{margin-left:0;font-size:15px}
@media(max-width:1000px){.kds-header{flex-wrap:wrap}.kds-identity{flex-basis:calc(100% - 110px)}.kds-metrics{order:3;width:100%;overflow-x:auto;padding-bottom:3px}.kds-metric{flex:1;min-width:150px}.kds-clock{margin-left:auto}}
@media(max-width:600px){.kds-header{padding:12px}.kds-heading-inline{gap:8px}.kds-title{font-size:15px;padding:6px 8px}#kdsSubtitle{font-size:10px}.kds-identity{gap:8px}}

.kds-clear{flex:none;border:1px solid #ccd9e1;border-radius:9px;background:#fff;color:#657d8b;font-size:11px;padding:9px 11px;cursor:pointer}.kds-clear:hover{border-color:#d27362;color:#ab4334;background:#fff5f2}.kds-clear:disabled{opacity:.5}
.kds-card[data-signal="4"]{background:#fff1f1;border-color:#df8a8a;border-top-color:#b62e36}.kds-canceled-label{display:block;color:#b02430;font-size:12px;margin-top:10px}.kds-canceled p{font-size:11px;color:#8d4a50;margin:6px 0}.kds-canceled .kds-btn{width:100%;background:#fff;border:1px solid #d8848a;color:#a72530}.kds-canceled .kf-item-head strong{text-decoration:line-through}

.kds-canceled>.kds-signal{display:none}

.kds-canceled .kf-item-head{opacity:.45;filter:grayscale(1)}.kds-canceled-label{margin:10px 0}.kds-canceled .kds-btn{margin-top:4px}.kds-card[data-signal="4"]{background:#f7f3f3;box-shadow:0 3px #ded2d2}
.kds-view-label{display:block;margin:16px 0 8px;font-size:13px;font-weight:700}#kdsExibicao{width:100%;padding:12px;background:white;border:1px solid #bdd3e1;border-radius:10px;color:#24495e;font:inherit}.kds-start-all{display:block;width:100%;margin:12px 0;padding:12px;border:1px solid #148573;border-radius:10px;background:#087c6e;color:white;font-weight:750;cursor:pointer;box-shadow:0 3px 0 #065e55}.kds-start-all:disabled{opacity:.6;cursor:wait}.kds-metrics{flex-wrap:wrap}.kds-metric.is-late{background:#fff0e7;border-color:#eca175}.kds-metric.is-late strong{color:#ad4627}
/* Grouped orders have a single sector action; item details remain visible. */
.kds-card.is-grouped .kf-item .kds-actions{display:none}.kds-card.keyboard-selected{outline:3px solid #ed861e;outline-offset:3px}.kds-start-all small{float:right;font-size:11px;border:1px solid #ffffff66;padding:2px 6px;border-radius:5px}.kds-keyboard-hint{font-size:12px;color:#4c7287;padding:8px 24px;background:#fff;border-bottom:1px solid #dce9ef}.kds-keyboard-hint kbd{font:inherit;font-weight:750;background:#edf4f8;padding:2px 5px;border-radius:4px}.kds-actions [hidden]{display:none!important}
.kds-mode-title{font-size:12px;font-weight:800;color:#46697d;margin:18px 0 10px}.kds-mode-options{display:grid;gap:10px;margin-bottom:16px}.kds-mode-options button{padding:12px 14px;text-align:left;border:1px solid #cadde8;border-radius:12px;background:#f7fafc;color:#325469;box-shadow:0 3px 0 #d1e2ea;white-space:normal}.kds-mode-options button b{display:block;font-size:14px}.kds-mode-options button small{display:block;font-size:11px;margin-top:5px;line-height:1.5;font-weight:400}.kds-mode-options [aria-pressed=true]{background:#edf8f5;border-color:#53a99b;box-shadow:0 3px 0 #6fb8ab;color:#087e70}.kds-mode-options button:focus-visible{outline:3px solid #ff8b18;outline-offset:3px}#kdsExibicao[hidden]{display:none!important}.kds-datahora{font-size:11px;color:#6f8798;margin:8px 0 14px}.kds-card>.kds-start-all{margin:16px 0 0;position:sticky;bottom:0;z-index:1;box-shadow:0 4px 0 #075e58,0 -6px 12px #ffffffb3}.kds-item-done{background:#edf8f2;border-radius:9px;margin:8px 0;padding:12px!important;opacity:.85}.kds-item-done .kf-item-head strong{color:#537a66}.kds-done-label{color:#17834d!important;font-size:12px;margin-top:9px}.kf-item.item-selected{outline:2px solid #138f83;outline-offset:-2px;border-radius:10px;background:#f0faf8;padding:12px 8px}.kds-card:not(.is-grouped) .kf-item{margin:8px 0}.kds-card:not(.is-grouped) .kds-actions{gap:8px}

/* Position headings group products within each dispatch. */
.kds-card .kds-posicao-head{font-size:13px;font-weight:700;line-height:1.4;margin-top:14px;padding:8px 10px;background:#eaf3f8;color:#234c62;border-left:3px solid #258499;border-radius:6px}

.kds-card .kds-tipo.kds-mesa{background:#fff0dc;color:#a64908;border-left:3px solid #f58220;font-weight:800}
.kds-card>.kds-datahora{margin:6px 0 4px}
.kds-card>.kds-datahora+.kds-posicao-head{margin-top:2px}
