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

:root {
  --bg: #0f1419;
  --surface: #1a222d;
  --surface-hover: #243040;
  --border: #2d3a4d;
  --text: #e8edf4;
  --muted: #8b9bb0;
  --accent: #3d8bfd;
  --accent-glow: rgba(61, 139, 253, 0.35);
  --error: #ff6b6b;
  --ok: #4ade80;
  --radius: 16px;
}

html,
body {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
}

body {
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(61, 139, 253, 0.12), transparent),
    var(--bg);
}

.app {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.screen {
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1.25rem;
  animation: fade-in 0.35s ease;
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.brand {
  text-align: center;
}

.brand h1 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.subtitle {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.hint,
.lede {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
  line-height: 1.4;
}

.flash {
  margin: 0;
  font-size: 0.875rem;
  text-align: center;
}

.flash--error {
  color: var(--error);
}

.flash--ok {
  color: var(--ok);
}

.hidden {
  display: none !important;
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  padding: 0.3rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.tab {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.55rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
}

.tab.active {
  background: var(--accent);
  color: #fff;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  width: 100%;
}

.panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--muted);
}

input {
  width: 100%;
  padding: 0.8rem 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 1rem;
}

input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.btn {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--accent);
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.btn:hover {
  background: #5a9dff;
  border-color: #5a9dff;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn--ghost:hover {
  background: var(--surface-hover);
  border-color: #3d4f66;
}

.link-btn,
.lock-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 0.875rem;
  cursor: pointer;
  padding: 0.35rem;
}

.link-btn:hover,
.lock-btn:hover {
  color: var(--text);
}

.account-card {
  text-align: center;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.account-name {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
}

.account-email {
  margin: 0.3rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}
