/* ============================================================
   Cantinho do Natal — Admin design system  (admin.css v1)
   Independente do CSS da loja. Tema claro/escuro via [data-theme].
   Tokens: --bg --surface --surface-2 --line --text --muted --accent --gold --danger ...
   Componentes: .btn .card .kpi .badge .tbl .toolbar .field .input .select .switch
                .tabs .modal .drawer .toast .skeleton .empty .dropdown .kbd .chip
   ============================================================ */
:root, [data-theme="light"] {
  --bg: #F4F5F2; --surface: #FFFFFF; --surface-2: #F8F8F5; --line: #E4E6E0; --line-2: #D5D8D0;
  --text: #17231E; --muted: #66716B; --faint: #949D97;
  --accent: #0F3B2E; --accent-2: #17503F; --accent-ink: #FFFFFF; --accent-soft: #E3EFE9;
  --gold: #B8913A; --gold-soft: #F6EDD3; --danger: #B3261E; --danger-soft: #FBE6E4; --warn: #9A6700; --warn-soft: #FFF3D0;
  --ok: #16794C; --ok-soft: #DFF3E8; --info: #1F5FA8; --info-soft: #E2EEFA;
  --shadow: 0 1px 2px rgba(15,35,28,.06), 0 8px 24px rgba(15,35,28,.07); --shadow-lg: 0 20px 60px rgba(8,20,16,.28);
  --radius: 12px; --radius-sm: 8px; --sidebar: 248px; --topbar: 58px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; --serif: 'Cormorant Garamond', Georgia, serif;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0C1512; --surface: #121E1A; --surface-2: #16241F; --line: #223530; --line-2: #2C443D;
  --text: #E8EFEB; --muted: #9AA9A2; --faint: #6C7B74;
  --accent: #C9A24B; --accent-2: #D8B861; --accent-ink: #10231C; --accent-soft: #1C3028;
  --gold: #D8B861; --gold-soft: #2B2815; --danger: #FF8E86; --danger-soft: #3A1B19; --warn: #F2C45A; --warn-soft: #33290F;
  --ok: #6FD3A0; --ok-soft: #14301F; --info: #7DB5F0; --info-soft: #132538;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35); --shadow-lg: 0 20px 60px rgba(0,0,0,.6);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme]) { color-scheme: dark; } }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.adm { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
:where(.adm) a { color: inherit; }
.adm h1, .adm h2, .adm h3, .adm p { margin: 0; }
:where(.adm) button, :where(.adm) input, :where(.adm) select, :where(.adm) textarea { font: inherit; color: inherit; }
.adm :focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .nowrap { white-space: nowrap; } .right { text-align: right; } .mono { font-variant-numeric: tabular-nums; }
.hide { display: none !important; }

/* ── Shell ─────────────────────────────────────────────────── */
.app { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; transition: grid-template-columns .25s ease; }
.app.is-collapsed { grid-template-columns: 68px minmax(0, 1fr); }
.side { position: sticky; top: 0; height: 100vh; background: var(--accent); color: #E9F0EC; display: flex; flex-direction: column; z-index: 40; overflow: hidden auto; }
[data-theme="dark"] .side { background: #0A1210; border-right: 1px solid var(--line); }
.side-brand { display: flex; align-items: center; gap: 10px; padding: 16px 16px 14px; text-decoration: none; color: #fff; min-height: var(--topbar); }
.side-brand svg { width: 30px; height: 30px; flex: none; color: #D8B861; }
.side-brand b { font: italic 600 22px/1 var(--serif); white-space: nowrap; }
.side-brand small { display: block; font: 500 10px/1 var(--font); letter-spacing: .18em; text-transform: uppercase; color: #BFD1C8; margin-bottom: 3px; }
.side-nav { padding: 6px 10px 20px; display: grid; gap: 2px; }
.side-group { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: #9DB5AA; padding: 16px 10px 6px; white-space: nowrap; }
.side-link { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 9px; color: #D7E4DD; text-decoration: none; font-weight: 500; position: relative; white-space: nowrap; transition: background .15s, color .15s, transform .15s; }
.side-link svg { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.side-link:hover { background: rgba(255,255,255,.09); color: #fff; }
.side-link.is-active { background: rgba(216,184,97,.18); color: #fff; box-shadow: inset 2px 0 0 #D8B861; }
.side-link .count { margin-left: auto; font-size: 11px; background: #D8B861; color: #10231C; border-radius: 99px; padding: 1px 7px; font-weight: 700; }
.app.is-collapsed .side-link span, .app.is-collapsed .side-group, .app.is-collapsed .side-brand div, .app.is-collapsed .side-link .count { display: none; }
.app.is-collapsed .side-link { justify-content: center; }
.side-foot { margin-top: auto; padding: 12px 10px 16px; border-top: 1px solid rgba(255,255,255,.1); display: grid; gap: 2px; }
.scrim { display: none; }
.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 30; height: var(--topbar); display: flex; align-items: center; gap: 10px; padding: 0 20px; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top-title { font-weight: 650; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-spacer { flex: 1; }
.top-search { display: flex; align-items: center; gap: 8px; height: 36px; min-width: 250px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); color: var(--muted); cursor: pointer; }
.top-search:hover { border-color: var(--line-2); }
.top-search svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
.kbd { font: 600 11px/1 var(--font); padding: 3px 6px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 6px; background: var(--surface); color: var(--muted); }
.icon-btn { width: 36px; height: 36px; display: inline-grid; place-items: center; border: 1px solid transparent; border-radius: 10px; background: transparent; cursor: pointer; color: var(--muted); transition: background .15s, color .15s, transform .15s; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn:active { transform: scale(.94); }
.icon-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.content { padding: 24px clamp(14px, 2.4vw, 32px) 60px; max-width: 1500px; width: 100%; margin: 0 auto; animation: pagein .35s ease both; }
@keyframes pagein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.page-h { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.page-h h1 { font-size: 24px; letter-spacing: -.01em; font-weight: 700; }
.page-h p { color: var(--muted); margin-top: 2px; }
.page-h .grow { flex: 1; }
.crumbs { font-size: 12.5px; color: var(--muted); margin-bottom: 4px; } .crumbs a { text-decoration: none; } .crumbs a:hover { color: var(--text); }
.menu-btn { display: none; }
@media (max-width: 960px) {
  .app, .app.is-collapsed { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; inset: 0 auto 0 0; width: min(290px, 86vw); transform: translateX(-102%); transition: transform .28s cubic-bezier(.2,.8,.2,1); box-shadow: var(--shadow-lg); }
  .app.is-collapsed .side-link span, .app.is-collapsed .side-group, .app.is-collapsed .side-brand div { display: initial; }
  .app.is-collapsed .side-link { justify-content: flex-start; }
  .app.nav-open .side { transform: none; }
  .scrim { display: block; position: fixed; inset: 0; background: rgba(6,16,12,.5); z-index: 35; opacity: 0; pointer-events: none; transition: opacity .25s; }
  .app.nav-open .scrim { opacity: 1; pointer-events: auto; }
  .menu-btn { display: inline-grid; }
  .top { padding: 0 12px; } .top-search { min-width: 0; width: 36px; padding: 0; justify-content: center; } .top-search span, .top-search .kbd { display: none; }
  .collapse-btn { display: none; }
  .content { padding-top: 16px; }
}

/* ── Primitives ────────────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 1px 0 rgba(0,0,0,.02); }
.card-h { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.card-h h2, .card-h h3 { font-size: 14.5px; font-weight: 650; } .card-h .sub { color: var(--muted); font-size: 12.5px; }
.card-b { padding: 18px; } .card-f { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; align-items: center; }
.grid { display: grid; gap: 16px; } .g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .split { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); } .g4.kpis, .g2.keep2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, transform .12s, box-shadow .15s; }
.btn:hover { background: var(--surface-2); border-color: var(--faint); }
.btn:active { transform: translateY(1px) scale(.985); }
.btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 30%, transparent); }
.btn-primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn-danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, var(--line)); } .btn-danger:hover { background: var(--danger-soft); }
.btn-ghost { border-color: transparent; background: transparent; } .btn-sm { height: 30px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
.btn[disabled], .btn.is-loading { opacity: .6; pointer-events: none; }
.btn.is-loading::after { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.b-ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; } .b-warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.b-bad { background: var(--danger-soft); color: var(--danger); border-color: transparent; } .b-info { background: var(--info-soft); color: var(--info); border-color: transparent; } .b-gold { background: var(--gold-soft); color: var(--gold); border-color: transparent; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 99px; background: var(--surface); cursor: pointer; font-weight: 550; font-size: 13px; text-decoration: none; transition: all .15s; }
.chip:hover { border-color: var(--faint); } .chip.is-on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.chip .n { font-size: 11.5px; opacity: .7; }

/* ── Forms ─────────────────────────────────────────────────── */
.field { display: grid; gap: 6px; margin-bottom: 14px; align-content: start; } .field > label, .lbl { font-weight: 600; font-size: 13px; }
.hint { font-size: 12.5px; color: var(--muted); } .err { font-size: 12.5px; color: var(--danger); }
.input, .select, .textarea { width: 100%; min-height: 38px; padding: 8px 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.textarea { min-height: 96px; resize: vertical; line-height: 1.55; } .textarea.code { font: 12.5px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; min-height: 340px; tab-size: 2; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); outline: 0; }
.input.is-invalid { border-color: var(--danger); }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; } .row > .grow { flex: 1; min-width: 0; }
.input-group { display: flex; } .input-group .addon { display: grid; place-items: center; padding: 0 12px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--muted); }
.input-group .addon:first-child { border-right: 0; border-radius: 10px 0 0 10px; } .input-group .addon:last-child { border-left: 0; border-radius: 0 10px 10px 0; }
.input-group .input:not(:first-child) { border-top-left-radius: 0; border-bottom-left-radius: 0; } .input-group .input:not(:last-child) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 550; }
.switch input { position: absolute; opacity: 0; } .switch .track { width: 40px; height: 23px; border-radius: 99px; background: var(--line-2); position: relative; transition: background .2s; flex: none; }
.switch .track::after { content: ""; position: absolute; left: 3px; top: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .2s cubic-bezier(.3,1.4,.5,1); }
.switch input:checked + .track { background: var(--accent); } .switch input:checked + .track::after { transform: translateX(17px); } .switch input:focus-visible + .track { outline: 2px solid var(--gold); outline-offset: 2px; }
.check { width: 17px; height: 17px; accent-color: var(--accent); cursor: pointer; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.tab { padding: 10px 14px; border: 0; background: none; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none; }
.tab:hover { color: var(--text); } .tab.is-on { color: var(--text); border-bottom-color: var(--gold); }
.tabpane { display: none; } .tabpane.is-on { display: block; animation: pagein .25s ease both; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; } .seg button { border: 0; background: var(--surface); padding: 7px 12px; font-weight: 600; cursor: pointer; color: var(--muted); } .seg button.is-on { background: var(--accent); color: var(--accent-ink); }

/* ── Tabelas / toolbar ─────────────────────────────────────── */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.search { position: relative; flex: 1 1 240px; max-width: 420px; } .search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; stroke: var(--faint); fill: none; stroke-width: 2; } .search .input { padding-left: 34px; }
.bulk { display: none; align-items: center; gap: 10px; padding: 10px 14px; background: var(--accent-soft); border-bottom: 1px solid var(--line); animation: pagein .2s ease both; } .bulk.is-on { display: flex; } .bulk b { font-weight: 700; }
.table-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { position: sticky; top: 0; text-align: left; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 650; padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; user-select: none; }
.tbl th[data-sort] { cursor: pointer; } .tbl th[data-sort]:hover { color: var(--text); } .tbl th.sorted::after { content: " \2191"; } .tbl th.sorted.desc::after { content: " \2193"; }
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr { transition: background .12s; } .tbl tbody tr:hover { background: var(--surface-2); } .tbl tbody tr.is-sel { background: var(--accent-soft); } .tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .thumb { width: 44px; height: 44px; border-radius: 9px; object-fit: contain; background: #fff; border: 1px solid var(--line); display: block; }
.tbl .cell-main { display: flex; align-items: center; gap: 12px; min-width: 0; } .tbl .cell-main b { display: block; font-weight: 600; } .tbl a.link { text-decoration: none; font-weight: 600; } .tbl a.link:hover { text-decoration: underline; }
.row-actions { display: flex; gap: 4px; justify-content: flex-end; opacity: .0; transition: opacity .15s; } .tbl tr:hover .row-actions, .tbl tr:focus-within .row-actions { opacity: 1; }
@media (hover: none) { .row-actions { opacity: 1; } }
.inline-edit { cursor: text; border-radius: 6px; padding: 2px 6px; margin: -2px -6px; border: 1px dashed transparent; } .inline-edit:hover { border-color: var(--line-2); background: var(--surface); }
.inline-edit.is-editing { padding: 0; margin: 0; border: 0; } .inline-edit input { width: 100%; min-width: 80px; height: 30px; padding: 0 8px; border: 1px solid var(--accent); border-radius: 7px; background: var(--surface); }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); color: var(--muted); flex-wrap: wrap; }
.pager nav { display: flex; gap: 4px; } .pager a, .pager span.pg { min-width: 32px; height: 32px; display: inline-grid; place-items: center; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; color: var(--text); } .pager .on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
@media (max-width: 760px) {
  .tbl.stack thead { display: none; } .tbl.stack, .tbl.stack tbody, .tbl.stack tr, .tbl.stack td { display: block; width: 100%; }
  .tbl.stack tr { padding: 12px 14px; border-bottom: 1px solid var(--line); position: relative; } .tbl.stack td { border: 0; padding: 3px 0; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  .tbl.stack td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: 12px; text-align: left; flex: none; } .tbl.stack td.cell-first { text-align: left; display: block; padding-bottom: 6px; } .tbl.stack td.cell-first::before { display: none; }
  .tbl.stack td.cell-sel { position: absolute; right: 12px; top: 12px; width: auto; } .row-actions { opacity: 1; justify-content: flex-start; }
}

/* ── KPI / gráficos ────────────────────────────────────────── */
.kpi { padding: 16px 18px; position: relative; overflow: hidden; }
.kpi .k-l { color: var(--muted); font-size: 12.5px; font-weight: 600; display: flex; align-items: center; gap: 8px; } .kpi .k-ic { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); } .kpi .k-ic svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.kpi .k-v { font-size: 28px; font-weight: 750; letter-spacing: -.02em; margin-top: 8px; font-variant-numeric: tabular-nums; } .kpi .k-d { font-size: 12.5px; margin-top: 2px; color: var(--muted); }
.delta-up { color: var(--ok); font-weight: 650; } .delta-down { color: var(--danger); font-weight: 650; }
.kpi svg.spark { position: absolute; right: 0; bottom: 0; width: 46%; height: 52px; opacity: .55; } .spark path.l { stroke: var(--gold); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; } .spark path.a { fill: color-mix(in srgb, var(--gold) 18%, transparent); stroke: none; }
.chart { width: 100%; height: 240px; display: block; } .chart .gridl { stroke: var(--line); stroke-width: 1; } .chart text { fill: var(--muted); font-size: 11px; } .chart .bar { fill: var(--accent); rx: 4; transition: opacity .15s, height .5s cubic-bezier(.2,.8,.2,1), y .5s cubic-bezier(.2,.8,.2,1); } .chart .bar:hover { opacity: .75; } [data-theme="dark"] .chart .bar { fill: var(--gold); }
.chart .line { fill: none; stroke: var(--gold); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); } .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.feed { list-style: none; margin: 0; padding: 0; } .feed li { display: flex; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); align-items: center; } .feed li:last-child { border-bottom: 0; } .feed .dot { width: 34px; height: 34px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; } .feed .dot svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
.bar-list { display: grid; gap: 10px; } .bar-list .bl { display: grid; gap: 4px; } .bar-list .bl-h { display: flex; justify-content: space-between; font-size: 13px; } .bar-list .bl-t { height: 7px; border-radius: 99px; background: var(--surface-2); overflow: hidden; border: 1px solid var(--line); } .bar-list .bl-t i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--gold)); border-radius: 99px; transition: width .8s cubic-bezier(.2,.8,.2,1); }
.skeleton { position: relative; overflow: hidden; background: var(--surface-2); border-radius: 8px; min-height: 14px; } .skeleton::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--text) 8%, transparent), transparent); transform: translateX(-100%); animation: shimmer 1.3s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }
.empty { text-align: center; padding: 52px 20px; color: var(--muted); } .empty svg { width: 54px; height: 54px; stroke: var(--gold); fill: none; stroke-width: 1.3; margin-bottom: 10px; } .empty h3 { color: var(--text); font-size: 16px; margin-bottom: 4px; }

/* ── Overlays ──────────────────────────────────────────────── */
.overlay { position: fixed; inset: 0; z-index: 80; display: none; background: rgba(6,16,12,.55); backdrop-filter: blur(3px); } .overlay.is-open { display: flex; animation: fade .18s ease both; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal { margin: auto; width: min(520px, calc(100vw - 28px)); max-height: calc(100vh - 40px); overflow: auto; background: var(--surface); border-radius: 16px; border: 1px solid var(--line); box-shadow: var(--shadow-lg); animation: pop .22s cubic-bezier(.2,1.1,.3,1) both; } .modal.wide { width: min(860px, calc(100vw - 28px)); }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
.modal-h { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); font-weight: 700; font-size: 16px; } .modal-b { padding: 20px; } .modal-f { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; }
.drawer { margin-left: auto; width: min(560px, 100vw); height: 100%; background: var(--surface); border-left: 1px solid var(--line); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; animation: slidein .26s cubic-bezier(.2,.8,.2,1) both; } .drawer .modal-b { flex: 1; overflow: auto; }
@keyframes slidein { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 120; display: grid; gap: 10px; width: min(380px, calc(100vw - 32px)); }
.toast { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: #10231C; color: #fff; box-shadow: var(--shadow-lg); border-left: 4px solid #D8B861; animation: toastin .3s cubic-bezier(.2,1.1,.3,1) both; }
.toast.ok { border-left-color: #6FD3A0; } .toast.err { border-left-color: #FF8E86; } .toast.out { animation: toastout .25s ease both; } .toast button { margin-left: auto; background: none; border: 0; color: inherit; opacity: .6; cursor: pointer; font-size: 18px; line-height: 1; }
@keyframes toastin { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } } @keyframes toastout { to { opacity: 0; transform: translateX(30px); } }
.cmd { align-items: flex-start; padding-top: 12vh; } .cmd .modal { padding: 0; width: min(600px, calc(100vw - 28px)); margin-top: 0; } .cmd input { width: 100%; border: 0; border-bottom: 1px solid var(--line); padding: 16px 20px; font-size: 16px; background: transparent; outline: 0; }
.cmd ul { list-style: none; margin: 0; padding: 8px; max-height: 50vh; overflow: auto; } .cmd li a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; text-decoration: none; } .cmd li.is-hi a, .cmd li a:hover { background: var(--accent-soft); } .cmd li small { margin-left: auto; color: var(--faint); }
.dropdown { position: relative; display: inline-block; } .dd-menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 190px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; display: none; z-index: 50; } .dropdown.is-open .dd-menu { display: block; animation: pop .16s ease both; }
.dd-menu a, .dd-menu button { display: flex; width: 100%; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px; border: 0; background: none; text-align: left; cursor: pointer; text-decoration: none; } .dd-menu a:hover, .dd-menu button:hover { background: var(--surface-2); }
.dropzone { border: 2px dashed var(--line-2); border-radius: 14px; padding: 22px; text-align: center; color: var(--muted); transition: all .18s; cursor: pointer; } .dropzone.is-over { border-color: var(--gold); background: var(--gold-soft); color: var(--text); transform: scale(1.01); }
.imgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; margin-top: 12px; }
.img-tile { position: relative; aspect-ratio: 1; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; cursor: grab; transition: transform .15s, box-shadow .15s; } .img-tile img { width: 100%; height: 100%; object-fit: contain; display: block; } .img-tile.is-drag { opacity: .4; } .img-tile.is-over { box-shadow: 0 0 0 3px var(--gold); transform: scale(1.03); }
.img-tile .x { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(10,25,20,.75); color: #fff; cursor: pointer; } .img-tile .pos { position: absolute; left: 6px; top: 6px; background: rgba(10,25,20,.75); color: #fff; border-radius: 99px; padding: 1px 8px; font-size: 11px; }
.preview { border: 1px solid var(--line); border-radius: 12px; background: #fff; color: #1F2D27; padding: 14px; max-height: 560px; overflow: auto; } .preview-frame { width: 100%; height: 560px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.callout svg { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin-top: 1px; }
.callout { display: flex; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--info-soft); color: var(--info); border: 1px solid transparent; } .callout.warn { background: var(--warn-soft); color: var(--warn); } .callout.bad { background: var(--danger-soft); color: var(--danger); } .callout.ok { background: var(--ok-soft); color: var(--ok); }
.dl { display: grid; grid-template-columns: 150px 1fr; gap: 8px 14px; } .dl dt { color: var(--muted); } .dl dd { margin: 0; font-weight: 550; word-break: break-word; }
.sticky-save { position: sticky; bottom: 0; z-index: 20; display: flex; gap: 10px; justify-content: flex-end; align-items: center; padding: 12px 16px; margin-top: 16px; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(8px); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.dirty-dot { display: none; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); } .is-dirty .dirty-dot { display: inline-block; }
@media (prefers-reduced-motion: reduce) { * { animation-duration: .001ms !important; transition-duration: .001ms !important; } }
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(900px 500px at 70% 0%, #1d5c49, #0F3B2E 55%, #08241c); }
.login .box { width: min(400px, 100%); background: var(--surface); border-radius: 18px; padding: 30px; box-shadow: var(--shadow-lg); animation: pop .4s cubic-bezier(.2,1.1,.3,1) both; } .login h1 { font: italic 600 32px var(--serif); color: var(--accent); } [data-theme="dark"] .login h1 { color: var(--gold); }

/* extra: definições / envios / segurança / login */
.set-wrap { max-width: 920px; }
.set-nav { margin-bottom: 20px; }
.set-nav .tab { display: inline-flex; align-items: center; gap: 7px; }
.set-nav .tab svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card + .card, .card + .callout, .callout + .card, form > .card + .card { margin-top: 16px; }
.grid > .card + .card, .grid > .card + .callout, .grid > .callout + .card, .row > .card + .card { margin-top: 0; }
.card-h .grow { flex: 1; min-width: 0; }
.opt { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.opt:last-child { border-bottom: 0; padding-bottom: 0; } .opt:first-child { padding-top: 0; }
.opt > div:first-child { min-width: 0; } .opt b { display: block; font-weight: 600; } .opt span.hint { display: block; }
.secret { position: relative; } .secret .input { padding-right: 84px; }
.secret .reveal { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); height: 28px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface-2); color: var(--muted); font-size: 12.5px; font-weight: 600; cursor: pointer; }
.secret .reveal:hover { color: var(--text); }
.set-saved { display: inline-flex; align-items: center; gap: 6px; color: var(--ok); font-size: 12.5px; font-weight: 600; }
.ro-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; }
.ro-grid small { display: block; color: var(--muted); font-size: 12px; } .ro-grid b { font-weight: 600; word-break: break-word; }
@media (max-width: 640px) { .ro-grid { grid-template-columns: minmax(0, 1fr); } .opt { align-items: flex-start; } }
.color-row { display: flex; gap: 8px; align-items: center; } .color-row input[type=color] { width: 44px; height: 38px; padding: 2px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); cursor: pointer; flex: none; }
.review-box { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--surface-2); }
.ship-list { list-style: none; margin: 0; padding: 0; }
.ship-item { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: var(--surface); transition: background .15s, box-shadow .15s; }
.ship-item:last-child { border-bottom: 0; } .ship-item.is-drag { opacity: .4; } .ship-item.is-over { box-shadow: inset 0 2px 0 var(--gold); }
.ship-item .grip { cursor: grab; color: var(--faint); font-size: 18px; line-height: 1; letter-spacing: -3px; user-select: none; }
.ship-item .info { flex: 1; min-width: 0; } .ship-item .info b { display: block; font-weight: 650; } .ship-item .price { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.ship-item .price small { display: block; font-weight: 500; color: var(--muted); font-size: 12px; }
.ship-item .tg { display: grid; gap: 2px; justify-items: center; font-size: 11px; color: var(--muted); }
@media (max-width: 640px) { .ship-item { flex-wrap: wrap; gap: 10px; } .ship-item .info { flex-basis: calc(100% - 60px); } .ship-item .price { text-align: left; } }
.ups-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.ups-card { display: flex; flex-direction: column; overflow: hidden; transition: transform .15s, box-shadow .15s; } .ups-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.ups-card .pic { aspect-ratio: 16/9; background: var(--surface-2); display: grid; place-items: center; border-bottom: 1px solid var(--line); overflow: hidden; } .ups-card .pic img { width: 100%; height: 100%; object-fit: contain; background: #fff; } .ups-card .pic svg { width: 40px; height: 40px; stroke: var(--faint); fill: none; stroke-width: 1.4; }
.ups-card .b { padding: 14px 16px; flex: 1; display: grid; gap: 6px; align-content: start; } .ups-card .f { padding: 10px 16px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 8px; }
.ups-card s { color: var(--faint); margin-right: 6px; }
.cat-pills { display: flex; flex-wrap: wrap; gap: 8px; } .cat-pills label { cursor: pointer; } .cat-pills input { position: absolute; opacity: 0; }
.cat-pills span { display: inline-flex; height: 32px; align-items: center; padding: 0 13px; border: 1px solid var(--line-2); border-radius: 99px; font-weight: 550; font-size: 13px; transition: all .15s; background: var(--surface); }
.cat-pills input:checked + span { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); } .cat-pills input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.sec-add { display: flex; gap: 10px; flex-wrap: wrap; padding: 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); } .sec-add .input { flex: 1 1 180px; width: auto; }
.tab .n { margin-left: 6px; font-size: 11.5px; padding: 0 7px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); }
.login .box h1 + p { margin-top: 4px; }
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.login-brand svg { width: 40px; height: 40px; color: var(--gold); flex: none; animation: twinkle 3.6s ease-in-out infinite; transform-origin: center; }
@keyframes twinkle { 0%, 100% { transform: scale(1) rotate(0); filter: drop-shadow(0 0 0 transparent); } 50% { transform: scale(1.08) rotate(8deg); filter: drop-shadow(0 0 8px color-mix(in srgb, var(--gold) 60%, transparent)); } }
.login-brand small { display: block; font: 600 10px/1 var(--font); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.login-brand h1 { line-height: 1; }
.login .box .field { margin-bottom: 16px; } .login .box .btn-primary { width: 100%; height: 42px; font-size: 15px; }
.login .box form > * { animation: pagein .5s ease both; } .login .box form > *:nth-child(2) { animation-delay: .06s; } .login .box form > *:nth-child(3) { animation-delay: .12s; } .login .box form > *:nth-child(4) { animation-delay: .18s; } .login .box form > *:nth-child(5) { animation-delay: .24s; }
.login .foot { text-align: center; margin-top: 18px; font-size: 12.5px; color: var(--muted); }
@media (prefers-color-scheme: dark) { .login-auto { } }

/* extra: encomendas / e-mails */
.drawer.mail-drawer { width: min(760px, 100vw); }
.mail-frame { display: block; width: 100%; max-width: 100%; height: 100%; min-height: 70vh; border: 0; background: #fff; margin: 0 auto; transition: width .25s ease; }
.mail-frame.is-mob { width: 390px; max-width: 100%; box-shadow: var(--shadow); border-radius: 12px; margin-top: 12px; height: calc(100% - 24px); }
.drawer form, form.drawer { min-height: 0; }
form.drawer .modal-b { flex: 1; overflow: auto; }
.dd-menu form { margin: 0; }
details.card > summary::-webkit-details-marker { display: none; }
.kpi-row-cart .k-v { font-size: 24px; }

/* extra: coleções / páginas / newsletter */
.adm a.btn-primary { color: var(--accent-ink); }
.adm a.btn-danger { color: var(--danger); }
.cell-grip svg, .callout > svg { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cell-grip { width: 34px; }
tr.is-drag { opacity: .45; } tr.is-over td { box-shadow: inset 0 2px 0 var(--gold); }
@media (max-width: 760px) {
  .tbl.stack td.cell-grip { display: none; }
  .grid.kpis3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } .kpis3 .kpi { padding: 12px; } .kpis3 .k-v { font-size: 22px; } .kpis3 .k-l { font-size: 11.5px; } .kpis3 .k-ic { display: none; }
}
/* extra: chips em linha com scroll horizontal (mobile) */
.chiprow { gap: 6px; flex-wrap: wrap; }
@media (max-width: 760px) { .chiprow { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -14px; padding: 0 14px 2px; width: calc(100% + 28px); } .chiprow .chip { flex: none; } .search { max-width: none; flex-basis: 100%; } }
/* extra: produtos */
.dropzone svg { width: 44px; height: 44px; stroke: var(--gold); fill: none; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 8px; }
.dropzone.is-loading { opacity: .6; pointer-events: none; }
@media (max-width: 640px) { .page-h .grow { flex: 1 1 100%; min-width: 0; overflow-wrap: anywhere; } .page-h h1 { font-size: 21px; } }
summary.card-h { cursor: pointer; list-style: none; } summary.card-h::-webkit-details-marker { display: none; }
summary.card-h > svg { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; transition: transform .2s; } details[open] > summary.card-h > svg { transform: rotate(90deg); } details[open] > summary.card-h { border-bottom: 1px solid var(--line); } details:not([open]) > summary.card-h { border-bottom: 0; }
.ship-item .price { min-width: 150px; } .ship-item .tg { width: 48px; } .ship-item .row-actions { min-width: 120px; }
@media (max-width: 640px) { .ship-item .price { min-width: 0; } .ship-item .row-actions { min-width: 0; } }
.pager .pg.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.bulk { flex-wrap: wrap; }
@media (max-width: 760px) { .tbl.stack td.cell-cust { display: block; text-align: left; max-width: none !important; } .tbl.stack td.cell-cust::before { display: none; } .tbl.stack td.cell-first { max-width: none !important; padding-right: 36px; } }
