:root {
  --green:       #0a7d3c;
  --green-dark:  #075c2c;
  --green-light: #12a050;
  --bg:          #0f1419;
  --panel:       #1a2129;
  --panel-light: #232c36;
  --text:        #e8edf2;
  --text-dim:    #8a97a3;
  --border:      #2c3742;
  --accent:      #ffd23f;
  --danger:      #e05555;
  --radius:      12px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-height: 100%;
  overscroll-behavior: none;
}

a { color: inherit; text-decoration: none; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: var(--green); color: #fff; border: none;
  padding: 12px 22px; border-radius: var(--radius);
  font-size: 15px; font-weight: 600; cursor: pointer;
  transition: background .15s, transform .1s;
  white-space: nowrap;
}
.btn:hover  { background: var(--green-dark); }
.btn:active { transform: scale(.97); }
.btn-ghost  { background: var(--panel-light); color: var(--text); }
.btn-ghost:hover { background: var(--border); }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #c04444; }
.btn-sm { padding: 8px 16px; font-size: 13px; border-radius: 9px; }
.btn-full { width: 100%; }

/* ── Forms ── */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; color: var(--text-dim); font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }
.field input, .field textarea, .field select {
  background: var(--panel-light); border: 1px solid var(--border);
  color: var(--text); padding: 11px 14px; border-radius: var(--radius);
  font-size: 15px; font-family: inherit;
  transition: border-color .15s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--green);
}
.field textarea { resize: vertical; min-height: 80px; }

/* ── Cards ── */
.card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
}

/* ── Nav ── */
nav.topbar {
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  padding: 13px 20px; display: flex; align-items: center; gap: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,.4); position: sticky; top: 0; z-index: 100;
}
nav.topbar .logo { font-size: 21px; }
nav.topbar h1 { font-size: 17px; font-weight: 700; flex: 1; }
nav.topbar .nav-links { display: flex; gap: 8px; }

/* ── Layout helpers ── */
.page  { max-width: 960px; margin: 0 auto; padding: 28px 18px 60px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row   { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.spacer { flex: 1; }

/* ── Badge ── */
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  font-size: 12px; font-weight: 600;
}
.badge-green { background: rgba(10,125,60,.25); color: #5dff8f; }
.badge-dim   { background: var(--panel-light); color: var(--text-dim); }
.badge-accent { background: rgba(255,210,63,.15); color: var(--accent); }

/* ── Toast ── */
#toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--panel); border: 1px solid var(--border); color: var(--text);
  padding: 12px 22px; border-radius: 20px; font-size: 14px; font-weight: 500;
  box-shadow: 0 4px 20px rgba(0,0,0,.4); z-index: 9999;
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
#toast.show { opacity: 1; }

/* ── Loading overlay ── */
.spinner {
  width: 22px; height: 22px; border: 3px solid var(--border);
  border-top-color: var(--green); border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Empty state ── */
.empty {
  text-align: center; padding: 60px 24px;
  color: var(--text-dim); display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.empty .empty-icon { font-size: 48px; opacity: .6; }
.empty h3 { font-size: 17px; color: var(--text); }
.empty p  { font-size: 14px; max-width: 300px; line-height: 1.55; }

/* ── Responsive ── */
@media (max-width: 600px) {
  .page { padding: 18px 14px 50px; }
  nav.topbar h1 { font-size: 15px; }
}
