@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;500;600;700&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:       #0c0c0c;
  --surface:  #161616;
  --surface2: #1f1f1f;
  --surface3: #2a2a2a;
  --border:   #2e2e2e;
  --border2:  #3a3a3a;
  --text:     #e2e2e2;
  --muted:    #5a5a5a;
  --muted2:   #888;
  --accent:   #f5a623;
  --accent-dim: rgba(245,166,35,0.12);
  --accent-hover: #ffb940;
  --danger:   #e05555;
  --success:  #4caf7d;
  --positive: #2a3d2e;
  --negative: #3d2a2a;
  --neutral:  #2a2e3d;
  --action:   #2e2a3d;
  --radius:   6px;
  --font: 'JetBrains Mono', 'Courier New', monospace;
}

html { font-size: 14px; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

/* ── BUTTONS ──────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  background: var(--surface2);
  color: var(--text);
  font: 500 13px/1 var(--font);
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  letter-spacing: .02em;
}
.btn:hover { background: var(--surface3); border-color: var(--border2); }
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #000;
  font-weight: 600;
}
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #000; }

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--muted2);
}
.btn-ghost:hover { background: var(--surface2); color: var(--text); }

.btn-danger {
  background: transparent;
  border-color: var(--danger);
  color: var(--danger);
}
.btn-danger:hover { background: var(--danger); color: #fff; }

.btn-sm { padding: 7px 14px; font-size: 12px; }
.btn-lg { padding: 14px 28px; font-size: 15px; }
.btn-full { width: 100%; justify-content: center; }

.btn[disabled] { opacity: .4; pointer-events: none; }

/* ── INPUTS ───────────────────────────────────── */
.input, .select, .textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font: 400 13px/1.5 var(--font);
  transition: border-color .15s;
  outline: none;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--accent);
}
.input::placeholder, .textarea::placeholder { color: var(--muted); }
.select { cursor: pointer; }
.textarea { resize: vertical; min-height: 80px; }

/* ── FORM GROUPS ──────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 11px; font-weight: 600; color: var(--muted2); letter-spacing: .08em; text-transform: uppercase; }
.field .hint { font-size: 11px; color: var(--muted); }

/* ── NAV ──────────────────────────────────────── */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.nav-brand {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.01em;
}
.nav-brand span { color: var(--accent); }
.nav-actions { display: flex; gap: 8px; align-items: center; }

/* ── BADGE ────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  border: 1px solid;
}
.badge-amber { background: var(--accent-dim); color: var(--accent); border-color: rgba(245,166,35,.3); }
.badge-green { background: rgba(76,175,125,.1); color: var(--success); border-color: rgba(76,175,125,.3); }
.badge-muted { background: var(--surface2); color: var(--muted2); border-color: var(--border); }

/* ── TOAST ────────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 9999;
}
.toast {
  padding: 12px 18px;
  background: var(--surface3);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  font-size: 13px;
  max-width: 320px;
  animation: slideIn .2s ease;
}
.toast.error { border-color: var(--danger); color: var(--danger); }
.toast.success { border-color: var(--success); color: var(--success); }
@keyframes slideIn { from { opacity:0; transform: translateY(8px); } to { opacity:1; transform: none; } }

/* ── SPINNER ──────────────────────────────────── */
.spinner {
  width: 16px; height: 16px;
  border: 2px solid var(--border2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .6s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── MODAL ────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.7);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(2px);
}
.modal {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 10px;
  padding: 28px;
  width: 100%;
  max-width: 440px;
  animation: modalIn .2s ease;
}
.modal-title { font-size: 16px; font-weight: 600; margin-bottom: 20px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 24px; }
@keyframes modalIn { from { opacity:0; transform: scale(.97); } to { opacity:1; transform: none; } }

/* ── UTILS ────────────────────────────────────── */
.hidden { display: none !important; }
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.text-muted { color: var(--muted2); }
.text-accent { color: var(--accent); }
.text-sm { font-size: 12px; }
.text-xs { font-size: 11px; }
.w-full { width: 100%; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
