/* ============================================================
   NIK BAR — Painel administrativo (dono)
   Reaproveita os tokens de styles.css
   ============================================================ */
.admin { display: flex; min-height: 100vh; }

/* ---- SIDEBAR ---- */
.adm-side {
  width: 252px; flex: none; border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 22px 16px;
  position: sticky; top: 0; height: 100vh; background: var(--bg-2);
}
.adm-brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 22px; transition: transform .15s ease; }
.adm-brand .brand-name { font-family: var(--font-display); font-size: 22px; letter-spacing: .6px; }
.adm-brand .brand-name b { color: var(--accent); }
.adm-brand:hover .brand-mark-img { transform: scale(1.07) rotate(-4deg);
  box-shadow: 0 0 0 2px var(--accent), 0 10px 24px -8px rgba(255,214,10,.55); }
.adm-brand:active { transform: scale(.96); }
.adm-nav { display: flex; flex-direction: column; gap: 3px; }
.adm-navlabel { font-size: 10.5px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--dim-2); padding: 16px 12px 8px; }
.adm-link {
  display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px;
  font-weight: 700; font-size: 14.5px; color: var(--dim); transition: all .15s; cursor: pointer;
}
.adm-link:hover { background: var(--on-card); color: var(--text); }
.adm-link.on { background: var(--accent); color: var(--ink); }
.adm-link .ic { display: grid; place-items: center; }
.adm-link .badge-n { margin-left: auto; background: var(--accent); color: var(--ink);
  font-size: 11px; font-weight: 900; min-width: 20px; height: 20px; border-radius: 10px;
  display: grid; place-items: center; padding: 0 5px; }
.adm-link.on .badge-n { background: var(--ink); color: var(--accent); }
.adm-side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding-top: 16px; }
.adm-owner { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px;
  background: var(--on-card); border: 1px solid var(--line); }
.adm-owner .av { width: 34px; height: 34px; border-radius: 50%; background: var(--purple); color: #fff;
  display: grid; place-items: center; font-weight: 900; font-size: 14px; flex: none; }
.adm-owner .nm { font-size: 13px; font-weight: 800; line-height: 1.2; white-space: nowrap; }
.adm-owner .rl { font-size: 11px; color: var(--dim); line-height: 1.2; }

/* ---- MAIN ---- */
.adm-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.adm-top { display: flex; align-items: center; gap: 16px; padding: 20px 30px; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20; background: color-mix(in oklab, var(--bg) 88%, transparent); backdrop-filter: blur(14px); }
.adm-top h1 { font-family: var(--font-display); font-size: 30px; text-transform: uppercase; line-height: 1; }
.adm-top .sub { color: var(--dim); font-size: 13px; font-weight: 600; margin-top: 3px; }
.adm-back { width: 42px; height: 42px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-3); border: 1px solid var(--line); color: var(--text); flex: none; transition: all .15s; }
.adm-back:hover { border-color: var(--line-2); color: var(--accent); transform: translateY(-2px); }
.adm-back:active { transform: scale(.92); }
.adm-body { padding: 28px 30px 60px; }

/* ---- KPI ---- */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.kpi { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); padding: 20px;
  transition: transform .16s ease, border-color .2s ease, box-shadow .2s ease; }
.kpi.clickable { cursor: pointer; }
.kpi.clickable:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: var(--shadow); }
.kpi.clickable:active { transform: translateY(-1px) scale(.99); }
.kpi .k-top { display: flex; align-items: center; justify-content: space-between; }
.kpi .k-ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  background: color-mix(in oklab, var(--accent) 18%, transparent); color: var(--accent); }
.kpi .k-go { color: var(--dim-2); opacity: 0; transform: translateX(-4px); transition: all .18s ease; }
.kpi.clickable:hover .k-go { opacity: 1; transform: translateX(0); color: var(--accent); }
.kpi .k-label { font-size: 12.5px; font-weight: 700; color: var(--dim); margin-top: 16px; }
.kpi .k-val { font-family: var(--font-display); font-size: 34px; line-height: 1; margin-top: 6px; }
.kpi .k-delta { font-size: 12px; font-weight: 800; margin-top: 8px; display: inline-flex; align-items: center; gap: 4px; }
.kpi .k-delta.up { color: #2ecc71; }
.kpi .k-delta.down { color: #ff5a6a; }

/* ---- panels / chart ---- */
.adm-cols { display: grid; grid-template-columns: 1.7fr 1fr; gap: 16px; margin-top: 16px; }
.panel { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; }
.panel-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.panel-h h3 { font-family: var(--font-display); font-size: 20px; text-transform: uppercase; }
.chart { display: flex; align-items: flex-end; gap: 10px; height: 200px; padding-top: 10px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.bar { width: 100%; max-width: 38px; border-radius: 8px 8px 4px 4px; background: linear-gradient(180deg, var(--accent), var(--accent-2));
  transition: height .4s ease; }
.bar.muted { background: var(--bg-3); }
.bar-lbl { font-size: 11px; font-weight: 700; color: var(--dim); }
.bar-val { font-size: 11px; font-weight: 800; }

.lowstock-item, .recent-order { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.lowstock-item:last-child, .recent-order:last-child { border-bottom: none; }
.recent-order.clickable, .lowstock-item.clickable { cursor: pointer; border-radius: 12px; padding: 12px 10px; margin: 0 -10px;
  border-bottom: 1px solid var(--line); transition: background .15s ease, transform .15s ease; }
.recent-order.clickable:hover, .lowstock-item.clickable:hover { background: var(--on-card); transform: translateX(2px); }
.recent-order.clickable:active, .lowstock-item.clickable:active { transform: scale(.99); }
.ls-thumb { width: 40px; height: 40px; border-radius: 10px; flex: none; display: grid; place-items: center; overflow: hidden; }
.ls-thumb .device { width: 16px; }
.ls-info { flex: 1; min-width: 0; }
.ls-name { font-weight: 800; font-size: 13.5px; }
.ls-sub { font-size: 12px; color: var(--dim); }
.ls-qty { font-family: var(--font-display); font-size: 20px; }
.ls-qty.crit { color: #ff5a6a; }
.ls-qty.warn { color: var(--accent); }

/* ---- TABLE ---- */
.adm-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.adm-search { flex: 1; max-width: 360px; display: flex; align-items: center; gap: 10px; background: var(--bg-2);
  border: 1px solid var(--line); border-radius: var(--pill); padding: 10px 16px; color: var(--dim); }
.adm-search input { flex: 1; background: none; border: none; color: var(--text); outline: none; font-size: 14px; }
.tbl-wrap { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 11px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase;
  color: var(--dim); padding: 14px 18px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 14px 18px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tr:hover td { background: var(--on-card); }
.t-prod { display: flex; align-items: center; gap: 12px; }
.t-thumb { width: 42px; height: 42px; border-radius: 10px; flex: none; display: grid; place-items: center; overflow: hidden; }
.t-thumb .device { width: 16px; }
.t-name { font-weight: 800; }
.t-sub { font-size: 12px; color: var(--dim); }
.price-edit, .stock-edit { display: inline-flex; align-items: center; background: var(--bg-3); border: 1px solid var(--line);
  border-radius: 10px; padding: 2px 4px 2px 10px; }
.price-edit input, .stock-edit input { width: 64px; background: none; border: none; color: var(--text); font-weight: 800;
  font-size: 14px; outline: none; font-family: inherit; }
.stepper { display: flex; flex-direction: column; }
.stepper button { width: 22px; height: 15px; display: grid; place-items: center; color: var(--dim); font-size: 9px; }
.stepper button:hover { color: var(--accent); }

/* toggle switch */
.sw { width: 44px; height: 25px; border-radius: 13px; background: var(--bg-3); border: 1px solid var(--line);
  position: relative; cursor: pointer; transition: background .2s; flex: none; }
.sw.on { background: var(--accent); border-color: var(--accent); }
.sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 19px; height: 19px; border-radius: 50%;
  background: #fff; transition: transform .2s; box-shadow: 0 2px 4px rgba(0,0,0,.3); }
.sw.on::after { transform: translateX(19px); }

/* status pills */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: var(--pill);
  font-size: 12px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.pill .d { width: 7px; height: 7px; border-radius: 50%; }
.pill.novo { background: color-mix(in oklab, var(--accent) 18%, transparent); color: var(--accent); }
.pill.novo .d { background: var(--accent); }
.pill.confirmado { background: color-mix(in oklab, #5B8DEF 20%, transparent); color: #8fb2ff; }
.pill.confirmado .d { background: #5B8DEF; }
.pill.entregue { background: color-mix(in oklab, #2ecc71 18%, transparent); color: #4ed98b; }
.pill.entregue .d { background: #2ecc71; }
.pill.cancelado { background: color-mix(in oklab, #ff5a6a 16%, transparent); color: #ff8a95; }
.pill.cancelado .d { background: #ff5a6a; }
.stock-badge { font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: var(--pill); white-space: nowrap; }
.stock-badge.ok { background: color-mix(in oklab, #2ecc71 16%, transparent); color: #4ed98b; }
.stock-badge.low { background: color-mix(in oklab, var(--accent) 18%, transparent); color: var(--accent); }
.stock-badge.out { background: color-mix(in oklab, #ff5a6a 16%, transparent); color: #ff8a95; }

/* config form */
.cfg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; max-width: 760px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 12px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: var(--dim); }
.field input, .field textarea { background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; color: var(--text); font-family: inherit; font-size: 14px; outline: none; }
.field input:focus, .field textarea:focus { border-color: var(--accent); }

@media (max-width: 1024px) { .kpi-grid { grid-template-columns: repeat(2, 1fr); } .adm-cols { grid-template-columns: 1fr; } }

/* ---- lembretes ---- */
.rem-add { display: flex; gap: 8px; margin-bottom: 14px; }
.rem-add input { flex: 1; background: var(--bg-3); border: 1px solid var(--line); border-radius: 11px;
  padding: 10px 13px; color: var(--text); font-family: inherit; font-size: 14px; outline: none; }
.rem-add input:focus { border-color: var(--accent); }
.rem-add .btn { padding: 10px 14px; }
.rem-list { display: flex; flex-direction: column; }
.rem-item { display: flex; align-items: center; gap: 11px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.rem-item:last-child { border-bottom: none; }
.rem-check { width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--line-2); flex: none;
  display: grid; place-items: center; color: var(--ink); transition: all .15s; }
.rem-item.done .rem-check { background: var(--accent); border-color: var(--accent); }
.rem-text { flex: 1; font-size: 14px; font-weight: 600; }
.rem-item.done .rem-text { text-decoration: line-through; color: var(--dim); }
.rem-del { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: var(--dim-2); transition: all .15s; }
.rem-del:hover { color: #ff7a86; background: color-mix(in oklab, #ff5a6a 14%, transparent); }
.rem-del:active, .rem-check:active { transform: scale(.85); }

/* ---- selects + tags ---- */
.adm-select { background: var(--bg-2); color: var(--text); border: 1px solid var(--line); border-radius: var(--pill);
  padding: 9px 14px; font-weight: 700; font-family: inherit; cursor: pointer; font-size: 13.5px; }
.paytag { font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: var(--pill);
  background: var(--bg-3); border: 1px solid var(--line); }
.sale-form { margin-top: 4px; border-color: var(--line-2); }
.sale-form select, .sale-form input { background: var(--bg-3); }

/* ---- product photo upload ---- */
.t-thumb.up { position: relative; cursor: pointer; }
.t-thumb-img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }
.t-thumb-cam { position: absolute; right: -4px; bottom: -4px; width: 19px; height: 19px; border-radius: 6px;
  background: var(--accent); color: var(--ink); display: grid; place-items: center; border: 2px solid var(--bg-2); }
.t-thumb.up:active { transform: scale(.92); }

/* ---- promoções ---- */
.promo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.promo-card { position: relative; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r);
  padding: 20px; transition: opacity .2s, border-color .2s; }
.promo-card.off { opacity: .55; }
.promo-tag { width: 38px; height: 38px; border-radius: 11px; background: var(--accent); color: var(--ink);
  display: grid; place-items: center; margin-bottom: 14px; }
.promo-del { position: absolute; top: 16px; right: 14px; width: 30px; height: 30px; border-radius: 9px;
  display: grid; place-items: center; color: var(--dim-2); transition: all .15s; }
.promo-del:hover { color: #ff7a86; background: color-mix(in oklab, #ff5a6a 14%, transparent); }
.promo-del:active { transform: scale(.85); }
.promo-val { font-family: var(--font-display); font-size: 26px; color: var(--accent); line-height: 1; }
.promo-name { font-weight: 800; font-size: 15px; margin-top: 8px; }
.promo-scope { color: var(--dim); font-size: 13px; margin-top: 3px; }
.promo-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }

/* ---- feed ---- */
.feed-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.post-card { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.post-img { position: relative; aspect-ratio: 1/1; display: grid; place-items: center; color: rgba(255,255,255,.8); }
.post-img img { width: 100%; height: 100%; object-fit: cover; }
.post-del { position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; border-radius: 9px;
  background: rgba(0,0,0,.55); backdrop-filter: blur(4px); color: #fff; display: grid; place-items: center; }
.post-del:active { transform: scale(.85); }
.post-body { padding: 14px 15px 16px; }
.post-cap { font-size: 13.5px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.feed-pill { font-size: 11.5px; font-weight: 800; padding: 4px 11px; border-radius: var(--pill); cursor: pointer; }
.feed-pill.rascunho { background: var(--bg-3); color: var(--dim); border: 1px solid var(--line); }
.feed-pill.agendado { background: color-mix(in oklab, var(--accent) 18%, transparent); color: var(--accent); }
.feed-pill.publicado { background: color-mix(in oklab, #2ecc71 16%, transparent); color: #4ed98b; }
.post-up { width: 150px; height: 150px; border-radius: 14px; border: 2px dashed var(--line-2); display: grid; place-items: center;
  text-align: center; color: var(--dim); font-size: 12.5px; font-weight: 700; cursor: pointer; flex: none; overflow: hidden; background: var(--bg-3); }
.post-up img { width: 100%; height: 100%; object-fit: cover; }
.post-up:active { transform: scale(.97); }

@media (max-width: 760px) {
  .cfg-grid { grid-template-columns: 1fr !important; }
  .sale-form .cfg-grid { grid-template-columns: 1fr 1fr !important; }
  .promo-grid, .feed-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
}
@media (max-width: 460px) {
  .promo-grid, .feed-grid { grid-template-columns: 1fr; }
  .sale-form .cfg-grid { grid-template-columns: 1fr !important; }
}

/* ============================================================
   HEADING TREATMENTS (tweakable) — contraste com o fundo
   ============================================================ */
/* Contorno escuro: borda arredondada escura ao redor das letras */
.head-outline .adm-top h1,
.head-outline .panel-h h3,
.head-outline .adm-brand .brand-name {
  -webkit-text-stroke: 3px var(--bg);
  paint-order: stroke fill;
  text-shadow: 0 3px 0 rgba(0,0,0,.55), 0 1px 8px rgba(0,0,0,.4);
}
.head-outline .adm-brand .brand-name { -webkit-text-stroke-width: 2px; }

/* Etiqueta: título dentro de uma caixa escura com bordas arredondadas */
.head-badge .adm-top h1 {
  display: inline-block; background: var(--bg-3); border: 1px solid var(--line-2);
  border-radius: 14px; padding: 7px 18px 9px; box-shadow: var(--shadow);
}
.head-badge .panel-h h3 {
  display: inline-block; background: var(--bg-3); border: 1px solid var(--line-2);
  border-radius: 11px; padding: 4px 14px 6px;
}

/* ============================================================
   ICON BUTTONS (editar / excluir nas linhas)
   ============================================================ */
.row-actions { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.icon-btn { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  color: var(--dim); background: var(--bg-3); border: 1px solid var(--line); transition: all .15s; }
.icon-btn:hover { color: var(--text); border-color: var(--line-2); }
.icon-btn:active { transform: scale(.9); }
.icon-btn.danger:hover { color: #ff8a95; background: color-mix(in oklab, #ff5a6a 14%, transparent); border-color: transparent; }
.icon-btn.edit:hover { color: var(--ink); background: var(--accent); border-color: var(--accent); }

/* ============================================================
   MODAL — editor de pedido
   ============================================================ */
.adm-modal-scrim { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.55);
  backdrop-filter: blur(6px); display: grid; place-items: center; padding: 24px; animation: mscrim .18s ease; }
@keyframes mscrim { from { opacity: 0; } }
.adm-modal { width: 100%; max-width: 600px; max-height: calc(100vh - 48px); display: flex; flex-direction: column;
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--r-lg); box-shadow: var(--shadow);
  overflow: hidden; animation: mpop .2s cubic-bezier(.2,.8,.3,1); }
@keyframes mpop { from { opacity: 0; transform: translateY(14px) scale(.97); } }
.adm-modal-h { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 20px 24px; border-bottom: 1px solid var(--line); }
.adm-modal-h h3 { font-family: var(--font-display); font-size: 24px; text-transform: uppercase; line-height: 1; }
.adm-modal-h .sub { color: var(--dim); font-size: 12.5px; font-weight: 700; margin-top: 3px; }
.adm-modal-x { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  color: var(--dim); background: var(--bg-3); border: 1px solid var(--line); flex: none; }
.adm-modal-x:hover { color: var(--text); }
.adm-modal-body { padding: 22px 24px; overflow-y: auto; display: flex; flex-direction: column; gap: 18px; }
.adm-modal-foot { display: flex; gap: 10px; padding: 18px 24px; border-top: 1px solid var(--line); }
.adm-modal-foot .btn { flex: 1; justify-content: center; }

.ord-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; }
.ord-grid .field.full { grid-column: 1 / -1; }
.ord-items { display: flex; flex-direction: column; gap: 10px; }
.ord-items-h { display: flex; align-items: center; justify-content: space-between; }
.ord-items-h label { font-size: 12px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: var(--dim); }
.ord-item-row { display: grid; grid-template-columns: 1fr 78px 36px; gap: 8px; align-items: center; }
.ord-item-row select, .ord-item-row input { background: var(--bg-3); border: 1px solid var(--line); border-radius: 11px;
  padding: 11px 12px; color: var(--text); font-family: inherit; font-size: 13.5px; outline: none; width: 100%; }
.ord-item-row select:focus, .ord-item-row input:focus { border-color: var(--accent); }
.ord-add-item { align-self: flex-start; display: inline-flex; align-items: center; gap: 7px; color: var(--accent);
  font-weight: 800; font-size: 13px; padding: 8px 4px; }
.ord-total { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px;
  background: var(--bg-3); border: 1px solid var(--line); border-radius: 14px; }
.ord-total .lbl { font-size: 13px; font-weight: 800; color: var(--dim); display: flex; align-items: center; gap: 10px; }
.ord-total .val { font-family: var(--font-display); font-size: 30px; line-height: 1; }
.ord-total input { width: 120px; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 10px;
  padding: 8px 10px; color: var(--text); font-family: var(--font-display); font-size: 22px; outline: none; text-align: right; }
.mini-toggle { display: inline-flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 700; color: var(--dim); cursor: pointer; }

@media (max-width: 520px) { .ord-grid { grid-template-columns: 1fr; } }

/* ============================================================
   MOBILE — sidebar vira gaveta (override que precisa vir DEPOIS
   da regra base .adm-side daqui, senão o position:sticky vence).
   ============================================================ */
@media (max-width: 860px) {
  .adm-side {
    position: fixed; left: -290px; top: 0; bottom: 0; height: 100vh; z-index: 60;
    width: 270px; max-width: 84vw;
    transition: left .26s cubic-bezier(.2,.8,.2,1); box-shadow: 0 0 60px rgba(0,0,0,.6);
  }
  .adm-side.open { left: 0; }
  .adm-burger { display: inline-flex; }
  .adm-main { width: 100%; min-width: 0; overflow-x: clip; }
  .adm-body { padding: 18px 14px 56px; }
  .tbl-wrap { -webkit-overflow-scrolling: touch; }
  /* deixa grids/colunas encolherem em vez de estourar a tela */
  .adm-cols, .kpi-grid { min-width: 0; }
  .adm-cols > *, .kpi-grid > * { min-width: 0; }
  .panel { min-width: 0; }
  /* pedidos recentes: colunas fixas encolhem pra caber no celular */
  .recent-order { gap: 8px; }
  .recent-order > div:first-child { width: 42px !important; }
  .recent-order > div:last-child { width: auto !important; min-width: 60px; }
  .recent-order .pill { padding: 4px 8px; font-size: 11px; }
}
/* Evita o ZOOM automático do iOS ao focar campos (precisa ser >= 16px) */
@media (max-width: 860px) {
  input:not([type="range"]), select, textarea { font-size: 16px !important; }
}

/* esconde no DESKTOP o nome do produto que só deve aparecer no card mobile */
.cell-head-x { display: none; }

/* ============================================================
   MOBILE — Dashboard compacto + KPIs proporcionais
   ============================================================ */
@media (max-width: 760px) {
  .kpi-grid { grid-template-columns: 1fr 1fr !important; gap: 10px; }
  .kpi { padding: 14px; }
  .kpi .k-ic { width: 32px; height: 32px; border-radius: 10px; }
  .kpi .k-go { display: none; }
  .kpi .k-label { font-size: 11.5px; margin-top: 10px; }
  .kpi .k-val { font-size: 22px; }
  .kpi .k-delta { font-size: 11px; margin-top: 6px; }
  .panel { padding: 16px; }
  .panel-h { margin-bottom: 14px; }
  .panel-h h3 { font-size: 18px; }
  .chart { height: 150px; gap: 6px; padding-top: 6px; }
  .adm-cols { gap: 12px; }
  .adm-toolbar { gap: 10px; }
  .adm-search { max-width: none; }
}

/* ============================================================
   MOBILE — Tabelas viram CARDS verticais (Vendas/Produtos/Taxas)
   Nada de scroll horizontal: cada linha vira um card empilhado.
   ============================================================ */
@media (max-width: 760px) {
  .tbl-wrap { background: transparent; border: none; overflow: visible; border-radius: 0; }
  .tbl { display: block; width: 100%; }
  .tbl thead { display: none; }
  .tbl tbody { display: block; }
  .tbl tr { display: block; background: var(--bg-2); border: 1px solid var(--line);
    border-radius: 16px; padding: 12px 14px; margin-bottom: 12px; }
  .tbl tr:hover td { background: transparent; }
  .tbl td { display: flex; align-items: center; justify-content: space-between; gap: 14px;
    padding: 9px 0; border: none; border-top: 1px solid var(--line); font-size: 14px; min-height: 42px; }
  .tbl td::before { content: attr(data-label); font-size: 10.5px; font-weight: 800; letter-spacing: .6px;
    text-transform: uppercase; color: var(--dim); flex: none; }
  /* célula principal (produto / venda / região) = cabeçalho do card */
  .tbl td.cell-head { display: block; padding: 2px 0 10px; border-top: none; }
  .tbl td.cell-head::before { display: none; }
  .cell-head-x { display: inline; font-weight: 800; font-size: 15px; }
  .cell-head-id { font-family: var(--font-display); font-size: 13px; color: var(--accent); margin-right: 8px; }
  /* esconde colunas redundantes dentro do card */
  .tbl td.cell-hide-m { display: none; }
  /* valores/edição/ações encostam à direita */
  .tbl td .price-edit, .tbl td .stock-edit { margin-left: auto; }
  .tbl td .row-actions { margin-left: auto; }
  .tbl td .paytag, .tbl td .stock-badge { margin-left: auto; }
  /* linha "nenhum dado encontrado" não vira card-coluna */
  .tbl td[colspan] { display: block; text-align: center; border: none; padding: 24px 0; }
  .tbl td[colspan]::before { display: none; }
}
