@font-face {
  font-family: "Outfit";
  src: url("assets/outfit.ttf") format("truetype");
  font-display: swap;
  font-weight: 100 900;
}

:root {
  color-scheme: light;
  --ink: #142a3a;
  --ink-soft: #365163;
  --navy: #15364b;
  --navy-2: #1d4c68;
  --teal: #0f766e;
  --teal-dark: #0b5f59;
  --mint: #dff5ec;
  --lime: #d7ed7d;
  --amber: #f0b64d;
  --amber-soft: #fff3d8;
  --red: #b42318;
  --red-soft: #fff0ee;
  --green: #18794e;
  --green-soft: #e9f7ef;
  --blue-soft: #eaf4fa;
  --canvas: #f4f7f6;
  --surface: #ffffff;
  --surface-2: #edf3f1;
  --border: #d8e1de;
  --muted: #647681;
  --focus: #f0b64d;
  --shadow: 0 18px 45px rgba(20, 42, 58, 0.09);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --sidebar: 264px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--canvas);
  color: var(--ink);
  font-family: "Outfit", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
}
button, input, select, textarea { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
a { color: inherit; }
img, svg { display: block; }
h1, h2, h3, h4 { margin: 0; line-height: 1.12; letter-spacing: -.025em; }
p { margin: 0; }
ul { margin: 0; padding: 0; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

.skip-link {
  position: fixed;
  top: -100px;
  left: 18px;
  z-index: 200;
  padding: 12px 16px;
  border-radius: 8px;
  background: var(--focus);
  color: var(--ink);
  font-weight: 700;
}
.skip-link:focus { top: 14px; }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.icon.lg { width: 28px; height: 28px; }
.icon.xl { width: 36px; height: 36px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.tiny { font-size: .75rem; }
.mono { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.text-right { text-align: right; }
.nowrap { white-space: nowrap; }
.stack { display: grid; gap: 18px; }
.stack-sm { display: grid; gap: 10px; }
.row { display: flex; align-items: center; gap: 12px; }
.row.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.align-start { align-items: flex-start; }
.grow { flex: 1 1 auto; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-2 { margin-bottom: 16px; }
.w-full { width: 100%; }

.btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 11px;
  padding: 10px 17px;
  background: var(--teal);
  color: white;
  text-decoration: none;
  font-weight: 650;
  transition: transform .18s ease, background-color .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.btn:hover:not(:disabled) { background: var(--teal-dark); transform: translateY(-1px); }
.btn.primary { background: var(--navy); }
.btn.primary:hover:not(:disabled) { background: var(--navy-2); }
.btn.secondary { background: var(--surface); color: var(--ink); border-color: var(--border); }
.btn.secondary:hover:not(:disabled) { background: var(--surface-2); border-color: #b9c8c4; }
.btn.ghost { background: transparent; color: var(--ink-soft); }
.btn.ghost:hover:not(:disabled) { background: var(--surface-2); }
.btn.danger { background: var(--red-soft); color: var(--red); }
.btn.danger:hover:not(:disabled) { background: #ffe3df; }
.btn.small { min-height: 38px; padding: 7px 12px; font-size: .83rem; }
.btn.icon-only { width: 44px; padding: 0; }
.btn.full { width: 100%; }
.link-btn { border: 0; background: transparent; padding: 0; color: var(--teal-dark); text-decoration: underline; text-underline-offset: 3px; }

.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px 13px 13px 5px;
  background: var(--lime);
  color: var(--navy);
  font-size: 1.03rem;
  font-weight: 800;
  letter-spacing: -.04em;
}
.brand-copy { display: grid; line-height: 1.05; }
.brand-copy strong { font-size: 1rem; letter-spacing: -.01em; }
.brand-copy span { margin-top: 4px; color: var(--muted); font-size: .7rem; letter-spacing: .07em; text-transform: uppercase; }
.public-brand .brand-copy span { color: #b9c9d3; }

.demo-bar {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 6px 18px;
  background: #0d2636;
  color: #dfe9ee;
  font-size: .76rem;
  text-align: center;
}
.demo-bar strong { color: var(--lime); }
.demo-bar button { border: 0; background: none; color: white; text-decoration: underline; text-underline-offset: 3px; }

.public-shell { min-height: calc(100vh - 34px); background: var(--navy); color: white; }
.public-header {
  max-width: 1220px;
  height: 88px;
  margin: auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.public-nav { display: flex; align-items: center; gap: 8px; }
.public-nav .btn.ghost { color: #e4eef2; }
.public-nav .btn.ghost:hover { background: rgba(255,255,255,.08); }
.public-nav .btn.secondary { background: transparent; color: white; border-color: rgba(255,255,255,.25); }
.public-nav .btn.secondary:hover { background: rgba(255,255,255,.08); }
.hero {
  max-width: 1220px;
  min-height: 650px;
  margin: auto;
  padding: 74px 28px 90px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(390px, .95fr);
  align-items: center;
  gap: 70px;
}
.hero-copy { max-width: 660px; }
.eyebrow { margin-bottom: 20px; color: var(--lime); font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.hero h1 { max-width: 720px; font-size: clamp(3rem, 5.5vw, 5.5rem); font-weight: 580; letter-spacing: -.055em; }
.hero h1 span { color: var(--lime); }
.hero-copy > p { max-width: 560px; margin-top: 24px; color: #d3e1e8; font-size: 1.15rem; line-height: 1.7; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-actions .btn { min-height: 50px; padding-inline: 22px; }
.hero-actions .btn:first-child { background: var(--lime); color: var(--navy); }
.hero-actions .btn:first-child:hover { background: #e3f49a; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 28px; color: #b9c9d3; font-size: .83rem; }
.hero-meta span { display: inline-flex; align-items: center; gap: 7px; }
.hero-preview { position: relative; }
.preview-window { overflow: hidden; border: 1px solid rgba(255,255,255,.12); border-radius: 26px; background: #f7faf9; color: var(--ink); box-shadow: 0 35px 80px rgba(0,0,0,.28); transform: rotate(1.5deg); }
.preview-top { height: 52px; display: flex; align-items: center; gap: 7px; padding: 0 18px; border-bottom: 1px solid var(--border); background: white; }
.preview-dot { width: 8px; height: 8px; border-radius: 50%; background: #b7c3c0; }
.preview-dot:first-child { background: #ec7d72; }
.preview-dot:nth-child(2) { background: #f0b64d; }
.preview-dot:nth-child(3) { background: #56b687; }
.preview-body { display: grid; grid-template-columns: 110px 1fr; min-height: 420px; }
.preview-side { padding: 22px 14px; background: var(--navy); }
.preview-side span { display: block; height: 9px; margin: 12px 0; border-radius: 6px; background: rgba(255,255,255,.18); }
.preview-side span:first-child { width: 60%; background: var(--lime); }
.preview-main { padding: 25px; }
.preview-main h3 { font-size: 1.55rem; }
.preview-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 22px 0; }
.preview-stat { min-height: 82px; padding: 13px; border: 1px solid var(--border); border-radius: 12px; background: white; }
.preview-stat strong { display: block; margin-top: 9px; font-size: 1.45rem; }
.preview-list { overflow: hidden; border: 1px solid var(--border); border-radius: 13px; background: white; }
.preview-row { display: grid; grid-template-columns: 1.3fr .8fr .6fr; gap: 10px; padding: 14px; border-top: 1px solid var(--border); font-size: .7rem; }
.preview-row:first-child { border: 0; color: var(--muted); background: var(--surface-2); }
.hero-chip { position: absolute; right: -20px; bottom: 42px; display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-radius: 13px; background: var(--lime); color: var(--navy); box-shadow: var(--shadow); font-size: .84rem; font-weight: 700; }
.public-section { background: var(--canvas); color: var(--ink); padding: 100px 28px; }
.public-section.alt { background: var(--surface); }
.section-inner { max-width: 1160px; margin: auto; }
.section-heading { max-width: 670px; margin-bottom: 42px; }
.section-heading .eyebrow { color: var(--teal); }
.section-heading h2 { font-size: clamp(2.1rem, 4vw, 3.4rem); }
.section-heading p { margin-top: 16px; color: var(--muted); font-size: 1.05rem; }
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.feature-card { min-height: 240px; padding: 27px; border: 1px solid var(--border); border-radius: 18px; background: white; }
.feature-icon { width: 48px; height: 48px; display: grid; place-items: center; margin-bottom: 32px; border-radius: 13px; background: var(--mint); color: var(--teal); }
.feature-card h3 { font-size: 1.18rem; }
.feature-card p { margin-top: 12px; color: var(--muted); font-size: .9rem; }
.public-footer { padding: 30px 28px; border-top: 1px solid rgba(255,255,255,.1); background: var(--navy); color: #bfd0d9; }
.public-footer > div { max-width: 1160px; margin: auto; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

.auth-page { min-height: 100vh; display: grid; grid-template-columns: minmax(360px, .85fr) minmax(520px, 1.15fr); }
.auth-aside { min-height: 100%; padding: 42px; display: flex; flex-direction: column; justify-content: space-between; background: var(--navy); color: white; }
.auth-aside-copy { max-width: 520px; margin: auto 0; padding: 60px 0; }
.auth-aside-copy .eyebrow { color: var(--lime); }
.auth-aside-copy h1 { font-size: clamp(2.5rem, 4.5vw, 4.6rem); font-weight: 560; }
.auth-aside-copy p { max-width: 450px; margin-top: 22px; color: #c8d9e1; font-size: 1.05rem; }
.auth-aside-list { display: grid; gap: 13px; margin-top: 30px; }
.auth-aside-list span { display: flex; align-items: center; gap: 10px; color: #e2edf2; font-size: .9rem; }
.auth-main { padding: 58px 44px; display: grid; place-items: center; background: var(--canvas); }
.auth-card { width: min(100%, 520px); }
.auth-card > h2 { font-size: 2.2rem; }
.auth-card > p { margin: 12px 0 28px; color: var(--muted); }
.auth-foot { margin-top: 24px; text-align: center; color: var(--muted); font-size: .9rem; }
.auth-foot a { color: var(--teal-dark); }
.divider { display: flex; align-items: center; gap: 12px; margin: 22px 0; color: var(--muted); font-size: .8rem; }
.divider::before, .divider::after { content: ""; height: 1px; flex: 1; background: var(--border); }

.field { display: grid; gap: 7px; font-size: .86rem; font-weight: 650; }
.field small { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea, .input {
  width: 100%;
  min-height: 46px;
  border: 1px solid #bdcbc7;
  border-radius: 10px;
  padding: 10px 12px;
  background: white;
  color: var(--ink);
  font-weight: 450;
}
.field textarea { min-height: 100px; resize: vertical; }
.field input[readonly] { background: var(--surface-2); color: var(--ink-soft); }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { border-color: var(--teal); outline: 3px solid rgba(15,118,110,.17); }
.field-error { margin-top: 2px; color: var(--red); font-size: .78rem; font-weight: 500; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .span-2 { grid-column: span 2; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: .88rem; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--teal); }
.error-summary { padding: 15px 17px; border: 1px solid #f2b8b1; border-radius: 10px; background: var(--red-soft); color: var(--red); }
.error-summary h3 { margin-bottom: 7px; font-size: 1rem; }
.note { padding: 14px 16px; border-radius: 10px; background: var(--blue-soft); color: var(--ink-soft); font-size: .86rem; }
.note.success { background: var(--green-soft); color: var(--green); }
.note.warning { background: var(--amber-soft); color: #815509; }
.note.danger { background: var(--red-soft); color: var(--red); }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 24px 18px; background: var(--navy); color: #e7f0f4; z-index: 50; }
.sidebar .brand { margin: 0 9px 26px; color: white; }
.sidebar .brand-copy span { color: #aec3ce; }
.nav-label { margin: 22px 10px 7px; color: #829faa; font-size: .67rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.side-nav { display: grid; gap: 3px; }
.side-nav a { min-height: 42px; display: flex; align-items: center; gap: 12px; padding: 9px 11px; border-radius: 10px; color: #cbdbe3; text-decoration: none; font-size: .88rem; font-weight: 520; }
.side-nav a:hover { background: rgba(255,255,255,.07); color: white; }
.side-nav a.active { background: var(--lime); color: var(--navy); font-weight: 700; }
.nav-count { min-width: 22px; height: 22px; display: inline-grid; place-items: center; margin-left: auto; border-radius: 20px; background: rgba(255,255,255,.12); font-size: .7rem; }
.side-nav a.active .nav-count { background: rgba(21,54,75,.12); }
.sidebar-bottom { margin-top: 32px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.12); }
.sidebar-bottom .btn.ghost { width: 100%; justify-content: flex-start; color: #cbdbe3; }
.app-main { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 35; min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 12px 30px; border-bottom: 1px solid var(--border); background: rgba(255,255,255,.94); backdrop-filter: blur(12px); }
.topbar-context { color: var(--muted); font-size: .82rem; }
.topbar-profile { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.avatar { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: var(--mint); color: var(--teal-dark); font-weight: 750; }
.profile-copy { display: grid; font-size: .84rem; line-height: 1.25; }
.profile-copy span { color: var(--muted); font-size: .73rem; }
.mobile-menu { display: none; }
.page { max-width: 1500px; margin: auto; padding: 30px 32px 60px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.page-head h1 { font-size: clamp(1.8rem, 3vw, 2.55rem); }
.page-head p { max-width: 700px; margin-top: 8px; color: var(--muted); }
.page-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .75fr); gap: 20px; align-items: start; }
.panel { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: 0 1px 2px rgba(20,42,58,.02); }
.panel-body { padding: 22px; }
.panel-head { min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.panel-head h2, .panel-head h3 { font-size: 1rem; letter-spacing: -.01em; }
.panel-foot { padding: 15px 20px; border-top: 1px solid var(--border); }
.stat-card { min-height: 132px; padding: 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.stat-card .row { justify-content: space-between; }
.stat-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: var(--surface-2); color: var(--teal); }
.stat-value { display: block; margin-top: 17px; font-size: 1.8rem; font-weight: 720; letter-spacing: -.03em; }
.stat-label { color: var(--muted); font-size: .8rem; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.status-dot.warning { background: var(--amber); }

.badge { min-height: 25px; display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 999px; background: var(--surface-2); color: var(--ink-soft); font-size: .73rem; font-weight: 700; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.done, .badge.active, .badge.matched { background: var(--green-soft); color: var(--green); }
.badge.submitted, .badge.review, .badge.pending { background: var(--amber-soft); color: #855807; }
.badge.draft, .badge.inactive { background: var(--surface-2); color: var(--muted); }
.badge.failed, .badge.rejected { background: var(--red-soft); color: var(--red); }
.badge.cash { background: #eee8ff; color: #6544a5; }
.badge.admin { background: var(--blue-soft); color: #216188; }

.toolbar { display: flex; align-items: end; justify-content: space-between; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar-group { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; }
.toolbar .field { min-width: 170px; }
.search-box { position: relative; min-width: min(100%, 280px); }
.search-box .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-box input { padding-left: 40px; }
.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 11px; background: var(--surface-2); }
.tab { min-height: 36px; border: 0; border-radius: 8px; padding: 7px 13px; background: transparent; color: var(--muted); font-size: .82rem; font-weight: 650; }
.tab.active { background: white; color: var(--ink); box-shadow: 0 1px 4px rgba(20,42,58,.08); }

.table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: white; }
table { width: 100%; border-collapse: collapse; }
th { padding: 12px 15px; background: #f5f8f7; color: var(--muted); font-size: .73rem; letter-spacing: .035em; text-align: left; text-transform: uppercase; white-space: nowrap; }
td { padding: 14px 15px; border-top: 1px solid var(--border); font-size: .86rem; vertical-align: middle; }
tbody tr:hover { background: #fafcfc; }
td .btn { vertical-align: middle; }
.group-row td { background: #eef4f2; color: var(--ink-soft); font-size: .78rem; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; }

.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.product-card { min-height: 250px; display: flex; flex-direction: column; padding: 21px; border: 1px solid var(--border); border-radius: var(--radius); background: white; }
.product-card.special { background: linear-gradient(145deg, #fff9e8, white 65%); border-color: #efd497; }
.product-mark { width: 47px; height: 47px; display: grid; place-items: center; border-radius: 13px; background: var(--mint); color: var(--teal); }
.product-card.special .product-mark { background: var(--amber-soft); color: #8a5a04; }
.product-card h3 { margin-top: 23px; font-size: 1.1rem; }
.product-card p { margin: 9px 0 18px; color: var(--muted); font-size: .84rem; }
.product-footer { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-top: auto; }
.price { font-size: 1.15rem; font-weight: 750; }
.price small { display: block; margin-bottom: 3px; color: var(--muted); font-size: .68rem; font-weight: 500; }

.order-line { display: grid; grid-template-columns: minmax(180px, 1.4fr) 100px 135px 145px 44px; gap: 12px; align-items: end; padding: 14px 0; border-top: 1px solid var(--border); }
.order-line:first-child { border-top: 0; }
.order-line .line-price { min-height: 46px; display: grid; align-content: center; }
.summary-list { display: grid; gap: 11px; }
.summary-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; color: var(--muted); font-size: .86rem; }
.summary-row strong { color: var(--ink); text-align: right; }
.summary-row.total { margin-top: 5px; padding-top: 15px; border-top: 1px solid var(--border); color: var(--ink); font-size: 1rem; }
.summary-row.total strong { font-size: 1.3rem; }
.sticky { position: sticky; top: 92px; }
.empty-state { padding: 55px 24px; text-align: center; }
.empty-icon { width: 58px; height: 58px; display: grid; place-items: center; margin: 0 auto 18px; border-radius: 18px; background: var(--surface-2); color: var(--teal); }
.empty-state h3 { font-size: 1.2rem; }
.empty-state p { max-width: 420px; margin: 8px auto 20px; color: var(--muted); }

.timeline { list-style: none; display: grid; }
.timeline li { position: relative; display: grid; grid-template-columns: 22px 1fr; gap: 10px; padding-bottom: 22px; font-size: .85rem; }
.timeline li::before { content: ""; position: absolute; left: 7px; top: 14px; bottom: -2px; width: 1px; background: var(--border); }
.timeline li:last-child::before { display: none; }
.timeline-dot { width: 15px; height: 15px; margin-top: 2px; border: 4px solid var(--surface); border-radius: 50%; background: var(--border); box-shadow: 0 0 0 1px var(--border); z-index: 1; }
.timeline li.complete .timeline-dot { background: var(--teal); box-shadow: 0 0 0 1px var(--teal); }
.timeline time { display: block; margin-top: 2px; color: var(--muted); font-size: .75rem; }
.file-list { display: grid; gap: 9px; }
.file-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 13px; border: 1px solid var(--border); border-radius: 10px; background: #fbfdfc; font-size: .82rem; }
.file-row > span:first-child { min-width: 0; display: flex; align-items: center; gap: 9px; overflow-wrap: anywhere; }

.progress { height: 9px; overflow: hidden; border-radius: 999px; background: var(--surface-2); }
.progress > span { display: block; height: 100%; border-radius: inherit; background: var(--teal); }
.metric-list { display: grid; gap: 14px; }
.metric-row { display: grid; grid-template-columns: 120px 1fr 42px; align-items: center; gap: 12px; font-size: .8rem; }
.integration-card { padding: 20px; border: 1px solid var(--border); border-radius: var(--radius); background: white; }
.integration-card h3 { margin: 16px 0 7px; font-size: 1rem; }
.integration-card p { color: var(--muted); font-size: .82rem; }

.stepper { display: grid; grid-template-columns: repeat(3, 1fr); margin-bottom: 25px; }
.step { position: relative; display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: .78rem; }
.step::after { content: ""; height: 1px; flex: 1; background: var(--border); }
.step:last-child::after { display: none; }
.step-number { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 50%; background: white; font-weight: 700; }
.step.active { color: var(--teal-dark); font-weight: 700; }
.step.active .step-number, .step.complete .step-number { border-color: var(--teal); background: var(--teal); color: white; }

.tutorial-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tutorial-card { padding: 24px; border: 1px solid var(--border); border-radius: var(--radius); background: white; }
.tutorial-card .step-number { margin-bottom: 25px; }
.tutorial-card h3 { font-size: 1.05rem; }
.tutorial-card p { margin-top: 10px; color: var(--muted); font-size: .84rem; }
.faq { border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary { padding: 17px 0; cursor: pointer; font-weight: 650; }
.faq details p { padding: 0 0 18px; color: var(--muted); }

dialog { width: min(650px, calc(100vw - 28px)); max-height: min(88vh, 900px); padding: 0; border: 1px solid var(--border); border-radius: 20px; background: var(--surface); color: var(--ink); box-shadow: 0 30px 90px rgba(10,32,45,.3); }
dialog.wide { width: min(900px, calc(100vw - 28px)); }
dialog::backdrop { background: rgba(8, 28, 40, .68); backdrop-filter: blur(3px); }
.dialog-head { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 17px 22px; border-bottom: 1px solid var(--border); }
.dialog-head h2 { font-size: 1.25rem; }
.dialog-body { padding: 23px; overflow: auto; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.role-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.role-card { min-height: 150px; display: grid; align-content: space-between; gap: 15px; padding: 17px; border: 1px solid var(--border); border-radius: 13px; background: white; text-align: left; }
.role-card:hover { border-color: var(--teal); background: #f7fbfa; }
.role-card strong { display: block; }
.role-card small { display: block; margin-top: 5px; color: var(--muted); }

#toast { position: fixed; left: 50%; bottom: 24px; z-index: 150; width: max-content; max-width: min(520px, calc(100vw - 28px)); padding: 13px 18px; border-radius: 11px; background: var(--ink); color: white; box-shadow: var(--shadow); opacity: 0; transform: translate(-50%, 18px); pointer-events: none; transition: opacity .18s ease, transform .18s ease; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1180px) {
  .hero { gap: 36px; }
  .feature-grid, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .order-line { grid-template-columns: minmax(180px, 1fr) 90px 120px 130px 44px; }
}

@media (max-width: 900px) {
  :root { --sidebar: 250px; }
  .hero { grid-template-columns: 1fr; padding-top: 45px; }
  .hero-preview { max-width: 620px; width: 100%; margin: auto; }
  .auth-page { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .auth-main { min-height: 100vh; padding: 38px 24px; }
  .app-shell { display: block; }
  .sidebar { position: fixed; left: 0; top: 0; width: var(--sidebar); transform: translateX(-102%); transition: transform .2s ease, box-shadow .2s ease; }
  .sidebar.open { transform: translateX(0); box-shadow: 0 0 0 100vw rgba(8,28,40,.62); }
  .mobile-menu { display: inline-flex; }
  .page { padding: 25px 22px 55px; }
  .topbar { padding-inline: 21px; }
  .content-grid { grid-template-columns: 1fr; }
  .sticky { position: static; }
  .order-line { grid-template-columns: 1fr 90px 130px 44px; }
  .order-line .unit-price { display: none; }
  .tutorial-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .public-header { height: 76px; padding: 0 18px; }
  .public-nav .nav-hide { display: none; }
  .hero { min-height: auto; padding: 42px 18px 70px; }
  .hero h1 { font-size: clamp(2.65rem, 13vw, 4rem); }
  .hero-copy > p { font-size: 1rem; }
  .hero-actions { display: grid; }
  .hero-actions .btn { width: 100%; }
  .preview-body { grid-template-columns: 74px 1fr; min-height: 330px; }
  .preview-main { padding: 17px; }
  .preview-main h3 { font-size: 1.15rem; }
  .preview-stats { grid-template-columns: 1fr 1fr; }
  .preview-stat:nth-child(3) { display: none; }
  .preview-row { grid-template-columns: 1fr .7fr; }
  .preview-row span:nth-child(3) { display: none; }
  .hero-chip { right: 10px; bottom: 25px; }
  .public-section { padding: 74px 18px; }
  .feature-grid, .grid-2, .grid-3, .grid-4, .product-grid { grid-template-columns: 1fr; }
  .feature-card { min-height: 200px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
  .page { padding: 22px 15px 48px; }
  .page-head { display: grid; }
  .page-actions, .page-actions .btn { width: 100%; }
  .topbar { min-height: 66px; padding: 10px 14px; }
  .profile-copy, .topbar-context { display: none; }
  .panel-body { padding: 17px; }
  .panel-head { padding-inline: 16px; }
  .toolbar, .toolbar-group { display: grid; width: 100%; }
  .toolbar .field, .search-box { width: 100%; min-width: 0; }
  .tabs { width: 100%; overflow-x: auto; }
  .tab { flex: 1 0 auto; }
  .order-line { grid-template-columns: 1fr 80px 44px; }
  .order-line .line-total { grid-column: 1 / 3; }
  .role-grid { grid-template-columns: 1fr; }
  .dialog-actions { display: grid; }
  .dialog-actions .btn { width: 100%; }
  .table-wrap.mobile-cards { border: 0; background: transparent; overflow: visible; }
  .table-wrap.mobile-cards table, .table-wrap.mobile-cards tbody { display: block; }
  .table-wrap.mobile-cards thead { display: none; }
  .table-wrap.mobile-cards tr { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; padding: 15px; border: 1px solid var(--border); border-radius: 13px; background: white; }
  .table-wrap.mobile-cards td { display: block; padding: 0; border: 0; font-size: .82rem; }
  .table-wrap.mobile-cards td::before { content: attr(data-label); display: block; margin-bottom: 3px; color: var(--muted); font-size: .68rem; text-transform: uppercase; }
  .table-wrap.mobile-cards td[data-wide] { grid-column: 1 / -1; }
  .table-wrap.mobile-cards .group-row { display: block; background: var(--surface-2); }
  .table-wrap.mobile-cards .group-row td::before { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .btn:hover { transform: none !important; }
}

@media print {
  .sidebar, .topbar, .page-actions, .btn, .demo-bar { display: none !important; }
  .app-shell { display: block; }
  .page { max-width: none; padding: 0; }
  .panel, .table-wrap { box-shadow: none; border-color: #bbb; }
  body { background: white; }
}
