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

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

:root {
  --bg:      #0E1117;
  --surface: #141A24;
  --border:  #1E2736;
  --blue:    #2563EB;
  --cyan:    #00E0FF;
  --text:    #F5F7FA;
  --muted:   #A3A8B3;
  --error:   #f87171;
  --radius:  14px;
  --grad:    linear-gradient(135deg, #2563EB, #00E0FF);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.container {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* ── Header ── */
.site-header {
  text-align: center;
}

.site-header h1 {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 4px;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo {
  width: 160px;
  height: 160px;
  object-fit: contain;
  border-radius: 50%;
}

.logo-sm {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 50%;
}

.slogan {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 6px;
}

/* Dashboard header */
.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dash-header h1 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 3px;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Card ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card h2 {
  font-size: 17px;
  font-weight: 700;
}

/* ── Tabs ── */
.tabs {
  display: flex;
  gap: 4px;
  background: var(--bg);
  border-radius: 10px;
  padding: 4px;
}

.tab {
  flex: 1;
  padding: 9px;
  border: none;
  background: none;
  color: var(--muted);
  cursor: pointer;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  font-weight: 600;
  transition: all 0.15s;
}

.tab.active {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

/* ── Forms ── */
form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

input[type="email"],
input[type="password"] {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 13px 14px;
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  width: 100%;
  outline: none;
  transition: border-color 0.15s;
}

input[type="email"]:focus,
input[type="password"]:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.consent-label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
}

.consent-label input[type="checkbox"] {
  margin-top: 2px;
  accent-color: var(--blue);
  flex-shrink: 0;
}

.consent-label a { color: var(--cyan); text-decoration: none; }
.consent-label a:hover { text-decoration: underline; }

/* ── Buttons ── */
.btn-primary {
  background: var(--grad);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 13px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: block;
  letter-spacing: 0.3px;
  transition: opacity 0.15s, transform 0.1s;
}

.btn-primary:hover  { opacity: 0.9; transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.btn-ghost {
  background: none;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 16px;
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
  font-weight: 600;
  transition: border-color 0.15s, color 0.15s;
}

.btn-ghost:hover { border-color: var(--blue); color: var(--cyan); }

/* ── Feedback ── */
.err   { color: var(--error); font-size: 13px; min-height: 18px; }
.ok    { color: var(--cyan);  font-size: 13px; }
.muted { color: var(--muted); font-size: 13px; }
.loading { text-align: center; color: var(--muted); padding: 40px 0; }

/* ── Status badge ── */
.status {
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}

.status.active {
  background: rgba(0, 224, 255, 0.07);
  color: var(--cyan);
  border: 1px solid rgba(0, 224, 255, 0.2);
}

.status.expired {
  background: rgba(248, 113, 113, 0.07);
  color: var(--error);
  border: 1px solid rgba(248, 113, 113, 0.2);
}

/* ── QR ── */
.qr-wrap { text-align: center; }
.qr-wrap img {
  width: 192px;
  height: 192px;
  border-radius: 12px;
  border: 2px solid var(--border);
  padding: 8px;
  background: #fff;
}

/* ── Steps (setup) ── */
.steps { display: flex; flex-direction: column; gap: 16px; }

.step { display: flex; gap: 12px; align-items: flex-start; }

.step-num {
  width: 28px; height: 28px;
  background: var(--grad);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 13px;
  flex-shrink: 0;
}

.dl-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.dl-links a { color: var(--cyan); text-decoration: none; font-size: 13px; font-weight: 600; }
.dl-links a:hover { text-decoration: underline; }

/* ── Actions ── */
.actions { display: flex; flex-direction: column; gap: 8px; }

/* ── Instruction (collapsible) ── */
details.how { border-top: 1px solid var(--border); padding-top: 12px; }
details.how summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  list-style: none;
}
details.how summary::before { content: '▶  '; font-size: 10px; }
details[open].how summary::before { content: '▼  '; }
details.how p { margin-top: 8px; font-size: 13px; color: var(--muted); line-height: 1.7; }

/* ── Support link ── */
.support-link {
  display: block;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  margin-top: 4px;
  transition: color 0.15s;
}
.support-link:hover { color: var(--cyan); }

/* ── Footer ── */
footer {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  justify-content: center;
  gap: 10px;
}

footer a { color: var(--muted); text-decoration: none; font-weight: 500; }
footer a:hover { color: var(--cyan); }
