/* Panificadora Zin — preview v1 */
:root{
  --bg:#FFF8F1;
  --card:#FFFFFF;
  --ink:#1F2937;
  --muted:#6B7280;
  --line:#E5E7EB;
  --brand:#B45309;
  --brand-2:#D97706;
  --brand-soft:#FED7AA;
  --ok:#16A34A;
  --warn:#D97706;
  --bad:#DC2626;
  --shadow:0 2px 8px rgba(0,0,0,.04),0 4px 16px rgba(0,0,0,.06);
  --radius:14px;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0;background:var(--bg);color:var(--ink);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;-webkit-font-smoothing:antialiased}
body{min-height:100vh;font-size:16px}
button{font:inherit;cursor:pointer}
input,select,textarea{font:inherit;color:inherit}
h2,h3{margin:8px 0 12px}
a{color:var(--brand)}

/* TOPBAR */
.topbar{
  position:sticky;top:0;z-index:10;
  display:flex;align-items:center;justify-content:space-between;
  padding:14px 20px;background:var(--card);
  border-bottom:1px solid var(--line);
  box-shadow:0 1px 3px rgba(0,0,0,.04);
}
.brand{display:flex;align-items:center;gap:12px;flex:1;justify-content:center;min-width:0}
.brand-logo{
  height:32px;
}
@media(min-width:640px){
  .brand-logo{height:44px}
}
.brand-logo img{height:100%;width:auto;display:block;filter:drop-shadow(0 1px 2px rgba(0,0,0,.1))}
.topbar-actions{display:flex;gap:8px;align-items:center}
.icon-btn{
  background:transparent;border:1px solid var(--line);
  width:42px;height:42px;border-radius:12px;
  display:grid;place-items:center;font-size:18px;
}
.cart-btn{
  position:relative;background:var(--brand);color:#fff;
  border:0;height:42px;padding:0 14px;border-radius:12px;
  font-size:18px;font-weight:600;
}
.cart-badge{
  position:absolute;top:-6px;right:-6px;background:#fff;color:var(--brand);
  border:2px solid var(--brand);
  width:22px;height:22px;border-radius:50%;
  display:grid;place-items:center;font-size:12px;font-weight:700;
}

/* VIEWS */
main{padding:16px 20px 80px;max-width:1100px;margin:0 auto}
.view{display:none}
.view.active{display:block}
.back-btn{
  background:transparent;border:0;color:var(--brand);
  font-weight:600;padding:4px 0 12px;
}

/* SEARCH + CATEGORIAS */
.search-row{position:sticky;top:64px;z-index:5;background:var(--bg);padding:8px 0}
.search{
  width:100%;height:44px;padding:0 14px;
  background:var(--card);border:1px solid var(--line);
  border-radius:12px;outline:none;
}
.search:focus{border-color:var(--brand)}
.cat-tabs{
  display:flex;gap:8px;overflow-x:auto;
  padding:6px 0 12px;scrollbar-width:none;
}
.cat-tabs::-webkit-scrollbar{display:none}
.cat-tab{
  flex-shrink:0;height:36px;padding:0 14px;
  background:var(--card);border:1px solid var(--line);
  border-radius:999px;font-size:13px;font-weight:500;
  white-space:nowrap;
}
.cat-tab.active{background:var(--brand);color:#fff;border-color:var(--brand)}

/* GRID DE PRODUTOS */
.grid{
  display:grid;grid-template-columns:repeat(2,1fr);
  gap:14px;
}
@media(min-width:640px){.grid{grid-template-columns:repeat(3,1fr)}}
@media(min-width:900px){.grid{grid-template-columns:repeat(4,1fr)}}
.product{
  background:var(--card);border-radius:var(--radius);
  box-shadow:var(--shadow);overflow:hidden;
  display:flex;flex-direction:column;
  border:1px solid var(--line);
  transition:transform .15s ease;
  min-width:0;
}
.product:active{transform:scale(.98)}
.product img{
  width:100%;aspect-ratio:4/3;object-fit:cover;
  background:#F3F4F6;
}
.product .p-body{
  padding:10px 12px 12px;display:flex;flex-direction:column;flex:1;gap:4px;
  min-width:0;
}
.product .p-name{
  font-size:14px;font-weight:600;line-height:1.25;min-height:2.5em;
  overflow-wrap:anywhere;word-break:break-word;
}
.product .p-desc{
  font-size:12px;color:var(--muted);line-height:1.3;min-height:2.6em;
  overflow-wrap:anywhere;word-break:break-word;
  display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;
}
.product .p-foot{
  display:flex;align-items:center;justify-content:space-between;
  margin-top:6px;gap:8px;
}
.product .p-price{font-weight:700;color:var(--brand);font-size:15px;white-space:nowrap}
.add-btn{
  background:var(--brand);color:#fff;border:0;
  height:34px;width:34px;border-radius:10px;font-size:18px;
  display:grid;place-items:center;
}
.add-btn.qty-mode{width:auto;padding:0 10px;font-weight:700;background:var(--ok)}

/* CARDS / FORM */
.card{
  background:var(--card);border:1px solid var(--line);
  border-radius:var(--radius);padding:18px;margin-bottom:14px;
  box-shadow:var(--shadow);
}
.card h3{font-size:15px;margin-bottom:10px;color:var(--brand);font-weight:700}
label{display:block;font-size:13px;color:var(--muted);margin-bottom:8px}
label input,label select{
  display:block;width:100%;height:42px;margin-top:4px;
  padding:0 12px;border:1px solid var(--line);
  border-radius:10px;background:#fff;outline:none;color:var(--ink);
}
label input:focus,label select:focus{border-color:var(--brand)}
.row{display:flex;gap:10px}
.row>label{flex:1}

/* SELETOR SEGMENTADO */
.seg{display:flex;background:#F3F4F6;border-radius:10px;padding:4px;margin-bottom:10px}
.seg-btn{
  flex:1;background:transparent;border:0;height:38px;
  border-radius:8px;font-weight:500;
}
.seg-btn.active{background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.08)}

/* PAGAMENTO */
.pay-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}
.pay-btn{
  background:var(--card);border:2px solid var(--line);
  height:50px;border-radius:10px;font-weight:500;
}
.pay-btn.active{border-color:var(--brand);background:var(--brand-soft)}

/* RESUMO / TOTAIS */
.checkout-items,.cart-items{display:flex;flex-direction:column;gap:6px;margin-bottom:10px}
.line{
  display:flex;align-items:center;gap:8px;padding:6px 0;
  border-bottom:1px dashed var(--line);
}
.line:last-child{border-bottom:0}
.line .l-name{flex:1;font-size:14px}
.line .l-qty{
  display:flex;align-items:center;gap:4px;
}
.line .l-qty button{
  width:28px;height:28px;border-radius:8px;
  background:#F3F4F6;border:0;font-weight:700;
}
.line .l-price{font-weight:600;color:var(--brand);min-width:72px;text-align:right}
.line .l-rm{background:transparent;border:0;color:var(--bad);font-size:16px;padding:4px}

.totals{margin-top:10px;padding-top:10px;border-top:1px solid var(--line);font-size:14px}
.totals .row-line{display:flex;justify-content:space-between;padding:2px 0}
.totals .row-line.big{font-size:17px;font-weight:700;color:var(--brand);margin-top:6px}

/* BOTÕES */
.primary{
  background:var(--brand);color:#fff;border:0;
  height:46px;padding:0 18px;border-radius:12px;
  font-weight:600;
}
.primary.big{width:100%;height:54px;font-size:16px;margin-top:10px}
.primary:disabled{opacity:.5;cursor:not-allowed}
.ghost{
  background:transparent;color:var(--brand);
  border:1px solid var(--brand);
  height:46px;padding:0 18px;border-radius:12px;font-weight:600;
}

/* DRAWER CARRINHO */
.drawer{
  position:fixed;top:0;right:0;bottom:0;
  width:min(420px,100%);background:var(--card);
  z-index:30;transform:translateX(100%);
  transition:transform .25s ease;
  display:flex;flex-direction:column;
  box-shadow:-4px 0 20px rgba(0,0,0,.12);
}
.drawer.open{transform:translateX(0)}
.drawer-head{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;border-bottom:1px solid var(--line)}
.drawer-body{flex:1;overflow-y:auto;padding:12px 16px}
.drawer-foot{padding:14px 16px;border-top:1px solid var(--line);background:#FAF7F2}
.overlay{
  position:fixed;inset:0;background:rgba(0,0,0,.4);
  opacity:0;pointer-events:none;transition:opacity .2s;z-index:20;
}
.overlay.open{opacity:1;pointer-events:auto}

/* SUCESSO */
.success{text-align:center;padding:24px 8px}
.success-emoji{font-size:64px}
.order-code{
  display:inline-block;margin:8px 0;padding:10px 18px;
  background:var(--brand-soft);color:var(--brand);
  border-radius:12px;font-weight:700;font-size:20px;letter-spacing:2px;
}
.success-actions{display:flex;gap:10px;justify-content:center;margin-top:14px;flex-wrap:wrap}
.muted{color:var(--muted);font-size:13px}

/* AVISO — tela de sucesso (número do sistema ≠ WhatsApp da padaria) */
.success-warning{
  display:flex;gap:12px;align-items:flex-start;
  text-align:left;
  max-width:520px;margin:18px auto 6px;
  padding:16px 18px;
  background:#FEF3C7;
  border:2px solid #F59E0B;
  border-radius:14px;
  box-shadow:0 2px 8px rgba(245,158,11,.18);
}
.sw-icon{
  font-size:28px;line-height:1;flex-shrink:0;
  display:flex;align-items:center;justify-content:center;
  width:44px;height:44px;border-radius:12px;
  background:#FDE68A;color:#92400E;
}
.sw-body{flex:1;min-width:0}
.sw-title{
  font-size:16px;font-weight:800;color:#92400E;
  margin-bottom:6px;line-height:1.25;
  text-transform:uppercase;letter-spacing:.3px;
}
.sw-text{font-size:14px;color:#78350F;line-height:1.5}
.sw-text b{color:#451A03;font-weight:700}
.sw-divider{
  height:1px;background:rgba(146,64,14,.25);
  margin:10px 0;
}
.sw-phone{
  display:inline-flex;align-items:center;gap:6px;
  margin-top:8px;
  padding:10px 16px;
  background:#92400E;color:#fff;
  border-radius:10px;
  font-size:16px;font-weight:700;
  text-decoration:none;
  transition:background .15s;
  box-shadow:0 1px 3px rgba(0,0,0,.15);
}
.sw-phone:hover{background:#78350F;color:#fff}
.sw-foot{font-size:12px}

/* TIMELINE STATUS */
.timeline{display:flex;flex-direction:column;gap:10px;margin-top:8px}
.timeline .step{
  display:flex;gap:10px;align-items:flex-start;
  padding:10px;border-radius:10px;background:#F9FAFB;
}
.timeline .step .dot{
  width:24px;height:24px;border-radius:50%;
  background:#E5E7EB;color:#fff;display:grid;place-items:center;
  font-size:12px;font-weight:700;flex-shrink:0;
}
.timeline .step.done .dot{background:var(--ok)}
.timeline .step.now .dot{background:var(--brand);box-shadow:0 0 0 4px var(--brand-soft)}
.timeline .step .txt{font-size:14px}
.timeline .step .txt b{display:block;font-size:13px}
.timeline .step .txt span{color:var(--muted);font-size:12px}

/* ADMIN */
.admin-head{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:8px;margin-bottom:10px}
.kanban{
  display:grid;grid-template-columns:1fr;gap:10px;
}
@media(min-width:700px){.kanban{grid-template-columns:repeat(2,1fr)}}
@media(min-width:1000px){.kanban{grid-template-columns:repeat(4,1fr)}}
.k-col{
  background:#F3F4F6;border-radius:12px;padding:10px;min-height:200px;
}
.k-col h4{margin:0 0 8px;font-size:13px;color:var(--muted);text-transform:uppercase;letter-spacing:.5px}
.k-card{
  background:#fff;border-radius:10px;padding:10px;margin-bottom:8px;
  box-shadow:0 1px 3px rgba(0,0,0,.06);font-size:13px;
  border-left:3px solid var(--brand);
}
.k-card .k-name{font-weight:600;margin-bottom:4px}
.k-card .k-meta{color:var(--muted);font-size:12px}
.k-card .k-actions{margin-top:6px;display:flex;gap:4px;flex-wrap:wrap}
.k-card .k-actions button{
  font-size:11px;padding:4px 8px;border-radius:6px;
  background:#F3F4F6;border:1px solid var(--line);
}
.k-card .k-actions button:hover{background:var(--brand);color:#fff;border-color:var(--brand)}

/* ADMIN LISTA DE PRODUTOS */
.admin-list{display:flex;flex-direction:column;gap:8px}
.admin-row{
  display:flex;align-items:center;gap:10px;padding:8px;
  background:var(--card);border:1px solid var(--line);
  border-radius:10px;
}
.admin-row img{width:48px;height:48px;border-radius:8px;object-fit:cover;background:#F3F4F6}
.admin-row .ar-info{flex:1;min-width:0}
.admin-row .ar-name{font-size:14px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.admin-row .ar-meta{font-size:12px;color:var(--muted)}
.admin-row .ar-actions button{
  background:transparent;border:0;color:var(--brand);
  font-size:16px;padding:4px;
}
.admin-row .ar-actions .del{color:var(--bad)}

/* MODAL */
.modal{
  position:fixed;inset:0;z-index:50;
  background:rgba(0,0,0,.5);
  display:none;align-items:center;justify-content:center;padding:16px;
}
.modal.open{display:flex}
.modal-card{
  background:#fff;border-radius:14px;width:100%;max-width:480px;
  max-height:90vh;overflow-y:auto;padding:18px;
}

/* TOAST */
.toast{
  position:fixed;left:50%;bottom:24px;transform:translateX(-50%) translateY(20px);
  background:#1F2937;color:#fff;padding:10px 18px;border-radius:10px;
  font-size:14px;opacity:0;pointer-events:none;
  transition:all .25s;z-index:60;
}
.toast.show{opacity:1;transform:translateX(-50%) translateY(0)}

/* PRODUTO DETALHE */
.detail-img{width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:12px;background:#F3F4F6;margin-bottom:10px}
.detail-price{font-size:24px;font-weight:700;color:var(--brand);margin:8px 0}
.qty-control{
  display:flex;align-items:center;gap:14px;justify-content:center;
  margin:14px 0;
}
.qty-control button{
  width:42px;height:42px;border-radius:12px;
  background:var(--brand-soft);border:0;color:var(--brand);
  font-size:20px;font-weight:700;
}
.qty-control input{
  width:60px;text-align:center;height:42px;
  border:1px solid var(--line);border-radius:10px;font-size:18px;font-weight:700;
}

/* ============== ADMIN — ABAS ============== */
.admin-tabs{
  display:flex;gap:6px;flex-wrap:wrap;
  background:#F3F4F6;border-radius:12px;padding:4px;
}
.admin-tab{
  flex:1;min-width:120px;
  background:transparent;border:0;
  height:40px;padding:0 14px;border-radius:10px;
  font-weight:500;font-size:14px;color:var(--muted);
  white-space:nowrap;transition:all .15s;
}
.admin-tab.active{
  background:#fff;color:var(--brand);
  box-shadow:0 1px 3px rgba(0,0,0,.08);font-weight:600;
}
.admin-tab:hover:not(.active){color:var(--ink)}

/* ============== ADMIN — DASHBOARD / KPIs ============== */
.kpi-grid{
  display:grid;grid-template-columns:repeat(2,1fr);
  gap:12px;margin-bottom:14px;
}
@media(min-width:700px){.kpi-grid{grid-template-columns:repeat(4,1fr)}}
.kpi-card{
  background:var(--card);border:1px solid var(--line);
  border-radius:12px;padding:16px 18px;
  box-shadow:var(--shadow);
  display:flex;flex-direction:column;gap:8px;
  position:relative;overflow:hidden;
  min-width:0;
}
.kpi-card::before{
  content:"";position:absolute;top:0;left:0;bottom:0;width:3px;
  background:var(--brand);
}
.kpi-card.orders::before{background:#1D4ED8}
.kpi-card.revenue::before{background:#047857}
.kpi-card.ticket::before{background:#6D28D9}
.kpi-card.preparing::before{background:var(--brand)}
.kpi-head{
  display:flex;align-items:center;gap:6px;
  color:var(--muted);
}
.kpi-head i, .kpi-head svg{color:currentColor;flex-shrink:0}
.kpi-head .kpi-label{
  font-size:11px;text-transform:uppercase;letter-spacing:.6px;
  font-weight:600;
}
.kpi-icon{ /* legado — escondido, ícone agora é SVG inline no .kpi-head */
  display:none !important;
}
.kpi-value{
  font-size:26px;font-weight:700;color:var(--ink);
  line-height:1.1;letter-spacing:-.5px;
}
@media(min-width:700px){
  .kpi-value{font-size:30px}
}

.dash-cols{
  display:grid;grid-template-columns:1fr;gap:14px;
}
@media(min-width:900px){.dash-cols{grid-template-columns:1fr 1fr}}
.dash-list{display:flex;flex-direction:column;gap:6px}
.dash-row{
  display:flex;align-items:center;gap:10px;
  padding:8px 10px;border-radius:10px;
  background:#FAF7F2;border:1px solid var(--line);
  font-size:14px;
}
.dash-row .dr-info{flex:1;min-width:0}
.dash-row .dr-name{font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dash-row .dr-meta{font-size:12px;color:var(--muted)}
.dash-row .dr-price{font-weight:700;color:var(--brand);white-space:nowrap}
.dash-row img{
  width:36px;height:36px;border-radius:8px;object-fit:cover;
  background:#F3F4F6;flex-shrink:0;
}
.k-tag{
  display:inline-block;padding:2px 8px;border-radius:999px;
  font-size:11px;font-weight:600;letter-spacing:.2px;
  background:#F3F4F6;color:var(--muted);white-space:nowrap;
}
.k-tag.confirmed{background:#DBEAFE;color:#1D4ED8}
.k-tag.preparing{background:var(--brand-soft);color:var(--brand)}
.k-tag.ready{background:#D1FAE5;color:#047857}
.k-tag.delivered{background:#E5E7EB;color:#374151}
.k-tag.cancelled{background:#FEE2E2;color:var(--bad)}

/* ============== ADMIN — FILTROS ============== */
.adm-filters{
  display:flex;gap:10px;flex-wrap:wrap;
  margin-bottom:12px;
}
.adm-filter-label{
  flex:1;min-width:140px;
  font-size:12px;color:var(--muted);
  text-transform:uppercase;letter-spacing:.4px;font-weight:600;
}
.adm-filter-label select{
  display:block;width:100%;height:38px;margin-top:4px;
  padding:0 10px;border:1px solid var(--line);
  border-radius:10px;background:#fff;outline:none;
  font-size:14px;color:var(--ink);
  text-transform:none;letter-spacing:0;font-weight:500;
}
.adm-filter-label select:focus{border-color:var(--brand)}

/* ============== ADMIN — KANBAN MELHORADO ============== */
.k-col{
  background:#F3F4F6;border-radius:12px;padding:10px;min-height:200px;
}
.k-col-head{
  display:flex;justify-content:space-between;align-items:baseline;
  margin-bottom:8px;padding:2px 4px;
  border-bottom:2px solid var(--line);
}
.k-col-head h4{margin:0;font-size:12px;color:var(--muted);text-transform:uppercase;letter-spacing:.5px;font-weight:700}
.k-col-total{font-size:11px;color:var(--muted);font-weight:600;margin-top:2px}
.k-col[data-status="confirmed"] .k-col-head{border-bottom-color:#1D4ED8}
.k-col[data-status="preparing"] .k-col-head{border-bottom-color:var(--brand)}
.k-col[data-status="ready"] .k-col-head{border-bottom-color:#047857}
.k-col[data-status="delivered"] .k-col-head{border-bottom-color:#6B7280}

.k-card{
  background:#fff;border-radius:10px;padding:10px;margin-bottom:8px;
  box-shadow:0 1px 3px rgba(0,0,0,.06);font-size:13px;
  border-left:3px solid var(--brand);
  cursor:pointer;transition:transform .12s,box-shadow .12s;
}
.k-card:hover{transform:translateY(-1px);box-shadow:0 4px 10px rgba(0,0,0,.08)}
.k-card-top{display:flex;gap:8px;align-items:center;margin-bottom:6px}
.k-card-top img{
  width:36px;height:36px;border-radius:8px;object-fit:cover;background:#F3F4F6;
  flex-shrink:0;
}
.k-card-name{font-weight:700;font-size:14px;line-height:1.2;flex:1;min-width:0}
.k-card-id{color:var(--muted);font-size:11px;font-weight:500}
.k-card-phone{color:var(--brand);font-size:12px;font-weight:500;text-decoration:none}
.k-card-meta{
  display:flex;flex-wrap:wrap;gap:6px;
  font-size:12px;color:var(--muted);margin-top:4px;
}
.k-card-meta b{color:var(--ink);font-weight:600}
.k-card-foot{
  display:flex;justify-content:space-between;align-items:center;
  margin-top:8px;padding-top:8px;border-top:1px dashed var(--line);
  gap:6px;
}
.k-card-foot .price{font-weight:700;color:var(--brand);font-size:15px}
.k-card-actions{display:flex;gap:4px}
.k-card-actions button{
  font-size:11px;padding:5px 9px;border-radius:7px;
  border:1px solid var(--line);background:#F9FAFB;
  font-weight:600;cursor:pointer;
}
.k-card-actions .next{background:var(--brand);color:#fff;border-color:var(--brand)}
.k-card-actions .next:hover{background:var(--brand-2)}
.k-card-actions .cancel{color:var(--bad)}
.k-card-actions .cancel:hover{background:#FEE2E2;border-color:var(--bad)}

/* ============== ADMIN — PRODUTOS ============== */
.prod-stats{
  display:flex;gap:14px;flex-wrap:wrap;
  margin-bottom:12px;padding:10px 14px;
  background:var(--card);border:1px solid var(--line);
  border-radius:12px;box-shadow:var(--shadow);
}
.prod-stat{display:flex;align-items:center;gap:8px;font-size:13px}
.prod-stat b{font-size:18px;color:var(--brand);font-weight:700}
.prod-stat span{color:var(--muted);text-transform:uppercase;font-size:11px;font-weight:600;letter-spacing:.3px}

.adm-prod-tools{margin-bottom:12px}
.adm-prod-tools .search{flex:1}

.adm-cat-tabs{margin-bottom:14px}

.adm-prod-grid{
  display:grid;grid-template-columns:1fr;gap:12px;
}
@media(min-width:560px){.adm-prod-grid{grid-template-columns:repeat(2,1fr)}}
@media(min-width:900px){.adm-prod-grid{grid-template-columns:repeat(3,1fr)}}
@media(min-width:1200px){.adm-prod-grid{grid-template-columns:repeat(4,1fr)}}
.adm-prod-card{
  background:var(--card);border:1px solid var(--line);
  border-radius:12px;overflow:hidden;
  box-shadow:var(--shadow);
  display:flex;flex-direction:column;
  transition:transform .12s,box-shadow .12s;
}
.adm-prod-card:hover{transform:translateY(-2px);box-shadow:0 6px 16px rgba(0,0,0,.08)}
.adm-prod-card .ap-img{
  width:100%;aspect-ratio:4/3;object-fit:cover;background:#F3F4F6;
}
.adm-prod-card .ap-body{padding:10px 12px;display:flex;flex-direction:column;gap:6px;flex:1}
.adm-prod-card .ap-name{font-weight:600;font-size:14px;line-height:1.25;min-height:2.5em}
.adm-prod-card .ap-meta{
  display:flex;justify-content:space-between;align-items:center;
  font-size:12px;color:var(--muted);margin-top:auto;
}
.adm-prod-card .ap-price{font-weight:700;color:var(--brand);font-size:15px;white-space:nowrap}
.adm-prod-card .ap-actions{
  display:flex;gap:4px;padding:8px 10px;
  border-top:1px solid var(--line);background:#FAF7F2;
}
.adm-prod-card .ap-actions button{
  flex:1;background:transparent;border:1px solid var(--line);
  height:32px;border-radius:8px;font-size:13px;font-weight:600;
  color:var(--ink);transition:all .12s;
}
.adm-prod-card .ap-actions button:hover{background:var(--brand);color:#fff;border-color:var(--brand)}
.adm-prod-card .ap-actions .del:hover{background:var(--bad);border-color:var(--bad)}

/* ============== ADMIN — CLIENTES ============== */
.cust-list{display:flex;flex-direction:column;gap:8px}
.cust-card{
  background:var(--card);border:1px solid var(--line);
  border-radius:12px;padding:14px;
  box-shadow:var(--shadow);
  cursor:pointer;transition:transform .12s;
}
.cust-card:hover{transform:translateY(-1px)}
.cust-head{
  display:flex;justify-content:space-between;align-items:flex-start;
  gap:10px;flex-wrap:wrap;
}
.cust-info{flex:1;min-width:0}
.cust-name{font-weight:700;font-size:15px}
.cust-phone{color:var(--brand);font-size:13px;text-decoration:none;font-weight:500}
.cust-stats{display:flex;gap:14px;font-size:12px;color:var(--muted)}
.cust-stats b{color:var(--ink);font-size:15px;display:block;font-weight:700}
.cust-orders{
  margin-top:10px;padding-top:10px;border-top:1px dashed var(--line);
  display:none;flex-direction:column;gap:6px;
}
.cust-card.open .cust-orders{display:flex}
.cust-order{
  display:flex;justify-content:space-between;align-items:center;gap:8px;
  font-size:13px;padding:6px 8px;border-radius:8px;background:#FAF7F2;
}
.cust-order .co-id{color:var(--muted);font-size:12px;font-weight:500}
.cust-order .co-total{font-weight:600;color:var(--brand)}

/* ============== MODAL — edição de produto ============== */
.modal-product-form label{margin-bottom:10px}
.modal-product-form input,.modal-product-form select,.modal-product-form textarea{
  display:block;width:100%;height:42px;margin-top:4px;
  padding:0 12px;border:1px solid var(--line);
  border-radius:10px;background:#fff;outline:none;color:var(--ink);
  font:inherit;
}
.modal-product-form textarea{height:auto;min-height:60px;padding:8px 12px;resize:vertical}
.modal-product-form input:focus,.modal-product-form select:focus,.modal-product-form textarea:focus{border-color:var(--brand)}
.preview-img{
  width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:10px;
  background:#F3F4F6;margin-top:6px;
}
.toggle-row{
  display:flex;align-items:center;gap:8px;
  padding:10px;background:#F9FAFB;border-radius:10px;cursor:pointer;
}
.toggle-row input{width:18px;height:18px;cursor:pointer}
.modal-product-form .form-actions{display:flex;gap:8px;margin-top:14px}

/* ============== MODAL — detalhes do pedido ============== */
.order-detail-head{display:flex;justify-content:space-between;align-items:flex-start;gap:10px;flex-wrap:wrap}
.order-detail-head h2{margin:0}
.order-detail-id{color:var(--muted);font-size:13px;font-weight:500;margin-top:2px}
.order-detail-section{margin-top:14px;padding-top:14px;border-top:1px solid var(--line)}
.order-detail-section h4{margin:0 0 6px;font-size:12px;color:var(--muted);text-transform:uppercase;letter-spacing:.4px}
.order-detail-items{display:flex;flex-direction:column;gap:4px}
.order-detail-items .odi{display:flex;justify-content:space-between;font-size:14px;padding:4px 0}
.order-detail-items .odi .odi-name{flex:1}
.order-detail-items .odi .odi-qty{color:var(--muted);margin-right:8px}
.order-detail-items .odi .odi-price{font-weight:600;color:var(--brand)}

/* ============== HERO DA CATEGORIA ============== */
.cat-hero{
  position:relative;
  height:128px;
  margin:14px 0 18px;
  border-radius:14px;
  overflow:hidden;
  background-size:cover;
  background-position:center;
  background-color:#F3F4F6;
  color:#fff;
}
@media(min-width:640px){.cat-hero{height:160px;border-radius:16px}}
@media(min-width:768px){.cat-hero{height:208px}}
@media(min-width:1024px){.cat-hero{height:240px}}

/* Hero "Todos" — sem imagem de fundo, destaque grande e legível */
.cat-hero.hero-all{
  background:linear-gradient(135deg,var(--brand) 0%,var(--brand-2) 100%);
  color:#fff;
  display:flex;align-items:center;
  height:180px;
}
@media(min-width:640px){.cat-hero.hero-all{height:220px}}
@media(min-width:1024px){.cat-hero.hero-all{height:260px}}
.cat-hero.hero-all::before{
  content:"";position:absolute;inset:0;
  background:
    radial-gradient(circle at 80% 20%,rgba(255,255,255,.18) 0,transparent 50%),
    radial-gradient(circle at 20% 90%,rgba(0,0,0,.12) 0,transparent 55%);
  pointer-events:none;
}
.cat-hero .hero-inner-all{
  align-items:center;justify-content:center;text-align:center;
  padding:0 20px;
}
.cat-hero .hero-eyebrow{
  display:inline-block;
  font-size:12px;font-weight:700;letter-spacing:1.2px;
  text-transform:uppercase;
  padding:4px 12px;border-radius:999px;
  background:rgba(255,255,255,.18);
  margin-bottom:10px;
  backdrop-filter:blur(2px);
}
.cat-hero .hero-title-all{
  font-size:32px;font-weight:800;line-height:1.05;
  margin:0;color:#fff;letter-spacing:-.5px;
  text-shadow:0 2px 8px rgba(0,0,0,.25);
}
@media(min-width:640px){.cat-hero .hero-title-all{font-size:42px}}
@media(min-width:1024px){.cat-hero .hero-title-all{font-size:52px}}
.cat-hero .hero-count{
  margin-top:10px;font-size:14px;font-weight:500;
  color:rgba(255,255,255,.92);
}
@media(min-width:640px){.cat-hero .hero-count{font-size:16px}}

.cat-hero.hero-photo::before{
  content:"";position:absolute;inset:0;
  background:linear-gradient(0deg,rgba(0,0,0,.55) 0%,rgba(0,0,0,.1) 55%,rgba(0,0,0,0) 100%);
}
.cat-hero .hero-inner{
  position:relative;z-index:1;
  display:flex;align-items:flex-end;
  padding:0;width:100%;height:100%;
}
.cat-hero .hero-text{width:100%;padding:12px 14px}
@media(min-width:640px){.cat-hero .hero-text{padding:16px 20px}}
.cat-hero .hero-title{
  font-size:20px;font-weight:700;line-height:1.1;
  margin:0;color:#fff;
  text-shadow:0 2px 6px rgba(0,0,0,.55);
  letter-spacing:-.3px;
}
@media(min-width:640px){.cat-hero .hero-title{font-size:24px}}
@media(min-width:768px){.cat-hero .hero-title{font-size:28px}}
@media(min-width:1024px){.cat-hero .hero-title{font-size:32px}}

/* ============== ADMIN TABS (linha horizontal) ============== */
.admin-tabs{
  display:flex;flex-wrap:wrap;gap:4px;
  margin-top:8px;width:100%;
  border-bottom:1px solid var(--line);
}
.admin-tab{
  background:transparent;border:0;padding:10px 14px;
  font-size:14px;font-weight:500;color:var(--muted);
  border-bottom:2px solid transparent;
  border-radius:0;cursor:pointer;
  display:flex;align-items:center;gap:6px;
}
.admin-tab i, .admin-tab svg{opacity:.7;flex-shrink:0;color:currentColor}
.admin-tab:hover{color:var(--ink)}
.admin-tab:hover i, .admin-tab:hover svg{opacity:1}
.admin-tab.active{
  color:var(--brand);
  border-bottom-color:var(--brand);
}
.admin-tab.active i, .admin-tab.active svg{opacity:1}
.adm-user{display:flex;align-items:center;gap:8px;margin-top:8px;flex-wrap:wrap}
.adm-user .muted{font-size:12px}

@media(min-width:1200px){.dash-cols{grid-template-columns:2fr 1fr 1fr}}
.dash-list{display:flex;flex-direction:column;gap:8px}
.dash-row{
  display:flex;align-items:center;gap:10px;
  padding:8px;border-radius:8px;cursor:pointer;
  transition:background .15s;
}
.dash-row:hover{background:#F9FAFB}
.dash-row img{width:40px;height:40px;border-radius:8px;object-fit:cover;background:#F3F4F6;flex-shrink:0}
.dash-row .dr-info{flex:1;min-width:0}
.dash-row .dr-name{font-size:13px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dash-row .dr-meta{font-size:11px;color:var(--muted)}
.dash-row .dr-price{font-weight:700;color:var(--brand);font-size:14px;white-space:nowrap}

/* ============== WEEK CHART ============== */
.week-bars{
  display:flex;align-items:flex-end;justify-content:space-around;
  gap:4px;height:140px;padding:8px 0 0;
}
.week-bar-wrap{flex:1;display:flex;flex-direction:column;align-items:center;gap:2px;height:100%}
.week-bar-value{font-size:11px;font-weight:700;color:var(--muted);height:14px}
.week-bar{
  width:100%;min-height:4px;
  background:linear-gradient(180deg,var(--brand) 0%,var(--brand-2) 100%);
  border-radius:6px 6px 0 0;
}
.week-bar-label{font-size:11px;color:var(--muted);font-weight:500}

/* ============== TOGGLE ROW (checkbox + label) ============== */
.toggle-row{
  display:flex;align-items:center;gap:10px;
  padding:10px 0;cursor:pointer;
  border-bottom:1px solid var(--line);
  margin-bottom:0;
}
.toggle-row:last-of-type{border-bottom:0}
.toggle-row input{width:20px;height:20px;flex-shrink:0;margin-top:0;cursor:pointer}
.toggle-row span{flex:1;font-size:14px}

/* ============== CARD-LIKE (configurações) ============== */
.card-like{
  background:var(--card);border:1px solid var(--line);
  border-radius:14px;padding:18px;
  box-shadow:var(--shadow);
}
.card-like h3{margin:0 0 14px;font-size:16px;color:var(--brand)}
.card-like label{display:block;margin-bottom:14px}
.card-like label input,
.card-like label select,
.card-like label textarea{
  display:block;width:100%;margin-top:6px;
  padding:10px 12px;border:1px solid var(--line);
  border-radius:10px;background:#fff;outline:none;font:inherit;color:inherit;
}
.card-like label input:focus,
.card-like label select:focus,
.card-like label textarea:focus{border-color:var(--brand)}
.card-like label textarea{resize:vertical;min-height:60px;font-family:inherit}

/* ============== AUTH VIEW ============== */
.auth-card{
  max-width:420px;margin:30px auto;
  background:var(--card);border:1px solid var(--line);
  border-radius:16px;padding:24px;
  box-shadow:var(--shadow);
  text-align:center;
}
.auth-card h2{margin:8px 0 4px}
.auth-logo{display:flex;justify-content:center;margin-bottom:12px}
.auth-logo .brand-logo{width:64px;height:64px}
.auth-form{margin-top:14px;text-align:left}
.auth-form label{font-size:13px;color:var(--muted);margin-bottom:12px}

/* ============== KANBAN STATUS TAGS ============== */
.k-tag{display:inline-block;padding:2px 8px;border-radius:6px;font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.3px;background:#F3F4F6;color:var(--ink);white-space:nowrap}
.k-tag.confirmed{background:#DBEAFE;color:#1D4ED8}
.k-tag.preparing{background:#FED7AA;color:#B45309}
.k-tag.ready{background:#D1FAE5;color:#047857}
.k-tag.delivered{background:#E5E7EB;color:#6B7280}
.k-tag.cancelled{background:#FEE2E2;color:#DC2626}
.k-tag.active{background:#D1FAE5;color:#047857}
.k-tag.inactive{background:#F3F4F6;color:#6B7280}

/* ============== A11Y MODES ============== */
html.high-contrast{
  --bg:#FFF;--card:#FFF;--ink:#000;--muted:#000;
  --line:#000;--brand:#000;--brand-2:#000;--brand-soft:#EEE;
}
html.high-contrast .topbar,
html.high-contrast .product,
html.high-contrast .kpi-card,
html.high-contrast .card,
html.high-contrast .card-like,
html.high-contrast .drawer,
html.high-contrast .admin-row,
html.high-contrast .k-card,
html.high-contrast .modal-card{
  border:2px solid #000 !important;
  box-shadow:none !important;
}
html.high-contrast button{font-weight:700;border-width:2px}
html.big-fonts{font-size:18px}
html.big-fonts .kpi-value{font-size:24px}
html.no-anim *,html.no-anim *::before,html.no-anim *::after{
  animation-duration:0s !important;transition-duration:0s !important;
}
html.reduce-motion *,html.reduce-motion *::before,html.reduce-motion *::after{
  animation-duration:0.01s !important;transition-duration:0.01s !important;
}
html.underline-links a{text-decoration:underline !important}
html.bigger-cursors{cursor:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 24 24'><path fill='%23B45309' d='M5 3l14 8-6 1.5L11 19z'/></svg>") 4 4,auto}
html.bigger-cursors *{cursor:inherit !important}

/* ============== BARRA FLUTUANTE DO CARRINHO ============== */
.cart-bar{
  position: fixed;
  left: 12px; right: 12px; bottom: 12px;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: linear-gradient(180deg, #B45309 0%, #92400E 100%);
  color: #fff;
  box-shadow: 0 10px 30px rgba(146, 64, 14, 0.35), 0 2px 6px rgba(0,0,0,0.12);
  animation: cartBarIn .25s ease-out;
  max-width: 720px;
  margin: 0 auto;
}
.cart-bar[hidden]{ display: none; }
.cart-bar-info{
  display: flex; flex-direction: column;
  gap: 2px; min-width: 0;
}
.cart-bar-count{
  font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .4px;
  opacity: .9;
  display: flex; align-items: baseline; gap: 4px;
}
.cart-bar-count-label{ font-weight: 500; text-transform: none; letter-spacing: 0; opacity: .8; font-size: 11px; }
.cart-bar-total{
  font-size: 18px; font-weight: 700;
  letter-spacing: -.3px;
  white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.cart-bar-cta{
  flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 6px;
  background: #fff;
  color: #92400E;
  font-weight: 700; font-size: 14px;
  border: 0; border-radius: 10px;
  padding: 10px 16px;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.18);
}
.cart-bar-cta:hover{ transform: translateY(-1px); box-shadow: 0 4px 10px rgba(0,0,0,0.22); }
.cart-bar-cta:active{ transform: translateY(0); }

@keyframes cartBarIn{
  from{ transform: translateY(20px); opacity: 0; }
  to  { transform: translateY(0);    opacity: 1; }
}

/* No checkout/admin/success a barra some (carrinho já está visível em outro lugar) */
body.no-cart-bar .cart-bar{ display: none !important; }

@media (min-width: 720px){
  .cart-bar{ padding: 14px 18px; }
  .cart-bar-total{ font-size: 20px; }
  .cart-bar-cta{ font-size: 15px; padding: 12px 20px; }
}

/* Respeita usuários com motion reduzido */
@media (prefers-reduced-motion: reduce){
  .cart-bar{ animation: none; }
  .cart-bar-cta{ transition: none; }
}


