@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/assets/libs/fonts/PlusJakartaSans-latin-wght.woff2") format("woff2");
  unicode-range:
    U+0000-00FF,
    U+0131,
    U+0152-0153,
    U+02BB-02BC,
    U+02C6,
    U+02DA,
    U+02DC,
    U+0304,
    U+0308,
    U+0329,
    U+2000-206F,
    U+20AC,
    U+2122,
    U+2191,
    U+2193,
    U+2212,
    U+2215,
    U+FEFF,
    U+FFFD;
}

/* ── Tokens ─────────────────────────────────────────── */
:root {
  color-scheme: light;

  --primary: #fbbf24;
  --bg: #f3f4f6;
  --bg-dark: #064e3b;

  --text: #0f172a;
  --text-primary: #0f172a;
  --text-secondary: rgba(15, 23, 42, 0.78);
  --text-tertiary: rgba(100, 116, 139, 0.96);
  --text-muted: rgba(15, 23, 42, 0.68);
  --text-inverse: #ffffff;
  --text-on-accent: #0f172a;
  --text-info: #1d4ed8;
  --text-success: #065f46;
  --text-warn: #92400e;
  --text-danger: #991b1b;

  --card: #ffffff;
  --card-hero: #ffffff;
  --card-glass: rgba(255, 255, 255, 0.82);

  --surface-1: rgba(2, 6, 23, 0.03);
  --surface-2: rgba(2, 6, 23, 0.05);
  --surface-3: rgba(2, 6, 23, 0.08);
  --surface-accent: rgba(251, 191, 36, 0.15);
  --surface-info: rgba(59, 130, 246, 0.12);
  --surface-success: rgba(16, 185, 129, 0.14);
  --surface-warn: rgba(245, 158, 11, 0.16);
  --surface-danger: rgba(239, 68, 68, 0.14);

  --border: rgba(148, 163, 184, 0.45);
  --border-strong: rgba(148, 163, 184, 0.45);
  --border-soft: rgba(148, 163, 184, 0.25);
  --focus-ring: rgba(251, 191, 36, 0.9);

  --overlay-bg: rgba(2, 6, 23, 0.6);

  --shadow-lg: 0 18px 50px rgba(15, 23, 42, 0.16);
  --shadow-md: 0 10px 22px rgba(15, 23, 42, 0.12);
  --shadow-sm: 0 6px 14px rgba(15, 23, 42, 0.08);

  --radius-xl: 2rem;
  --radius-lg: 1.5rem;
  --radius-md: 1.1rem;
  --radius-sm: 0.9rem;
}

html.dark {
  color-scheme: dark;
  --text: rgba(248, 250, 252, 0.98);
  --text-primary: rgba(248, 250, 252, 0.98);
  --text-secondary: rgba(226, 232, 240, 0.9);
  --text-tertiary: rgba(203, 213, 225, 0.86);
  --text-muted: rgba(226, 232, 240, 0.82);
  --text-on-accent: #0f172a;
  --text-info: rgba(219, 234, 254, 0.96);
  --text-success: rgba(220, 252, 231, 0.96);
  --text-warn: rgba(254, 243, 199, 0.96);
  --text-danger: rgba(254, 202, 202, 0.97);

  --card: #0f172a;
  --card-hero: #111b31;
  --card-glass: rgba(15, 23, 42, 0.84);
  --bg-dark: #0b1220;

  --surface-1: rgba(255, 255, 255, 0.08);
  --surface-2: rgba(255, 255, 255, 0.1);
  --surface-3: rgba(255, 255, 255, 0.14);
  --surface-accent: rgba(251, 191, 36, 0.2);
  --surface-info: rgba(96, 165, 250, 0.24);
  --surface-success: rgba(16, 185, 129, 0.2);
  --surface-warn: rgba(245, 158, 11, 0.23);
  --surface-danger: rgba(239, 68, 68, 0.24);

  --border-strong: rgba(255, 255, 255, 0.24);
  --border-soft: rgba(255, 255, 255, 0.16);
  --focus-ring: rgba(251, 191, 36, 0.95);

  --overlay-bg: rgba(2, 6, 23, 0.72);
}

/* ── Reset ──────────────────────────────────────────── */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }

body {
  margin: 0;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  -webkit-tap-highlight-color: transparent;
  min-height: 100dvh;
  transition: background-color 220ms ease, color 220ms ease;
}

html.dark body {
  background: var(--bg-dark);
}

img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }

/* ── Shell ──────────────────────────────────────────── */
.acc-shell {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ── Header ─────────────────────────────────────────── */
.acc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  transition: background-color 220ms ease;
}

html.dark .acc-header {
  background: var(--bg-dark);
}

.acc-back {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid var(--border-soft);
  background: var(--card);
  display: grid;
  place-items: center;
  color: var(--text-primary);
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 180ms ease;
  box-shadow: var(--shadow-sm);
}

.acc-back:active {
  transform: scale(0.94);
}

.acc-back svg {
  width: 20px;
  height: 20px;
}

.acc-header-center {
  display: flex;
  align-items: center;
  gap: 8px;
}

.acc-brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--primary);
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.5);
}

.acc-brand-label {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* ── Theme toggle button ── */
.acc-theme-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 2px solid rgba(15, 23, 42, 0.18);
  background: #ffffff;
  display: grid;
  place-items: center;
  padding: 0;
  color: #1e293b;
  cursor: pointer;
  box-shadow:
    0 4px 14px rgba(15, 23, 42, 0.12),
    0 1px 3px rgba(15, 23, 42, 0.08);
  transition: transform 160ms ease, box-shadow 180ms ease, background 200ms ease, border-color 200ms ease;
}

.acc-theme-btn:hover {
  background: #f1f5f9;
  border-color: rgba(15, 23, 42, 0.28);
  box-shadow:
    0 6px 18px rgba(15, 23, 42, 0.16),
    0 2px 4px rgba(15, 23, 42, 0.1);
  transform: scale(1.06);
}

.acc-theme-btn:active {
  transform: scale(0.92);
}

html.dark .acc-theme-btn {
  background: #1e293b;
  border-color: rgba(148, 163, 184, 0.35);
  color: #fbbf24;
  box-shadow:
    0 4px 14px rgba(2, 6, 23, 0.4),
    0 1px 3px rgba(2, 6, 23, 0.2);
}

html.dark .acc-theme-btn:hover {
  background: #273548;
  border-color: rgba(251, 191, 36, 0.4);
  box-shadow:
    0 6px 18px rgba(2, 6, 23, 0.5),
    0 0 12px rgba(251, 191, 36, 0.12);
}

.acc-theme-btn:focus-visible {
  outline: 3px solid rgba(59, 130, 246, 0.5);
  outline-offset: 2px;
}

/* ── Theme icons ── */
.acc-theme-icon {
  width: 22px;
  height: 22px;
  color: inherit;
  stroke: currentColor;
  fill: none;
}

/* Light mode: show sun, hide moon */
.acc-icon-sun { opacity: 1; }
.acc-icon-moon { display: none; }

/* Dark mode: show moon, hide sun */
html.dark .acc-icon-sun { display: none; }
html.dark .acc-icon-moon { display: block; opacity: 1; }

/* ── Main ───────────────────────────────────────────── */
.acc-main {
  flex: 1;
  padding: 0 18px 40px;
  display: grid;
  gap: 18px;
  align-content: start;
}

/* ── Hero ───────────────────────────────────────────── */
.acc-hero {
  text-align: center;
  padding: 28px 20px 22px;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--card-hero);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-lg);
}

.acc-hero-glow {
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.28) 0%, transparent 70%);
  border-radius: 999px;
  pointer-events: none;
}

.acc-hero-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 20px;
  background: linear-gradient(135deg, #064e3b, #065f46);
  color: #ffffff;
  display: grid;
  place-items: center;
  box-shadow: 0 12px 30px rgba(6, 78, 59, 0.3);
  position: relative;
  z-index: 1;
}

html.dark .acc-hero-icon {
  background: linear-gradient(135deg, rgba(6, 95, 70, 0.95), rgba(6, 78, 59, 0.95));
  box-shadow: 0 12px 30px rgba(6, 78, 59, 0.5);
}

.acc-hero-icon svg {
  width: 30px;
  height: 30px;
}

.acc-hero-title {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  position: relative;
  z-index: 1;
}

.acc-hero-sub {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  line-height: 1.45;
  max-width: 300px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* ── Alert ──────────────────────────────────────────── */
.alert {
  display: none;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(239, 68, 68, 0.3);
  background: var(--surface-danger);
  color: var(--text-danger);
  font-weight: 700;
  font-size: 13px;
  line-height: 1.3;
}

html.dark .alert {
  background: var(--surface-danger);
  border-color: rgba(239, 68, 68, 0.44);
  color: var(--text-danger);
}

.alert.success {
  border-color: rgba(34, 197, 94, 0.3);
  background: var(--surface-success);
  color: var(--text-success);
}

html.dark .alert.success {
  border-color: rgba(34, 197, 94, 0.42);
  background: var(--surface-success);
  color: var(--text-success);
}

/* ── Card ───────────────────────────────────────────── */
.acc-card {
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  padding: 20px;
  box-shadow: var(--shadow-md);
  display: grid;
  gap: 18px;
}

html.dark .acc-card {
  border-color: var(--border-soft);
}

/* ── Tabs ───────────────────────────────────────────── */
.acc-tablist {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.acc-tab {
  min-height: 44px;
  border: 1px solid rgba(5, 150, 105, 0.16);
  border-radius: 16px;
  background: rgba(240, 253, 244, 0.82);
  color: #065f46;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 180ms ease, background 180ms ease;
}

.acc-tab:active {
  transform: scale(0.97);
}

html.dark .acc-tab {
  background: rgba(6, 95, 70, 0.24);
  color: #d1fae5;
  border-color: rgba(6, 95, 70, 0.35);
}

.acc-tab.is-active {
  background: linear-gradient(180deg, #fbbf24, #f59e0b);
  border-color: rgba(251, 191, 36, 0.5);
  color: #0f172a;
  box-shadow: 0 14px 28px rgba(251, 191, 36, 0.22);
}

html.dark .acc-tab.is-active {
  background: linear-gradient(180deg, #fbbf24, #f59e0b);
  color: #0f172a;
  border-color: rgba(251, 191, 36, 0.5);
}

/* ── Panels ─────────────────────────────────────────── */
.acc-tab-panels {
  min-height: 0;
}

.acc-tab-panel {
  display: none;
}

.acc-tab-panel.is-open {
  display: block;
  animation: acc-fade-in 260ms ease;
}

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

/* ── Form ───────────────────────────────────────────── */
.acc-form {
  display: grid;
  gap: 14px;
}

.acc-field {
  display: grid;
  gap: 8px;
}

.acc-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.acc-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.acc-input-icon {
  position: absolute;
  left: 16px;
  width: 20px;
  height: 20px;
  color: var(--text-tertiary);
  pointer-events: none;
  display: grid;
  place-items: center;
}

.acc-input-icon svg {
  width: 18px;
  height: 18px;
}

.acc-input {
  width: 100%;
  border: none;
  border-radius: 16px;
  padding: 16px 48px 16px 46px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  background: var(--surface-2);
  color: var(--text-primary);
  outline: none;
  box-shadow: inset 0 0 0 1px var(--border-soft);
  transition: box-shadow 180ms ease, transform 180ms ease, background-color 180ms ease;
  min-height: 52px;
}

html.dark .acc-input {
  background: var(--surface-2);
  color: var(--text-primary);
  box-shadow: inset 0 0 0 1px var(--border-soft);
}

.acc-input::placeholder {
  color: var(--text-tertiary);
  font-weight: 700;
}

.acc-input:focus {
  box-shadow: inset 0 0 0 2px var(--focus-ring), 0 0 0 4px rgba(251, 191, 36, 0.25);
  transform: translateY(-1px);
}

.acc-password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: 1px solid rgba(6, 95, 70, 0.14);
  border-radius: 12px;
  background: rgba(236, 253, 245, 0.92);
  color: #065f46;
  display: grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.64),
    0 8px 16px rgba(15, 23, 42, 0.06);
  transition: transform 120ms ease, background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}

.acc-password-toggle:active {
  transform: translateY(-50%) scale(0.96);
}

.acc-password-toggle:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.acc-password-toggle[aria-pressed="true"] {
  background: rgba(6, 95, 70, 0.96);
  border-color: rgba(6, 95, 70, 0.32);
  color: #f8fafc;
}

html.dark .acc-password-toggle {
  background: rgba(15, 118, 110, 0.22);
  border-color: rgba(110, 231, 183, 0.18);
  color: #ccfbf1;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 10px 18px rgba(2, 6, 23, 0.18);
}

html.dark .acc-password-toggle[aria-pressed="true"] {
  background: rgba(16, 185, 129, 0.28);
  border-color: rgba(110, 231, 183, 0.28);
  color: #f0fdf4;
}

.acc-password-eye {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
}

.acc-password-eye svg {
  width: 18px;
  height: 18px;
}

/* ── Button ─────────────────────────────────────────── */
.btn {
  border: none;
  border-radius: 20px;
  padding: 18px 18px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 120ms ease, filter 180ms ease, box-shadow 180ms ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  user-select: none;
  font-family: inherit;
  font-size: 14px;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--primary);
  color: var(--text-on-accent);
  box-shadow: 0 18px 34px rgba(251, 191, 36, 0.3);
}

.btn-primary:hover {
  filter: saturate(1.04) brightness(0.98);
}

.acc-submit {
  margin-top: 4px;
  min-height: 52px;
  border-radius: 18px;
  font-size: 13px;
}

.acc-btn-arrow {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* ── Link button ────────────────────────────────────── */
.acc-link-btn {
  background: none;
  border: none;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 8px 0;
  text-align: center;
}

.acc-link-btn strong {
  color: #065f46;
  font-weight: 800;
}

html.dark .acc-link-btn strong {
  color: #6ee7b7;
}

/* ── Info box ───────────────────────────────────────── */
.acc-info-box {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--surface-info);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

html.dark .acc-info-box {
  background: var(--surface-info);
  border-color: rgba(96, 165, 250, 0.25);
}

.acc-info-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--text-info);
  margin-top: 1px;
}

.acc-info-box p {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--text-info);
}

/* ── Footer card ────────────────────────────────────── */
.acc-footer-card {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  background: var(--surface-1);
  border: 1px solid var(--border-soft);
}

.acc-footer-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(6, 78, 59, 0.1);
  color: #065f46;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

html.dark .acc-footer-icon {
  background: rgba(6, 95, 70, 0.25);
  color: #6ee7b7;
}

.acc-footer-icon svg {
  width: 18px;
  height: 18px;
}

.acc-footer-text {
  min-width: 0;
}

.acc-footer-title {
  margin: 0 0 2px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.acc-footer-sub {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* ── Loading state ──────────────────────────────────── */
.acc-submit.is-loading {
  pointer-events: none;
  opacity: 0.7;
}

.acc-submit.is-loading span {
  opacity: 0;
}

.acc-submit.is-loading::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2.5px solid transparent;
  border-top-color: var(--text-on-accent);
  border-radius: 999px;
  animation: acc-spin 600ms linear infinite;
}

@keyframes acc-spin {
  to { transform: rotate(360deg); }
}

/* ── Responsive ─────────────────────────────────────── */
@media (min-width: 820px) {
  .acc-shell {
    max-width: 520px;
  }
}

@media (max-height: 680px) {
  .acc-hero {
    padding: 20px 18px 16px;
  }

  .acc-hero-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    margin-bottom: 10px;
  }

  .acc-hero-icon svg {
    width: 22px;
    height: 22px;
  }

  .acc-hero-title {
    font-size: 22px;
  }

  .acc-hero-sub {
    font-size: 11px;
  }

  .acc-main {
    gap: 14px;
  }

  .acc-card {
    padding: 16px;
    gap: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body,
  .btn,
  .acc-input,
  .acc-tab,
  .acc-tab-panel.is-open {
    transition: none;
    animation: none;
  }
}
