:root {
  --navy: #071527;
  --navy-soft: #10223d;
  --gold: #c9a24d;
  --gold-soft: #f5ead0;
  --ink: #172033;
  --muted: #657084;
  --line: #e8edf3;
  --bg: #f7f9fc;
  --card: #ffffff;
  --danger: #b42318;
  --success: #067647;
  --radius: 22px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  width: 100%;
  min-height: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  overflow-x: hidden;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(201,162,77,.16), transparent 32rem),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

img,
svg,
video,
iframe {
  max-width: 100%;
  height: auto;
}

.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.nav {
  padding: 22px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: -.03em;
  min-height: 44px;
  max-width: 100%;
  white-space: nowrap;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--navy), var(--gold));
  display: grid;
  place-items: center;
  color: white;
  font-weight: 900;
  flex: 0 0 auto;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.btn {
  border: 0;
  outline: 0;
  cursor: pointer;
  padding: 12px 16px;
  border-radius: 999px;
  font-weight: 750;
  background: var(--navy);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  line-height: 1.2;
  text-align: center;
  touch-action: manipulation;
  white-space: nowrap;
  transition: box-shadow .18s ease, transform .16s ease, background .16s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(7,21,39,.12);
}

.btn.secondary {
  background: white;
  color: var(--navy);
  border: 1px solid var(--line);
}

.btn.gold {
  background: linear-gradient(135deg, var(--gold), #a98232);
  color: #111827;
}

.btn.full {
  width: 100%;
  white-space: normal;
}

.hero {
  padding: 58px 0 72px;
  display: grid;
  grid-template-columns: 1.04fr .96fr;
  gap: 32px;
  align-items: center;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--navy);
  background: var(--gold-soft);
  border: 1px solid rgba(201,162,77,.24);
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 750;
  max-width: 100%;
  overflow-wrap: anywhere;
}

h1 {
  margin: 18px 0 14px;
  font-size: clamp(42px, 6vw, 72px);
  line-height: .94;
  letter-spacing: -.07em;
  color: var(--navy);
}

.lead {
  font-size: 18px;
  line-height: 1.65;
  color: var(--muted);
  max-width: 640px;
}

.hero-actions {
  margin-top: 28px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.panel {
  background: rgba(255,255,255,.86);
  border: 1px solid var(--line);
  box-shadow: 0 24px 70px rgba(15,23,42,.08);
  border-radius: 32px;
  padding: 24px;
  backdrop-filter: blur(18px);
  overflow-wrap: anywhere;
}

.member-card {
  border-radius: 28px;
  padding: 24px;
  background:
    radial-gradient(circle at top right, rgba(201,162,77,.32), transparent 12rem),
    linear-gradient(145deg, var(--navy), var(--navy-soft));
  color: white;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow-wrap: anywhere;
}

.card-label {
  color: rgba(255,255,255,.72);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .12em;
}

.card-title {
  margin-top: 8px;
  font-size: 28px;
  font-weight: 850;
  letter-spacing: -.04em;
}

.karat-value {
  margin-top: 18px;
  font-size: clamp(36px, 8vw, 48px);
  line-height: 1;
  font-weight: 900;
  color: #f6d889;
  overflow-wrap: anywhere;
}

.card-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 16px;
}

.mini {
  padding: 16px;
  border-radius: 20px;
  background: white;
  border: 1px solid var(--line);
  overflow-wrap: anywhere;
}

.mini strong {
  display: block;
  color: var(--navy);
  font-size: 18px;
}

.mini span {
  color: var(--muted);
  font-size: 13px;
}

.auth-wrap {
  min-height: calc(100vh - 84px);
  min-height: calc(100svh - 84px);
  display: grid;
  place-items: center;
  padding: 32px 0 64px;
}

.auth-card {
  width: min(460px, 100%);
  padding: 28px;
  border-radius: 30px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 24px 70px rgba(15,23,42,.08);
  overflow-wrap: anywhere;
}

.auth-card h1 {
  font-size: clamp(30px, 7vw, 38px);
  line-height: 1.06;
  margin: 10px 0;
  letter-spacing: -.05em;
}

.form {
  display: grid;
  gap: 14px;
  margin-top: 22px;
  width: 100%;
}

.field {
  display: grid;
  gap: 7px;
  width: 100%;
}

label {
  font-size: 13px;
  font-weight: 760;
  color: var(--navy);
  line-height: 1.35;
}

input {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0 14px;
  font-size: 16px;
  line-height: 1.4;
  outline: none;
  background: #fbfcfe;
}

input:focus {
  border-color: rgba(201,162,77,.85);
  box-shadow: 0 0 0 4px rgba(201,162,77,.14);
}

.notice {
  padding: 13px 14px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.5;
  background: #f1f5f9;
  color: var(--muted);
  border: 1px solid var(--line);
  overflow-wrap: anywhere;
}

.notice.success {
  background: #ecfdf3;
  color: var(--success);
  border-color: #abefc6;
}

.notice.error {
  background: #fef3f2;
  color: var(--danger);
  border-color: #fecdca;
}

.fineprint {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--muted);
}

.dashboard {
  padding: 38px 0 72px;
}

.dash-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 24px;
}

.dash-head h1 {
  font-size: clamp(34px, 5vw, 54px);
  margin: 0 0 8px;
}

.dash-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 20px;
}

.stat-card,
.profile-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 24px;
  box-shadow: 0 18px 50px rgba(15,23,42,.06);
  overflow-wrap: anywhere;
}

.stat-card.dark {
  color: white;
  background:
    radial-gradient(circle at top right, rgba(201,162,77,.30), transparent 16rem),
    linear-gradient(145deg, var(--navy), var(--navy-soft));
}

.stat-label {
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .13em;
  font-weight: 800;
}

.dark .stat-label {
  color: rgba(255,255,255,.68);
}

.stat-value {
  margin-top: 14px;
  font-size: clamp(42px, 7vw, 72px);
  font-weight: 920;
  letter-spacing: -.06em;
  overflow-wrap: anywhere;
}

.ref-code {
  margin-top: 14px;
  padding: 14px;
  border-radius: 18px;
  background: #f8fafc;
  border: 1px dashed #cad4e0;
  font-weight: 850;
  color: var(--navy);
  word-break: break-word;
}

.rows {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.row span {
  color: var(--muted);
}

.row strong {
  text-align: right;
  overflow-wrap: anywhere;
}

.footer {
  padding: 26px 0;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 900px) {
  .hero,
  .dash-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 42px 0 56px;
    gap: 24px;
  }

  .dash-head {
    flex-direction: column;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .nav {
    gap: 14px;
    align-items: flex-start;
  }

  .nav-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .dashboard {
    padding: 28px 0 56px;
  }
}

@media (max-width: 640px) {
  .container {
    width: calc(100% - 24px);
  }

  .nav {
    padding: 16px 0;
    flex-wrap: wrap;
  }

  .brand {
    font-size: 15px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 12px;
  }

  .nav-actions {
    width: 100%;
    justify-content: stretch;
  }

  .nav-actions .btn {
    width: 100%;
    min-height: 48px;
  }

  h1 {
    font-size: clamp(34px, 10vw, 48px);
    line-height: 1.02;
  }

  .lead {
    font-size: 16px;
    line-height: 1.6;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .panel,
  .auth-card,
  .stat-card,
  .profile-card {
    border-radius: 24px;
    padding: 22px;
  }

  .member-card {
    border-radius: 24px;
    padding: 22px;
    min-height: 240px;
  }

  .card-title {
    font-size: 24px;
  }

  .auth-wrap {
    min-height: calc(100vh - 78px);
    min-height: calc(100svh - 78px);
    place-items: start center;
    padding: 26px 0 44px;
  }

  .auth-card h1 {
    font-size: clamp(30px, 9vw, 38px);
  }

  .btn {
    min-height: 50px;
    white-space: normal;
  }

  .dash-head h1 {
    font-size: clamp(32px, 9vw, 44px);
  }

  .row {
    flex-direction: column;
    gap: 4px;
  }

  .row strong {
    text-align: left;
  }
}

@media (max-width: 420px) {
  .container {
    width: calc(100% - 20px);
  }

  .nav {
    padding: 14px 0;
  }

  .panel,
  .auth-card,
  .stat-card,
  .profile-card {
    padding: 20px;
    border-radius: 22px;
  }

  .member-card {
    padding: 20px;
    border-radius: 22px;
  }

  .kicker {
    font-size: 12px;
    padding: 7px 10px;
  }

  .fineprint {
    font-size: 12px;
  }

  .stat-value {
    font-size: clamp(36px, 14vw, 54px);
  }
}