:root {
  --ink: #1c2430;
  --muted: #5e6a78;
  --navy: #10233c;
  --navy-2: #1b3a5c;
  --copper: #8d5a32;
  --copper-soft: #f3e6d8;
  --paper: #f3efe7;
  --card: #fffcf7;
  --line: #e3daca;
  --teal: #1d6b5f;
  --ok: #1d7a46;
  --ok-bg: #e5f5ec;
  --wait: #8a5a10;
  --wait-bg: #f8efd8;
  --bad: #8d2e2e;
  --bad-bg: #f8e6e6;
  --shadow: 0 18px 40px rgba(16, 35, 60, .08);
  --serif: "Fraunces", "Times New Roman", serif;
  --sans: "Outfit", "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
}
a { color: inherit; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 560; letter-spacing: -.02em; line-height: 1.15; margin: 0 0 .4rem; }
p { margin: 0 0 .8rem; }

.wrap { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(243, 239, 231, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap, .app-top .bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.mark {
  width: 42px; height: 42px; border-radius: 12px;
  background: var(--navy); color: #f6efe4;
  display: grid; place-items: center;
  font-family: var(--serif); font-weight: 600;
}
.brand b { display: block; font-size: 15px; letter-spacing: .01em; }
.brand small { display: block; color: var(--muted); font-size: 12px; }
.nav { display: flex; align-items: center; gap: 18px; }
.nav a { text-decoration: none; color: var(--navy); font-size: 15px; }
.nav a:hover { color: var(--copper); }

.btn, button.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; cursor: pointer; text-decoration: none;
  background: var(--navy); color: #f7f3ec;
  border-radius: 999px; padding: 11px 18px; font-weight: 560;
}
.btn:hover { background: var(--navy-2); }
.btn.copper { background: var(--copper); }
.btn.ghost { background: transparent; color: var(--navy); border: 1px solid var(--line); }
.btn.danger { background: var(--bad); }
.btn.small { padding: 7px 12px; font-size: 14px; }
.btn.full { width: 100%; }

.hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: 42px; align-items: center; padding: 54px 0 28px; }
.kicker { color: var(--copper); font-size: 13px; letter-spacing: .16em; text-transform: uppercase; font-weight: 650; }
.hero h1 { font-size: clamp(40px, 5vw, 64px); margin: 10px 0 14px; }
.lede { font-size: 18px; color: var(--muted); max-width: 46ch; }
.hero-actions { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.hero-card {
  background: var(--navy); color: #f6f1e8; border-radius: 28px; padding: 22px;
  box-shadow: var(--shadow);
}
.hero-card .row { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.12); }
.hero-card .row:last-child { border-bottom: 0; }
.hero-card span { color: #c9bfb2; font-size: 13px; }
.hero-card strong { font-size: 15px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 8px 0 36px; }
.stat, .card, .panel, .table-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
}
.stat { padding: 16px 18px; }
.stat b { display: block; font-family: var(--serif); font-size: 28px; }
.stat span { color: var(--muted); font-size: 13px; }
.section { padding: 10px 0 36px; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin-bottom: 16px; }
.grid-3, .grid-2 { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card { padding: 18px; }
.card h3 { font-size: 24px; }
.price { font-size: 20px; color: var(--navy); font-weight: 650; }
.muted { color: var(--muted); }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.step { padding: 16px; background: var(--card); border-radius: 18px; border: 1px solid var(--line); }
.step em { font-style: normal; color: var(--copper); font-weight: 700; }
.band { background: var(--navy); color: #f6f1e8; border-radius: 28px; padding: 28px; display: flex; justify-content: space-between; gap: 18px; align-items: center; }
.band p { color: #d9d0c4; }
.site-footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; }

.page { padding: 28px 0 48px; }
.filters, .form-grid { display: grid; gap: 12px; }
.form-grid.two { grid-template-columns: 1fr 1fr; }
label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
input, select, textarea {
  width: 100%; background: white; border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px;
}
textarea { min-height: 110px; resize: vertical; }
.err { color: var(--bad); font-size: 12px; }
.alert { padding: 12px 14px; border-radius: 12px; margin-bottom: 14px; }
.alert.ok { background: var(--ok-bg); color: var(--ok); }
.alert.bad { background: var(--bad-bg); color: var(--bad); }
.badge { display: inline-flex; border-radius: 999px; padding: 3px 9px; font-size: 12px; font-weight: 650; background: #eee; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.wait { background: var(--wait-bg); color: var(--wait); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.muted { background: #eeeae3; color: var(--muted); }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 14px; }
th { font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.pager { display: flex; gap: 12px; align-items: center; margin-top: 14px; }
.pager a, .pager span { text-decoration: none; }

.shell { display: grid; grid-template-columns: 84px 248px minmax(0, 1fr); min-height: 100vh; background: #f3f4f8; }
.rail {
  background: #141826; color: #b7b3c4;
  display: flex; flex-direction: column; align-items: center;
  padding: 14px 8px 16px; gap: 4px;
  position: sticky; top: 0; height: 100vh;
}
.rail-logo {
  width: 42px; height: 42px; border-radius: 14px; margin-bottom: 10px;
  display: grid; place-items: center; text-decoration: none;
  background: linear-gradient(160deg, #f6efe4, #d7b89a); color: #1a2436;
  font-family: var(--serif); font-weight: 640;
}
.rail-item {
  width: 68px; border-radius: 14px; padding: 8px 4px 7px;
  display: grid; justify-items: center; gap: 4px;
  color: #b7b3c4; text-decoration: none; text-align: center;
  font-size: 10.5px; line-height: 1.15; font-weight: 520;
}
.rail-item svg { width: 22px; height: 22px; }
.rail-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.rail-item.on { background: #2a3148; color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.rail-spacer { flex: 1; }
.rail-user {
  width: 36px; height: 36px; border-radius: 50%; margin-top: 8px;
  display: grid; place-items: center; background: #3d3428; color: #f6efe4;
  font-size: 13px; font-weight: 650;
}
.subnav {
  background: #f4f5f8; border-right: 1px solid #e6e8ef;
  padding: 18px 12px 16px; position: sticky; top: 0; height: 100vh;
  overflow: auto; display: flex; flex-direction: column;
}
.subnav-kicker { margin: 2px 10px 0; color: var(--copper); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; font-weight: 650; }
.subnav h2 {
  font-family: var(--sans); font-size: 20px; font-weight: 650; letter-spacing: -.02em;
  margin: 2px 10px 14px; color: #161a24;
}
.sub-item {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: #3c4250;
  padding: 10px 12px; border-radius: 12px; font-size: 14.5px; margin-bottom: 2px;
}
.sub-item svg { width: 18px; height: 18px; color: #6d7380; flex: none; }
.sub-item:hover { background: rgba(255,255,255,.72); }
.sub-item.on {
  background: #fff; color: #161a24; font-weight: 650;
  box-shadow: 0 1px 2px rgba(16,24,40,.06), 0 8px 20px rgba(20,24,38,.05);
}
.sub-item.on svg { color: var(--copper); }
.subnav-foot { margin-top: auto; padding: 14px 10px 4px; border-top: 1px solid #e6e8ef; }
.subnav-foot strong, .subnav-foot small { display: block; }
.subnav-foot strong { font-size: 14px; }
.subnav-foot small { color: var(--muted); font-size: 12px; word-break: break-all; }
.workspace { min-width: 0; display: flex; flex-direction: column; background: #f3f4f8; }
.work-top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 64px; padding: 0 22px;
  background: rgba(255,255,255,.92); backdrop-filter: blur(12px);
  border-bottom: 1px solid #e6e8ef;
}
.work-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.work-title strong { font-size: 15px; }
.content { padding: 22px 24px 40px; }
.workspace .card, .workspace .table-card, .workspace .stat {
  background: #fff; border-color: #e7e9ef;
  box-shadow: 0 1px 2px rgba(16,24,40,.04);
}
.workspace .table-card { overflow: hidden; }
.workspace .content > h1 { font-size: 32px; margin-bottom: 14px; }
.workspace th { background: #fafbfc; }
.scrim { display: none; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.kpi b { font-family: var(--serif); font-size: 26px; display: block; }
.bars { display: grid; gap: 8px; }
.bar { display: grid; grid-template-columns: 88px 1fr auto; gap: 8px; align-items: center; font-size: 13px; }
.bar i { display: block; height: 10px; border-radius: 99px; background: var(--copper); }
.codes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.code {
  border: 1px dashed var(--copper); background: var(--copper-soft); border-radius: 16px; padding: 14px;
}
.code b { display: block; font-size: 22px; font-family: var(--serif); }
.split { display: grid; grid-template-columns: 1.4fr .8fr; gap: 16px; }
.menu-btn { display: none; }

@media (max-width: 980px) {
  .hero, .grid-3, .steps, .split, .kpis, .form-grid.two, .codes { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .shell { grid-template-columns: 1fr; }
  .rail, .subnav {
    position: fixed; z-index: 40; top: 0; height: 100vh;
    transform: translateX(-120%); transition: transform .2s ease;
  }
  .rail { width: 84px; }
  .subnav { width: min(248px, calc(100vw - 84px)); left: 84px; }
  .shell.open .rail, .shell.open .subnav { transform: none; }
  .shell.open .scrim { display: block; position: fixed; inset: 0; background: rgba(16,20,32,.45); z-index: 35; }
  .menu-btn { display: inline-flex; }
  .nav { display: none; }
}
