/* public.css — welcome, login, logout, and signup pages */

/* ---------- Shared ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* ---------- Landing (welcome.php) ---------- */
body.landing {
  margin: 0;
  background: var(--surface-0);
  color: var(--text-1);
  -webkit-font-smoothing: antialiased;
}

/* ---------- Navigation ---------- */
.landing-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  padding: 14px clamp(20px, 4vw, 48px);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .landing-nav {
    background: rgba(34, 39, 47, 0.92);
  }
}

.landing-nav .logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.landing-nav .logo {
  height: 36px;
  width: auto;
}

.landing-nav .spacer { flex: 1; }

.landing-nav .nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.landing-nav .nav-links a:not(.btn) {
  color: var(--text-2);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s ease;
}

.landing-nav .nav-links a:not(.btn):hover {
  color: var(--text-1);
  text-decoration: none;
}

.landing-nav .hamb {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 20px;
  color: var(--text-1);
  cursor: pointer;
  line-height: 1;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(64px, 10vw, 112px) clamp(20px, 4vw, 48px) clamp(72px, 12vw, 120px);
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, var(--brand-soft) 0%, transparent 70%),
    linear-gradient(180deg, var(--surface-2) 0%, var(--surface-0) 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.35;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.4) 0%, transparent 80%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,0.4) 0%, transparent 80%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}

.hero-copy { text-align: left; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  margin-bottom: 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-strong);
  background: var(--brand-soft);
  border: 1px solid rgba(74, 137, 220, 0.25);
  border-radius: var(--radius-pill);
}

.hero-badge svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.hero h1 {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
  color: var(--text-1);
}

.hero h1 .accent {
  color: var(--brand-strong);
}

.hero .lead {
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.6;
  color: var(--text-2);
  max-width: 520px;
  margin: 0 0 32px;
}

.hero .cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 36px;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 16px;
  font-weight: 600;
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-2);
}

.trust-item svg {
  width: 20px;
  height: 20px;
  color: var(--brand);
  flex-shrink: 0;
}

.hero-visual {
  position: relative;
}

.hero-mockup {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-2), 0 24px 48px rgba(22, 91, 211, 0.12);
  background: var(--surface-2);
}

.hero-mockup-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  background: var(--surface-1);
  border-bottom: 1px solid var(--border);
}

.hero-mockup-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-strong);
}

.hero-mockup-bar span:first-child { background: #ff5f57; }
.hero-mockup-bar span:nth-child(2) { background: #febc2e; }
.hero-mockup-bar span:nth-child(3) { background: #28c840; }

/* ---------- UI mockups (CSS/SVG product previews) ---------- */
.ui-mockup {
  font-size: 11px;
  line-height: 1.4;
  color: var(--text-1);
}

.ui-app {
  display: flex;
  min-height: 280px;
  background: var(--surface-0);
}

.ui-sidebar {
  width: 52px;
  flex-shrink: 0;
  padding: 14px 10px;
  background: var(--surface-2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.ui-sidebar-logo {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand-strong), var(--brand));
}

.ui-nav-dot {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--surface-1);
  border: 1px solid var(--border);
}

.ui-nav-dot.active {
  background: var(--brand-soft);
  border-color: rgba(74, 137, 220, 0.35);
}

.ui-main {
  flex: 1;
  padding: 16px;
  min-width: 0;
}

.ui-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.ui-topbar h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-1);
}

.ui-pill {
  font-size: 9px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  background: var(--success-bg);
  color: var(--success);
}

.ui-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.ui-stat {
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.ui-stat label {
  display: block;
  font-size: 9px;
  color: var(--text-3);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ui-stat strong {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.ui-stat.sales strong { color: var(--brand-strong); }
.ui-stat.income strong { color: #0d9710; }
.ui-stat.unpaid strong { color: #da280c; }
.ui-stat.expense strong { color: var(--text-2); }

.ui-chart-wrap {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
}

.ui-chart-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.ui-chart-head span {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-2);
}

.ui-chart {
  width: 100%;
  height: auto;
  display: block;
}

/* Invoice mockup */
.ui-invoice {
  padding: 16px;
  background: var(--surface-0);
}

.ui-invoice-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.ui-invoice-head h3 {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 600;
}

.ui-invoice-head p {
  margin: 0;
  font-size: 9px;
  color: var(--text-3);
}

.ui-invoice-no {
  text-align: right;
  font-size: 9px;
  color: var(--text-3);
}

.ui-invoice-no strong {
  display: block;
  font-size: 12px;
  color: var(--brand-strong);
  margin-top: 2px;
}

.ui-field {
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  font-size: 10px;
  color: var(--text-2);
}

.ui-field.filled { color: var(--text-1); font-weight: 500; }

.ui-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 10px;
  font-size: 9px;
}

.ui-table th {
  text-align: left;
  padding: 6px 8px;
  background: var(--surface-1);
  color: var(--text-3);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border);
}

.ui-table td {
  padding: 7px 8px;
  border-bottom: 1px solid var(--border);
  color: var(--text-2);
}

.ui-table tr:last-child td { border-bottom: none; }

.ui-total-row {
  display: flex;
  justify-content: flex-end;
  gap: 24px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 10px;
}

.ui-total-row div { text-align: right; }
.ui-total-row label { display: block; color: var(--text-3); font-size: 9px; }
.ui-total-row strong { font-size: 13px; color: var(--brand-strong); }

.ui-btn-mini {
  display: inline-block;
  margin-top: 10px;
  padding: 6px 14px;
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  background: var(--brand);
  border-radius: 6px;
}

/* Ledger mockup */
.ui-ledger {
  padding: 16px;
  background: var(--surface-0);
}

.ui-ledger-search {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.ui-ledger-search .ui-field {
  flex: 1;
  margin: 0;
}

.ui-ledger-search .ui-btn-mini {
  margin: 0;
  white-space: nowrap;
}

.ui-ledger-table .ui-table td:last-child,
.ui-ledger-table .ui-table th:last-child { text-align: right; }

.ui-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  font-size: 8px;
  font-weight: 600;
}

.ui-badge.paid { background: var(--success-bg); color: var(--success); }
.ui-badge.due { background: var(--danger-bg); color: var(--danger); }
.ui-badge.partial { background: var(--warning-bg); color: var(--warning); }

/* Screen cards with mockups */
.screen-preview {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--surface-0);
  display: flex;
  flex-direction: column;
}

.screen-preview .ui-mockup {
  height: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.screen-preview .ui-app,
.screen-preview .ui-invoice,
.screen-preview .ui-ledger {
  flex: 1;
}

.screen-card--dashboard .ui-stats { grid-template-columns: repeat(4, 1fr); }
.screen-card--dashboard .ui-app { min-height: 0; }
.screen-card--dashboard .ui-sidebar { display: none; }
.screen-card--dashboard .ui-stat strong { font-size: 11px; }
.screen-card--dashboard .ui-chart-wrap { flex: 1; display: flex; flex-direction: column; }
.screen-card--dashboard .ui-chart { flex: 1; min-height: 48px; }

.hero-mockup .ui-app { min-height: 320px; }
.hero-mockup .ui-stats { grid-template-columns: repeat(2, 1fr); }

@media (min-width: 480px) {
  .hero-mockup .ui-stats { grid-template-columns: repeat(4, 1fr); }
}

.hero-float {
  position: absolute;
  bottom: -20px;
  left: -24px;
  padding: 14px 18px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-2);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 500;
}

.hero-float-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--success-bg);
  color: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-float-icon svg { width: 20px; height: 20px; }

.hero-float small {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-3);
  margin-top: 2px;
}

/* ---------- Trust bar ---------- */
.trust-bar {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  padding: 28px clamp(20px, 4vw, 48px);
}

.trust-bar-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}

.trust-stat strong {
  display: block;
  font-size: 28px;
  font-weight: 700;
  color: var(--brand-strong);
  line-height: 1.2;
  margin-bottom: 4px;
}

.trust-stat span {
  font-size: 14px;
  color: var(--text-2);
}

/* ---------- Sections ---------- */
.section {
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(56px, 8vw, 96px) clamp(20px, 4vw, 48px);
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 48px;
}

.section-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-strong);
  margin-bottom: 12px;
}

.section h2 {
  font-size: clamp(28px, 3.5vw, 38px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  color: var(--text-1);
}

.section .section-lead {
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-2);
  margin: 0;
}

/* ---------- Features ---------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
  border-color: rgba(74, 137, 220, 0.4);
  box-shadow: var(--shadow-1);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.feature-icon svg { width: 24px; height: 24px; }

.feature-card h3 {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-1);
}

.feature-card p {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-2);
}

/* ---------- How it works ---------- */
.section-alt {
  background: var(--surface-1);
  max-width: none;
}

.section-alt .section {
  padding-top: clamp(56px, 8vw, 96px);
  padding-bottom: clamp(56px, 8vw, 96px);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  counter-reset: step;
}

.step {
  position: relative;
  text-align: center;
  padding: 0 12px;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0 auto 20px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-on-accent);
  background: var(--brand);
  border-radius: 50%;
}

.step h3 {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 600;
}

.step p {
  margin: 0;
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.55;
}

/* ---------- Screenshots ---------- */
.screens-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.screen-card {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-2);
  box-shadow: var(--shadow-1);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.screen-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-2);
}

.screen-caption {
  padding: 16px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  border-top: 1px solid var(--border);
}

/* ---------- CTA band ---------- */
.cta-band {
  margin: 0 clamp(20px, 4vw, 48px) clamp(56px, 8vw, 96px);
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
  padding: clamp(48px, 6vw, 72px) clamp(32px, 5vw, 64px);
  text-align: center;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--brand-strong) 0%, var(--brand) 100%);
  color: var(--text-on-accent);
  box-shadow: 0 20px 40px rgba(22, 91, 211, 0.25);
}

.cta-band h2 {
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 700;
  margin: 0 0 12px;
  color: #fff;
}

.cta-band p {
  font-size: 17px;
  margin: 0 auto 28px;
  max-width: 480px;
  opacity: 0.92;
  line-height: 1.55;
}

.cta-band .cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.cta-band .btn {
  background: #fff;
  border-color: #fff;
  color: var(--brand-strong);
}

.cta-band .btn:hover {
  background: var(--brand-soft);
  border-color: var(--brand-soft);
  color: var(--brand-strong);
}

.cta-band .btn-ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.6);
  color: #fff;
}

.cta-band .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #fff;
  color: #fff;
}

/* ---------- Footer ---------- */
.landing-footer {
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  padding: 40px clamp(20px, 4vw, 48px) 32px;
}

.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}

.footer-brand .logo {
  height: 32px;
  margin-bottom: 14px;
}

.footer-brand p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-2);
  margin: 0;
  max-width: 280px;
}

.footer-col h4 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-1);
  margin: 0 0 16px;
}

.footer-col a {
  display: block;
  font-size: 14px;
  color: var(--text-2);
  text-decoration: none;
  margin-bottom: 10px;
  transition: color 0.15s ease;
}

.footer-col a:hover {
  color: var(--brand-strong);
  text-decoration: none;
}

.footer-bottom {
  max-width: 1120px;
  margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--text-3);
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-copy { text-align: center; }

  .hero .lead { margin-left: auto; margin-right: auto; }

  .hero .cta,
  .hero-trust { justify-content: center; }

  .hero-visual { order: -1; max-width: 520px; margin: 0 auto; }

  .hero-float { left: 8px; bottom: -12px; }

  .trust-bar-inner { grid-template-columns: repeat(2, 1fr); }

  .features-grid,
  .steps,
  .screens-grid { grid-template-columns: repeat(2, 1fr); }

  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .landing-nav .hamb { display: inline-flex; }

  .landing-nav .nav-links {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    position: absolute;
    top: calc(100% + 8px);
    right: 16px;
    left: 16px;
    padding: 16px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow-2);
  }

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

  .landing-nav .nav-links a:not(.btn) {
    padding: 10px 12px;
    border-radius: var(--radius-sm);
  }

  .landing-nav .nav-links a:not(.btn):hover {
    background: var(--surface-1);
  }

  .trust-bar-inner,
  .features-grid,
  .steps,
  .screens-grid,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-bottom { flex-direction: column; text-align: center; }

  .hero-float { display: none; }
}

/* ---------- Auth shell (login + logout) ---------- */
body.logout-page,
body.login-page {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse 70% 50% at 50% -10%, var(--brand-soft) 0%, transparent 70%),
    linear-gradient(180deg, var(--surface-2) 0%, var(--surface-0) 100%);
  color: var(--text-1);
  -webkit-font-smoothing: antialiased;
}

.logout-footer,
.login-page-footer {
  padding: 20px 24px 28px;
  text-align: center;
  font-size: 13px;
  color: var(--text-3);
}

.logout-footer a,
.login-page-footer a {
  color: var(--text-2);
  text-decoration: none;
}

.logout-footer a:hover,
.login-page-footer a:hover {
  color: var(--brand-strong);
  text-decoration: none;
}

/* ---------- Logout ---------- */
.logout-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 24px;
}

.logout-nav .logo {
  height: 36px;
  width: auto;
}

.logout-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.logout-card {
  width: 100%;
  max-width: 440px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-2);
  padding: clamp(32px, 6vw, 48px);
  text-align: center;
}

.logout-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 24px;
  border-radius: 50%;
  background: var(--success-bg);
  color: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
}

.logout-icon svg {
  width: 32px;
  height: 32px;
}

.logout-card h1 {
  margin: 0 0 10px;
  padding: 0;
  font-size: clamp(24px, 4vw, 28px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-1);
}

.logout-card .lead {
  margin: 0 0 28px;
  padding: 0;
  font-size: 16px;
  line-height: 1.55;
  color: var(--text-2);
}

.logout-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.logout-actions .btn {
  width: 100%;
  min-height: 46px;
  font-size: 15px;
  font-weight: 600;
}

/* ---------- Login ---------- */
.login-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(20px, 4vw, 32px);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .login-nav {
    background: rgba(34, 39, 47, 0.92);
  }
}

.login-nav .logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.login-nav .logo {
  height: 36px;
  width: auto;
}

.login-nav .nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
}

.login-nav .nav-link:hover {
  color: var(--brand-strong);
  text-decoration: none;
}

.login-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(24px, 5vw, 48px) 20px;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-2);
  padding: clamp(28px, 5vw, 40px);
}

.login-card h1 {
  margin: 0 0 8px;
  padding: 0;
  font-size: clamp(22px, 4vw, 26px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-1);
}

.login-card .sub {
  margin: 0 0 24px;
  padding: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-2);
}

.login-alert {
  padding: 12px 14px;
  margin-bottom: 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  line-height: 1.45;
  font-weight: 500;
}

.login-alert--warning {
  background: var(--warning-bg);
  border: 1px solid rgba(138, 90, 0, 0.2);
  color: var(--warning);
}

.login-alert--danger {
  background: var(--danger-bg);
  border: 1px solid rgba(163, 45, 45, 0.2);
  color: var(--danger);
}

.login-alert--success {
  background: var(--success-bg);
  border: 1px solid rgba(31, 122, 68, 0.2);
  color: var(--success);
}

.login-form .field {
  margin-bottom: 16px;
}

.login-form .field > label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
}

.login-form .field-hint {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.4;
}

.login-form input {
  width: 100%;
}

.login-form .btn-primary {
  width: 100%;
  min-height: 46px;
  margin-top: 8px;
  font-size: 15px;
  font-weight: 600;
}

.login-footer-text {
  margin: 20px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 14px;
  color: var(--text-2);
}

.login-footer-text a {
  color: var(--brand-strong);
  font-weight: 600;
  text-decoration: none;
}

.login-footer-text a:hover {
  text-decoration: underline;
}

@media (max-width: 480px) {
  .login-card {
    padding: 24px 18px;
  }
}

/* ---------- Signup ---------- */
body.signup-page {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse 70% 50% at 50% -10%, var(--brand-soft) 0%, transparent 70%),
    linear-gradient(180deg, var(--surface-2) 0%, var(--surface-0) 100%);
  color: var(--text-1);
  -webkit-font-smoothing: antialiased;
}

.signup-main {
  flex: 1;
  padding: clamp(24px, 5vw, 48px) 20px 32px;
  display: flex;
  justify-content: center;
}

.signup-card {
  width: 100%;
  max-width: 760px;
}

.signup-header {
  text-align: center;
  margin-bottom: 28px;
}

.signup-header h1 {
  margin: 0 0 8px;
  padding: 0;
  font-size: clamp(24px, 4vw, 30px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-1);
}

.signup-header .sub {
  margin: 0 0 20px;
  padding: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-2);
}

.signup-trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 20px;
}

.signup-trust-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-3);
}

.signup-trust-item svg {
  width: 16px;
  height: 16px;
  color: var(--brand);
  flex-shrink: 0;
}

.signup-form-panel {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-2);
  padding: clamp(24px, 4vw, 36px);
}

.signup-form .login-alert {
  margin-bottom: 20px;
}

.signup-section-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand-strong);
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.signup-section-title:not(:first-child) {
  margin-top: 28px;
}

.signup-form .field > label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
}

.signup-form .field input {
  width: 100%;
}

.signup-form .form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 0;
}

.signup-form .form-row .field {
  margin-bottom: 0;
}

.signup-form .form-row + .form-row,
.signup-form .form-row + .field,
.signup-form .field + .form-row {
  margin-top: 16px;
}

.signup-form .field-hint {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.4;
}

.signup-file-field {
  margin-top: 16px;
}

.signup-file-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-1);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.signup-file-wrap:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.signup-file-wrap input[type="file"] {
  width: 100%;
  font-size: 13px;
  color: var(--text-2);
}

.signup-form .form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.signup-form .form-actions .btn-primary {
  flex: 1;
  min-width: 200px;
  min-height: 46px;
  font-size: 15px;
  font-weight: 600;
}

.signup-form .form-actions .btn-ghost {
  min-height: 46px;
  font-size: 14px;
  font-weight: 500;
}

.signup-footer-text {
  margin: 24px 0 0;
  text-align: center;
  font-size: 14px;
  color: var(--text-2);
}

.signup-footer-text a {
  color: var(--brand-strong);
  font-weight: 600;
  text-decoration: none;
}

.signup-footer-text a:hover {
  text-decoration: underline;
}

@media (max-width: 640px) {
  .signup-form .form-row {
    grid-template-columns: 1fr;
  }

  .signup-form .form-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .signup-form .form-actions .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .signup-form-panel {
    padding: 20px 16px;
  }

  .signup-trust {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }
}
