@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  --bg: #050505;
  --surface: #111113;
  --card: rgba(18, 18, 20, 0.88);
  --line: rgba(255, 255, 255, 0.08);
  --text: #ffffff;
  --muted: #9a9a9a;
  --red: #ff2d2d;
  --red-dim: rgba(255, 45, 45, 0.18);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, sans-serif;
}

body { overflow-x: hidden; }

.grid-bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 45, 45, 0.16), transparent 34%),
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: auto, 72px 72px, 72px 72px;
  pointer-events: none;
  z-index: 0;
}

.hero, .center, .app-wrap, .back-btn { position: relative; z-index: 1; }

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 64px 20px 80px;
}

.brand-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 18px;
  box-shadow: 0 0 40px rgba(255, 45, 45, 0.35);
  margin-bottom: 28px;
}

.brand-logo.small {
  width: 56px;
  height: 56px;
  margin-bottom: 14px;
}

h1 {
  font-family: 'Space Grotesk', Inter, sans-serif;
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 700;
  letter-spacing: -0.04em;
}

h1 span { color: #fff; }

.lede {
  color: var(--muted);
  margin: 16px 0 28px;
  line-height: 1.6;
  font-size: 15px;
}

.cta-row, .feature-grid {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 12px 20px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.btn:hover { transform: translateY(-1px); }
.btn-light { background: #fff; color: #111; }
.btn-ghost { background: #1a1a1c; color: #fff; border: 1px solid var(--line); }
.btn-danger { background: transparent; color: #ff6b6b; border: 1px solid rgba(255, 45, 45, 0.4); border-radius: 12px; }
.btn.full { width: 100%; border-radius: 12px; padding: 13px 18px; margin-top: 8px; }
.btn:disabled { opacity: 0.6; cursor: wait; transform: none; }

.feature-grid { margin-top: 72px; }
.feature-card {
  width: 220px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px 20px;
  backdrop-filter: blur(16px);
}

.feature-icon { font-size: 22px; margin-bottom: 14px; }
.feature-card h3 { font-size: 16px; margin-bottom: 6px; }
.feature-card p { color: var(--muted); font-size: 13px; line-height: 1.45; }

.center {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 88px 16px 32px;
}

.login-card {
  width: min(400px, 100%);
  background: #101012;
  border: 1px solid #2a2a2e;
  border-radius: 18px;
  padding: 28px 26px 22px;
  text-align: center;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
}

.auth-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 22px;
}
.auth-brand img { width: 22px; height: 22px; object-fit: contain; }
.auth-brand strong { letter-spacing: 0.16em; font-size: 15px; font-weight: 700; }

.login-card h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 32px;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
}
.login-card h2 span { color: #ff2d3a; }

.login-card form { display: grid; gap: 12px; text-align: left; }
.login-card form[hidden] { display: none; }
.login-card .sub { text-align: center; margin: 0 0 8px; }
.login-card h2 { text-align: center; }

.sub { color: var(--muted); font-size: 14px; margin: 4px 0 24px; }

.input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #161418;
  border: 1px solid #3a2428;
  border-radius: 12px;
  padding: 0 14px;
  margin-top: 2px;
  transition: border-color 0.15s ease;
}
.input-wrap:focus-within { border-color: #ff2d3a; }

.input-icon { width: 18px; height: 18px; color: #8d8d8d; display: grid; place-items: center; flex-shrink: 0; }
.input-icon svg { width: 18px; height: 18px; }

.auth-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.auth-row .text-link { font-size: 13px; font-weight: 600; white-space: nowrap; }

.remember {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: #d4d4d4;
  font-size: 13px;
  line-height: 1.4;
}
.remember input { margin-top: 2px; accent-color: #ff2d3a; }
.terms { margin-top: 2px; }

.text-link {
  border: 0;
  background: none;
  color: #ff4d57;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

.form-ok { color: #86efac; font-size: 13px; }

.input-wrap input {
  flex: 1;
  width: 100%;
  background: transparent;
  border: 0;
  color: #fff;
  padding: 14px 0;
  outline: none;
  font-size: 14px;
}
.input-wrap input::placeholder { color: #8a8a8a; }
.input-wrap input:-webkit-autofill,
.input-wrap input:-webkit-autofill:hover,
.input-wrap input:-webkit-autofill:focus {
  -webkit-text-fill-color: #fff;
  caret-color: #fff;
  border-radius: 12px;
  box-shadow: 0 0 0 1000px #161418 inset;
  transition: background-color 99999s ease-out;
}

.fine { margin-top: 4px; color: #eee; font-size: 14px; text-align: center; font-weight: 700; }
.fine a { color: #fff; }

.btn.btn-light.full {
  width: 100%;
  border: 0;
  border-radius: 12px;
  background: #ff2d3a;
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 14px 16px;
  cursor: pointer;
}
.btn.btn-light.full:disabled { opacity: 0.6; cursor: wait; }

.code-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #3a2428;
  border-radius: 14px;
  padding: 16px 12px;
  margin: 6px 0 4px;
}
.code-digit,
.reset-digit {
  width: 42px;
  height: 48px;
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  background: #121214;
  border: 1px solid #4a3034;
  border-radius: 10px;
}
.code-digit:focus,
.reset-digit:focus { outline: none; border-color: #ff2d3a; }
.code-dash { color: #888; font-size: 22px; margin: 0 2px; }
.verify-links { display: flex; justify-content: space-between; align-items: center; }
.text-link.light { color: #eee; font-weight: 600; }

.form-error {
  color: #ff7a7a;
  font-size: 13px;
  text-align: left;
  margin: 10px 0 0;
}

.back-btn {
  position: fixed;
  z-index: 20;
  top: 18px;
  left: 18px;
  color: #eee;
  text-decoration: none;
  background: #17171a;
  border: 1px solid #2e2e32;
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.back-btn:hover { border-color: #ff2d3a; color: #fff; }

.app-wrap {
  width: min(760px, calc(100% - 32px));
  margin: 64px auto;
  display: grid;
  gap: 16px;
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
}

.user-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.user-row { display: flex; align-items: center; gap: 14px; }
.avatar { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; background: #222; }
.muted { color: var(--muted); font-size: 14px; line-height: 1.55; margin-top: 8px; }
.kicker { color: var(--red); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 8px; }
.key-box {
  margin-top: 18px;
  background: #0c0c0e;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}
.key-box span { display: block; color: var(--muted); font-size: 11px; letter-spacing: 0.08em; }
.key-box code { color: #fff; font-size: 14px; }
.ok { margin-top: 14px; color: #4ade80; font-size: 14px; }

@media (max-width: 700px) {
  .feature-card { width: min(320px, 100%); }
  .user-panel { flex-direction: column; align-items: flex-start; }
}
