:root {
  --bg: #0b0b0c;
  --panel: #121214;
  --panel-2: #18181b;
  --text: #f6f6f7;
  --muted: #9a9aa2;
  --line: #2b2b30;
  --accent: #f5f5f5;
  --accent-text: #111113;
  --danger: #ff6b6b;
  --success: #62d394;
  --warning: #f6c85f;
  --radius: 16px;
  --shadow: 0 20px 50px rgba(0,0,0,.34);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); }
body { min-height: 100vh; }
button, input, select { font: inherit; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
.app-shell { min-height: 100vh; }
.boot-card { min-height: 100vh; display: grid; place-items: center; align-content: center; gap: 16px; color: var(--muted); }
.brand-mark { width: 54px; height: 54px; border: 1px solid var(--line); border-radius: 15px; display: grid; place-items: center; font-weight: 900; color: var(--text); letter-spacing: -.04em; }
.auth-layout { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr); }
.auth-visual { padding: 56px; display: flex; flex-direction: column; justify-content: space-between; background: radial-gradient(circle at 20% 20%, #29292f 0, transparent 32%), linear-gradient(145deg,#101012,#080809); border-right: 1px solid var(--line); }
.auth-visual h1 { font-size: clamp(42px, 6vw, 84px); line-height: .92; margin: 0; max-width: 780px; letter-spacing: -.06em; text-transform: uppercase; }
.auth-visual p { color: var(--muted); max-width: 560px; line-height: 1.6; }
.auth-pane { display: grid; place-items: center; padding: 32px; }
.card { width: min(100%, 520px); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; }
.card.wide { width: 100%; max-width: none; }
.eyebrow { color: var(--muted); text-transform: uppercase; letter-spacing: .16em; font-size: 12px; font-weight: 800; }
h1,h2,h3,p { margin-top: 0; }
h2 { letter-spacing: -.03em; }
.muted { color: var(--muted); }
.stack { display: grid; gap: 16px; }
.field { display: grid; gap: 8px; }
.field label { font-size: 13px; color: #c8c8ce; font-weight: 700; }
.field input, .field select { width: 100%; border: 1px solid var(--line); background: #0e0e10; color: var(--text); border-radius: 12px; padding: 13px 14px; outline: none; }
.field input:focus, .field select:focus { border-color: #6f6f77; box-shadow: 0 0 0 3px rgba(255,255,255,.06); }
.btn { border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; background: var(--panel-2); color: var(--text); font-weight: 800; }
.btn:hover { filter: brightness(1.08); }
.btn.primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.btn.danger { color: #fff; border-color: #5e2f31; background: #3a1e20; }
.btn.ghost { background: transparent; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.notice { border: 1px solid var(--line); background: #101012; border-radius: 12px; padding: 12px 14px; font-size: 14px; line-height: 1.5; }
.notice.error { border-color: #5e2f31; color: #ffd5d5; }
.notice.success { border-color: #24563b; color: #caf4d9; }
.notice.warning { border-color: #5d4d24; color: #ffe7a7; }
.small { font-size: 12px; }
.inline { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.shell { min-height: 100vh; display: grid; grid-template-columns: 250px minmax(0,1fr); }
.sidebar { border-right: 1px solid var(--line); background: #0d0d0f; padding: 24px 18px; display: flex; flex-direction: column; gap: 28px; }
.brand { display: flex; gap: 12px; align-items: center; font-weight: 900; letter-spacing: -.03em; }
.brand .brand-mark { width: 40px; height: 40px; border-radius: 11px; }
.nav { display: grid; gap: 8px; }
.nav a { padding: 11px 12px; border-radius: 10px; color: var(--muted); font-weight: 700; }
.nav a:hover, .nav a.active { background: var(--panel-2); color: var(--text); }
.sidebar-footer { margin-top: auto; display: grid; gap: 12px; }
.user-chip { border-top: 1px solid var(--line); padding-top: 16px; }
.user-chip strong, .user-chip span { display: block; }
.user-chip span { color: var(--muted); font-size: 12px; margin-top: 4px; }
.main { padding: 32px; min-width: 0; }
.topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.topbar h1 { font-size: 32px; letter-spacing: -.05em; margin-bottom: 8px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(12, minmax(0,1fr)); }
.col-4 { grid-column: span 4; }
.col-6 { grid-column: span 6; }
.col-8 { grid-column: span 8; }
.col-12 { grid-column: span 12; }
.metric { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.metric .value { font-size: 30px; font-weight: 900; letter-spacing: -.04em; }
.metric .label { color: var(--muted); font-size: 13px; margin-top: 8px; }
.status { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warning); }
.status.ok .status-dot { background: var(--success); }
.status.bad .status-dot { background: var(--danger); }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; background: var(--panel); min-width: 760px; }
th, td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; font-size: 14px; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
tr:last-child td { border-bottom: 0; }
.badge { display: inline-flex; padding: 5px 8px; border: 1px solid var(--line); border-radius: 999px; font-size: 11px; font-weight: 800; }
.badge.ok { color: #b9f1cf; border-color: #28563c; }
.badge.off { color: #ffc7c7; border-color: #623235; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: #0b0b0d; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; word-break: break-all; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 16px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 22px 0; }
@media (max-width: 900px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-visual { min-height: 300px; border-right: 0; border-bottom: 1px solid var(--line); }
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; border-right: 0; border-bottom: 1px solid var(--line); }
  .nav { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .sidebar-footer { margin-top: 0; }
  .main { padding: 22px; }
  .col-4,.col-6,.col-8 { grid-column: span 12; }
}
/* Fase 1 — Produtos e Estoque */
.col-3 { grid-column: span 3; }
.toolbar { display:flex; gap:10px; margin:16px 0; flex-wrap:wrap; }
.toolbar input,.toolbar select { min-width:220px; border:1px solid var(--line); background:#0e0e10; color:var(--text); border-radius:12px; padding:11px 13px; }
.form-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; }
.field textarea { width:100%; border:1px solid var(--line); background:#0e0e10; color:var(--text); border-radius:12px; padding:13px 14px; resize:vertical; font:inherit; }
.field textarea:focus { border-color:#6f6f77; outline:none; box-shadow:0 0 0 3px rgba(255,255,255,.06); }
.align-end { align-content:end; }
.hidden { display:none !important; }
.check { display:flex; gap:8px; align-items:center; color:#c8c8ce; }
.check input { width:auto; }
.variants-table { min-width:1180px; }
.variants-table input,.variants-table select { width:100%; min-width:92px; border:1px solid var(--line); background:#0e0e10; color:var(--text); border-radius:8px; padding:8px; }
.variants-table .money-input { min-width:100px; }
.variants-table .qty-input { min-width:70px; }
.modal-backdrop { position:fixed; inset:0; z-index:1000; background:rgba(0,0,0,.78); display:grid; place-items:center; padding:24px; overflow:auto; }
.modal-card { width:min(920px,100%); max-height:92vh; overflow:auto; background:var(--panel); border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow); padding:26px; }
.badge.warn { color:#ffe7a7; border-color:#5d4d24; }
.positive { color:var(--success); font-weight:800; }
.negative { color:#ff9c9c; font-weight:800; }
@media (max-width: 1100px) { .form-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } .col-3 { grid-column:span 6; } }
@media (max-width: 700px) { .form-grid { grid-template-columns:1fr; } .col-3 { grid-column:span 12; } .toolbar input,.toolbar select { width:100%; min-width:0; } }
