/* Admin panel: dark menu, light work area (see the Pedidos artboard). System fonts only: no third-party requests. */
:root {
  --ink: #15171c;
  --ink-2: #2a2d35;
  --ink-3: #1f2229;
  --muted: #5c6270;
  --muted-dark: #a3a8b3;
  --line: #e3e5ea;
  --line-strong: #d9dce2;
  --surface: #ffffff;
  --page: #f4f5f7;
  --accent: #0b6b4f;
  --accent-soft: #f1f7f4;
  --go: #3dd68c;
  --danger: #a3261c;
  --danger-soft: #fff6f5;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, monospace;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--page); color: var(--ink); font-family: var(--font); }
a { color: inherit; }
button, input { font: inherit; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); font-size: 12.5px; }

.btn { height: 44px; padding: 0 18px; border-radius: 10px; font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; transition: transform 120ms ease, background-color 120ms ease; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, input:focus-visible, .tabs button:focus-visible, tbody tr:focus-visible { outline: 3px solid var(--go); outline-offset: 2px; }
.btn-primary { border: 0; background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--ink-2); }
.btn-ghost { border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); }
.btn-ghost:hover { background: var(--page); }

.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; }
.brand-mark { width: 32px; height: 32px; border-radius: 9px; background: #e9ebef; color: var(--ink); display: grid; place-items: center; font-weight: 800; font-size: 14px; }
.brand-text { display: flex; flex-direction: column; }
.brand-text strong { font-size: 15px; font-weight: 800; }
.brand-text span { font-size: 12px; color: var(--muted-dark); }

/* Layout */
.layout { min-height: 100vh; display: flex; flex-wrap: wrap; }
.sidebar { flex: 1 1 232px; max-width: 100%; background: var(--ink); color: #e9ebef; padding: 24px 16px; display: flex; flex-direction: column; gap: 28px; }
.nav-links { display: flex; flex-direction: column; gap: 4px; }
.nav-link { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 10px; color: #c9cdd5; text-decoration: none; font-size: 14px; font-weight: 600; }
.nav-link.active { background: var(--ink-2); color: #fff; font-weight: 700; }
.nav-link.soon { opacity: 0.55; cursor: default; }
.nav-link small { margin-left: auto; font-size: 11px; }
.nav-badge { margin-left: auto; background: var(--go); color: #0b2a1d; border-radius: 999px; padding: 2px 8px; font-size: 12px; font-weight: 800; }
.logout { margin-top: auto; }
.logout .btn { width: 100%; background: var(--ink-3); color: #e9ebef; border-color: var(--ink-2); }
.logout .btn:hover { background: var(--ink-2); }

.content { flex: 999 1 560px; min-width: 0; padding: 28px 32px 40px; display: flex; flex-direction: column; gap: 22px; }
.page-header { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.title-block { display: flex; flex-direction: column; gap: 2px; margin-right: auto; }
.title-block h1 { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }
.title-block span { font-size: 13px; color: var(--muted); }
#search { height: 44px; width: 280px; max-width: 100%; border: 1px solid var(--line-strong); border-radius: 10px; padding: 0 14px; font-size: 14px; background: var(--surface); color: var(--ink); }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.card span { font-size: 13px; color: var(--muted); font-weight: 600; }
.card strong { font-family: var(--mono); font-size: 24px; }

.tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.tabs button { height: 40px; padding: 0 14px; border-radius: 999px; font-size: 13.5px; font-weight: 700; display: flex; align-items: center; gap: 8px; cursor: pointer; background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); }
.tabs button[aria-selected="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.tabs button span { font-family: var(--mono); font-size: 12px; opacity: 0.7; }

.error { margin: 0; padding: 12px 14px; border-radius: 10px; background: var(--danger-soft); color: var(--danger); border: 1px solid #f0c2be; font-weight: 600; }

.split { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
.table-wrap { flex: 999 1 640px; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow-x: auto; }
table { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 13.5px; }
thead tr { text-align: left; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; }
th { padding: 14px 12px; font-weight: 700; }
th:first-child, td:first-child { padding-left: 16px; }
td { padding: 14px 12px; vertical-align: top; }
.num { text-align: right; }
td.num { font-family: var(--mono); }
tbody tr { cursor: pointer; border-top: 1px solid #eef0f3; }
tbody tr:hover { background: #f8f9fb; }
tbody tr[aria-selected="true"] { background: var(--accent-soft); }
.cell-main { font-weight: 700; }
.cell-number { font-weight: 800; font-size: 14px; }
.cell-sub { color: var(--muted); font-size: 12px; margin-top: 3px; }
.empty { padding: 28px 16px; margin: 0; color: var(--muted); text-align: center; }
.more { margin: 12px 16px 16px; }

.badge { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.badge-paid { background: #fff1d6; color: #7a4b00; }
.badge-shipped { background: #ddf5ea; color: #0b5a42; }
.badge-refunded { background: #ecedf1; color: #3f4450; }

.detail { flex: 1 1 320px; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px; position: sticky; top: 16px; }
#detail { display: flex; flex-direction: column; gap: 18px; }
#detail[hidden] { display: none; }
.detail-empty { margin: 0; color: var(--muted); }
.detail-head { display: flex; align-items: center; gap: 10px; }
.detail-head h2 { margin: 0; font-size: 18px; font-weight: 800; }
.detail-block { display: flex; flex-direction: column; gap: 4px; overflow-wrap: anywhere; }
.label { font-size: 12px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }

/* Login */
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: radial-gradient(circle at 20% 10%, #2a2d35 0, var(--ink) 55%); }
.login-card { width: 100%; max-width: 380px; background: var(--surface); border-radius: 18px; padding: 28px; display: flex; flex-direction: column; gap: 16px; box-shadow: 0 24px 60px rgb(0 0 0 / 35%); }
.login-card .brand { padding: 0; }
.login-card .brand-mark { background: var(--ink); color: #fff; }
.login-card .brand-text span { color: var(--muted); }
.login-card h1 { margin: 4px 0 0; font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.login-card form { display: flex; flex-direction: column; gap: 8px; }
.login-card label { font-size: 13px; font-weight: 700; margin-top: 6px; }
.login-card input { height: 46px; border: 1px solid var(--line-strong); border-radius: 10px; padding: 0 14px; font-size: 15px; }
#code { font-family: var(--mono); letter-spacing: 0.2em; }
.login-card .btn { margin-top: 12px; }
.login-error { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--danger-soft); color: var(--danger); font-size: 13.5px; font-weight: 600; }
.login-hint { margin: 0; color: var(--muted); font-size: 12.5px; }

@media (max-width: 720px) {
  .content { padding: 20px 16px 32px; }
  .sidebar { padding: 16px; gap: 16px; }
  .detail { position: static; }
}
@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
}

/* Produtos e links */
.notice { margin: 0; padding: 12px 14px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); border: 1px solid #cfe6db; font-weight: 600; font-size: 13.5px; }
.success { margin: 0; padding: 12px 14px; border-radius: 10px; background: #ddf5ea; color: #0b5a42; font-weight: 600; }
.product-list { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.product-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; display: flex; gap: 16px; align-items: flex-start; }
.product-card.selected { border: 2px solid var(--ink); }
.thumb { width: 64px; height: 64px; flex: none; border-radius: 12px; background: #eef0f3; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.link-button { border: 0; background: none; padding: 0; font: inherit; font-size: 16px; font-weight: 800; color: var(--ink); cursor: pointer; text-align: left; }
.link-button:hover { color: var(--accent); }
.variant-line { display: grid; grid-template-columns: minmax(120px, auto) minmax(0, 1fr) auto; gap: 8px; align-items: center; font-size: 13.5px; }
.variant-line.inactive { opacity: 0.55; }
.link-field { height: 36px; min-width: 0; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; background: var(--page); font-family: var(--mono); font-size: 12.5px; color: var(--ink); }
.btn-small { height: 36px; padding: 0 12px; font-size: 13px; }
.btn-dashed { border: 1px dashed #c4c8d0; background: #fafbfc; color: #3f4450; height: 40px; }
.editor form { display: flex; flex-direction: column; gap: 8px; }
.editor h2 { margin: 0 0 6px; font-size: 18px; font-weight: 800; }
.editor input[type="text"], .editor input[type="url"], .editor input[type="date"], .editor select { height: 44px; border: 1px solid var(--line-strong); border-radius: 10px; padding: 0 12px; font-size: 14px; background: var(--surface); color: var(--ink); }
.editor .label { margin-top: 6px; }
.variants { display: flex; flex-direction: column; gap: 8px; }
.variant-row { display: grid; grid-template-columns: minmax(0, 1fr) 110px auto; gap: 8px; }
.variant-row input { height: 44px; min-width: 0; border: 1px solid var(--line-strong); border-radius: 10px; padding: 0 12px; font-size: 14px; }
.variant-row .v-price { text-align: right; }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; min-height: 44px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); }
.form-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.form-actions .btn { flex: 1 1 140px; }
.discounts { display: flex; flex-direction: column; gap: 14px; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; }
.section-head h2 { margin: 0; font-size: 22px; font-weight: 800; }
.discounts table { min-width: 520px; }
@media (max-width: 720px) {
  .variant-line { grid-template-columns: 1fr; }
}
