:root {
  --ink: #101315;
  --muted: #657077;
  --paper: #f3f5f1;
  --card: #ffffff;
  --line: #dfe4de;
  --acid: #d8ff43;
  --acid-deep: #b7dc25;
  --danger: #c94335;
  --warn: #fff0ba;
  --ok: #e6f9cb;
  --shadow: 0 22px 60px rgba(24, 35, 28, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--paper); }
body { margin: 0; color: var(--ink); background: var(--paper); min-height: 100vh; }
button, input, textarea { font: inherit; }
input, textarea, select { font-size: 16px; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .55; }

.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, .8fr);
  background: var(--ink);
}

.auth-story {
  min-height: 100vh;
  padding: clamp(32px, 6vw, 88px);
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    radial-gradient(circle at 12% 18%, rgba(216,255,67,.22), transparent 28%),
    linear-gradient(145deg, #101315 0%, #172019 100%);
}

.brand { display: flex; align-items: center; gap: 12px; font-weight: 850; letter-spacing: -.04em; }
.brand-mark { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: var(--acid); color: var(--ink); font-size: 15px; letter-spacing: -.08em; }
.brand small { display: block; margin-top: 2px; color: #a9b2aa; font-size: 10px; letter-spacing: .16em; }
.auth-copy { max-width: 740px; padding: 64px 0; }
.eyebrow { display: block; margin-bottom: 14px; color: #839087; font-size: 11px; text-transform: uppercase; letter-spacing: .16em; font-weight: 800; }
.auth-copy h1 { margin: 0 0 22px; font-size: clamp(42px, 6vw, 82px); line-height: .98; letter-spacing: -.065em; }
.auth-copy p { max-width: 650px; margin: 0; color: #c7cec8; font-size: clamp(17px, 2vw, 22px); line-height: 1.55; }
.benefits { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 34px; }
.benefits span { padding: 10px 13px; border: 1px solid #384039; border-radius: 999px; color: #dce1dc; font-size: 13px; }

.auth-panel { min-height: 100vh; display: grid; place-items: center; padding: 28px; background: var(--paper); }
.auth-card { width: min(100%, 470px); padding: clamp(28px, 5vw, 48px); border-radius: 28px; background: var(--card); box-shadow: var(--shadow); }
.auth-card h2 { margin: 12px 0 8px; font-size: clamp(28px, 4vw, 42px); line-height: 1.05; letter-spacing: -.05em; }
.auth-card > p { margin: 0 0 26px; color: var(--muted); line-height: 1.55; }
.auth-icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--ink); color: var(--acid); font-weight: 900; }

.form { display: grid; gap: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.wide { grid-column: 1 / -1; }
label { display: grid; gap: 7px; color: #2b3134; font-size: 13px; font-weight: 750; }
input, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fbfcfa;
  color: var(--ink);
  padding: 13px 14px;
  outline: none;
  transition: border-color .18s, box-shadow .18s;
}
input[type="file"] { min-width: 0; max-width: 100%; overflow: hidden; }
textarea { min-height: 90px; resize: vertical; }
input:focus, textarea:focus { border-color: var(--acid-deep); box-shadow: 0 0 0 4px rgba(216,255,67,.24); }

.button {
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 13px 17px;
  background: white;
  color: var(--ink);
  font-weight: 820;
}
.button-primary { border-color: var(--acid); background: var(--acid); }
.button-primary:hover { background: #e4ff78; }
.button-dark { border-color: var(--ink); background: var(--ink); color: white; }
.button-danger { border-color: #f0cfcb; color: var(--danger); background: #fff8f7; }
.button-wide { width: 100%; }
.link-button { padding: 0; border: 0; color: var(--ink); background: transparent; font-weight: 800; text-decoration: underline; text-underline-offset: 4px; }
.note { display: block; margin-top: 16px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.alert { margin: 0 0 18px; padding: 13px 15px; border-radius: 13px; background: var(--warn); color: #5d4912; font-size: 13px; line-height: 1.45; }
.alert-danger { background: #ffebe8; color: #86291f; }

.shell { min-height: 100vh; display: grid; grid-template-columns: 264px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 25px 20px; color: white; background: var(--ink); display: flex; flex-direction: column; }
.account { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 11px; align-items: center; margin: 42px 0 28px; }
.avatar { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--acid); color: var(--ink); font-weight: 900; }
.account strong, .account small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account small { display: block; margin-top: 3px; color: #89958c; font-size: 11px; }
.nav { display: grid; gap: 7px; }
.nav button { display: grid; grid-template-columns: 28px 1fr; align-items: center; width: 100%; border: 0; border-radius: 12px; padding: 12px; color: #acb5ae; background: transparent; text-align: left; font-weight: 750; }
.nav button.active { color: var(--ink); background: var(--acid); }
.sidebar-foot { margin-top: auto; display: grid; gap: 8px; }
.sidebar-foot button { width: 100%; border: 1px solid #313a33; border-radius: 12px; padding: 11px; color: #c6cec8; background: transparent; text-align: left; }

.main { min-width: 0; padding: 28px clamp(20px, 4vw, 64px) 72px; }
.topbar { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 30px; }
.topbar h1 { margin: 0; font-size: clamp(30px, 4vw, 48px); letter-spacing: -.055em; }
.topbar p { margin: 6px 0 0; color: var(--muted); }
.topbar-actions { display: flex; gap: 9px; }
.icon-button { width: 43px; height: 43px; border: 1px solid var(--line); border-radius: 13px; background: white; }
.notification-button { position: relative; color: var(--acid-deep); }
.notification-button b { position: absolute; top: -7px; right: -7px; min-width: 20px; height: 20px; padding: 0 5px; display: grid; place-items: center; border-radius: 999px; background: var(--danger); color: white; font-size: 10px; }

.view { max-width: 1180px; }
.journey { padding: clamp(25px, 5vw, 54px); border-radius: 28px; background: var(--ink); color: white; box-shadow: var(--shadow); }
.journey.attention { background: #29280f; }
.journey.success { background: #152319; }
.journey .signal { display: inline-flex; align-items: center; gap: 8px; color: var(--acid); font-size: 12px; text-transform: uppercase; letter-spacing: .14em; font-weight: 850; }
.journey .signal i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 6px rgba(216,255,67,.09); }
.journey h2 { max-width: 760px; margin: 20px 0 12px; font-size: clamp(34px, 6vw, 68px); line-height: 1; letter-spacing: -.065em; }
.journey p { max-width: 720px; margin: 0; color: #cbd2cc; font-size: 17px; line-height: 1.55; }
.journey .button { margin-top: 28px; }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 18px; }
.card { min-width: 0; padding: 24px; border: 1px solid var(--line); border-radius: 22px; background: var(--card); }
.card h3 { margin: 6px 0 9px; font-size: 25px; letter-spacing: -.04em; overflow-wrap: anywhere; }
.card p { margin: 0; color: var(--muted); line-height: 1.55; }
.card-row { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.card-row:last-child { border-bottom: 0; }
.card-row span { color: var(--muted); font-size: 13px; }
.card-row strong { text-align: right; }
.empty { min-height: 320px; display: grid; place-items: center; text-align: center; }
.empty div { max-width: 540px; }
.empty span { width: 68px; height: 68px; margin: 0 auto 17px; border-radius: 20px; display: grid; place-items: center; background: var(--acid); font-weight: 900; font-size: 24px; }
.empty h2 { margin: 0 0 10px; font-size: 34px; letter-spacing: -.05em; }
.empty p { margin: 0; color: var(--muted); line-height: 1.55; }
.privacy { margin-top: 18px; padding: 17px 20px; border: 1px solid #d7e1c0; border-radius: 16px; background: #f8ffea; color: #455126; font-size: 13px; line-height: 1.5; }
.bike-symbol { width: 100%; min-height: 130px; margin: 12px 0 20px; display: grid; place-items: center; border-radius: 17px; background: linear-gradient(145deg, #eaff99, var(--acid)); font-size: 38px; font-weight: 950; letter-spacing: -.08em; }
.return-card { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 14px 24px; }
.return-card .eyebrow, .return-card h3, .return-card p { grid-column: 1; }
.return-card .button { grid-column: 2; grid-row: 1 / span 3; }
.document-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.signature-list { display: grid; gap: 10px; margin-top: 16px; }
.signature-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #fbfcfa; }
.signature-row div { display: grid; gap: 4px; }
.signature-row small { color: var(--muted); }
.signature-modal { width: min(100%, 760px); }
.document-preview { max-height: 42vh; overflow: auto; margin: 18px 0; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: #f7f8f5; color: var(--ink); font: 400 .9rem/1.55 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.document-hash { display: grid; gap: 4px; padding: 10px 12px; border-radius: 12px; background: #eef3ea; color: var(--muted); font-size: 11px; }
.document-hash code { color: var(--ink); overflow-wrap: anywhere; user-select: all; }
.consent { align-items: start; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; line-height: 1.45; }
.status-pill { display: inline-flex; padding: 8px 11px; border-radius: 999px; background: var(--ok); color: #2f5512; font-size: 12px; font-weight: 800; }
.intent-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.intent-row:last-child { border-bottom: 0; }
.intent-row small { display: block; margin-top: 4px; color: var(--muted); }
.support-layout { display: grid; grid-template-columns: minmax(260px, .75fr) minmax(0, 1.35fr); gap: 18px; align-items: start; }
.support-list, .support-thread { display: grid; gap: 12px; }
.conversation-item { width: 100%; padding: 16px 18px; display: grid; gap: 5px; border: 1px solid var(--line); border-radius: 16px; background: white; color: var(--ink); text-align: left; }
.conversation-item.active { border-color: var(--acid-deep); box-shadow: 0 0 0 3px rgba(216,255,67,.22); }
.conversation-item small, .message small, .notification-row small { color: var(--muted); }
.message-list { display: grid; gap: 10px; margin: 20px 0; }
.message { max-width: 82%; padding: 13px 15px; border-radius: 15px 15px 15px 4px; background: #f1f3ef; }
.message.mine { margin-left: auto; border-radius: 15px 15px 4px 15px; background: #efffc1; }
.message p { margin-top: 5px; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.repair-card { margin-top: 6px; }
.notification-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.notification-row:last-child { border-bottom: 0; }
.notification-row.unread { padding-left: 14px; border-left: 4px solid var(--acid-deep); }
.notification-row p { margin: 5px 0; }
.modal-backdrop { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 18px; background: rgba(8,12,9,.68); backdrop-filter: blur(8px); }
.modal-box { position: relative; width: min(100%, 520px); max-height: calc(100vh - 36px); overflow: auto; padding: clamp(26px, 5vw, 42px); border-radius: 24px; background: white; box-shadow: var(--shadow); }
.modal-box h2 { margin: 5px 0 10px; font-size: 34px; letter-spacing: -.05em; }
.modal-box > p { margin: 0 0 22px; color: var(--muted); line-height: 1.5; }
.modal-close { position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 11px; background: white; font-size: 22px; }

.registration { margin-top: 18px; padding: clamp(24px, 4vw, 42px); border-radius: 24px; background: white; border: 1px solid var(--line); }
.registration-head { margin-bottom: 26px; }
.registration-head h2 { margin: 5px 0 8px; font-size: 34px; letter-spacing: -.05em; }
.registration-head p { margin: 0; color: var(--muted); line-height: 1.5; }
.checkbox { grid-template-columns: 20px 1fr; align-items: center; }
.checkbox input { width: 18px; height: 18px; padding: 0; }
.hidden { display: none !important; }

.bottom-nav { display: none; }
.toast { position: fixed; right: 22px; bottom: 22px; max-width: min(420px, calc(100vw - 44px)); z-index: 20; padding: 13px 16px; border-radius: 13px; background: var(--ink); color: white; box-shadow: var(--shadow); opacity: 0; transform: translateY(12px); pointer-events: none; transition: .2s; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { background: #812b23; }
.fatal { min-height: 100vh; display: grid; place-items: center; padding: 24px; text-align: center; }

@media (max-width: 880px) {
  input, textarea, select { font-size: 16px; }
  .auth { grid-template-columns: 1fr; }
  .auth-story { display: none; }
  .auth-panel { padding: 18px; }
  .shell { display: block; }
  .sidebar { display: none; }
  .main { padding: 20px 16px 100px; }
  .topbar { margin-bottom: 20px; }
  .topbar p { display: none; }
  .topbar-actions .avatar { display: none; }
  .grid, .form-grid { grid-template-columns: 1fr; }
  .support-layout { grid-template-columns: 1fr; }
  .wide { grid-column: auto; }
  .bottom-nav { position: fixed; left: 10px; right: 10px; bottom: max(10px, env(safe-area-inset-bottom)); z-index: 10; display: grid; grid-template-columns: repeat(4, 1fr); padding: 7px; border: 1px solid #333a34; border-radius: 18px; background: rgba(16,19,21,.96); box-shadow: var(--shadow); backdrop-filter: blur(14px); }
  .bottom-nav button { border: 0; border-radius: 12px; padding: 8px 3px; color: #89928b; background: transparent; font-size: 10px; font-weight: 750; }
  .bottom-nav button span { display: block; margin-bottom: 3px; font-size: 18px; }
  .bottom-nav button.active { color: var(--ink); background: var(--acid); }
  .return-card { display: block; }
  .return-card .button { width: 100%; margin-top: 18px; }
  .signature-row { align-items: stretch; flex-direction: column; }
  .signature-row .button { width: 100%; }
  .notification-row { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
.return-actions { display:flex; flex-wrap:wrap; gap:10px; }
.document-preview { max-height:58vh; overflow:auto; padding:22px; border:1px solid var(--line); border-radius:18px; background:#fff; color:#17201b; font:15px/1.55 Arial,sans-serif; }
.document-preview h3 { margin:22px 0 14px; font-size:20px; line-height:1.3; text-align:center; }
.document-preview h4 { margin:26px 0 12px; color:#174838; font-size:18px; }
.document-preview h5 { margin:20px 0 8px; color:#174838; font-size:16px; }
.document-preview p { margin:0 0 11px; text-align:justify; }
.document-table-wrap { max-width:100%; overflow-x:auto; margin:16px 0 20px; }
.document-preview table { width:100%; border-collapse:collapse; font-size:13px; }
.document-preview th, .document-preview td { min-width:120px; padding:8px 10px; border:1px solid #cbd5d1; text-align:left; vertical-align:top; }
.document-preview th { background:#e8f4ef; }
.success-alert { border-color:#75c896; background:#eaf8ef; }
.document-scroll-status { display:grid; gap:8px; margin:12px 0; font-size:13px; font-weight:700; color:var(--muted); }
.document-scroll-status progress { width:100%; height:8px; accent-color:var(--acid); }
[data-signature-consent][hidden] { display:none !important; }
.message-attachment { display:grid; grid-template-columns:auto 1fr auto; gap:8px; align-items:center; width:100%; margin-top:8px; padding:9px 11px; border:1px solid rgba(13,31,23,.15); border-radius:12px; background:rgba(255,255,255,.65); color:inherit; text-align:left; cursor:pointer; }
.message-attachment small { margin:0; }
.support-search { display:flex; gap:8px; margin:12px 0; }
.support-search input { min-width:0; flex:1; }
.replacement-documents { display:grid; gap:8px; margin-top:18px; padding-top:16px; border-top:1px solid var(--line); }
