:root {
  --bg: #0b0f17;
  --surface: #121824;
  --card: #171f2e;
  --border: #253147;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --emerald: #00d084;
  --crimson: #ff4d6a;
  --gold: #f5b731;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; }
body { background: var(--bg); color: var(--text); }
.login-overlay {
  position: fixed; inset: 0; background: rgba(11, 15, 23, 0.94); z-index: 999;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.login-card {
  width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px; padding: 24px; display: flex; flex-direction: column; gap: 10px;
}
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 260px; background: var(--surface); border-right: 1px solid var(--border);
  padding: 20px; display: flex; flex-direction: column; gap: 18px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 10px; background: linear-gradient(135deg, var(--emerald), var(--gold));
  color: #0b0f17; font-weight: 800; display: grid; place-items: center; font-size: 20px;
}
.brand h1 { font-size: 16px; letter-spacing: 0.8px; }
.badge { font-size: 10px; padding: 2px 6px; border-radius: 4px; background: rgba(245, 183, 49, 0.16); color: var(--gold); font-weight: 700; }
.nav-menu { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.nav-btn {
  text-align: left; background: transparent; border: 1px solid transparent; color: var(--muted);
  padding: 10px 12px; border-radius: 10px; cursor: pointer; font-size: 14px; font-weight: 500;
}
.nav-btn:hover { background: var(--card); color: var(--text); }
.nav-btn.active { background: rgba(0, 208, 132, 0.14); color: var(--emerald); border-color: rgba(0, 208, 132, 0.35); }
.disclaimer { font-size: 11px; color: var(--gold); background: rgba(245, 183, 49, 0.1); padding: 10px; border-radius: 8px; border: 1px solid rgba(245, 183, 49, 0.25); }

.main { flex: 1; padding: 24px 32px; overflow-y: auto; }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; gap: 16px; flex-wrap: wrap; }
.subtitle { color: var(--muted); font-size: 13px; margin-top: 4px; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.status-pill { font-size: 12px; padding: 6px 12px; border-radius: 999px; background: rgba(0, 208, 132, 0.14); color: var(--emerald); font-weight: 600; }

.panel { display: none; flex-direction: column; gap: 20px; }
.panel.active { display: flex; }
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.kpi-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px; }
.kpi-label { font-size: 12px; color: var(--muted); }
.kpi-val { font-size: 22px; font-weight: 700; margin-top: 6px; font-family: monospace; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 20px; overflow-x: auto; }
.card h3 { margin-bottom: 14px; font-size: 16px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 600; font-size: 12px; }

.form-card { display: flex; flex-direction: column; gap: 12px; max-width: 720px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], textarea {
  background: var(--card); border: 1px solid var(--border); color: var(--text);
  padding: 10px; border-radius: 8px; font-size: 14px;
}
.checkbox-row { flex-direction: row; align-items: center; gap: 8px; color: var(--text); font-size: 14px; }

.btn { padding: 9px 14px; border-radius: 8px; border: none; cursor: pointer; font-weight: 600; font-size: 13px; }
.btn.primary { background: var(--emerald); color: #0b0f17; }
.btn.secondary { background: var(--card); color: var(--text); border: 1px solid var(--border); }
.btn.sm { padding: 5px 10px; font-size: 12px; }

.clean-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.clean-list li { background: var(--card); padding: 12px; border-radius: 10px; border: 1px solid var(--border); }
.ticket-stack { display: flex; flex-direction: column; gap: 12px; }
.ticket-item { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.pos { color: var(--emerald); }
.neg { color: var(--crimson); }
.toast {
  position: fixed; bottom: 20px; right: 20px; background: var(--card); border: 1px solid var(--emerald);
  color: var(--text); padding: 12px 18px; border-radius: 10px; display: none; font-size: 13px;
}
@media (max-width: 820px) {
  .layout { flex-direction: column; }
  .sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--border); }
}
