:root {
  color-scheme: light;
  --bg: #f4f8fb;
  --panel: #ffffff;
  --ink: #0a1628;
  --muted: #667085;
  --line: #dce6ef;
  --green: #16b879;
  --blue: #1267f2;
  --cyan: #12a7c8;
  --orange: #f59e0b;
  --red: #d92d20;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

img {
  max-width: 100%;
}

.hidden {
  display: none !important;
}

.eyebrow {
  display: block;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand img {
  width: 42px;
  height: 42px;
  border-radius: 8px;
}

.brand strong {
  font-size: 22px;
  font-weight: 950;
}

.brand span {
  color: var(--green);
}

.primary-button,
.secondary-button,
.ghost-button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border-radius: 8px;
  border: 0;
  font-weight: 850;
  text-decoration: none;
  white-space: nowrap;
}

.primary-button {
  padding: 0 18px;
  background: var(--green);
  color: #fff;
  box-shadow: 0 12px 26px rgba(22, 184, 121, 0.22);
}

.secondary-button {
  padding: 0 16px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.ghost-button {
  min-height: 36px;
  padding: 0 10px;
  background: transparent;
  color: var(--muted);
}

.icon-button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.full {
  width: 100%;
}

.toast-host {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 60;
  display: grid;
  gap: 10px;
  width: min(420px, calc(100vw - 32px));
  transform: translateX(-50%);
  pointer-events: none;
}

.toast {
  padding: 12px 14px;
  border-radius: 8px;
  background: #111827;
  color: #fff;
  box-shadow: var(--shadow);
  font-weight: 800;
}

.toast.error {
  background: var(--red);
}

.public-shell {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.9), rgba(244,248,251,0.88)),
    url("./assets/home/home-background.png") center top / cover fixed;
}

.public-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(18px, 5vw, 64px);
  border-bottom: 1px solid rgba(220, 230, 239, 0.8);
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(18px);
}

.public-nav nav {
  display: flex;
  gap: 8px;
}

.public-nav nav button {
  min-height: 38px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-weight: 850;
}

.public-main {
  width: min(1180px, calc(100vw - 36px));
  margin: 0 auto;
  padding: 42px 0 72px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(380px, 1fr);
  gap: clamp(32px, 6vw, 86px);
  align-items: center;
  min-height: calc(100vh - 112px);
}

.hero-copy h1 {
  margin: 14px 0 18px;
  font-size: clamp(42px, 5vw, 72px);
  line-height: 0.96;
  letter-spacing: 0;
}

.hero-copy p {
  max-width: 620px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.hero-actions,
.quick-actions,
.header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-media {
  position: relative;
  min-height: 520px;
}

.hero-bg {
  position: absolute;
  inset: 20px 0 auto auto;
  width: 90%;
  height: 460px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-cash {
  position: absolute;
  left: 0;
  bottom: 30px;
  width: 72%;
  filter: drop-shadow(0 24px 30px rgba(15, 23, 42, 0.18));
}

.hero-card {
  position: absolute;
  right: 2%;
  top: 76px;
  width: 52%;
  filter: drop-shadow(0 24px 30px rgba(15, 23, 42, 0.18));
}

.hero-rate-card {
  position: absolute;
  right: 32px;
  bottom: 70px;
  width: 172px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.hero-rate-card span,
.hero-rate-card em,
.balance-panel span,
.session-card span {
  color: var(--muted);
  font-size: 13px;
}

.hero-rate-card strong {
  display: block;
  font-size: 38px;
}

.hero-rate-card em {
  font-style: normal;
}

.auth-and-rates {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 22px;
  align-items: start;
}

.auth-panel,
.public-directory,
.balance-panel,
.search-panel,
.records-panel,
.profile-card,
.settings-panel,
.modal {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,0.94);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.auth-panel,
.public-directory,
.search-panel,
.records-panel,
.profile-card,
.settings-panel {
  padding: 18px;
}

.auth-tabs,
.segmented {
  display: flex;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fafc;
}

.auth-tabs button,
.segmented button {
  flex: 1;
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 850;
}

.auth-tabs .selected,
.segmented .selected {
  background: #fff;
  color: var(--blue);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.auth-form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  outline: 0;
}

input,
select {
  height: 42px;
  padding: 0 12px;
}

input[type="checkbox"],
input[type="radio"] {
  width: auto;
  height: auto;
  padding: 0;
}

textarea {
  min-height: 104px;
  padding: 12px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(18,103,242,0.12);
}

.inline-fields {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
}

.form-hint {
  min-height: 18px;
  margin: 0;
  color: var(--orange);
  font-size: 13px;
  font-weight: 800;
}

.quote-hint {
  margin: -2px 0 0;
  padding: 10px 12px;
  border: 1px solid rgba(18,103,242,0.18);
  border-radius: 8px;
  background: #eef6ff;
  color: var(--blue);
  font-size: 13px;
  font-weight: 850;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.section-header h2 {
  margin: 0;
}

.public-card-grid,
.card-list {
  display: grid;
  gap: 12px;
}

.public-card-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.card-tile,
.order-card,
.wallet-record,
.bank-row,
.notification-row,
.support-row {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.card-tile {
  grid-template-columns: 54px 1fr;
  align-items: center;
}

.card-tile img,
.card-logo {
  width: 54px;
  height: 54px;
  border-radius: 8px;
  object-fit: cover;
  background: #eef4f8;
}

.card-tile strong,
.order-card strong {
  display: block;
  overflow-wrap: anywhere;
}

.meta,
.card-tile span,
.order-card span,
.wallet-record span {
  color: var(--muted);
  font-size: 13px;
}

.how-section {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 22px;
}

.how-section article {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.how-section span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-bottom: 12px;
  border-radius: 8px;
  background: #e8fbf3;
  color: var(--green);
  font-weight: 950;
}

.how-section p {
  margin-bottom: 0;
  color: var(--muted);
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 22px;
  border-right: 1px solid var(--line);
  background: #fff;
}

.app-nav {
  display: grid;
  gap: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-weight: 850;
  text-align: left;
}

.nav-item.selected {
  background: #eaf2ff;
  color: var(--blue);
}

.session-card {
  display: grid;
  gap: 6px;
  margin-top: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.workspace {
  min-width: 0;
  padding: 26px;
}

.workspace-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.workspace-header h1 {
  margin: 4px 0 0;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.dashboard-grid,
.wallet-grid,
.profile-grid {
  display: grid;
  gap: 16px;
}

.dashboard-grid {
  grid-template-columns: minmax(280px, 0.8fr) 1.2fr;
  margin-bottom: 16px;
}

.wallet-grid {
  grid-template-columns: minmax(300px, 0.8fr) 1fr;
}

.wallet-grid .large {
  grid-column: 1 / -1;
}

.profile-grid {
  grid-template-columns: 320px 1fr;
}

.balance-panel {
  padding: 20px;
}

.balance-panel strong {
  display: block;
  margin: 8px 0;
  font-size: 34px;
  line-height: 1.05;
}

.balance-panel p {
  color: var(--muted);
}

.wallet-balance-breakdown {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.wallet-balance-breakdown span {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.wallet-balance-breakdown b {
  color: var(--ink);
  font-size: 15px;
}

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

.chip {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-weight: 850;
}

.chip.selected {
  border-color: rgba(18,103,242,0.25);
  background: #eaf2ff;
  color: var(--blue);
}

.card-list {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.sell-card {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.sell-card h3 {
  margin: 0 0 4px;
}

.sell-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.toolbar {
  margin-bottom: 14px;
}

.record-list {
  display: grid;
  gap: 12px;
}

.record-list.compact {
  max-height: 540px;
  overflow: auto;
  padding-right: 4px;
}

.order-card {
  grid-template-columns: 1fr auto;
  align-items: start;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  background: #eef4ff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.status.COMPLETED,
.status.APPROVED {
  background: #e8fbf3;
  color: var(--green);
}

.status.FAILED,
.status.REJECTED,
.status.CLOSED {
  background: #fff0f0;
  color: var(--red);
}

.status.PENDING,
.status.SUBMITTED,
.status.PLATFORM_REVIEW {
  background: #fff7e6;
  color: #a15c00;
}

.profile-card {
  display: grid;
  justify-items: center;
  text-align: center;
}

.avatar-wrap {
  position: relative;
  width: 112px;
  height: 112px;
}

.avatar-wrap img {
  width: 112px;
  height: 112px;
  border-radius: 24px;
  object-fit: cover;
  border: 1px solid var(--line);
}

.avatar-wrap button {
  position: absolute;
  right: -8px;
  bottom: -8px;
}

.file-input {
  display: none;
}

.profile-card h2 {
  margin: 18px 0 4px;
}

.profile-card p {
  margin: 0 0 14px;
  color: var(--muted);
}

.settings-panel {
  display: grid;
  gap: 8px;
}

.settings-panel button {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 850;
}

.bottom-nav {
  display: none;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(6, 14, 26, 0.48);
}

.modal {
  width: min(720px, 100%);
  max-height: min(860px, calc(100vh - 40px));
  overflow: hidden;
}

.modal header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 18px 12px;
  border-bottom: 1px solid var(--line);
}

.modal h2 {
  margin: 2px 0 0;
}

.modal-body {
  max-height: calc(100vh - 160px);
  overflow: auto;
  padding: 18px;
}

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

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

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

.detail-cell {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.detail-cell span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.detail-cell strong {
  overflow-wrap: anywhere;
}

.proof-image {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.level-card,
.invite-panel {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid rgba(18,103,242,0.18);
  border-radius: 8px;
  background: linear-gradient(135deg, #eef6ff, #f7fffb);
}

.level-card span,
.invite-panel span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.level-card strong,
.invite-panel strong {
  color: var(--ink);
  font-size: 28px;
  overflow-wrap: anywhere;
}

.level-card p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.feedback-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.feedback-panel strong {
  color: var(--ink);
}

.feedback-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  white-space: pre-wrap;
}

.empty-state {
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
  background: rgba(255,255,255,0.72);
}

@media (max-width: 920px) {
  .public-nav {
    align-items: flex-start;
    gap: 12px;
    flex-direction: column;
  }

  .hero,
  .auth-and-rates,
  .dashboard-grid,
  .wallet-grid,
  .profile-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 0;
    padding-top: 20px;
  }

  .hero-media {
    min-height: 380px;
  }

  .hero-bg {
    height: 330px;
  }

  .how-section {
    grid-template-columns: 1fr;
  }

  .app-shell {
    display: block;
    padding-bottom: 78px;
  }

  .sidebar {
    display: none;
  }

  .workspace {
    padding: 18px;
  }

  .workspace-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .bottom-nav {
    position: fixed;
    right: 12px;
    bottom: 12px;
    left: 12px;
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255,255,255,0.94);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
  }

  .bottom-nav button {
    display: grid;
    place-items: center;
    gap: 2px;
    min-height: 50px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
  }

  .bottom-nav button.selected {
    background: #eaf2ff;
    color: var(--blue);
  }
}

@media (max-width: 620px) {
  .public-main {
    width: min(100vw - 28px, 1180px);
    padding-top: 24px;
  }

  .public-nav nav {
    width: 100%;
    overflow-x: auto;
  }

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

  .hero-copy p {
    font-size: 16px;
  }

  .hero-media {
    min-height: 300px;
  }

  .hero-bg {
    width: 100%;
    height: 260px;
  }

  .hero-cash {
    width: 78%;
  }

  .hero-rate-card {
    right: 12px;
    bottom: 32px;
  }

  .inline-fields,
  .two-col,
  .detail-grid,
  .wallet-balance-breakdown,
  .order-card,
  .sell-card {
    grid-template-columns: 1fr;
  }

  .card-list {
    grid-template-columns: 1fr;
  }

  .segmented {
    overflow-x: auto;
  }

  .segmented button {
    min-width: max-content;
    padding: 0 12px;
  }

  .modal-backdrop {
    align-items: end;
    padding: 0;
  }

  .modal {
    width: 100%;
    max-height: 92vh;
    border-radius: 8px 8px 0 0;
  }
}
