:root {
  color-scheme: dark;
  --bg: #070a10;
  --surface: #11151e;
  --surface-2: #171c27;
  --border: #293141;
  --text: #f5f7fb;
  --muted: #8992a5;
  --cyan: #00d8ff;
  --pink: #ff35ab;
  --violet: #8c63ff;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); overflow-x: hidden; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.glow { position: fixed; width: 420px; height: 420px; border-radius: 50%; filter: blur(120px); opacity: .1; pointer-events: none; }
.glow-cyan { background: var(--cyan); top: -180px; left: -180px; }
.glow-pink { background: var(--pink); right: -180px; bottom: -180px; }
.shell { width: min(1180px, calc(100% - 36px)); margin: 0 auto; padding: 34px 0 80px; position: relative; }
.brand { display: flex; align-items: center; gap: 14px; margin-bottom: 70px; letter-spacing: .08em; }
.brand .mark { width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid var(--cyan); border-radius: 14px; color: var(--cyan); font-weight: 950; box-shadow: 0 0 24px #00d8ff25; }
.brand strong, .brand span { display: block; }
.brand span { color: var(--muted); font-size: 11px; margin-top: 4px; letter-spacing: .18em; }
.card { background: linear-gradient(145deg, #151a24, #0d1118); border: 1px solid var(--border); border-radius: 24px; padding: 28px; }
.login { width: min(440px, 100%); margin: 0 auto; }
h1 { font-size: clamp(28px, 4vw, 44px); margin: 4px 0 8px; }
h2 { margin: 0 0 8px; }
.eyebrow { color: var(--cyan); font-size: 11px; font-weight: 900; letter-spacing: .18em; margin: 0; }
.muted { color: var(--muted); }
label { color: #cbd1dd; font-size: 13px; font-weight: 700; display: grid; gap: 8px; }
input, textarea, select { width: 100%; color: var(--text); background: #090d14; border: 1px solid var(--border); border-radius: 12px; padding: 13px 14px; outline: none; }
input:focus, textarea:focus, select:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px #00d8ff16; }
textarea { min-height: 100px; resize: vertical; }
form { display: grid; gap: 18px; margin-top: 24px; }
.primary { color: #04070c; font-weight: 950; border: 0; border-radius: 13px; padding: 14px 18px; background: linear-gradient(100deg, var(--cyan), var(--violet), var(--pink)); }
.primary.compact { padding: 11px 15px; }
.ghost, .danger { border-radius: 12px; padding: 10px 14px; background: transparent; }
.ghost { color: var(--text); border: 1px solid var(--border); }
.danger { color: #ff6c87; border: 1px solid #632c3d; }
.error { min-height: 18px; margin: 0; color: #ff6c87; font-size: 13px; }
.dashboard { display: grid; gap: 26px; }
.topbar, .panel-head { display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.tabs { display: flex; gap: 8px; border-bottom: 1px solid var(--border); }
.tab { color: var(--muted); background: transparent; border: 0; border-bottom: 2px solid transparent; padding: 14px 18px; font-weight: 850; }
.tab.active { color: var(--cyan); border-bottom-color: var(--cyan); }
.tab-count { display: inline-grid; place-items: center; min-width: 21px; height: 21px; margin-left: 6px; padding: 0 6px; color: #070a10; background: var(--pink); border-radius: 999px; font-size: 11px; }
.panel { display: none; }
.panel.active { display: block; }
.mission-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin-top: 20px; }
.mission { text-align: left; color: inherit; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 20px; }
.mission:hover { transform: translateY(-2px); border-color: #48536a; }
.mission.inactive { opacity: .55; }
.mission-top { display: flex; justify-content: space-between; gap: 12px; }
.badge { color: var(--cyan); background: #00d8ff12; border: 1px solid #00d8ff35; padding: 5px 8px; border-radius: 999px; font-size: 11px; font-weight: 900; }
.mission h3 { margin: 18px 0 8px; }
.mission-reward { color: var(--pink); font-weight: 900; margin-top: 18px; }
.reward-list { display: grid; gap: 14px; margin-top: 20px; }
.reward-card { display: grid; gap: 18px; color: inherit; background: var(--surface); border: 1px solid #ff35ab55; border-radius: 18px; padding: 20px; }
.reward-card.fulfilled { opacity: .65; border-color: var(--border); }
.reward-main { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.reward-card h3 { margin: 14px 0 7px; }
.reward-card p { margin: 5px 0; }
.reward-value { color: var(--pink); font-size: 22px; font-weight: 950; white-space: nowrap; }
.badge.pending { color: var(--pink); background: #ff35ab12; border-color: #ff35ab35; }
.badge.done { color: #56e6ad; background: #56e6ad12; border-color: #56e6ad35; }
.client-id { overflow-wrap: anywhere; }
.fulfill-reward { justify-self: end; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.wide { grid-column: 1 / -1; }
.toggle { display: flex; align-items: center; gap: 10px; }
.toggle input { width: 18px; height: 18px; accent-color: var(--cyan); }
.empty-state { text-align: center; padding: 70px 30px; }
.empty-icon { color: var(--pink); font-size: 46px; }
dialog { width: min(650px, calc(100% - 28px)); color: var(--text); background: #10151e; border: 1px solid var(--border); border-radius: 24px; padding: 0; }
dialog::backdrop { background: #02040ad9; backdrop-filter: blur(7px); }
dialog form { padding: 26px; margin: 0; }
.dialog-head, .dialog-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.dialog-actions { justify-content: flex-end; }
.icon-button { color: var(--muted); background: transparent; border: 0; font-size: 30px; }
.toast { position: fixed; right: 22px; bottom: 22px; background: #15231f; border: 1px solid #2f725c; border-radius: 13px; padding: 13px 18px; transform: translateY(100px); opacity: 0; transition: .25s; }
.toast.show { transform: translateY(0); opacity: 1; }

@media (max-width: 650px) {
  .brand { margin-bottom: 35px; }
  .topbar, .panel-head { align-items: flex-start; flex-direction: column; }
  .form-grid { grid-template-columns: 1fr; }
  .wide { grid-column: auto; }
  .tabs { overflow-x: auto; }
  .reward-main { align-items: flex-start; flex-direction: column; }
  .fulfill-reward { width: 100%; justify-self: stretch; }
}
