:root {
  color-scheme: light;
  --bg: #f6f8fb;
  --panel: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --primary: #2563eb;
  --green: #16a34a;
  --yellow: #d97706;
  --red: #dc2626;
  --slate: #475569;
  --shadow: 0 12px 30px rgba(15, 23, 42, .08);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}
a { color: inherit; }
.topbar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 2rem clamp(1rem, 4vw, 3rem);
  background: linear-gradient(135deg, #0f172a, #1e3a8a);
  color: white;
}
.topbar h1 { margin: .2rem 0; font-size: clamp(1.8rem, 4vw, 3rem); }
.topbar p { margin: 0; color: #dbeafe; }
.eyebrow { letter-spacing: .12em; text-transform: uppercase; font-size: .75rem; font-weight: 800; }
main { padding: clamp(1rem, 4vw, 3rem); max-width: 1500px; margin: 0 auto; }
.cards { display: grid; grid-template-columns: repeat(6, minmax(150px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.card, .panel, .box {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.card { padding: 1rem; }
.card span { color: var(--muted); font-size: .85rem; }
.card strong { display: block; margin-top: .35rem; font-size: 1.8rem; }
.panel { padding: 1rem; }
.panel-head { display: flex; justify-content: space-between; gap: 1rem; align-items: end; margin-bottom: 1rem; }
h2, h3 { margin: 0 0 .35rem; }
.muted { color: var(--muted); }
.filters { display: grid; grid-template-columns: 2fr repeat(3, 1fr) auto; gap: .8rem; align-items: end; margin-bottom: 1rem; }
label { display: grid; gap: .35rem; color: var(--muted); font-size: .85rem; font-weight: 700; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: .75rem .85rem;
  font: inherit;
  background: white;
  color: var(--text);
}
.check { display: flex; align-items: center; gap: .5rem; padding-bottom: .75rem; }
.check input { width: auto; }
.button, button {
  border: 0;
  border-radius: 12px;
  background: var(--primary);
  color: white;
  padding: .75rem 1rem;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.button.ghost { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 1180px; }
th, td { padding: .85rem .7rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
th { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
td img { width: 48px; height: 48px; border-radius: 12px; object-fit: cover; border: 1px solid var(--border); }
.product-link { font-weight: 800; color: var(--primary); text-decoration: none; }
.badge { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 900; text-transform: uppercase; }
.badge.verde { background: #dcfce7; color: #166534; }
.badge.amarelo { background: #fef3c7; color: #92400e; }
.badge.vermelho, .badge.sem-estoque { background: #fee2e2; color: #991b1b; }
.badge.sem-vendas { background: #e2e8f0; color: #334155; }
.flag { display:inline-block; margin:.15rem .2rem .15rem 0; padding:.22rem .45rem; border-radius:999px; background:#eef2ff; color:#3730a3; font-size:.75rem; font-weight:700; }
.detail-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 1rem; }
.box { padding: 1rem; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; }
.kpi { border: 1px solid var(--border); border-radius: 14px; padding: .8rem; }
.kpi span { color: var(--muted); font-size: .8rem; }
.kpi strong { display: block; font-size: 1.5rem; margin-top: .25rem; }
.form-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: .8rem; }
form .full { grid-column: 1 / -1; }
.notice { border-left: 4px solid var(--primary); padding: .8rem 1rem; background: #eff6ff; border-radius: 12px; }
@media (max-width: 1100px) {
  .cards { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
  .filters { grid-template-columns: 1fr 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .topbar { align-items: start; flex-direction: column; }
  .cards, .filters, .kpis, .form-row { grid-template-columns: 1fr; }
}
.header-actions { display: flex; gap: .7rem; flex-wrap: wrap; justify-content: flex-end; }
.integration-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(140px, 1fr));
  gap: .7rem;
  margin-bottom: 1rem;
}
.integration-strip > div {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: .75rem;
  box-shadow: var(--shadow);
  color: var(--muted);
  font-size: .85rem;
}
.integration-strip strong { color: var(--text); display:block; margin-bottom:.2rem; }
.status-dot { width:.75rem; height:.75rem; border-radius:999px; display:inline-block; margin-right:.35rem; }
.status-dot.off { background: var(--red); }
.status-dot.on { background: var(--green); }
.code-inline { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background:#f1f5f9; padding:.15rem .35rem; border-radius:.4rem; }
@media (max-width: 1100px) { .integration-strip { grid-template-columns: repeat(2, minmax(140px, 1fr)); } }
@media (max-width: 640px) { .integration-strip { grid-template-columns: 1fr; } .header-actions { justify-content:flex-start; } }
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 1rem; }
.login-card { width: min(440px, 100%); }
.login-card h1 { margin-top: .2rem; }
