:root {
  color-scheme: light;
  --bg: #f5f7f8;
  --surface: #ffffff;
  --surface-strong: #eef3f2;
  --line: #d9e1df;
  --text: #14201d;
  --muted: #65736f;
  --accent: #0f766e;
  --accent-strong: #0b5f59;
  --warn: #b7791f;
  --danger: #b42318;
  --shadow: 0 18px 48px rgba(17, 24, 39, 0.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  min-height: 76px;
  padding: 14px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-size: 20px;
  font-weight: 800;
  text-decoration: none;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.site-nav a,
.ghost-link {
  color: var(--muted);
  font-weight: 700;
  text-decoration: none;
}

.site-nav a:hover,
.ghost-link:hover {
  color: var(--accent);
}

.landing {
  min-height: calc(100vh - 76px);
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.14), transparent 36%),
    linear-gradient(180deg, #ffffff 0%, #eef4f5 100%);
}

.hero-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 48px;
  align-items: center;
  width: min(1180px, calc(100% - 48px));
  min-height: calc(100vh - 142px);
  margin: 0 auto;
  padding: 56px 0 34px;
}

.hero-copy {
  display: grid;
  gap: 22px;
  max-width: 720px;
}

.hero-copy h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(44px, 6vw, 82px);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero-text {
  max-width: 610px;
  margin: 0;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.market-panel {
  display: grid;
  gap: 12px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
}

.market-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.market-row.is-highlighted {
  border-color: rgba(15, 118, 110, 0.36);
  background: #edf7f5;
}

.landing-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border-top: 1px solid var(--line);
  background: var(--line);
}

.landing-band > div {
  min-height: 210px;
  padding: 34px;
  background: #ffffff;
}

.landing-band h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.landing-band p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(320px, 380px) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px;
  border-right: 1px solid var(--line);
  background: var(--surface);
}

.brand-row,
.topbar,
.section-heading,
.compact-header,
.order-summary,
.timeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-row {
  justify-content: flex-start;
}

.brand-mark {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
}

.brand-name {
  font-size: 18px;
  font-weight: 760;
}

.brand-subtitle,
.eyebrow,
.field span,
.order-metrics dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.auth-panel,
.orders-section,
.workspace,
.order-create,
.order-detail {
  min-width: 0;
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(12, 20, 18, 0.46);
}

.auth-dialog {
  position: relative;
  display: grid;
  gap: 18px;
  width: min(560px, 100%);
  max-height: min(820px, calc(100vh - 48px));
  overflow: auto;
  padding: 36px;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 24px 80px rgba(17, 24, 39, 0.22);
  outline: none;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
}

.auth-heading {
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
}

.auth-heading h2 {
  margin: 0;
  font-size: 30px;
}

.auth-heading p {
  margin: 0;
  color: var(--muted);
}

.domain-badge {
  padding: 9px 13px;
  border-radius: 8px;
  background: #f7faf9;
  color: var(--muted);
  font-weight: 760;
}

.segmented-control,
.auth-intents {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faf9;
}

.segmented-control button,
.auth-intents button {
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font-weight: 760;
}

.segmented-control button.is-active,
.auth-intents button.is-active {
  background: #ffffff;
  box-shadow: 0 1px 6px rgba(17, 24, 39, 0.08);
}

.auth-intents {
  width: min(280px, 100%);
  margin: 0 auto 16px;
  border: 0;
  background: transparent;
}

.auth-intents button.is-active {
  color: var(--accent);
  box-shadow: inset 0 -2px 0 var(--accent);
}

.telegram-device-setup {
  display: grid;
  gap: 14px;
  color: var(--muted);
  line-height: 1.5;
}

.telegram-device-setup.is-disabled {
  opacity: 0.55;
}

.telegram-device-pending {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
}

.telegram-qr {
  width: 220px;
  height: 220px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.telegram-device-copy {
  display: grid;
  gap: 12px;
}

.telegram-device-copy p {
  margin: 0;
  line-height: 1.4;
}

.telegram-open-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 40px;
  padding: 9px 13px;
  border-radius: 8px;
  background: #54a9eb;
  color: #ffffff;
  font-weight: 760;
  text-decoration: none;
}

.device-facts {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
}

.device-facts div {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
}

.device-facts dt,
.device-facts dd {
  margin: 0;
}

.device-facts dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
}

.device-facts dd {
  overflow-wrap: anywhere;
  font-weight: 760;
}

.device-status {
  color: var(--muted);
}

.auth-status {
  margin: 0;
}

.mini-app-body {
  min-height: 100vh;
  background: #ffffff;
}

.mini-login {
  display: grid;
  gap: 16px;
  min-height: 100vh;
  padding: 20px 16px;
}

.mini-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text);
  font-size: 18px;
}

.mini-card {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 20px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
}

.mini-card h1 {
  margin: 0;
  text-align: center;
  font-size: 30px;
  line-height: 1.1;
}

.mini-muted {
  margin: 0;
  color: var(--muted);
  text-align: center;
  line-height: 1.45;
}

.mini-facts {
  display: grid;
  gap: 0;
  margin: 0;
  overflow: hidden;
  border-radius: 8px;
  background: #ffffff;
}

.mini-facts div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}

.mini-facts div:last-child {
  border-bottom: 0;
}

.mini-facts dt,
.mini-facts dd {
  margin: 0;
}

.mini-facts dt {
  color: var(--muted);
}

.mini-facts dd {
  text-align: right;
  overflow-wrap: anywhere;
  font-weight: 800;
}

.mini-domain {
  display: grid;
  justify-items: center;
  gap: 8px;
  color: var(--muted);
  text-align: center;
}

.mini-domain strong {
  padding: 8px 12px;
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
}

.mini-status {
  min-height: 22px;
  margin: 0;
  color: var(--muted);
  text-align: center;
}

.mini-status.is-error {
  color: var(--danger);
}

.mini-actions,
.mini-confirm {
  display: grid;
  gap: 10px;
  margin-top: auto;
}

.mini-actions .primary-button,
.mini-actions .ghost-button,
.mini-confirm .primary-button {
  width: 100%;
  min-height: 48px;
}

.mini-confirm {
  padding: 18px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.mini-confirm h2 {
  margin: 0;
  font-size: 20px;
}

.warning-box {
  padding: 12px;
  border: 1px solid rgba(180, 35, 24, 0.42);
  border-radius: 8px;
  background: #fff5f5;
  color: var(--text);
  line-height: 1.4;
}

.confirm-check {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: flex-start;
  line-height: 1.35;
}

.auth-form {
  display: grid;
  gap: 12px;
}

.auth-separator {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin: 4px 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.auth-separator::before,
.auth-separator::after {
  content: "";
  height: 1px;
  background: var(--line);
}

.telegram-widget-slot {
  display: flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
}

.telegram-widget-slot-compact {
  justify-content: flex-end;
}

.telegram-login-button {
  width: min(100%, 260px);
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid #4aa3df;
  border-radius: 8px;
  background: #54a9eb;
  color: #ffffff;
  font-weight: 760;
}

.telegram-login-button:hover {
  background: #3d98dc;
}

.telegram-login-button-compact {
  width: auto;
  min-height: 40px;
}

.telegram-unavailable {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
}

.field {
  display: grid;
  gap: 6px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
  color: var(--text);
  outline: none;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.field textarea {
  min-height: 96px;
  resize: vertical;
  line-height: 1.45;
}

.primary-button,
.ghost-button,
.icon-button,
.order-button {
  min-height: 40px;
  border-radius: 8px;
  border: 1px solid transparent;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  background: var(--accent);
  color: white;
  font-weight: 760;
  text-decoration: none;
}

.primary-button:hover {
  background: var(--accent-strong);
}

.ghost-button {
  padding: 9px 13px;
  background: var(--surface);
  color: var(--text);
  border-color: var(--line);
}

.ghost-button:hover,
.icon-button:hover {
  background: var(--surface-strong);
}

.icon-button {
  width: 40px;
  padding: 0;
  background: var(--surface);
  color: var(--text);
  border-color: var(--line);
  font-size: 20px;
  line-height: 1;
}

.heading-actions,
.form-actions,
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-heading h1,
.topbar h2,
.compact-header h3,
.order-summary h3,
.timeline-header h3,
.empty-state h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
}

.eyebrow {
  margin: 0 0 4px;
}

.orders-list {
  display: grid;
  gap: 8px;
  overflow: auto;
  padding-right: 2px;
}

.order-button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  width: 100%;
  padding: 12px;
  text-align: left;
  background: #fbfcfc;
  color: var(--text);
  border-color: var(--line);
}

.order-button:hover,
.order-button.is-active {
  border-color: var(--accent);
  background: #edf7f5;
}

.order-code,
.order-amount {
  overflow-wrap: anywhere;
  font-weight: 760;
}

.order-meta {
  color: var(--muted);
  font-size: 13px;
}

.workspace {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px;
}

.topbar {
  min-height: 52px;
}

.status-band {
  display: none;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
}

.status-band.is-visible {
  display: block;
}

.status-band.is-error {
  border-color: rgba(180, 35, 24, 0.3);
  color: var(--danger);
}

.order-create {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.order-form {
  display: grid;
  gap: 14px;
}

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

.form-grid-wide {
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
}

.empty-state {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin: auto;
  max-width: 360px;
  text-align: center;
  color: var(--muted);
}

.empty-state img {
  width: 72px;
  height: 72px;
}

.empty-state p {
  margin: 0;
  line-height: 1.5;
}

.order-detail {
  display: grid;
  gap: 18px;
}

.order-summary,
.order-metrics,
.timeline,
.message-form {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.order-summary {
  padding: 18px;
}

.status-pill {
  max-width: 180px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #e9f6f4;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 760;
  overflow-wrap: anywhere;
}

.order-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.order-metrics div {
  padding: 16px;
  border-right: 1px solid var(--line);
}

.order-metrics div:last-child {
  border-right: 0;
}

.order-metrics dt,
.order-metrics dd {
  margin: 0;
}

.order-metrics dd {
  margin-top: 6px;
  font-weight: 760;
  overflow-wrap: anywhere;
}

.timeline {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow: hidden;
}

.message-form {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
}

.timeline-item {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.timeline-item:last-child {
  border-bottom: 0;
}

.timeline-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.timeline-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.5;
}

.hidden {
  display: none !important;
}

@media (max-width: 860px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .site-nav {
    display: none;
  }

  .hero-section,
  .landing-band {
    grid-template-columns: 1fr;
  }

  .hero-section {
    width: min(100% - 32px, 720px);
    gap: 26px;
    min-height: auto;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .orders-list {
    max-height: 360px;
  }
}

@media (max-width: 560px) {
  .site-header {
    padding: 12px 16px;
  }

  .site-brand span {
    display: none;
  }

  .hero-copy h1 {
    font-size: 42px;
  }

  .hero-text {
    font-size: 17px;
  }

  .auth-dialog {
    padding: 28px 18px 20px;
  }

  .telegram-device-pending {
    grid-template-columns: 1fr;
  }

  .telegram-qr {
    justify-self: center;
  }

  .sidebar,
  .workspace {
    padding: 16px;
  }

  .form-grid,
  .form-grid-wide,
  .order-metrics {
    grid-template-columns: 1fr;
  }

  .order-metrics div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .order-metrics div:last-child {
    border-bottom: 0;
  }

  .topbar,
  .compact-header,
  .order-summary {
    align-items: flex-start;
    flex-direction: column;
  }
}

body.is-app {
  background:
    linear-gradient(180deg, #06758a 0%, #06758a 34%, #f2f4f5 34%, #f2f4f5 100%);
}

body.is-app .app-shell {
  display: grid;
  grid-template-columns: minmax(340px, 420px) minmax(0, 760px);
  justify-content: center;
  gap: 22px;
  min-height: 100vh;
  padding: 24px;
  background: transparent;
}

body.is-app .sidebar,
body.is-app .workspace {
  min-width: 0;
  max-height: calc(100vh - 48px);
  overflow: hidden;
  border: 0;
  border-radius: 28px;
  background: #f7f8f9;
  box-shadow: 0 24px 70px rgba(9, 29, 35, 0.22);
}

body.is-app .sidebar {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0;
  padding: 0;
}

body.is-app .app-header {
  padding: 20px 20px 16px;
  background: #06758a;
  color: #ffffff;
}

body.is-app .brand-mark {
  width: 46px;
  height: 46px;
  flex-basis: 46px;
  border-radius: 12px;
}

body.is-app .brand-name {
  font-size: 19px;
  font-weight: 820;
}

body.is-app .brand-subtitle,
body.is-app .app-header .eyebrow {
  color: rgba(255, 255, 255, 0.72);
}

body.is-app .orders-section {
  display: flex;
  min-height: 0;
  flex-direction: column;
  gap: 16px;
  overflow: auto;
  padding: 16px;
}

body.is-app .wallet-card {
  display: grid;
  gap: 16px;
  padding: 22px 18px 18px;
  border-radius: 24px;
  background: linear-gradient(135deg, #0a6978 0%, #2362b8 100%);
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 18px 36px rgba(35, 98, 184, 0.24);
}

body.is-app .wallet-caption {
  margin: 0;
  color: rgba(255, 255, 255, 0.66);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

body.is-app .wallet-balance {
  color: #ffffff;
  font-size: 34px;
  font-weight: 830;
  line-height: 1;
  text-align: center;
}

body.is-app .wallet-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

body.is-app .wallet-action {
  min-height: 50px;
  border-radius: 16px;
}

body.is-app .wallet-action.primary-button {
  background: #ffffff;
  color: #111827;
}

body.is-app .wallet-action.ghost-button {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

body.is-app .orders-heading {
  padding: 2px 2px 0;
}

body.is-app .section-heading h1,
body.is-app .topbar h2,
body.is-app .compact-header h3,
body.is-app .order-summary h3,
body.is-app .timeline-header h3,
body.is-app .empty-state h3 {
  font-size: 22px;
  font-weight: 820;
}

body.is-app .orders-list {
  display: grid;
  gap: 10px;
  overflow: visible;
  padding: 0 0 4px;
}

body.is-app .order-button {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  width: 100%;
  min-height: 74px;
  padding: 14px;
  border: 0;
  border-radius: 18px;
  background: #ffffff;
  color: #101828;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.05);
}

body.is-app .order-button:hover,
body.is-app .order-button.is-active {
  background: #eaf6f5;
  box-shadow: inset 0 0 0 1px #16877f, 0 10px 28px rgba(22, 135, 127, 0.16);
}

body.is-app .order-code,
body.is-app .order-amount {
  min-width: 0;
  font-size: 16px;
  font-weight: 820;
}

body.is-app .order-meta {
  min-width: 0;
  color: #667085;
  font-size: 13px;
}

body.is-app .order-row {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

body.is-app .order-flow {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
}

body.is-app .order-arrow {
  color: #98a2b3;
  font-weight: 820;
}

body.is-app .workspace {
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: auto;
  padding: 18px;
}

body.is-app .topbar {
  min-height: auto;
  padding: 4px 2px 0;
}

body.is-app .topbar-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

body.is-app .status-band {
  border: 0;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.05);
}

body.is-app .empty-state {
  align-content: center;
  width: 100%;
  max-width: none;
  min-height: 360px;
  margin: 0;
  padding: 34px 22px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 12px 34px rgba(16, 24, 40, 0.06);
}

body.is-app .empty-state img {
  width: 74px;
  height: 74px;
}

body.is-app .order-detail {
  display: grid;
  gap: 14px;
}

body.is-app .order-summary {
  align-items: flex-start;
  min-height: 134px;
  padding: 20px;
  border: 0;
  border-radius: 24px;
  background: linear-gradient(135deg, #0a6978 0%, #2362b8 100%);
  color: #ffffff;
  box-shadow: 0 18px 36px rgba(35, 98, 184, 0.2);
}

body.is-app .order-summary .eyebrow {
  color: rgba(255, 255, 255, 0.68);
}

body.is-app .order-summary h3 {
  margin-top: 8px;
  color: #ffffff;
  font-size: 28px;
}

body.is-app .status-pill {
  max-width: 100%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

body.is-app .order-metrics,
body.is-app .timeline,
body.is-app .message-form,
body.is-app .order-create {
  border: 0;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 12px 34px rgba(16, 24, 40, 0.06);
}

body.is-app .order-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body.is-app .order-metrics div {
  border-color: #edf0f2;
}

body.is-app .order-metrics dt {
  color: #667085;
}

body.is-app .order-metrics dd {
  color: #101828;
  font-size: 18px;
}

body.is-app .timeline-header {
  padding: 4px 2px 0;
}

body.is-app .timeline-item {
  border-color: #edf0f2;
}

body.is-app .timeline-meta {
  color: #667085;
}

body.is-app .timeline-text {
  color: #101828;
}

body.is-app .message-form,
body.is-app .order-create {
  padding: 18px;
}

body.is-app .order-create {
  gap: 18px;
}

body.is-app .order-form {
  gap: 16px;
}

body.is-app .form-step {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 4px 0;
}

body.is-app .step-marker {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #eaf6f5;
  color: #0f766e;
  font-weight: 820;
}

body.is-app .form-step h4,
body.is-app .form-step p {
  margin: 0;
}

body.is-app .form-step h4 {
  color: #101828;
  font-size: 16px;
}

body.is-app .form-step p {
  margin-top: 3px;
  color: #667085;
  font-size: 13px;
  line-height: 1.35;
}

body.is-app .field {
  gap: 7px;
}

body.is-app .field span,
body.is-app .order-metrics dt,
body.is-app .eyebrow {
  color: #667085;
}

body.is-app .field input,
body.is-app .field select,
body.is-app .field textarea {
  min-height: 52px;
  border: 1px solid #dfe5e7;
  border-radius: 16px;
  background: #f8fafb;
}

body.is-app .field textarea {
  min-height: 118px;
}

body.is-app .primary-button,
body.is-app .ghost-button,
body.is-app .icon-button {
  min-height: 46px;
  border-radius: 14px;
  font-weight: 780;
}

body.is-app .primary-button {
  background: #0f766e;
}

body.is-app .primary-button:hover {
  background: #0b5f59;
}

body.is-app .ghost-button {
  border-color: #dfe5e7;
  background: #ffffff;
}

body.is-app .form-actions {
  justify-content: stretch;
}

body.is-app .form-actions .primary-button {
  width: 100%;
  min-height: 52px;
}

@media (max-width: 980px) {
  body.is-app {
    background: #06758a;
  }

  body.is-app .app-shell {
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    gap: 0;
    width: 100%;
    min-height: 100vh;
    padding: 0;
    overflow-x: hidden;
  }

  body.is-app .sidebar,
  body.is-app .workspace {
    max-height: none;
    border-radius: 0;
    box-shadow: none;
  }

  body.is-app .sidebar {
    background: #06758a;
  }

  body.is-app .orders-section {
    padding: 12px 14px 20px;
  }

  body.is-app .orders-section > * {
    width: min(100%, calc(100vw - 28px));
  }

  body.is-app .workspace {
    min-height: 50vh;
    padding: 18px 14px 22px;
    border-radius: 26px 26px 0 0;
    background: #f7f8f9;
  }
}

@media (max-width: 640px) {
  body.is-app .app-header {
    padding: 16px 16px 12px;
  }

  body.is-app .wallet-card {
    padding: 20px 16px 16px;
    border-radius: 22px;
  }

  body.is-app .wallet-balance {
    font-size: 30px;
  }

  body.is-app .wallet-actions,
  body.is-app .form-grid,
  body.is-app .form-grid-wide,
  body.is-app .order-metrics {
    grid-template-columns: 1fr;
  }

  body.is-app .order-metrics div {
    border-right: 0;
    border-bottom: 1px solid #edf0f2;
  }

  body.is-app .order-metrics div:last-child {
    border-bottom: 0;
  }

  body.is-app .topbar,
  body.is-app .compact-header,
  body.is-app .order-summary {
    align-items: stretch;
  }

  body.is-app .topbar-actions {
    justify-content: stretch;
  }

  body.is-app .topbar-actions .ghost-button {
    flex: 1;
  }

  body.is-app .order-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
}
