@font-face {
  font-family: "Estedad";
  src: url("/static/fonts/Estedad-Regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Estedad";
  src: url("/static/fonts/Estedad-SemiBold.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Estedad";
  src: url("/static/fonts/Estedad-Bold.woff2") format("woff2");
  font-style: normal;
  font-weight: 700 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --navy: #02071e;
  --navy-soft: #111a3b;
  --pink: #f90062;
  --pink-soft: #fff0f6;
  --cyan: #08b9ed;
  --cyan-soft: #edfaff;
  --orange: #ff8416;
  --ink: #11172a;
  --muted: #667085;
  --line: #dce3ec;
  --surface: #fff;
  --background: #f2f6fa;
  --success: #16845b;
  --danger: #b42318;
  --shadow: 0 14px 38px rgba(2, 7, 30, .10), 0 2px 8px rgba(2, 7, 30, .05);
  font-family: "Estedad", Tahoma, Arial, sans-serif;
}

html {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}
* { box-sizing: border-box; }
body {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 5%, rgba(8, 185, 237, .08), transparent 28rem),
    radial-gradient(circle at 95% 20%, rgba(249, 0, 98, .055), transparent 25rem),
    var(--background);
}
button, input, textarea { min-width: 0; max-width: 100%; font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  width: 100%;
  max-width: 100%;
  color: #fff;
  background: linear-gradient(110deg, var(--navy) 0%, #06143d 58%, #073f60 100%);
  border-bottom: 2px solid rgba(8, 185, 237, .55);
  box-shadow: 0 7px 22px rgba(2, 7, 30, .22);
}
.topbar::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -2px;
  width: 38%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--orange), var(--pink));
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  max-width: 780px;
  min-height: 78px;
  margin: 0 auto;
  padding: 10px max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left));
}
.brand-heading { display: flex; align-items: center; gap: 11px; min-width: 0; }
.header-logo { width: 52px; height: 52px; flex: 0 0 52px; border-radius: 14px; object-fit: cover; box-shadow: 0 5px 16px rgba(0,0,0,.24); }
.topbar h1 { margin: 0; font-size: 1.15rem; line-height: 1.5; white-space: nowrap; }
.eyebrow { margin: 0; color: var(--cyan); direction: ltr; text-align: right; font-size: .68rem; font-weight: 700; letter-spacing: 1.2px; }
.top-actions { display: flex; flex: 0 0 auto; gap: 7px; }
.ghost { border: 1px solid rgba(255,255,255,.36); border-radius: 11px; padding: 8px 11px; color: #fff; background: rgba(255,255,255,.08); font-size: .8rem; font-weight: 600; }
.ghost:hover { border-color: var(--cyan); background: rgba(8,185,237,.12); }

main {
  width: 100%;
  max-width: 780px;
  min-width: 0;
  margin: 0 auto;
  padding: 20px 14px calc(44px + env(safe-area-inset-bottom));
}
.card {
  width: 100%;
  min-width: 0;
  overflow: visible;
  background: rgba(255,255,255,.97);
  border: 1px solid rgba(214,224,235,.92);
  border-radius: 22px;
  box-shadow: var(--shadow);
}
.auth-card { max-width: 440px; margin: 6vh auto 0; padding: 28px; text-align: center; }
.auth-card h2, .success-card h2 { margin: 15px 0 7px; }
.login-logo { display: block; width: 96px; height: 96px; margin: auto; border-radius: 26px; object-fit: cover; box-shadow: 0 13px 28px rgba(2,7,30,.24); }
.muted, .hint { color: var(--muted); }
.hint { font-size: .79rem; line-height: 1.9; }
.stack { display: grid; gap: 15px; margin-top: 24px; text-align: right; }

.sale-layout { display: grid; width: 100%; min-width: 0; gap: 17px; }
.form-step { scroll-margin-top: 158px; }
.section-card { padding: 21px; }
.section-title { display: flex; align-items: baseline; gap: 9px; margin-bottom: 18px; }
.section-title p { margin: 0; color: var(--pink); font-size: .7rem; font-weight: 700; white-space: nowrap; }
.section-title p::after { content: ""; display: inline-block; width: 18px; height: 2px; margin-right: 8px; vertical-align: middle; border-radius: 2px; background: linear-gradient(90deg, var(--pink), var(--orange)); }
.section-title h2 { margin: 0; font-size: 1.03rem; }

.progress-nav {
  position: sticky;
  top: 88px;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: 100%;
  min-width: 0;
  padding: 8px;
  overflow: hidden;
  background: rgba(255,255,255,.94);
  border: 1px solid rgba(213,223,234,.95);
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(2,7,30,.10);
  backdrop-filter: blur(12px);
}
.progress-nav::before { content: ""; position: absolute; top: 24px; right: 13%; left: 13%; height: 2px; background: #e4e8ef; }
.progress-step { position: relative; z-index: 1; display: grid; justify-items: center; gap: 3px; padding: 2px 4px; border: 0; color: #8b94a5; background: transparent; }
.progress-step span { display: grid; width: 30px; height: 30px; place-items: center; border: 2px solid #e1e6ed; border-radius: 50%; background: #fff; font-size: .75rem; font-weight: 700; transition: .2s ease; }
.progress-step small { font-size: .68rem; font-weight: 600; }
.progress-step.active { color: var(--navy); }
.progress-step.active span { color: #fff; border-color: var(--pink); background: linear-gradient(145deg, var(--pink), #d90055); box-shadow: 0 4px 12px rgba(249,0,98,.28); }
.progress-step.done span { color: #fff; border-color: var(--cyan); background: var(--cyan); }

label { display: grid; min-width: 0; gap: 7px; color: #303a50; font-size: .84rem; font-weight: 600; }
input, textarea { width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 13px; padding: 12px 13px; color: var(--ink); background: #fff; outline: none; transition: border .15s, box-shadow .15s, background .15s; }
input:hover, textarea:hover { border-color: #c3cedc; }
input:focus, textarea:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(8,185,237,.14); }
textarea { resize: vertical; line-height: 1.9; }
.two-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.customer-fields { display: grid; min-width: 0; gap: 14px; margin-top: 18px; padding-top: 18px; border-top: 1px dashed var(--line); }

fieldset { width: 100%; min-width: 0; margin: 0 0 18px; padding: 0; border: 0; }
legend { margin-bottom: 10px; color: #303a50; font-size: .84rem; font-weight: 600; }
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; min-width: 0; gap: 9px; }
.choice { display: block; min-width: 0; cursor: pointer; }
.choice input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.choice span { display: grid; width: 100%; min-width: 0; min-height: 48px; place-items: center; padding: 8px 7px; overflow-wrap: anywhere; border: 1px solid var(--line); border-radius: 13px; color: #263248; background: #fafbfd; text-align: center; font-size: .76rem; font-weight: 600; line-height: 1.6; transition: transform .15s, border .15s, background .15s, box-shadow .15s; }
.choice:hover span { transform: translateY(-1px); border-color: #bac8d8; box-shadow: 0 5px 12px rgba(2,7,30,.06); }
.choice input:focus-visible + span { outline: 3px solid rgba(8,185,237,.25); outline-offset: 2px; }
.choice input:checked + span { border-color: var(--cyan); color: #003f59; background: var(--cyan-soft); box-shadow: inset 0 0 0 1px var(--cyan), 0 5px 14px rgba(8,185,237,.12); }
.choice.brand-stoktop input:checked + span { border-color: var(--pink); color: #9d003e; background: var(--pink-soft); box-shadow: inset 0 0 0 1px var(--pink), 0 6px 15px rgba(249,0,98,.13); }
.choice.brand-stoktop:hover span { border-color: rgba(249,0,98,.5); }
.choice.brand-klap input:checked + span { border-color: var(--cyan); color: #033853; background: linear-gradient(100deg, var(--cyan-soft), #fff8ed); box-shadow: inset -3px 0 0 var(--cyan), inset 3px 0 0 var(--orange), 0 6px 15px rgba(8,185,237,.13); }
.choice.brand-klap:hover span { border-color: rgba(8,185,237,.65); }

.primary, .secondary { min-height: 48px; border: 0; border-radius: 13px; padding: 12px 18px; font-weight: 700; transition: transform .15s, box-shadow .15s; }
.primary { color: #fff; background: linear-gradient(105deg, var(--navy), #083d62 70%, #087ca3); box-shadow: 0 9px 22px rgba(2,7,30,.22); }
.primary:hover, .secondary:hover { transform: translateY(-1px); }
.primary:active, .secondary:active { transform: translateY(0); }
.secondary { color: #7f0032; background: var(--pink-soft); border: 1px solid rgba(249,0,98,.35); }
.primary:disabled, .secondary:disabled { opacity: .55; cursor: wait; transform: none; }
.parse-action { display: block; width: 100%; margin-top: 12px; position: static; }
.submit-bar { position: static; width: 100%; padding: 2px 0 0; }
.submit { position: static; width: 100%; min-height: 56px; font-size: .98rem; }

.search-results { width: 100%; min-width: 0; max-height: 260px; overflow: auto; margin-top: 6px; border: 1px solid var(--line); border-radius: 13px; background: #fff; box-shadow: 0 15px 32px rgba(2,7,30,.14); }
.result { display: block; width: 100%; min-width: 0; padding: 12px; border: 0; border-bottom: 1px solid #edf1f5; background: #fff; text-align: right; }
.result:last-child { border-bottom: 0; }
.result:hover { background: var(--cyan-soft); }
.result strong { display: block; overflow-wrap: anywhere; }
.result small { display: block; margin-top: 5px; overflow-wrap: anywhere; color: var(--muted); }
.selection { width: 100%; min-width: 0; margin-top: 10px; padding: 12px 14px; overflow-wrap: anywhere; border: 1px solid #a9d8c7; border-radius: 13px; background: #edf9f4; color: #185c45; line-height: 1.8; }

.success-card { max-width: 520px; margin: 6vh auto; padding: 28px; text-align: center; }
.success-icon { display: grid; width: 64px; height: 64px; place-items: center; margin: auto; border-radius: 50%; color: #fff; background: var(--success); font-size: 2rem; }
.document-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 22px 0; }
.document-links a { padding: 12px; border: 1px solid #bcdff0; border-radius: 13px; color: #034663; background: var(--cyan-soft); text-decoration: none; font-weight: 700; }

.toast { position: fixed; right: 14px; bottom: 20px; left: 14px; z-index: 100; max-width: 620px; margin: auto; padding: 13px 16px; border-radius: 13px; color: #fff; background: #273648; box-shadow: 0 10px 35px rgba(0,0,0,.25); line-height: 1.8; }
.toast.error { background: var(--danger); }
.busy { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; gap: 11px; color: #fff; background: rgba(2,7,30,.68); backdrop-filter: blur(3px); }
.spinner { width: 25px; height: 25px; border: 3px solid rgba(255,255,255,.35); border-top-color: var(--cyan); border-radius: 50%; animation: spin .75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 520px) {
  .topbar-inner { min-height: 72px; padding-right: 10px; padding-left: 10px; }
  .header-logo { width: 46px; height: 46px; flex-basis: 46px; border-radius: 12px; }
  .topbar h1 { font-size: 1rem; }
  .ghost { padding: 7px 9px; font-size: .72rem; }
  main { width: 100%; max-width: 100%; padding: 14px 10px calc(34px + env(safe-area-inset-bottom)); }
  .progress-nav { top: 80px; border-radius: 15px; }
  .progress-step small { font-size: .62rem; }
  .form-step { scroll-margin-top: 150px; }
  .section-card { padding: 17px 14px; border-radius: 19px; }
  .two-columns { grid-template-columns: minmax(0, 1fr); }
  .choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .choice span { min-height: 46px; padding: 7px 5px; font-size: .7rem; }
  .auth-card { padding: 23px 18px; }
  .document-links { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 360px) {
  .header-logo { width: 42px; height: 42px; flex-basis: 42px; }
  .eyebrow { display: none; }
  .topbar h1 { font-size: .92rem; }
  .progress-step span { width: 27px; height: 27px; }
  .progress-nav::before { top: 22px; }
  .choice span { font-size: .66rem; }
}
