/* Unified app content system. The desktop rail is deliberately unchanged. */
:root {
  --app-bg: #070708;
  --app-panel: #0d0d0f;
  --app-panel-raised: #121214;
  --app-line: rgba(255,255,255,.095);
  --app-line-strong: rgba(255,255,255,.17);
  --app-text: #f5f5f6;
  --app-muted: #92929a;
  --app-soft: #686870;
  --app-radius: 16px;
}

.workspace main { background: var(--app-bg); }
.screen { width: 100%; max-width: 1440px; margin-inline: auto; }
.screen > * { min-width: 0; }
.kicker { color: #777780 !important; font-size: 9px !important; font-weight: 750; letter-spacing: .13em; }
.page-intro { margin-bottom: 24px; }
.page-intro h2 { margin: 7px 0 8px; color: var(--app-text); font-size: clamp(32px,4vw,50px); font-weight: 580; letter-spacing: -.055em; line-height: 1; }
.page-intro p { margin: 0; color: var(--app-muted); font-size: 13px; line-height: 1.55; }

button,a,input,select,textarea { -webkit-tap-highlight-color: transparent; }
.solid-button,.outline-button,.light-button,.row-action,.text-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding-inline: 16px;
  font-size: 12px;
  font-weight: 650;
}
.solid-button { border: 1px solid #f2f2f3; color: #09090a; background: #f2f2f3; }
.solid-button:hover { border-color: #fff; background: #fff; transform: translateY(-1px); }
.outline-button,.row-action { border: 1px solid var(--app-line); color: #e6e6e9; background: var(--app-panel); }
.outline-button:hover,.row-action:hover { border-color: var(--app-line-strong); background: #151517; }
.solid-button .ui-icon,.outline-button .ui-icon,.text-button .ui-icon { width: 16px; height: 16px; flex: 0 0 16px; }

/* Overview */
.home-command { min-height: 318px; }
.home-command-copy h2 { max-width: 700px; }
.home-command-copy > p { font-size: 13px; }
.home-balance > span,.home-balance > p { color: var(--app-muted); }
.home-balance > button { min-height: 46px; padding-inline: 14px; display: flex; align-items: center; justify-content: space-between; color: #ededf0; }
.home-pulse button { min-height: 122px; border: 1px solid var(--app-line); }
.home-pulse span { color: var(--app-muted); }
.home-pulse small { color: var(--app-soft); line-height: 1.35; }

/* Shared page shells */
.network-hero,.directory-hero,.store-ops-head,.money-hero,.account-intro {
  border-color: var(--app-line) !important;
  background: linear-gradient(145deg,rgba(255,255,255,.028),transparent 52%),var(--app-panel) !important;
}
.network-hero h2,.directory-hero h2,.store-ops-head h2 { font-weight: 560; }
.network-hero p,.directory-hero p,.store-ops-head p { font-size: 13px; }
.network-hero-mark,.directory-overview { border-color: var(--app-line); background: var(--app-panel-raised); }
.network-tools,.directory-tools { margin-block: 14px 24px; border-color: var(--app-line); background: var(--app-panel); }
.network-tools label,.network-tools select,.directory-tools label,.directory-tools select { min-height: 48px; border-color: var(--app-line); background: #09090b; }
.network-tools input,.directory-tools input { font-size: 13px; }
.network-card,.storefront-card,.listing-card,.business-card,.distribution-row { border-color: var(--app-line); background: var(--app-panel); }
.network-card:hover,.storefront-card:hover,.listing-card:hover,.business-card:hover { border-color: var(--app-line-strong); }
.network-mode { color: #f2f2f4; background: rgba(8,8,9,.82); }
.network-supplier span,.business-body > small,.business-manage,.distribution-row a { color: #b4b4ba; }
.network-card-media { background: linear-gradient(145deg,#19191c,#0b0b0d); }
.network-card-media > span { color: #b8b8be; }
.network-product-section { border-color: var(--app-line); background: linear-gradient(135deg,rgba(255,255,255,.025),transparent 45%); }

/* Marketplace and store directory */
.search-bar { min-height: 66px; padding: 8px; border: 1px solid var(--app-line); border-radius: 14px; background: var(--app-panel); }
.search-bar input { min-width: 0; padding-left: 8px; color: var(--app-text); font-size: clamp(18px,2vw,25px); }
.filter { min-height: 40px; border: 1px solid var(--app-line); color: var(--app-muted); }
.filter.active { border-color: #ededf0; color: #09090a; background: #ededf0; }
.directory-overview p { color: var(--app-muted); }
.storefront-grid { gap: 12px; }

/* Store management */
.store-ops-head { align-items: center; }
.store-ops-grid { margin-top: 14px; }
.business-card { text-align: left; }
.business-cover { background: linear-gradient(145deg,#1a1a1d,#0b0b0d); }
.business-cover em { background: rgba(8,8,9,.78); }
.business-manage { min-height: 42px; display: flex; align-items: center; justify-content: space-between; }
.store-detail-back { min-height: 42px; margin-bottom: 14px; }
.store-ops-panel { border-color: var(--app-line); background: var(--app-panel); }
.store-ops-panel-head { gap: 18px; }
.store-ops-panel-head > div:last-child { gap: 8px; }
.store-ops-stats { gap: 8px; }
.store-ops-stats article,.store-revenue-strip { border: 1px solid var(--app-line); background: var(--app-panel-raised); }
.store-ops-stats article span,.store-ops-stats article small { color: var(--app-muted); }
.subnav { gap: 4px; padding: 5px; border: 1px solid var(--app-line); border-radius: 12px; background: #09090b; overflow-x: auto; scrollbar-width: none; }
.subnav::-webkit-scrollbar { display: none; }
.subnav button { min-height: 40px; padding: 0 13px; border-radius: 8px; white-space: nowrap; }
.subnav button.active { color: #09090a; background: #ededf0; }

/* Messages */
.messenger { height: calc(100dvh - 132px); min-height: 570px; overflow: hidden; border: 1px solid var(--app-line); border-radius: var(--app-radius); background: var(--app-panel); }
.thread-column { border-color: var(--app-line); background: #0a0a0c; }
.thread-head { padding: 22px 20px 12px; }
.thread-head .icon-button { min-width: 44px; min-height: 44px; }
.inbox-switch { margin-inline: 16px; padding: 4px; border: 1px solid var(--app-line); border-radius: 10px; background: #070708; }
.inbox-switch button { min-height: 38px; min-width: 0; border-radius: 7px; padding-inline: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox-switch button.active { color: #080809; background: #ededf0; }
.thread-search { min-height: 44px; margin: 12px 16px; border-color: var(--app-line); background: var(--app-panel); }
.thread-list button { min-height: 64px; }
.conversation { background: radial-gradient(circle at 50% 15%,rgba(255,255,255,.025),transparent 35%),#0d0d0f; }
.conversation-empty p { max-width: 330px; color: var(--app-muted); line-height: 1.5; }

/* The support tab must remain fully visible beside chats and requests. */
.messenger { min-width: 0; }
.thread-column { min-width: 0; }
.inbox-switch { grid-template-columns: repeat(3, minmax(0, 1fr)); min-width: 0; }
.inbox-switch button { font-size: clamp(9px, 1.05vw, 11px); letter-spacing: -.01em; }

/* Money */
.money-overview { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(330px,.75fr); gap: 12px; }
.money-balance-card,.money-actions-card,.store-funds-panel,.money-history-panel { border: 1px solid var(--app-line); border-radius: var(--app-radius); background: var(--app-panel); }
.money-balance-card { min-width: 0; padding: 26px; }
.money-balance-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.money-balance-head > div { display: grid; gap: 8px; }
.money-balance-head span,.money-card-title p { color: var(--app-muted); font-size: 12px; }
.money-balance-head strong { color: var(--app-text); font-size: clamp(42px,5vw,68px); font-weight: 520; letter-spacing: -.065em; line-height: .95; }
.money-ready { display: inline-flex; align-items: center; gap: 7px; padding: 8px 10px; border: 1px solid var(--app-line); border-radius: 999px; background: #101012; }
.money-ready i { width: 6px; height: 6px; border-radius: 50%; background: #6bd29b; box-shadow: 0 0 12px rgba(107,210,155,.5); }
.balance-visual { min-height: 190px; margin-top: 24px; padding: 14px 0 0; border: 0; background: transparent; }
.wallet-metrics { margin-top: 14px; display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; overflow: hidden; border: 1px solid var(--app-line); border-radius: 12px; background: var(--app-line); }
.wallet-metrics > div { min-height: 80px; padding: 16px; display: grid; gap: 6px; border: 0; border-radius: 0; background: #0a0a0c; }
.wallet-metrics span,.wallet-metrics small { color: var(--app-muted); font-size: 11px; }
.wallet-metrics strong { color: var(--app-text); font-size: 18px; font-weight: 560; }
.money-actions-card { padding: 22px; }
.money-card-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.money-card-title h2 { margin: 5px 0 0; color: var(--app-text); font-size: 20px; font-weight: 570; letter-spacing: -.035em; }
.money-card-title p { max-width: 520px; margin: 7px 0 0; line-height: 1.5; }
.money-action { margin-top: 12px; overflow: hidden; border: 1px solid var(--app-line); border-radius: 12px; background: #09090b; }
.money-action summary { min-height: 70px; padding: 12px; display: grid; grid-template-columns: 38px 1fr 18px; align-items: center; gap: 11px; cursor: pointer; list-style: none; }
.money-action summary::-webkit-details-marker { display: none; }
.money-action summary > span:nth-child(2) { display: grid; gap: 3px; }
.money-action summary strong { font-size: 12px; }
.money-action summary small { color: var(--app-muted); font-size: 10px; }
.money-action summary > i { display: flex; transition: transform .2s ease; }
.money-action[open] summary > i { transform: rotate(90deg); }
.money-action form { padding: 0 12px 12px; display: grid; gap: 10px; }
.money-action label,.money-actions-card label { display: grid; gap: 7px; color: #bcbcc2; font-size: 11px; }
.money-action input,.settings-card input,.settings-card textarea { min-height: 46px; border-color: var(--app-line); border-radius: 9px; background: #0d0d0f; }
.money-action button { width: 100%; }
.money-action .deposit-box { margin: 0 12px 12px; }
.store-funds-panel { margin-top: 12px; padding: 22px; }
.store-funds-panel > header > span { flex: 0 0 auto; padding: 8px 10px; border: 1px solid var(--app-line); border-radius: 999px; color: #d9d9dc; font-size: 11px; background: #09090b; }
.store-funds-list { margin-top: 18px; display: grid; gap: 6px; }
.store-fund-row { min-width: 0; padding: 12px; display: grid; grid-template-columns: 42px minmax(150px,1fr) minmax(110px,.6fr) minmax(100px,.55fr) minmax(110px,.6fr) auto; align-items: center; gap: 14px; border: 1px solid var(--app-line); border-radius: 12px; background: #09090b; }
.store-fund-mark { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--app-line); border-radius: 11px; color: #eeeef0; font-size: 13px; font-weight: 700; background: #151517; }
.store-fund-name,.store-fund-stat,.store-fund-available { min-width: 0; display: grid; gap: 4px; }
.store-fund-name strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.store-fund-name small,.store-fund-stat small,.store-fund-available small { color: var(--app-muted); font-size: 10px; }
.store-fund-stat strong { color: #c4c4c9; font-size: 12px; font-weight: 540; }
.store-fund-available strong { color: #fff; font-size: 15px; font-weight: 620; }
.store-fund-row button { min-width: 92px; }
.store-fund-row button:disabled { opacity: .35; cursor: not-allowed; transform: none; }
.money-lower-grid { margin-top: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.money-history-panel { min-width: 0; padding: 22px; }
.money-history-panel .activity-list { margin-top: 16px; border: 0; background: transparent; }
.money-history-panel .activity-row { padding-inline: 0; }
.withdrawal-state { display: grid; gap: 3px; text-align: right; }
.withdrawal-state small { color: var(--app-muted); font-size: 9px; text-transform: capitalize; }
.action-card p,.settings-card p { color: var(--app-muted); line-height: 1.55; }

/* Account */
.account-intro { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; }
.account-grid { gap: 12px; }
.settings-card { border: 1px solid var(--app-line); border-radius: var(--app-radius); background: var(--app-panel); }
.settings-card:hover { border-color: var(--app-line-strong); }
.auto-withdraw-fields { display:grid; grid-template-columns:minmax(0,1fr) 190px; gap:12px; margin-top:16px; }
.auto-withdraw-fields label { display:grid; gap:7px; color:var(--app-muted); font-size:12px; }
.auto-withdraw-fields input,.auto-withdraw-fields select { min-height:46px; padding:0 12px; border:1px solid var(--app-line); border-radius:9px; background:#0d0d0f; color:var(--app-text); }
.auto-withdraw-settings-card .profile-form-actions { align-items:center; margin-top:14px; }
@media (max-width:720px) { .auto-withdraw-fields { grid-template-columns:1fr; } }
.session-list > * { border-color: var(--app-line) !important; background: #09090b !important; }
.admin-launch { min-height: 104px; }

.empty-state,.empty-result { color: var(--app-muted); border-color: var(--app-line); background: rgba(255,255,255,.012); line-height: 1.5; }

@media (max-width: 900px) {
  .screen { padding: 24px 20px 120px; }
  .money-overview { grid-template-columns: 1fr; }
  .balance-visual { min-height: 210px; }
  .messenger { height: calc(100dvh - 184px); }
}

@media (max-width: 760px) {
  .topbar { position: sticky; top: 0; z-index: 40; }
  .topbar > div:nth-child(2) { display: none; }
  .top-actions { margin-left: auto; }
  .screen { padding: 16px 14px calc(112px + env(safe-area-inset-bottom)); }
  .page-intro { margin: 8px 2px 18px; }
  .page-intro h2 { font-size: 34px; }
  .home-command { min-height: 0; padding: 25px 20px; }
  .home-command-copy h2 { font-size: clamp(36px,11vw,46px); line-height: .98; }
  .home-command-actions { display: grid; grid-template-columns: 1fr; }
  .home-command-actions > * { min-height: 48px; }
  .home-balance { min-height: 168px; padding: 20px; }
  .home-pulse { gap: 7px; }
  .home-pulse button { min-height: 112px; padding: 15px; }
  .section-heading { margin-top: 34px; gap: 12px; }
  .section-heading .text-button { min-height: 42px; padding-inline: 10px; }
  .network-hero,.directory-hero,.store-ops-head,.money-hero,.account-intro { padding: 24px 19px; }
  .network-hero h2,.directory-hero h2,.store-ops-head h2 { font-size: 36px; line-height: 1; }
  .network-hero p,.directory-hero p,.store-ops-head p { font-size: 12px; }
  .network-tools,.directory-tools { grid-template-columns: 1fr !important; padding: 7px; }
  .network-tools .solid-button,.directory-tools .solid-button { min-height: 48px; justify-content: center; }
  .search-bar { min-height: 58px; }
  .search-bar .solid-button { min-height: 44px; padding-inline: 13px; }
  .store-ops-head { gap: 22px; align-items: stretch; }
  .store-ops-head .solid-button { width: 100%; justify-content: center; }
  .store-ops-stats { grid-template-columns: 1fr 1fr; }
  .store-ops-stats article { min-height: 112px; padding: 16px; }
  .store-ops-panel { padding: 15px; border-radius: 14px; }
  .store-ops-panel-head { align-items: stretch; }
  .store-ops-panel-head > div:last-child { grid-template-columns: 1fr; }
  .store-ops-panel-head > div:last-child > * { width: 100%; justify-content: center; }
  .subnav { margin-inline: -3px; }
  .money-overview { gap: 10px; }
  .balance-visual { min-width: 0; min-height: 170px; padding: 13px; }
  .store-fund-row { grid-template-columns: 42px 1fr auto; }
  .store-fund-stat { display: none; }
  .store-fund-available { text-align: right; }
  .money-lower-grid { grid-template-columns: 1fr; }
  .money-grid,.account-grid { grid-template-columns: 1fr; }
  .settings-card.span-two { grid-column: auto; }
  .account-intro { grid-template-columns: auto 1fr; }
  .account-intro .danger { grid-column: 1/-1; width: 100%; justify-content: center; }
  .messenger { height: calc(100dvh - 166px - env(safe-area-inset-bottom)); min-height: 470px; border-radius: 14px; }
  .thread-column { width: 100%; }
  .mobile-dock {
    min-height: calc(68px + env(safe-area-inset-bottom));
    padding: 6px 5px env(safe-area-inset-bottom);
    border-top: 1px solid rgba(255,255,255,.12);
    background: rgba(10,10,11,.96);
    backdrop-filter: blur(20px);
  }
  .mobile-dock button { min-width: 0; min-height: 56px; gap: 4px; border-radius: 10px; font-size: 9px; }
  .mobile-dock button .ui-icon { width: 19px; height: 19px; }
  .mobile-dock button.active { color: #fff; background: #1b1b1e; }
}

@media (max-width: 430px) {
  .money-balance-card,.money-actions-card,.store-funds-panel,.money-history-panel { padding: 16px; border-radius: 14px; }
  .money-balance-head strong { font-size: 43px; }
  .money-ready { display: none; }
  .wallet-metrics { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .wallet-metrics > div { min-width: 0; min-height: 72px; padding: 12px 9px; }
  .wallet-metrics strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; }
  .store-funds-panel > header { display: grid; }
  .store-funds-panel > header > span { width: max-content; }
  .store-fund-row { grid-template-columns: 38px minmax(0,1fr) auto; gap: 10px; }
  .store-fund-mark { width: 38px; height: 38px; }
  .store-fund-available { grid-row: 2; grid-column: 2; text-align: left; }
  .store-fund-row button { grid-row: 1/3; grid-column: 3; min-width: 78px; padding-inline: 11px; }
  .home-pulse { grid-template-columns: 1fr 1fr; }
  .home-pulse button { min-width: 0; }
  .home-pulse span,.home-pulse small { overflow-wrap: anywhere; }
  .store-ops-stats { grid-template-columns: 1fr; }
  .business-card { grid-template-columns: 1fr; }
  .business-cover { min-height: 118px; }
  .business-cover i { width: 52px; height: 52px; }
  .business-body { padding: 18px; }
  .business-metrics { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .business-metrics b:last-child { display: block; }
  .network-card-media { height: 180px; }
}

@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
