:root {
  --navy: #0b172a;
  --navy-2: #1e3a5f;
  --gold: #8a5c10;
  --gold-soft: #f5ead7;
  --bg: #f8fafc;
  --card: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --danger: #b91c1c;
  --danger-bg: #fee2e2;
  --warn: #a16207;
  --warn-bg: #fef9c3;
  --good: #047857;
  --good-bg: #d1fae5;
  --info: #1d4ed8;
  --info-bg: #dbeafe;
  --shadow: 0 18px 60px rgba(15, 23, 42, 0.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; }
.shell, .sidebar, .main, .brand-mark, .nav, .topbar, .grid, .card, .table-wrap { min-width: 0; }
.kicker, .h1, .lead, .kpi-value, .section-title { overflow-wrap: anywhere; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 3px;
}
.hidden { display: none !important; }

.shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  background: var(--navy);
  color: white;
  padding: 24px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand-mark {
  display: grid;
  gap: 6px;
  margin-bottom: 28px;
}
.brand-kicker, .kicker {
  color: var(--gold);
  letter-spacing: .14em;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 800;
}
.brand-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -.03em;
}
.nav {
  display: grid;
  gap: 8px;
}
.nav button, .ghost-button, .primary-button, .secondary-button {
  border: 0;
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  font-weight: 750;
}
.nav button {
  color: #dbeafe;
  background: transparent;
  text-align: left;
}
.nav button.active, .nav button:hover {
  background: rgba(255,255,255,.1);
  color: white;
}
.sidebar-note {
  border-top: 1px solid rgba(255,255,255,.18);
  margin-top: 24px;
  padding-top: 18px;
  color: #cbd5e1;
  font-size: 13px;
  line-height: 1.55;
}
.main {
  padding: 28px;
  max-width: 1320px;
  width: 100%;
}
.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}
.h1 {
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1;
  letter-spacing: -.05em;
  margin: 0 0 10px;
}
.lead {
  max-width: 72ch;
  color: var(--muted);
  line-height: 1.7;
  font-size: 16px;
  margin: 0;
}
.muted { color: var(--muted); line-height: 1.6; }
.brand-logo { width: 44px; height: 44px; border-radius: 12px; display: block; }
.login-main { max-width: 540px; margin: 0 auto; padding: 72px 20px; }
.login-card { padding: 32px; }
.login-title { font-size: clamp(34px, 8vw, 52px); }
.legal-main { max-width: 880px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
}
.card.elevated { box-shadow: var(--shadow); }
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpi-label { color: var(--muted); font-size: 13px; font-weight: 700; }
.kpi-value { font-size: clamp(24px, 4vw, 34px); line-height: 1.1; font-weight: 850; letter-spacing: -.04em; margin-top: 8px; font-variant-numeric: tabular-nums; }
.kpi-note { color: var(--muted); font-size: 13px; margin-top: 8px; line-height: 1.45; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.badge.danger { background: var(--danger-bg); color: var(--danger); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.good { background: var(--good-bg); color: var(--good); }
.badge.info { background: var(--info-bg); color: var(--info); }
.badge.neutral { background: #f1f5f9; color: #475569; }
.section-title {
  font-size: 20px;
  margin: 0 0 12px;
  letter-spacing: -.02em;
}
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: white; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { text-align: left; padding: 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); background: #f8fafc; }
td { font-size: 14px; line-height: 1.45; }
.money { font-variant-numeric: tabular-nums; font-weight: 850; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.actions.split { justify-content: space-between; }
.interest-form label { display: grid; gap: 8px; color: var(--ink); font-weight: 750; }
.interest-form input, .interest-form select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--ink);
  background: white;
}
.check-row {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: flex-start;
  gap: 12px !important;
  color: var(--muted) !important;
  font-weight: 600 !important;
  line-height: 1.55;
}
.check-row input { width: 18px; min-width: 18px; min-height: 18px; margin-top: 3px; }
.primary-button { background: var(--navy); color: white; }
.secondary-button { background: white; color: var(--navy); border: 1px solid var(--line); }
.ghost-button { background: #f8fafc; color: var(--navy); }
.primary-button[disabled], .secondary-button[disabled], .ghost-button[disabled] { opacity: .55; cursor: not-allowed; }
.notice {
  border: 1px solid #f3d6a6;
  background: #fff8eb;
  color: #7c4a03;
  border-radius: 16px;
  padding: 16px;
  line-height: 1.6;
}
.notice.danger { border-color: #fecaca; background: #fff1f2; color: #991b1b; }
.notice.good { border-color: #bbf7d0; background: #f0fdf4; color: #166534; }
.list { display: grid; gap: 10px; padding: 0; margin: 0; list-style: none; }
.list li { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: white; }
.hero-site {
  min-height: 100vh;
  background: radial-gradient(circle at 10% 0%, #f5ead7, transparent 34%), linear-gradient(135deg, #ffffff 0%, #f8fafc 58%, #eef2f7 100%);
}
.site-nav {
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.site-brand { display: grid; gap: 2px; font-weight: 850; letter-spacing: -.03em; }
.site-main { max-width: 1180px; margin: 0 auto; padding: 56px 20px 80px; }
.site-hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 28px; align-items: stretch; }
.site-title { font-size: clamp(42px, 8vw, 86px); line-height: .92; letter-spacing: -.07em; margin: 10px 0 18px; }
.site-subtitle { color: var(--muted); font-size: 18px; line-height: 1.75; max-width: 62ch; }
.hero-panel { background: var(--navy); color: white; border-radius: 24px; padding: 24px; box-shadow: var(--shadow); }
.hero-panel .muted { color: #cbd5e1; }
.lock-list { display: grid; gap: 12px; margin-top: 20px; }
.lock-item { padding: 13px; border-radius: 12px; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.06); }
.site-section { margin-top: 28px; }
.footer { color: var(--muted); font-size: 13px; padding-top: 28px; line-height: 1.6; }
.mobile-tabs { display: none; }
.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  max-width: min(420px, calc(100vw - 40px));
  background: var(--navy);
  color: white;
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: var(--shadow);
  z-index: 20;
}

@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; padding: 18px; }
  .nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sidebar-note { display: none; }
  .main { padding: 18px; }
  .grid.four, .grid.three, .grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-hero { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .grid.four, .grid.three, .grid.two { grid-template-columns: 1fr; }
  .topbar { display: grid; }
  .nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card { padding: 16px; border-radius: 14px; }
  .site-nav { align-items: flex-start; gap: 12px; }
  .site-main { padding-top: 28px; }
  table { min-width: 680px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
