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

:root {
  --accent:        #0071e3;
  --accent-hover:  #005bb5;
  --accent-ring:   rgba(0, 113, 227, 0.18);

  --text-primary:   #111318;
  --text-secondary: #4b5563;
  --text-muted:     #9ca3af;

  --border:    #e5e7eb;
  --bg:        #f9fafb;
  --card:      #ffffff;

  --radius-card:  16px;
  --radius-input: 10px;
  --radius-btn:   10px;
  --radius-pill:  999px;

  --shadow-card: 0 1px 3px rgba(0,0,0,0.06), 0 8px 24px rgba(0,0,0,0.07);
  --transition:  0.15s ease;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

body {
  background-color: #f9fafb;
  background-image: radial-gradient(circle, #d1d5db 1px, transparent 1px);
  background-size: 24px 24px;
}

/* ── NAV ── */
header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--border);
  height: 56px;
}

.nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.nav-logo img {
  height: 32px;
  width: auto;
}

.nav-logo span {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
}

.nav-links a {
  padding: 6px 13px;
  font-size: 0.9125rem;
  font-weight: 400;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 7px;
  transition: color var(--transition), background var(--transition);
  display: flex;
  align-items: center;
  gap: 5px;
}

.nav-links a:hover {
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.04);
}

.nav-lang-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 5px 10px;
  font-family: var(--font);
  font-size: 0.8125rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background var(--transition);
}

.nav-lang-btn:hover { background: rgba(0,0,0,0.04); }

.nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  gap: 0;
}

.nav-toggle-bars { display: flex; flex-direction: column; gap: 4px; }

.nav-toggle span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--text-primary);
  border-radius: 2px;
}

.nav-toggle-label {
  font-size: 0.55rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.07em;
  margin-top: 3px;
}

/* lang dropdown */
.lang-dropdown {
  position: relative;
}

.lang-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.10);
  padding: 4px;
  min-width: 130px;
  z-index: 200;
}

.lang-menu.open { display: block; }

.lang-menu a {
  display: block;
  padding: 7px 12px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 6px;
}

.lang-menu a:hover {
  background: var(--bg);
  color: var(--text-primary);
}

/* ── PAGE ── */
.page {
  min-height: 100vh;
  padding-top: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-bottom: 48px;
  gap: 0;
}

/* ── BRAND HEADER ── */
.brand-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  animation: fadeUp 0.4s ease both;
}

.brand-header img {
  width: 72px;
  height: 72px;
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
  object-fit: contain;
}

.brand-header h1 {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1.2;
}

.brand-header p {
  font-size: 0.875rem;
  color: var(--text-muted);
  letter-spacing: -0.01em;
}

/* feature pill row */
.feature-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
}

.feature-pills span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: #fff;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

/* app store callout */
.app-callout {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px 12px;
  max-width: 460px;
  margin: 0 auto 18px;
  padding: 10px 14px;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  background: #eff6ff;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 600;
  text-align: center;
}

.app-callout-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px 14px;
}

.app-callout a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
  font-size: 0.875rem;
}

.app-callout a:hover { text-decoration: underline; }

.app-callout a svg {
  flex: 0 0 auto;
}

/* ── CARD ── */
.card {
  width: 100%;
  max-width: 384px;
  background: var(--card);
  border-radius: var(--radius-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  animation: fadeUp 0.4s ease both 0.08s;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── STATUS MSG ── */
.status-msg {
  display: none;
  margin: 16px 20px 0;
  padding: 11px 14px;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 500;
  background: #fffbeb;
  color: #78350f;
  border: 1px solid #fde68a;
}

.status-msg.error   { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.status-msg.success { background: #f0fdf4; color: #14532d; border-color: #bbf7d0; }

/* ── TAB SWITCHER ── */
.tabs { padding: 16px 16px 0; }

.tab-switcher {
  display: flex;
  background: var(--bg);
  border-radius: 9px;
  padding: 3px;
  gap: 3px;
}

.tab-btn {
  flex: 1;
  background: none;
  border: none;
  padding: 8px 0;
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 7px;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
  letter-spacing: -0.01em;
}

.tab-btn.active {
  background: #fff;
  color: var(--text-primary);
  box-shadow: 0 1px 4px rgba(0,0,0,0.10), 0 0 0 1px rgba(0,0,0,0.06);
}

/* ── FORM BODY ── */
.form-body { padding: 20px; }

.form-pane { display: none; }
.form-pane.active {
  display: block;
  animation: fadeUp 0.2s ease both;
}

/* ── FIELD ── */
.field {
  margin-bottom: 10px;
  position: relative;
  width: 100%;
}

.field-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  z-index: 2;
  pointer-events: none;
}

.field input {
  width: 100%;
  height: 44px;
  padding: 0 14px 0 38px;
  border: 1px solid var(--border);
  border-radius: var(--radius-input);
  font-family: var(--font);
  font-size: 0.9375rem;
  color: var(--text-primary);
  background: var(--bg);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  letter-spacing: -0.01em;
}

.field.no-icon input { padding-left: 14px; }
.field.has-toggle input { padding-right: 40px; }

.field input::placeholder { color: var(--text-muted); }

.field input:focus {
  background: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}

.field .toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  cursor: pointer;
  z-index: 2;
  transition: color var(--transition);
  display: flex;
  align-items: center;
}

.field .toggle-password:hover { color: var(--text-secondary); }

.field[data-tip] .field-tip {
  display: none;
  position: absolute;
  top: calc(100% + 5px);
  left: 0; right: 0;
  background: #111318;
  color: #f9fafb;
  font-size: 0.74rem;
  padding: 8px 11px;
  border-radius: 7px;
  z-index: 20;
  line-height: 1.5;
  pointer-events: none;
}

.field[data-tip]:focus-within .field-tip { display: block; }

/* ── META ROW ── */
.row-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 8px 0 14px;
  font-size: 0.8125rem;
}

.row-meta label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

.row-meta input[type="checkbox"] {
  width: 14px;
  height: 14px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}

.row-meta a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.row-meta a:hover { text-decoration: underline; }

/* ── PRIMARY BUTTON ── */
.btn-primary {
  width: 100%;
  height: 44px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-btn);
  font-family: var(--font);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 12px rgba(0,113,227,0.28);
}

.btn-primary:active { transform: scale(0.99); }

/* ── TERMS ── */
.terms-line {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 4px 0 12px;
  line-height: 1.55;
}

.terms-line a { color: var(--text-secondary); font-weight: 500; text-decoration: underline; }

/* ── SUCCESS PANE ── */
.success-pane {
  display: none;
  text-align: center;
  padding: 32px 20px;
}

.success-pane .icon {
  width: 52px;
  height: 52px;
  background: #f0fdf4;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  font-size: 1.35rem;
}

.success-pane p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 18px;
}

.success-pane a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

/* ── CARD FOOTER ── */
.card-footer {
  border-top: 1px solid var(--border);
  padding: 12px 20px;
  text-align: center;
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.7;
  background: var(--bg);
  border-radius: 0 0 var(--radius-card) var(--radius-card);
}

.card-footer a { color: var(--text-muted); text-decoration: none; }
.card-footer a:hover { color: var(--text-secondary); text-decoration: underline; }
.card-footer .sep { margin: 0 5px; }

/* ── PAGE FOOTER ── */
.page-footer {
  margin-top: 20px;
  text-align: center;
  font-size: 0.72rem;
  color: var(--text-muted);
  animation: fadeUp 0.4s ease both 0.15s;
}

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  .nav-toggle { display: flex; }

  .nav-links {
    display: none;
    position: fixed;
    top: 56px;
    left: 0; right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: center;
    padding: 10px 16px 16px;
    gap: 2px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    z-index: 99;
  }

  .nav-links.open { display: flex; }

  .nav-links a {
    width: 180px;
    justify-content: center;
    font-size: 0.9375rem;
    padding: 10px 16px;
  }

  .page { padding: 72px 16px 48px; }

  .card { max-width: 100%; }
}
