:root {
  --navy: #06152b;
  --ink: #0e2340;
  --ink-2: #1c2e48;
  --muted: #3d4a60;
  --line: #bdcce0;
  --blue: #1268ff;
  --blue-dark: #0c4fd7;
  --green: #13a36d;
  --green-btn: #1d9e75;
  --bg: #f5f8fc;
  --white: #ffffff;
  --amber: #b86500;
  --warn-bg: #fff8eb;
  --radius: 14px;
  --font: Manrope, system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
}

.create-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.create-sidebar {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.88);
  padding: 0 16px 24px;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.create-logo {
  display: flex;
  align-items: center;
  height: 68px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin: 0 -16px 16px;
  padding: 0 20px;
}

.create-logo img { height: 30px; width: auto; display: block; }

.btn-wallet,
.btn-create,
.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: 0.15s ease;
}

.btn-wallet {
  width: 100%;
  background: var(--green-btn);
  color: #fff;
  padding: 12px 14px;
  margin-bottom: 10px;
}

.btn-wallet:disabled,
.btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.wallet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 16px;
}

.wallet-actions .btn-wallet,
.wallet-actions .btn-ghost {
  width: auto;
  margin: 0;
  flex: 1 1 140px;
}

.wallet-status {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  margin-bottom: 4px;
}

.wallet-status p {
  margin: 0;
  font-size: 12.5px;
  color: var(--ink-2);
  word-break: break-all;
}

.wallet-pill {
  display: inline-flex;
  align-self: start;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 4px;
  padding: 3px 7px;
}

.wallet-pill.off {
  color: var(--muted);
  background: #e8eef7;
}

.wallet-pill.on {
  color: #0b7a50;
  background: #eaf8f2;
}

.deposit-card .steps-ol {
  margin-top: 4px;
}

.btn-create {
  width: 100%;
  background: var(--blue);
  color: #fff;
  padding: 12px 14px;
  margin-bottom: 22px;
}

.btn-primary {
  background: var(--blue);
  color: #fff;
  padding: 11px 22px;
}

.btn-primary:hover { background: var(--blue-dark); }

.btn-ghost {
  background: transparent;
  color: var(--ink-2);
  border: 1px solid var(--line);
  padding: 11px 18px;
}

.sidebar-block { margin-bottom: 22px; }
.sidebar-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  margin: 0;
}

.escrow-track {
  margin-top: 20px;
}

.escrow-track .sidebar-label {
  margin-bottom: 12px;
}

.track-list {
  list-style: none;
  margin: 0;
  padding: 0 0 0 2px;
  position: relative;
}

.track-list::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 5px;
  bottom: 8px;
  width: 1px;
  background: rgba(18, 104, 255, 0.55);
}

.track-list li {
  position: relative;
  padding: 0 0 12px 18px;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.38);
}

.track-list li:last-child {
  padding-bottom: 0;
}

.track-list li i {
  position: absolute;
  left: 0;
  top: 4px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  box-sizing: border-box;
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  background: var(--navy);
}

.track-list li.is-done {
  color: rgba(255, 255, 255, 0.85);
}

.track-list li.is-done i {
  border-color: #1268ff;
  background: #1268ff;
}

.track-list li.is-current {
  color: #fff;
}

.track-list li.is-current i {
  border-color: #1268ff;
  background: transparent;
}

.create-main { min-width: 0; display: flex; flex-direction: column; }

.create-top {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  padding: 14px 24px;
}

.create-top h1 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
}

.create-top p {
  margin: 6px 0 0;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.stepper {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.stepper-item {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 14px 12px;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.stepper-item:last-child { border-right: none; }

.stepper-item b {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #e8eef7;
  color: var(--muted);
  font-size: 12px;
}

.stepper-item strong { display: block; font-size: 13px; color: inherit; }
.stepper-item small { display: none; color: var(--blue); font-family: var(--mono); font-size: 10px; }

.stepper-item.is-current {
  background: var(--bg);
  color: var(--blue);
}

.stepper-item.is-current b {
  background: var(--blue);
  color: #fff;
}

.stepper-item.is-current small { display: block; }

.stepper-item.is-done { color: var(--blue); }
.stepper-item.is-done b { background: rgba(18, 104, 255, 0.15); color: var(--blue); }

.stepper-mobile {
  display: none;
}

.stepper-bar {
  height: 3px;
  background: var(--line);
}

.stepper-bar i {
  display: block;
  height: 100%;
  background: var(--blue);
  transition: width 0.35s ease;
}

.create-body {
  display: flex;
  justify-content: center;
  padding: 22px 24px 40px;
}

.create-form {
  width: 100%;
  max-width: 720px;
}

.banner-safe {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  background: #0a1b34;
  color: #fff;
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 16px;
}

.banner-safe strong { display: block; margin-bottom: 4px; }
.banner-safe p { margin: 0; font-size: 13px; color: rgba(255, 255, 255, 0.72); }

.pill {
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  padding: 6px 10px;
  color: #fff;
}

.pill.soft {
  background: rgba(18, 104, 255, 0.12);
  border-color: rgba(18, 104, 255, 0.45);
  color: var(--blue);
}

.promo {
  background: #f3eeff;
  border: 1px solid rgba(122, 82, 255, 0.25);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 13.5px;
  color: #3d2b73;
  margin-bottom: 18px;
}

.promo a { color: var(--blue); font-weight: 700; text-decoration: none; }

.eyebrow {
  margin: 0 0 6px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--blue);
}

.create-form h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
}

.lede {
  margin: 6px 0 18px;
  color: var(--ink-2);
  font-size: 14px;
}

.card {
  background: var(--white);
  border: 1px solid rgba(18, 104, 255, 0.18);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: 0 10px 30px rgba(14, 35, 64, 0.06);
}

.card.narrow { max-width: 520px; }

.card-head {
  background: #0a1b34;
  color: #fff;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  margin: -18px -18px 16px;
  padding: 12px 18px;
  border-radius: var(--radius) var(--radius) 0 0;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 8px;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  color: var(--ink);
  background: #fff;
  outline: none;
  margin-bottom: 14px;
}

input:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(18, 104, 255, 0.3);
}

.hint {
  margin: -6px 0 14px;
  font-size: 12.5px;
  color: var(--ink-2);
  line-height: 1.45;
}

.hint.amber { color: var(--amber); }

.type-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.escrow-type-card,
.token-chip,
.network-chip,
.window-chip {
  text-align: left;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 14px;
  cursor: pointer;
  color: var(--ink);
  font: inherit;
}

.escrow-type-card strong { display: block; margin-bottom: 4px; font-size: 14px; }
.escrow-type-card span { display: block; font-size: 12px; color: var(--muted); }

.escrow-type-card--custom {
  grid-column: 1 / -1;
  border-style: dashed;
}

.chip-row { display: flex; gap: 8px; flex-wrap: nowrap; margin-bottom: 10px; }
.chip-row.wrap { flex-wrap: wrap; }

.token-chip,
.network-chip,
.window-chip {
  flex: 1;
  text-align: center;
  font-weight: 700;
  font-size: 13px;
  padding: 12px 10px;
}

.network-chip[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

.actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}

.actions.center { justify-content: center; }

.dispute-card {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.dispute-card p { margin: 6px 0 0; font-size: 13px; color: var(--ink-2); }

.warn {
  background: var(--warn-bg);
  border: 1px solid rgba(184, 101, 0, 0.25);
  color: #7a4500;
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 13.5px;
  margin-bottom: 16px;
}

.card hr {
  border: none;
  border-top: 1px solid #e2e9f3;
  margin: 8px 0 18px;
}

.kv {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 14px;
  padding: 8px 0;
  color: var(--ink-2);
}

.kv strong { color: var(--ink); font-weight: 700; }
.kv.total {
  border-top: 1px solid var(--line);
  margin-top: 6px;
  padding-top: 12px;
  font-weight: 800;
}

.mono { font-family: var(--mono); }
.blue { color: var(--blue) !important; }
.green { color: var(--green) !important; }
.mb { margin: 0 0 10px; font-size: 14px; }

.steps-ol {
  margin: 0;
  padding-left: 18px;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.6;
}

.done-box {
  text-align: center;
  max-width: 480px;
  margin: 24px auto 40px;
  background: #fff;
  border: 1px solid rgba(18, 104, 255, 0.18);
  border-radius: 18px;
  padding: 36px 28px;
}

.done-box-wide {
  max-width: 640px;
  text-align: left;
}

.done-box-wide .done-icon,
.done-box-wide h2,
.done-box-wide > p:not(.ref) {
  text-align: center;
}

.done-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(19, 163, 109, 0.12);
  color: var(--green);
  font-size: 28px;
  font-weight: 800;
}

.done-box h2 { margin: 0 0 8px; text-align: center; }
.done-box .ref {
  margin: 10px 0 18px;
  color: var(--ink-2);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.copy-id {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-2);
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.copy-id:hover { border-color: var(--blue); color: var(--blue); }

.done-alert {
  background: #eaf8f2;
  border: 1px solid rgba(19, 163, 109, 0.45);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 12.5px;
  line-height: 1.45;
  color: #0b7a50;
  margin-bottom: 16px;
}

.done-next {
  border: 1.5px solid #bccbdf;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 16px;
  background: #fff;
}

.done-next .card-head {
  margin: 0;
  border-radius: 0;
}

.done-steps {
  list-style: none;
  margin: 0;
  padding: 16px;
  display: grid;
  gap: 14px;
}

.done-steps li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  align-items: start;
}

.done-steps li > span {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--blue);
  background: #e7effc;
  border: 1.5px solid #bcd3f7;
}

.done-steps strong {
  display: block;
  font-size: 14px;
  color: #0a1b34;
  margin-bottom: 3px;
}

.done-steps p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: #2d3b50;
}

.done-roles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}

.done-roles > div {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}

.done-roles strong {
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
  color: var(--ink);
}

.done-roles p {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--ink-2);
}

@media (max-width: 700px) {
  .done-roles { grid-template-columns: 1fr; }
}

.create-help {
  position: sticky;
  top: 16px;
  align-self: start;
}

.help-kicker {
  margin: 0 0 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
  font-weight: 700;
}

.create-help h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 800;
}

.create-help > p {
  margin: 0 0 14px;
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.5;
}

.help-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
}

.help-card strong { display: block; margin-bottom: 4px; font-size: 13.5px; }
.help-card p { margin: 0; font-size: 12.5px; color: var(--ink-2); line-height: 1.45; }

.help-tip {
  background: rgba(18, 104, 255, 0.08);
  border: 1px solid rgba(18, 104, 255, 0.28);
  border-radius: 12px;
  padding: 14px;
  margin: 14px 0;
  font-size: 13px;
  color: var(--ink-2);
}

.help-tip strong {
  display: block;
  color: var(--blue);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.contract-box {
  background: #0a1b34;
  color: rgba(255, 255, 255, 0.8);
  border-radius: 12px;
  padding: 14px;
  font-size: 12.5px;
}

.contract-box p { margin: 0 0 6px; color: rgba(255, 255, 255, 0.5); font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; }
.contract-box code { display: block; color: #fff; font-family: var(--mono); margin-bottom: 8px; }
.contract-box small { display: block; line-height: 1.4; color: rgba(255, 255, 255, 0.55); }

/* Mobile create */
.create-mobile-bar {
  display: none;
}

@media (max-width: 900px) {
  .create-shell {
    grid-template-columns: 1fr;
  }

  .create-sidebar {
    display: none;
  }

  .create-mobile-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    position: sticky;
    top: 0;
    z-index: 40;
    height: 60px;
    padding: 0 14px;
    background: var(--navy);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .create-mobile-bar a {
    display: flex;
    align-items: center;
  }

  .create-mobile-bar img {
    height: 26px;
    width: auto;
    display: block;
  }

  .create-mobile-bar__actions {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .create-mobile-bar .btn-wallet {
    width: auto;
    margin: 0;
    padding: 10px 12px;
    font-size: 13px;
    border-radius: 10px;
  }

  .create-mobile-menu {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
  }

  .create-main {
    min-width: 0;
  }

  .create-top {
    padding: 18px 16px 8px;
  }

  .create-top h1 {
    font-size: 24px;
  }

  .stepper {
    display: none;
  }

  .stepper-mobile {
    display: block;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    padding: 14px 16px 12px;
  }

  .stepper-mobile__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
  }

  .stepper-mobile__count {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
  }

  .stepper-mobile__dots {
    display: flex;
    align-items: center;
    gap: 5px;
  }

  .stepper-mobile__dots i {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #d5deeb;
    display: block;
  }

  .stepper-mobile__dots i.is-done {
    background: rgba(18, 104, 255, 0.45);
  }

  .stepper-mobile__dots i.is-on {
    width: 18px;
    border-radius: 999px;
    background: var(--blue);
  }

  .stepper-mobile__name {
    display: block;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--ink);
    line-height: 1.2;
  }

  .stepper-bar {
    margin: 0;
  }

  .create-body {
    padding: 12px 16px 40px;
  }

  .create-form {
    max-width: none;
  }

  .banner-safe {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .type-grid {
    grid-template-columns: 1fr;
  }

  .chip-row {
    flex-wrap: wrap;
  }

  .chip-row .token-chip,
  .chip-row .window-chip {
    flex: 1 1 calc(50% - 8px);
  }

  .actions {
    position: sticky;
    bottom: 0;
    z-index: 20;
    margin: 20px -16px -16px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: linear-gradient(180deg, rgba(245, 248, 252, 0), #f5f8fc 28%);
    flex-wrap: wrap;
  }

  .actions .btn-primary,
  .actions .btn-ghost {
    flex: 1 1 140px;
  }

  .card {
    padding: 16px;
  }

  .create-help {
    display: none;
  }
}
