:root {
  --bg: #08080a;
  --panel: #111114;
  --line: rgba(255,255,255,0.08);
  --text: #f2f2f4;
  --muted: #7a7a86;
  --font: "DM Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", monospace;
  --accent: #5b8def;
}

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

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

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

.auth-top {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(8,8,10,0.9);
  backdrop-filter: blur(12px);
}

.auth-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--muted);
}
.auth-back:hover { color: var(--text); }
.auth-back svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }

.auth-brand {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 800;
}
.auth-brand img { width: 24px; height: 24px; }

.auth-shell {
  max-width: 1100px; margin: 0 auto;
  padding: 32px 24px 64px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start;
}

@media (max-width: 900px) {
  .auth-shell { grid-template-columns: 1fr; }
}

.auth-panel {
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(255,255,255,0.03), transparent), var(--panel);
  padding: 28px;
  position: relative; overflow: hidden;
}

.auth-panel::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 80% 50% at 0% 0%, var(--accent-soft, rgba(91,141,239,0.12)), transparent 55%);
}

.auth-panel > * { position: relative; z-index: 1; }

.auth-hero h1 {
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 900; letter-spacing: -0.04em; line-height: 1.05;
  margin-bottom: 10px;
}

.auth-hero p { color: var(--muted); font-size: 14px; line-height: 1.6; margin-bottom: 20px; }

.auth-features { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.auth-feat {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--muted);
  padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: rgba(0,0,0,0.2);
}
.auth-feat-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 10px var(--accent);
}

.tool-switch {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px;
}

.tool-pill {
  font-size: 11px; font-weight: 700; padding: 7px 12px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted);
  background: rgba(255,255,255,0.02);
  transition: all 0.2s;
}
.tool-pill:hover { color: var(--text); border-color: rgba(255,255,255,0.15); }
.tool-pill.active {
  color: var(--text);
  border-color: var(--accent);
  background: var(--accent-soft, rgba(91,141,239,0.12));
}

.auth-form label {
  display: block; font-size: 10px; font-weight: 800;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 8px;
}

.auth-input {
  width: 100%; padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,0.35);
  color: var(--text); font: inherit; font-size: 15px;
  margin-bottom: 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.auth-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft, rgba(91,141,239,0.15));
}
.auth-input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.auth-btn {
  width: 100%; padding: 14px;
  border: 0; border-radius: 10px;
  font: inherit; font-size: 14px; font-weight: 800;
  color: #fff; cursor: pointer;
  background: var(--accent);
  transition: filter 0.2s, transform 0.2s;
}
.auth-btn:hover { filter: brightness(1.06); }
.auth-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.auth-btn-ghost {
  display: block; text-align: center;
  margin-top: 10px; padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  font-size: 13px; font-weight: 700; color: var(--muted);
  background: rgba(255,255,255,0.02);
}
.auth-btn-ghost:hover { color: var(--text); border-color: rgba(255,255,255,0.15); }

.auth-msg {
  margin-top: 14px; padding: 12px 14px; border-radius: 10px;
  font-size: 13px; display: none;
}
.auth-msg.error {
  display: block;
  color: #f87171;
  background: rgba(248,113,113,0.1);
  border: 1px solid rgba(248,113,113,0.25);
}
.auth-msg.success {
  display: block;
  color: #34d399;
  background: rgba(52,211,153,0.1);
  border: 1px solid rgba(52,211,153,0.25);
}

.dashboard { display: none; }
.dashboard.active { display: block; }
.login-view.hidden { display: none; }

.dash-header {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
  margin-bottom: 24px;
}
.dash-header h2 { font-size: 24px; font-weight: 800; letter-spacing: -0.03em; }
.dash-user {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 600;
  padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255,255,255,0.03);
}
.dash-logout {
  padding: 8px 14px; border-radius: 8px; border: 1px solid rgba(248,113,113,0.3);
  background: rgba(248,113,113,0.1); color: #f87171;
  font-size: 12px; font-weight: 700; cursor: pointer;
}

.dash-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px;
}
@media (max-width: 700px) { .dash-grid { grid-template-columns: 1fr; } }

.dash-card {
  padding: 20px; border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,0.25);
}
.dash-card h3 {
  font-size: 12px; font-weight: 800; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 14px;
}
.dash-row { margin-bottom: 12px; }
.dash-row label { display: block; font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.dash-row span { font-size: 14px; font-weight: 600; font-family: var(--mono); }

.sub-item {
  padding: 12px; border-radius: 10px; margin-bottom: 10px;
  border: 1px solid var(--line); background: rgba(255,255,255,0.02);
}
.sub-name {
  display: inline-block; font-size: 11px; font-weight: 800;
  padding: 4px 10px; border-radius: 999px;
  background: var(--accent-soft, rgba(91,141,239,0.15));
  color: var(--accent); margin-bottom: 8px;
}
.sub-active { color: #34d399; font-size: 11px; font-weight: 700; }
.sub-expired { color: #f87171; font-size: 11px; font-weight: 700; }

.download-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 18px; border-radius: 10px;
  font-size: 13px; font-weight: 800; color: #fff;
  background: var(--accent);
  margin-top: 8px;
}
.download-btn.disabled {
  opacity: 0.5; pointer-events: none;
}

.whats-list { list-style: none; }
.whats-list li {
  font-size: 13px; color: var(--muted);
  padding: 6px 0; border-bottom: 1px solid var(--line);
}
.whats-list li:last-child { border-bottom: 0; }
