:root {
  --bg: #0f0f1a;
  --panel: #1a1a2e;
  --accent: #6c63ff;
  --green: #00d084;
  --red: #ff4757;
  --orange: #ff8c00;
  --text: #e0e0e0;
  --subtext: #888aaa;
  --border: #2a2a4a;
}

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

body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

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

/* ── Header ─────────────────────────────────────────── */
.header {
  background: var(--accent);
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.header-logo img { height: 32px; }
.header-logo span {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}
.header-nav { display: flex; align-items: center; gap: 16px; }
.header-nav a { color: rgba(255,255,255,0.85); font-size: 14px; }
.header-nav a:hover { color: #fff; text-decoration: none; }

/* ── Auth pages ─────────────────────────────────────── */
.auth-container {
  max-width: 400px;
  margin: 80px auto;
  padding: 0 20px;
}
.auth-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 36px 32px;
  position: relative;
}
.auth-sun {
  position: absolute;
}
.auth-logo {
  text-align: center;
  margin-bottom: 20px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100px;
}
.auth-logo .auth-sun {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.auth-logo img {
  height: 72px;
  width: 72px;
  object-fit: contain;
  position: relative;
  z-index: 1;
}
.auth-card h1 {
  font-size: 24px;
  margin-bottom: 8px;
  text-align: center;
}
.auth-card .subtitle {
  color: var(--subtext);
  font-size: 14px;
  text-align: center;
  margin-bottom: 28px;
}

/* ── Forms ──────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-size: 13px;
  color: var(--subtext);
  margin-bottom: 6px;
}
.form-group input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}
.form-group input:focus {
  border-color: var(--orange);
}

/* ── Buttons ────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 10px 24px;
  border-radius: 8px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
  text-align: center;
}
.btn:hover { opacity: 0.9; }
.btn:active { transform: scale(0.98); }

.btn-accent {
  background: var(--accent);
  color: #fff;
  width: 100%;
}
.btn-orange {
  background: var(--orange);
  color: #fff;
}
.btn-green {
  background: var(--green);
  color: #fff;
}
.btn-red {
  background: var(--red);
  color: #fff;
}

/* ── Flash messages ─────────────────────────────────── */
.flash {
  padding: 10px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 13px;
}
.flash-error { background: rgba(255,71,87,0.15); color: var(--red); border: 1px solid rgba(255,71,87,0.3); }
.flash-success { background: rgba(0,208,132,0.15); color: var(--green); border: 1px solid rgba(0,208,132,0.3); }
.flash-info { background: rgba(108,99,255,0.15); color: var(--accent); border: 1px solid rgba(108,99,255,0.3); }

/* ── Dashboard ──────────────────────────────────────── */
.dashboard-body {
  max-width: 560px;
  margin: 0 auto;
  padding: 20px;
}

.section {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}
.section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ── Dashboard fields & grid ────────────────────────── */
.radio-row {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
}
.radio-label {
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
}
.radio-label input[type="radio"] { accent-color: var(--accent); }

.btn-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}
.btn-grid .btn { font-size: 12px; padding: 10px 6px; }

.field-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}
.field-row label {
  font-size: 12px;
  color: var(--subtext);
  white-space: nowrap;
}
.field-sm {
  width: 70px;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  outline: none;
}
.field-sm:focus { border-color: var(--accent); }
.field-expand {
  flex: 1;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  outline: none;
  min-width: 0;
}
.field-expand:focus { border-color: var(--accent); }

/* ── Status log ────────────────────────────────────── */
.status-log {
  max-height: 200px;
  overflow-y: auto;
  font-family: Consolas, monospace;
  font-size: 12px;
}
.status-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-label { color: var(--text); flex: 1; }
.status-state { font-size: 11px; white-space: nowrap; }
.status-time { color: var(--subtext); font-size: 11px; white-space: nowrap; }
.status-empty { color: var(--subtext); font-size: 12px; padding: 8px 0; }

code {
  background: var(--bg);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--orange);
}

/* ── Subscribe page ─────────────────────────────────── */
.subscribe-container {
  max-width: 440px;
  margin: 80px auto;
  padding: 0 20px;
  text-align: center;
}
.subscribe-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 40px 32px;
}
.subscribe-card h1 { font-size: 28px; margin-bottom: 8px; }
.subscribe-card .price {
  font-size: 48px;
  font-weight: 700;
  color: var(--green);
  margin: 20px 0 4px;
}
.subscribe-card .price span {
  font-size: 16px;
  color: var(--subtext);
  font-weight: 400;
}
.subscribe-card ul {
  list-style: none;
  margin: 24px 0;
  text-align: left;
}
.subscribe-card ul li {
  padding: 8px 0;
  font-size: 14px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}
.subscribe-card ul li::before {
  content: "\2713";
  color: var(--green);
  font-weight: 700;
  margin-right: 10px;
}

/* ── Footer link ────────────────────────────────────── */
.auth-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 13px;
  color: var(--subtext);
}
.auth-footer a {
  color: var(--orange);
}
