:root {
  --bg: #f5f7fb;
  --bg-dark: #050b18;
  --bg-dark-2: #071126;
  --bg-dark-3: #0b0f21;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-solid: #ffffff;
  --border: #e7ebf3;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --primary: #0071e3;
  --primary-hover: #006edb;
  --success: #1a7f37;
  --warning: #b26a00;
  --danger: #c92a2a;
  --shadow: 0 18px 50px rgba(23, 31, 49, 0.08);
  --radius-xl: 24px;
  --radius-lg: 20px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --max-width: 1200px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(0, 113, 227, 0.08), transparent 34%),
    var(--bg);
  color: var(--text);
  font-family: "Inter", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.landing-page {
  background:
    radial-gradient(circle at 18% 12%, rgba(63, 124, 255, 0.12), transparent 24%),
    radial-gradient(circle at 84% 18%, rgba(106, 148, 255, 0.14), transparent 22%),
    linear-gradient(180deg, #f7f9fe 0%, #eef3ff 52%, #f7f9fe 100%);
  color: #1d1d1f;
}

body.app-page {
  background:
    radial-gradient(circle at top left, rgba(80, 136, 255, 0.12), transparent 26%),
    radial-gradient(circle at top right, rgba(196, 203, 255, 0.45), transparent 20%),
    #f5f7fb;
  color: #1d1d1f;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

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

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(0, 113, 227, 0.22);
  border-color: rgba(0, 113, 227, 0.45);
}

label {
  display: block;
}

.shell {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px;
}

.app-shell {
  max-width: 1460px;
  padding-top: 18px;
}

.app-layout {
  display: grid;
  grid-template-columns: 308px minmax(0, 1fr);
  gap: 26px;
  align-items: start;
}

.app-content {
  min-width: 0;
  gap: 18px;
}

.landing-shell {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  padding: 18px 40px 48px;
}

.landing-shell::before {
  content: "";
  position: absolute;
  inset: 120px 0 0;
  background:
    radial-gradient(circle at 72% 34%, rgba(96, 61, 255, 0.08), transparent 22%),
    radial-gradient(circle at 38% 18%, rgba(26, 126, 255, 0.08), transparent 18%);
  pointer-events: none;
}

.landing-nav {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 74px;
  padding: 14px 20px;
  border: 1px solid rgba(216, 225, 240, 0.96);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 50px rgba(19, 28, 45, 0.08);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #111827;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.brand-mark {
  position: relative;
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: linear-gradient(180deg, #4f87ff 0%, #3b78ff 100%);
  box-shadow: 0 12px 26px rgba(37, 106, 255, 0.24);
}

.brand-mark::before {
  content: "";
  position: absolute;
  width: 21px;
  height: 16px;
  border: 2.5px solid rgba(255, 255, 255, 0.98);
  border-radius: 5px;
  transform: translateY(1px);
}

.brand-mark::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.98);
  transform: translate(9px, -1px);
}

.brand-mark-inner {
  position: absolute;
  width: 14px;
  height: 2.5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  transform: translate(-4px, 7px);
}

.brand-name {
  font-size: 1.55rem;
  line-height: 1;
}

.landing-links {
  display: flex;
  align-items: center;
  gap: 18px;
  color: #1f2430;
  font-size: 1rem;
}

.landing-links a {
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.landing-links a:hover {
  opacity: 0.86;
  transform: translateY(-1px);
}

.landing-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px;
  min-height: 44px;
  border-radius: 999px;
  background: linear-gradient(180deg, #4f87ff 0%, #3a7bf8 100%);
  color: white;
  font-weight: 700;
  box-shadow: 0 14px 30px rgba(49, 105, 255, 0.24);
}

.landing-cta:hover {
  opacity: 0.95;
  transform: translateY(-1px);
}

.landing-hero {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 24px;
  margin-top: 28px;
  padding: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(246, 249, 255, 0.98) 100%);
  border-color: rgba(218, 226, 239, 0.95);
  box-shadow: 0 28px 90px rgba(19, 28, 45, 0.08);
}

.landing-hero-copy {
  display: grid;
  align-content: center;
  gap: 18px;
  padding: 12px 6px 12px 8px;
}

.landing-hero-copy h1 {
  margin: 0;
  max-width: 12ch;
  color: #111827;
  font-size: clamp(2.8rem, 4.7vw, 4.9rem);
  line-height: 0.96;
  letter-spacing: -0.06em;
  font-weight: 800;
}

.landing-hero-copy p {
  max-width: 56ch;
  margin: 0;
  color: #6b7280;
  font-size: 1.03rem;
  line-height: 1.7;
}

.landing-hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.landing-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  color: #1f2430;
  border: 1px solid rgba(218, 226, 239, 0.95);
  background: #ffffff;
}

.landing-secondary:hover {
  background: #f7f9fe;
}

.landing-hero-panel {
  display: grid;
  align-content: center;
  gap: 12px;
}

.landing-hero-card {
  padding: 18px 18px 17px;
  border-radius: 20px;
  background: linear-gradient(180deg, #f8faff 0%, #eef4ff 100%);
  border: 1px solid rgba(218, 226, 239, 0.95);
}

.landing-hero-value {
  margin-top: 8px;
  color: #1f2430;
  font-size: 1rem;
  line-height: 1.55;
}

.landing-summary-grid {
  margin-top: 18px;
}

.landing-content-grid {
  margin-top: 18px;
}

.landing-panel-card {
  min-height: 100%;
}

.landing-flow-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.landing-flow-item {
  display: grid;
  gap: 4px;
  padding: 16px 0;
  border-bottom: 1px solid #edf1f7;
}

.landing-flow-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.landing-flow-item strong {
  font-size: 1rem;
}

.landing-flow-item span {
  color: #737780;
  line-height: 1.55;
}

.assistant-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.72fr);
  gap: 18px;
}

.assistant-card {
  padding: 26px;
}

.assistant-prompt-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.assistant-prompt {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(218, 226, 239, 0.95);
  background: #f7f9fe;
  color: #1f2430;
  cursor: pointer;
}

.assistant-prompt:hover {
  background: #edf3fd;
}

.assistant-reply {
  margin: 10px 0 0;
  color: #4f5664;
  line-height: 1.65;
}

.landing-summary-grid .stat-value,
.landing-summary-grid .stat-foot,
.landing-content-grid .panel-card,
.landing-content-grid .asset-row {
  color: inherit;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: 0 16px 38px rgba(22, 29, 44, 0.07);
  backdrop-filter: blur(18px);
}

.app-page .card {
  background: #ffffff;
  border-color: rgba(226, 230, 239, 0.9);
}

.sidebar {
  position: sticky;
  top: 18px;
  display: flex;
  min-height: calc(100vh - 36px);
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
  gap: 16px;
  border: 1px solid rgba(227, 232, 242, 0.92);
  box-shadow: 0 20px 60px rgba(19, 28, 45, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 250, 255, 0.96) 100%);
}

.sidebar-brand {
  display: grid;
  gap: 12px;
  padding: 6px 4px 12px;
  border-bottom: 1px solid rgba(231, 235, 243, 0.92);
}

.sidebar-brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-brand strong {
  display: block;
  font-size: 1.2rem;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.sidebar-role {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: #f3f6fb;
  color: #6b7280;
  font-size: 0.82rem;
  font-weight: 600;
}

.sidebar-brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(180deg, #3f7cff 0%, #2f6df6 100%);
  color: white;
  font-weight: 800;
  letter-spacing: -0.06em;
  box-shadow: 0 14px 28px rgba(47, 109, 246, 0.25);
}

.sidebar-brand-subtitle {
  margin-top: 4px;
  color: #7b8191;
  font-size: 0.82rem;
}

.sidebar-nav {
  display: grid;
  gap: 8px;
  padding: 2px 2px 0;
}

.sidebar-nav-label {
  margin: 2px 0 4px;
  color: #8a909f;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.sidebar-link {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 14px 0 16px;
  border-radius: 16px;
  color: #30333d;
  background: transparent;
  border: 1px solid transparent;
  transition: background-color 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.sidebar-link:hover {
  background: rgba(0, 113, 227, 0.06);
  border-color: rgba(0, 113, 227, 0.08);
  transform: translateX(2px);
}

.sidebar-link.is-active {
  background: linear-gradient(180deg, rgba(63, 124, 255, 0.14) 0%, rgba(63, 124, 255, 0.08) 100%);
  border-color: rgba(63, 124, 255, 0.16);
  color: #0b5fc0;
  font-weight: 700;
  box-shadow: inset 3px 0 0 #3f7cff;
}

.sidebar-footer {
  display: grid;
  gap: 12px;
  padding-top: 2px;
}

.sidebar-footer-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(248, 250, 255, 0.98) 0%, rgba(241, 245, 253, 0.98) 100%);
  border: 1px solid rgba(228, 233, 244, 0.96);
}

.sidebar-footer-copy {
  display: grid;
  gap: 4px;
}

.sidebar-footer-title {
  font-weight: 700;
  color: #1f2430;
}

.sidebar-footer-subtitle {
  color: #7b8191;
  font-size: 0.9rem;
  line-height: 1.4;
}

.sidebar-signout {
  display: inline-flex;
  justify-content: center;
  min-height: 44px;
  align-items: center;
  padding: 0 16px;
  border-radius: 999px;
  background: #eef2fb;
  color: #1f2430;
  font-weight: 600;
  border: 1px solid rgba(226, 231, 242, 0.96);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px;
}

.topbar-copy h1 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.topbar-copy p {
  margin: 8px 0 0;
  color: #737780;
  font-size: 1rem;
}

.topbar-chip {
  display: inline-flex;
  align-items: center;
  height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  background: #f3f6fb;
  color: #5f6572;
  font-weight: 600;
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(280px, 0.9fr);
  gap: 24px;
  padding: 28px;
}

.hero-panel-copy h2 {
  margin: 8px 0 10px;
  font-size: 1.85rem;
  line-height: 1.06;
  letter-spacing: -0.04em;
}

.hero-panel-copy p {
  margin: 0;
  color: #69707a;
  font-size: 1rem;
  line-height: 1.6;
}

.eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6d7280;
}

.hero-panel-meta {
  display: grid;
  align-content: center;
  gap: 10px;
  padding: 22px;
  border-radius: 22px;
  background: linear-gradient(180deg, #f8faff 0%, #eef4ff 100%);
  border: 1px solid rgba(218, 226, 239, 0.9);
}

.meta-label {
  color: #748095;
  font-size: 0.95rem;
}

.meta-value {
  font-size: 1.05rem;
  color: #1f2430;
  word-break: break-all;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.stat-card {
  padding: 20px 22px;
}

.stat-card-primary {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.stat-label {
  color: #79808c;
  font-size: 0.98rem;
}

.stat-value {
  margin-top: 8px;
  font-size: clamp(1.35rem, 1.8vw, 1.9rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
  font-weight: 700;
  color: #1d1d1f;
  overflow-wrap: anywhere;
}

.stat-foot {
  margin-top: 10px;
  color: #8590a1;
  font-size: 0.92rem;
}

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

.panel-card {
  padding: 22px;
}

.panel-head h3 {
  margin: 6px 0 0;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

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

.action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 16px;
  border-radius: 16px;
  background: #f4f7fc;
  color: #1d1d1f;
  font-weight: 600;
  border: 1px solid rgba(222, 228, 238, 0.95);
}

.action-button:hover {
  background: #edf3fd;
}

.asset-stack {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.asset-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid #edf1f7;
}

.asset-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.asset-name {
  font-weight: 600;
  font-size: 1rem;
}

.asset-symbol {
  color: #8b92a0;
  font-size: 0.92rem;
  margin-top: 4px;
}

.asset-balance {
  font-size: clamp(1rem, 1.25vw, 1.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
  text-align: right;
}

.trade-grid {
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  gap: 18px;
}

.trade-form-card,
.market-card {
  padding: 24px;
}

.market-card {
  display: grid;
  gap: 18px;
}

.market-card-head,
.market-price-row,
.market-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.market-card h3 {
  margin: 8px 0 0;
  font-size: 1.4rem;
  letter-spacing: -0.03em;
}

.market-badge {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(0, 113, 227, 0.08);
  color: #0b5fc0;
  font-size: 0.92rem;
  font-weight: 600;
}

.market-price {
  margin-top: 4px;
  font-size: 2.2rem;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.market-change {
  font-size: 0.98rem;
  font-weight: 600;
  color: #1a7f37;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(26, 127, 55, 0.08);
}

.market-chart-wrap {
  position: relative;
  min-height: 260px;
  border-radius: 22px;
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(247, 249, 253, 0.92), rgba(241, 245, 251, 0.78));
  border: 1px solid rgba(224, 229, 238, 0.92);
  overflow: hidden;
}

.market-chart-wrap svg {
  width: 100%;
  height: 100%;
  display: block;
}

.market-grid-line {
  stroke: rgba(184, 194, 211, 0.28);
  stroke-width: 1;
}

.market-path {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.market-area {
  opacity: 0.95;
}

.market-point {
  fill: #4b83ff;
  stroke: white;
  stroke-width: 2.5;
}

.market-foot {
  color: #5f6674;
}

.trade-receipt-card {
  margin-top: 18px;
  padding: 24px;
}

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

.receipt-item {
  display: grid;
  gap: 6px;
  padding: 16px;
  border-radius: 18px;
  background: #f8faff;
  border: 1px solid rgba(224, 229, 238, 0.96);
}

.send-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.85fr);
  gap: 18px;
}

.send-form-card {
  padding: 28px;
}

.send-side {
  min-width: 0;
}

.send-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.send-wallet-pill {
  display: grid;
  gap: 6px;
  min-width: 250px;
  padding: 16px 18px;
  border-radius: 22px;
  background: linear-gradient(180deg, #f8faff 0%, #eef4ff 100%);
  border: 1px solid rgba(218, 226, 239, 0.9);
}

.send-wallet-pill .mono {
  overflow-wrap: anywhere;
  font-size: 0.98rem;
}

.field-group {
  gap: 8px;
}

.field-label {
  color: #5f6674;
  font-size: 0.95rem;
  font-weight: 600;
}

.send-two-up {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.send-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.send-note {
  color: #7c8494;
  font-size: 0.92rem;
}

.send-summary-card {
  padding: 22px;
  display: grid;
  gap: 14px;
}

.send-balance {
  font-size: clamp(1.8rem, 3vw, 2.55rem);
  line-height: 1;
  letter-spacing: -0.05em;
  font-weight: 800;
  color: #1d1d1f;
  overflow-wrap: anywhere;
}

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

.send-activity-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid #edf1f7;
}

.send-activity-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.send-risk {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(0, 113, 227, 0.08);
  color: #0b5fc0;
  font-size: 0.86rem;
  font-weight: 600;
  white-space: nowrap;
}

.receive-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 18px;
}

.receive-hero-card,
.receive-qr-card,
.public-pay-card {
  padding: 28px;
}

.receive-hero-card {
  display: grid;
  align-items: center;
}

.receive-owner-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(180deg, #f8faff 0%, #eef4ff 100%);
  border: 1px solid rgba(218, 226, 239, 0.9);
}

.receive-address {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.receive-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.receive-link-btn {
  background: rgba(0, 113, 227, 0.08);
  color: #0b5fc0;
}

.receive-qr-card {
  display: grid;
  gap: 18px;
}

.receive-qr-top {
  display: grid;
  gap: 12px;
}

.receive-url-pill {
  padding: 12px 14px;
  border-radius: 16px;
  background: #f5f8fe;
  border: 1px solid rgba(224, 229, 238, 0.96);
  color: #5f6674;
  overflow-wrap: anywhere;
}

.receive-qr-shell {
  display: grid;
  place-items: center;
  min-height: 320px;
  padding: 22px;
  border-radius: 24px;
  background:
    radial-gradient(circle at center, rgba(0, 113, 227, 0.08), transparent 55%),
    linear-gradient(180deg, #fafdff 0%, #f2f6ff 100%);
  border: 1px solid rgba(218, 226, 239, 0.9);
}

.receive-qr-image {
  width: min(100%, 300px);
  aspect-ratio: 1;
  border-radius: 24px;
  background: white;
  padding: 14px;
  box-shadow: 0 16px 36px rgba(23, 31, 49, 0.08);
}

.receive-qr-footer {
  display: grid;
  gap: 12px;
  padding-top: 2px;
}

.public-pay-shell {
  max-width: 1200px;
}

.public-pay-card {
  overflow: hidden;
}

.public-pay-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  gap: 18px;
}

.public-pay-main {
  padding-right: 8px;
}

.public-pay-title {
  margin: 6px 0 10px;
  font-size: clamp(2rem, 3.4vw, 3.1rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.public-pay-recipient {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(180deg, #f8faff 0%, #eef4ff 100%);
  border: 1px solid rgba(218, 226, 239, 0.9);
}

.public-pay-wallet {
  display: block;
  margin-top: 6px;
  overflow-wrap: anywhere;
}

.public-pay-form {
  padding-top: 6px;
}

.public-pay-two-up {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.public-pay-cta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.public-pay-side {
  min-width: 0;
}

.public-pay-summary {
  padding: 22px;
  display: grid;
  gap: 12px;
}

.public-pay-summary-name {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.public-pay-receipt-list {
  display: grid;
  gap: 12px;
}

.merchant-qr-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.82fr);
  gap: 18px;
}

.merchant-qr-card,
.merchant-qr-preview {
  padding: 28px;
}

.merchant-qr-form {
  padding-top: 6px;
}

.merchant-qr-two-up {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 14px;
}

.merchant-qr-preview {
  display: grid;
  gap: 18px;
}

.merchant-qr-preview-shell {
  display: grid;
  place-items: center;
  min-height: 320px;
  padding: 22px;
  border-radius: 24px;
  background:
    radial-gradient(circle at center, rgba(63, 124, 255, 0.08), transparent 55%),
    linear-gradient(180deg, #fafdff 0%, #f2f6ff 100%);
  border: 1px solid rgba(218, 226, 239, 0.9);
}

.merchant-qr-preview-shell img {
  width: min(100%, 300px);
  aspect-ratio: 1;
  border-radius: 24px;
  background: white;
  padding: 14px;
  box-shadow: 0 16px 36px rgba(23, 31, 49, 0.08);
}

.merchant-qr-meta {
  display: grid;
  gap: 14px;
}

.merchant-qr-payload {
  margin-top: 6px;
  overflow-wrap: anywhere;
}

.merchant-qr-recent-list {
  display: grid;
  gap: 10px;
}

.merchant-qr-recent-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #f7f9fd;
  border: 1px solid rgba(228, 233, 244, 0.96);
}

.merchant-qr-mode {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(0, 113, 227, 0.08);
  color: #0b5fc0;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.merchant-qr-mode.is-live {
  background: rgba(26, 127, 55, 0.08);
  color: #1a7f37;
}

.merchant-qr-mode.is-off {
  background: rgba(202, 42, 42, 0.08);
  color: #c92a2a;
}

.merchant-qr-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.merchant-tx-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.26fr) minmax(300px, 0.74fr);
  gap: 18px;
}

.merchant-tx-hero,
.merchant-table-card,
.merchant-side-card {
  padding: 26px;
}

.merchant-tx-hero,
.merchant-dashboard-hero,
.merchant-qr-card,
.merchant-qr-preview {
  overflow: hidden;
}

.merchant-dashboard-grid {
  display: grid;
  gap: 18px;
}

.merchant-dashboard-hero {
  padding: 26px;
}

.merchant-dashboard-list {
  padding: 26px;
}

.merchant-dashboard-hero-top,
.merchant-tx-hero-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.88fr);
  gap: 18px;
  align-items: start;
}

.merchant-tx-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.merchant-stat {
  display: grid;
  gap: 6px;
  padding: 16px 17px;
  border-radius: 18px;
  background: linear-gradient(180deg, #f8faff 0%, #eef4ff 100%);
  border: 1px solid rgba(218, 226, 239, 0.9);
}

.merchant-stat strong {
  font-size: clamp(1.15rem, 1.9vw, 1.6rem);
  line-height: 1;
  letter-spacing: -0.05em;
  overflow-wrap: anywhere;
}

.merchant-table-head h3 {
  margin: 6px 0 0;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
}

.merchant-table {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.merchant-table-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1.1fr) 110px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 16px;
  background: #f7f9fd;
  border: 1px solid rgba(228, 233, 244, 0.96);
}

.merchant-table-time,
.merchant-table-amount,
.merchant-table-ref {
  overflow-wrap: anywhere;
}

.merchant-table-tx {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.merchant-dashboard-qr-meta {
  display: grid;
  justify-items: end;
  gap: 8px;
  text-align: right;
}

.merchant-qr-item-copy {
  min-width: 0;
}

.merchant-table-row-head {
  background: transparent;
  border: 0;
  color: #7b8191;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding-bottom: 6px;
}

.merchant-empty {
  padding: 18px 16px;
  color: #7b8191;
}

.payments-scanner {
  padding: 20px;
  display: grid;
  gap: 16px;
}

.payments-scanner-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.payments-scanner-head h3 {
  margin: 6px 0 8px;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
}

.scanner-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.scanner-frame {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  border-radius: 22px;
  background: linear-gradient(180deg, #061021 0%, #0b1630 100%);
  border: 1px solid rgba(218, 226, 239, 0.9);
}

.scanner-frame video {
  width: 100%;
  height: 260px;
  object-fit: cover;
  display: block;
  background: #0b1220;
}

.scanner-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.scanner-overlay span {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: #273041;
  font-size: 0.92rem;
  font-weight: 600;
}

.scanner-status {
  padding: 12px 14px;
  border-radius: 14px;
  background: #f5f8fe;
  color: #5f6674;
  border: 1px solid rgba(224, 229, 238, 0.96);
}

.page-grid {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.stack {
  display: grid;
  gap: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

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

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

.section-title {
  margin: 0 0 8px;
  font-size: 1.5rem;
  line-height: 1.1;
}

.section-subtitle {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 960px) {
  .page-grid {
    grid-template-columns: 1fr;
  }

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

  .sidebar {
    min-height: auto;
    position: static;
  }

  .summary-grid,
  .content-grid {
    grid-template-columns: 1fr;
  }

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

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

  .receive-grid,
  .public-pay-grid,
  .merchant-qr-grid,
  .merchant-tx-grid {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    grid-template-columns: 1fr;
  }

  .landing-shell {
    padding: 14px 18px 40px;
  }

  .landing-nav {
    min-height: auto;
    padding: 14px 16px;
    flex-wrap: wrap;
  }

  .landing-links {
    gap: 14px;
    flex-wrap: wrap;
    font-size: 0.98rem;
  }

  .brand-name {
    font-size: 1.34rem;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
  }

  .landing-hero {
    grid-template-columns: 1fr;
    margin-top: 22px;
    padding: 22px;
  }

  .landing-hero-copy h1 {
    max-width: none;
    font-size: clamp(2.35rem, 9vw, 4rem);
  }

  .topbar {
    padding: 18px 20px;
    flex-wrap: wrap;
  }
}

@media (max-width: 640px) {
  .landing-links {
    width: 100%;
    justify-content: flex-start;
  }

  .landing-cta {
    width: 100%;
    justify-content: center;
  }

  .landing-hero-actions {
    width: 100%;
  }

  .landing-secondary,
  .landing-hero .landing-cta {
    width: 100%;
  }

  .landing-hero-copy p {
    font-size: 1rem;
  }

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

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

  .market-card-head,
  .market-price-row,
  .market-foot {
    flex-direction: column;
    align-items: flex-start;
  }

  .payments-scanner-head {
    flex-direction: column;
  }

  .scanner-actions {
    width: 100%;
  }

  .send-hero {
    flex-direction: column;
  }

  .send-two-up {
    grid-template-columns: 1fr;
  }

  .receive-owner-card,
  .public-pay-recipient,
  .public-pay-two-up,
  .merchant-qr-two-up,
  .merchant-tx-hero-row,
  .merchant-dashboard-hero-top,
  .merchant-tx-stats,
  .merchant-table-row {
    grid-template-columns: 1fr;
  }

  .send-wallet-pill {
    min-width: 0;
    width: 100%;
  }

  .receive-actions,
  .public-pay-cta {
    flex-direction: column;
    align-items: stretch;
  }

  .receive-link-btn,
  .public-pay-cta .btn {
    width: 100%;
  }

  .merchant-table-row-head {
    display: none;
  }

  .merchant-dashboard-qr-meta {
    justify-items: start;
    text-align: left;
  }
}
