body.admin { background: #f6f1ea; }
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-box { background: var(--paper); border-radius: 22px; padding: 32px; width: min(380px, 100%); box-shadow: var(--shadow); text-align: center; }
.login-box .logo-badge { margin: 0 auto 14px; width: 60px; height: 60px; font-size: 24px; }
.login-box h1 { font-size: 26px; }
.login-box p { color: var(--muted); font-size: 14px; }

.adm-top { background: var(--ink); color: #fff; position: sticky; top: 0; z-index: 30; }
.adm-top .wrap { max-width: 1400px; display: flex; align-items: center; gap: 14px; height: 64px; }
.adm-top .logo b { color: #fff; }
.adm-top .logo small { color: #bba; }
.tabs { display: flex; gap: 4px; margin-left: 12px; overflow-x: auto; scrollbar-width: none; }
.tab { background: none; border: 0; color: #cbbcaa; padding: 8px 14px; border-radius: 10px; font-weight: 600; white-space: nowrap; position: relative; }
.tab.on { background: rgba(255,255,255,.12); color: #fff; }
.tab .badge { background: var(--amber); color: var(--ink); border-radius: 10px; font-size: 11px; padding: 1px 7px; margin-left: 4px; }
.switch { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.switch input { display: none; }
.switch i { width: 42px; height: 24px; border-radius: 12px; background: #7a685c; position: relative; transition: background .2s; }
.switch i::after { content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%; background: #fff; top: 3px; left: 3px; transition: transform .2s; }
.switch input:checked + i { background: var(--green); }
.switch input:checked + i::after { transform: translateX(18px); }
.adm-main { max-width: 1400px; margin: 0 auto; padding: 20px 16px 60px; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar h2 { font-size: 26px; margin-right: auto; }

/* Kanban */
.board { display: grid; grid-template-columns: repeat(4, minmax(260px, 1fr)); gap: 14px; align-items: start; overflow-x: auto; padding-bottom: 8px; }
.col { background: #ece4d8; border-radius: 16px; padding: 10px; min-height: 200px; }
.col-head { display: flex; justify-content: space-between; align-items: center; padding: 4px 6px 10px; font-weight: 800; font-size: 14px; text-transform: uppercase; letter-spacing: .4px; }
.col-head span { background: #fff; border-radius: 10px; padding: 0 9px; font-size: 13px; }
.col.novo .col-head { color: var(--red); }
.col.preparo .col-head { color: #b86e00; }
.col.entrega .col-head { color: var(--blue); }
.col.concluido .col-head { color: var(--green); }
.ocard { background: var(--paper); border-radius: 12px; padding: 12px; margin-bottom: 10px; box-shadow: 0 1px 3px rgba(0,0,0,.06); border-left: 4px solid var(--line); font-size: 14px; }
.ocard.novo { border-left-color: var(--red); animation: flash 1.2s ease 3; }
.ocard.preparo { border-left-color: var(--amber); }
.ocard.entrega, .ocard.pronto { border-left-color: var(--blue); }
.ocard.concluido { border-left-color: var(--green); opacity: .8; }
.ocard.cancelado { border-left-color: #999; opacity: .55; }
@keyframes flash { 50% { background: #fff1d6; } }
.ocard-h { display: flex; justify-content: space-between; align-items: baseline; }
.ocard-h b { font-size: 16px; }
.ocard-h small, .meta { color: var(--muted); font-size: 12.5px; }
.ocard ul { margin: 8px 0; padding-left: 0; list-style: none; }
.ocard li { padding: 2px 0; }
.ocard li em { color: var(--muted); font-size: 12.5px; display: block; padding-left: 20px; }
.chip { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: #f1ebe2; margin-right: 4px; }
.chip.ent { background: #e5eefc; color: var(--blue); }
.chip.ret { background: #f3e8ff; color: #7c3aed; }
.ocard .acts { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.ocard .acts .btn { flex: 1; }
.ocard .tot { display: flex; justify-content: space-between; font-weight: 800; border-top: 1px dashed var(--line); padding-top: 8px; margin-top: 4px; }
.icon-btn { border: 1px solid var(--line); background: #fff; border-radius: 999px; width: 34px; height: 34px; display: grid; place-items: center; text-decoration: none; }
.timer { font-weight: 700; }
.timer.late { color: var(--red); }

/* Tabelas */
.panel { background: var(--paper); border-radius: 16px; padding: 18px; box-shadow: 0 1px 3px rgba(0,0,0,.05); margin-bottom: 16px; }
.panel h3 { font-size: 18px; margin-bottom: 10px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; padding: 8px; border-bottom: 1px solid var(--line); }
td { padding: 10px 8px; border-bottom: 1px solid #f3ece2; vertical-align: middle; }
tr.off td { opacity: .5; }
.tbl-wrap { overflow-x: auto; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--paper); border-radius: 16px; padding: 16px 18px; }
.kpi small { color: var(--muted); font-weight: 600; font-size: 13px; }
.kpi b { display: block; font-family: var(--display); font-size: 30px; margin-top: 4px; }
.bars .bar { display: grid; grid-template-columns: 160px 1fr 70px; gap: 10px; align-items: center; font-size: 14px; margin: 8px 0; }
.bars .bar div { background: #f1ebe2; border-radius: 6px; height: 12px; overflow: hidden; }
.bars .bar i { display: block; height: 100%; background: var(--red); border-radius: 6px; }
.cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Comanda para impressão */
#printArea { display: none; }
@media print {
  body > *:not(#printArea) { display: none !important; }
  #printArea { display: block; font-family: 'Courier New', monospace; font-size: 13px; width: 72mm; color: #000; }
  #printArea h2 { font-size: 18px; text-align: center; margin: 0; }
  #printArea hr { border: 0; border-top: 1px dashed #000; }
  #printArea .r { display: flex; justify-content: space-between; }
}

@media (max-width: 900px) {
  .kpis { grid-template-columns: 1fr 1fr; }
  .cols2 { grid-template-columns: 1fr; }
  .adm-top .logo div:last-child { display: none; }
  .bars .bar { grid-template-columns: 110px 1fr 60px; }
}
