:root {
  color-scheme: light;
  --bg: #f5f7ff;
  --sidebar: #111b2d;
  --sidebar-border: rgba(255, 255, 255, 0.08);
  --panel: rgba(255, 255, 255, 0.94);
  --line: #e7e9f4;
  --text: #172033;
  --muted: #6d7891;
  --purple: #5c38f4;
  --purple-dark: #4725db;
  --green: #16a34a;
  --red: #ef4444;
  --blue: #2563eb;
  --orange: #f59e0b;
  --shadow: 0 22px 60px rgba(32, 47, 86, 0.10);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(112, 92, 255, 0.12), transparent 22%),
    radial-gradient(circle at top left, rgba(79, 209, 197, 0.12), transparent 20%),
    linear-gradient(180deg, #fbfcff 0%, var(--bg) 100%);
}

.reconciliation-main { padding: 18px 22px 32px; }
.reconciliation-hero { position: sticky; top: 0; z-index: 35; display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: -18px -22px 12px; padding: 16px 22px; border-bottom: 1px solid var(--line); background: rgba(249, 251, 255, .94); backdrop-filter: blur(16px); }
.reconciliation-hero h1 { margin: 2px 0 3px; font-size: 1.7rem; }
.reconciliation-hero p { margin: 0; color: var(--muted); font-size: .88rem; }
.reconciliation-eyebrow { color: var(--purple); font-size: .7rem; font-weight: 800; letter-spacing: .16em; }
.reconciliation-actions { display: flex; gap: 8px; }
.reconciliation-menu-button { display: none; }
.reconciliation-sync-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; padding: 10px 14px; border: 1px solid #dfe4f3; border-radius: 12px; background: rgba(255,255,255,.82); }
.reconciliation-sync-bar div:first-child { display: flex; align-items: center; gap: 9px; }
.reconciliation-sync-bar span { color: var(--muted); font-size: .75rem; }
.reconciliation-sync-bar strong { font-size: .8rem; }
.reconciliation-sync-message { color: #53617b; font-size: .78rem; text-align: right; }
.reconciliation-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; margin-bottom: 10px; }
.reconciliation-summary-card { position: relative; overflow: hidden; min-height: 104px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 10px 28px rgba(32,47,86,.06); }
.reconciliation-summary-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--purple); }
.reconciliation-summary-card.blue::before { background: #2f75f5; }.reconciliation-summary-card.red::before { background: #ef4444; }.reconciliation-summary-card.orange::before { background: #f59e0b; }
.reconciliation-summary-card span,.reconciliation-money-grid span { display: block; color: var(--muted); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.reconciliation-summary-card strong { display: block; margin: 8px 0 3px; font-size: 1.55rem; }
.reconciliation-summary-card small,.reconciliation-money-grid small { color: var(--muted); font-size: .72rem; }.reconciliation-summary-card strong.negative { color: var(--red); }
.reconciliation-money-grid { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 8px; margin-bottom: 10px; }
.reconciliation-money-grid article { padding: 12px 13px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.9); }
.reconciliation-money-grid strong { display: block; margin: 6px 0 2px; font-size: 1rem; }.reconciliation-money-grid .settled { border-color: #b9e6c8; background: #f3fcf6; }.reconciliation-money-grid .settled strong { color: #11833a; }.reconciliation-money-grid .pending { border-color: #f4d59a; background: #fffbef; }.reconciliation-money-grid .pending strong { color: #b66b00; }
.reconciliation-category-grid { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 7px; margin-bottom: 10px; }
.reconciliation-category-card { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; padding: 9px 10px; border: 1px solid var(--line); border-radius: 11px; color: var(--text); background: #fff; cursor: pointer; }
.reconciliation-category-card span { overflow: hidden; font-size: .7rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }.reconciliation-category-card strong { min-width: 24px; color: var(--purple); font-size: .9rem; }.reconciliation-category-card.active { border-color: var(--purple); box-shadow: 0 0 0 2px rgba(92,56,244,.1); }
.reconciliation-filter-panel { display: grid; grid-template-columns: minmax(220px,1.7fr) repeat(5,minmax(120px,1fr)) auto; gap: 8px; align-items: end; margin-bottom: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.92); }
.reconciliation-filter-panel label span { display: block; margin: 0 0 5px; color: #4e5a72; font-size: .7rem; font-weight: 700; }.reconciliation-filter-panel input,.reconciliation-filter-panel select { width: 100%; height: 38px; padding: 0 10px; border: 1px solid #dfe3ef; border-radius: 9px; color: var(--text); background: #fff; }
.reconciliation-filter-panel button { height: 38px; }
.reconciliation-data-panel { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: var(--shadow); }
.reconciliation-table-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }.reconciliation-table-heading strong,.reconciliation-table-heading span { display: block; }.reconciliation-table-heading span { margin-top: 2px; color: var(--muted); font-size: .72rem; }
.reconciliation-legend { display: flex; gap: 6px; }.reconciliation-legend span { margin: 0; padding: 4px 8px; border-radius: 999px; font-weight: 700; }.reconciliation-legend .ok { color: #15803d; background: #eaf8ee; }.reconciliation-legend .warn { color: #9a6500; background: #fff5d8; }.reconciliation-legend .bad { color: #c62828; background: #fff0f0; }
.reconciliation-table-wrap { max-height: calc(100vh - 360px); overflow: auto; }.reconciliation-table { width: 100%; min-width: 1450px; border-collapse: separate; border-spacing: 0; font-size: .75rem; }.reconciliation-table th { position: sticky; top: 0; z-index: 3; padding: 10px; color: #39445b; text-align: left; background: #f4f2ff; border-bottom: 1px solid #dedaf8; }.reconciliation-table td { padding: 10px; vertical-align: top; border-bottom: 1px solid #edf0f6; }.reconciliation-table td strong,.reconciliation-table td small { display: block; }.reconciliation-table td small { margin-top: 4px; color: var(--muted); line-height: 1.35; }
.reconciliation-row.category-mismatch td:first-child,.reconciliation-row.category-local-only td:first-child,.reconciliation-row.category-api-only td:first-child { border-left: 4px solid #ef4444; }.reconciliation-row.category-duplicate td:first-child,.reconciliation-row.category-status-difference td:first-child { border-left: 4px solid #f59e0b; }.reconciliation-row.category-matched td:first-child { border-left: 4px solid #22a559; }.reconciliation-row.category-cancelled { opacity: .72; background: #fafafa; }
.reconciliation-badge { display: inline-flex; padding: 5px 8px; border-radius: 999px; font-size: .65rem; font-weight: 800; white-space: nowrap; }.reconciliation-badge.matched { color: #15803d; background: #e8f8ed; }.reconciliation-badge.mismatch,.reconciliation-badge.local-only,.reconciliation-badge.api-only { color: #c62828; background: #fff0f0; }.reconciliation-badge.duplicate,.reconciliation-badge.status-difference { color: #996100; background: #fff3d3; }.reconciliation-badge.cancelled { color: #64748b; background: #eef1f5; }
.value-different { color: #d52d2d; }.reconciliation-issue { max-width: 260px; color: #8d2530; line-height: 1.45; }
.reconciliation-pagination { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 10px; }.reconciliation-pagination button { width: 38px; height: 34px; }.reconciliation-pagination span { color: var(--muted); font-size: .78rem; }
.reconciliation-mobile-list { display: none; }

@media (max-width: 1200px) {
  .reconciliation-money-grid { grid-template-columns: repeat(3,1fr); }.reconciliation-category-grid { grid-template-columns: repeat(4,1fr); }.reconciliation-filter-panel { grid-template-columns: repeat(3,1fr); }.reconciliation-search { grid-column: span 2; }
}

@media (max-width: 760px) {
  .reconciliation-main { padding: 12px; }.reconciliation-hero { margin: -12px -12px 10px; padding: 12px; }.reconciliation-hero h1 { font-size: 1.3rem; }.reconciliation-hero p { font-size: .75rem; }.reconciliation-menu-button { display: inline-flex; }.reconciliation-actions { flex-shrink: 0; flex-wrap: wrap; }.reconciliation-actions button { min-height: 42px; padding: 9px 10px; font-size: .72rem; }
  .reconciliation-sync-bar { display: block; }.reconciliation-sync-message { margin-top: 6px; text-align: left; }.reconciliation-summary-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }.reconciliation-summary-card { min-height: 90px; padding: 13px; min-width: 0; }.reconciliation-summary-card strong { font-size: 1.25rem; overflow-wrap: anywhere; }
  .reconciliation-money-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }.reconciliation-category-grid { display: flex; overflow-x: auto; padding-bottom: 3px; -webkit-overflow-scrolling: touch; }.reconciliation-category-card { min-width: 135px; flex: 0 0 auto; }
  .reconciliation-filter-panel { grid-template-columns: 1fr; gap: 8px; }.reconciliation-search { grid-column: 1 / -1; }.reconciliation-filter-panel button { grid-column: 1 / -1; min-height: 42px; }.reconciliation-filter-panel input,.reconciliation-filter-panel select { min-height: 42px; }.reconciliation-table-wrap { display: none; }.reconciliation-mobile-list { display: grid; gap: 9px; padding: 10px; }
  .reconciliation-mobile-card { padding: 12px; border: 1px solid var(--line); border-left: 4px solid var(--purple); border-radius: 12px; background: #fff; }.reconciliation-mobile-card.category-mismatch,.reconciliation-mobile-card.category-local-only,.reconciliation-mobile-card.category-api-only { border-left-color: #ef4444; }.reconciliation-mobile-card.category-duplicate,.reconciliation-mobile-card.category-status-difference { border-left-color: #f59e0b; }.reconciliation-mobile-card.category-matched { border-left-color: #22a559; }.reconciliation-mobile-card header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }.reconciliation-mobile-card h3 { margin: 10px 0 3px; font-size: .95rem; }.reconciliation-mobile-card p { margin: 0 0 9px; color: var(--muted); font-size: .75rem; }.reconciliation-mobile-values { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }.reconciliation-mobile-values span { padding: 7px; border-radius: 8px; color: var(--muted); background: #f7f8fc; font-size: .65rem; }.reconciliation-mobile-values strong { display: block; margin-top: 3px; color: var(--text); font-size: .76rem; }.reconciliation-mobile-status { margin-top: 8px; color: #45516a; font-size: .7rem; }.reconciliation-mobile-card footer { margin-top: 8px; padding-top: 8px; border-top: 1px dashed #dfe3ee; color: #9c2730; font-size: .7rem; line-height: 1.4; }
  .reconciliation-legend { display: none; }
  .reconciliation-page .sidebar { position: fixed; z-index: 1000; transform: translateX(-105%); transition: transform .2s ease; }.reconciliation-page .sidebar.is-open { transform: translateX(0); }.reconciliation-page .mobile-sidebar-backdrop.is-open { display: block; }
}

.reconciliation-table { min-width: 1580px; }
.reconciliation-badge.ignored { color: #596579; background: #edf0f5; }
.reconciliation-badge.resolved { color: #1768b8; background: #e8f3ff; }
.reconciliation-action-stack { display: grid; gap: 5px; min-width: 112px; }
.reconciliation-action-stack button,
.reconciliation-action-button { display: block; width: 100%; padding: 6px 8px; border: 1px solid #dce1ee; border-radius: 7px; color: #34405a; background: #fff; font-size: .68rem; font-weight: 700; text-align: center; text-decoration: none; cursor: pointer; }
.reconciliation-action-button.repair { color: #4e2be0; border-color: #c9bcff; background: #f6f3ff; }
.reconciliation-action-stack button.resolved { color: #1768b8; border-color: #b9dcff; }
.reconciliation-action-stack button.ignored { color: #6b7280; }
.reconciliation-reviewed-label { display: block; padding: 6px 8px; border-radius: 7px; font-size: .67rem; font-weight: 800; text-align: center; }
.reconciliation-reviewed-label.matched { color: #16813c; background: #eaf8ee; }
.reconciliation-reviewed-label.ignored { color: #596579; background: #edf0f5; }
.reconciliation-reviewed-label.resolved { color: #1768b8; background: #e8f3ff; }
.reconciliation-row.category-ignored,
.reconciliation-row.category-resolved { background: #fafbfe; }
.finance-summary-group h3 small { display: inline-block; margin-left: 8px; color: var(--muted); font-size: .68rem; font-weight: 500; text-transform: none; letter-spacing: 0; }
.cny-reconciliation-summary > .finance-held-card { border-color: #efc76d; background: linear-gradient(135deg, #fffaf0, #fff5d8); }
.cny-reconciliation-summary > .finance-held-card strong { color: #a45f00; }

@media (max-width: 760px) {
  .reconciliation-mobile-actions { margin-top: 9px; }
  .reconciliation-mobile-actions .reconciliation-action-stack { grid-template-columns: repeat(3, 1fr); }
  .reconciliation-mobile-actions .reconciliation-action-button,
  .reconciliation-mobile-actions button { min-height: 36px; }
}

button,
input,
select {
  font: inherit;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px 16px;
  color: #fff;
  background:
    radial-gradient(circle at top, rgba(92, 56, 244, 0.20), transparent 28%),
    linear-gradient(180deg, #152038 0%, var(--sidebar) 100%);
  border-right: 1px solid var(--sidebar-border);
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 4px 12px;
}

.brand-mark {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 28px;
}

.brand-mark span {
  display: block;
  width: 6px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffb44b, #ff7c24);
}

.brand-mark span:nth-child(1) { height: 12px; }
.brand-mark span:nth-child(2) { height: 20px; }
.brand-mark span:nth-child(3) { height: 28px; }

.brand-title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.brand-subtitle {
  color: #ffb44b;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
}

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

.nav-item {
  display: block;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  text-align: left;
  padding: 13px 16px;
  border-radius: 14px;
  cursor: pointer;
  text-decoration: none;
}

.nav-item.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(92, 56, 244, 0.95), rgba(110, 74, 255, 0.85));
  box-shadow: 0 12px 28px rgba(92, 56, 244, 0.30);
}

.pwa-install-button {
  width: 100%;
  border: 1px dashed rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  text-align: left;
}

.pwa-install-button.install-ready {
  border-style: solid;
  border-color: rgba(129, 92, 246, 0.58);
  color: #fff;
  background: linear-gradient(135deg, rgba(112, 72, 245, 0.48), rgba(76, 37, 214, 0.54));
}

.pwa-install-dialog {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(8, 17, 37, 0.66);
  backdrop-filter: blur(6px);
}

.pwa-install-dialog-card {
  width: min(460px, 100%);
  padding: 24px;
  border: 1px solid rgba(92, 56, 244, 0.22);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 28px 70px rgba(8, 17, 37, 0.34);
}

.pwa-install-dialog-card h3 {
  margin: 0 0 10px;
  color: var(--purple-dark);
  font-size: 1.2rem;
}

.pwa-install-dialog-card p {
  margin: 0 0 20px;
  color: #4b5563;
  line-height: 1.6;
}

.pwa-install-dialog-card button {
  width: 100%;
}

.side-card,
.side-profile {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
}

.side-card {
  margin-top: auto;
  padding: 16px;
}

.side-card h3 {
  margin: 0 0 14px;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.side-setting-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.9rem;
}

.side-divider {
  height: 1px;
  margin: 14px 0;
  background: rgba(255, 255, 255, 0.10);
}

.quick-actions {
  display: grid;
  gap: 10px;
}

.sidebar-action {
  border: 0;
  color: #fff;
  border-radius: 12px;
  padding: 12px 14px;
  font-weight: 700;
  cursor: pointer;
}

.sidebar-action.violet { background: linear-gradient(135deg, #6e44ff, #5532e3); }
.sidebar-action.green { background: linear-gradient(135deg, #23b35e, #18934a); }
.sidebar-action.red { background: linear-gradient(135deg, #f34f63, #d82e43); }

.side-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
}

.profile-avatar {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #3f2db5;
  font-weight: 800;
  background: linear-gradient(135deg, #ffe7b7, #fff6e7);
}

.profile-name {
  font-weight: 700;
}

.profile-role {
  color: rgba(255, 255, 255, 0.70);
  font-size: 0.88rem;
}

.main-shell {
  padding: 24px 28px 28px;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.dashboard-sticky-stack {
  position: sticky;
  top: 0;
  z-index: 48;
  padding-top: 12px;
  padding-bottom: 6px;
  background:
    linear-gradient(180deg, rgba(245, 247, 255, 0.96), rgba(245, 247, 255, 0.88) 82%, rgba(245, 247, 255, 0));
  backdrop-filter: blur(6px);
}

.sales-sticky-stack {
  position: sticky;
  top: 0;
  z-index: 48;
  padding-top: 12px;
  padding-bottom: 8px;
  background:
    linear-gradient(180deg, rgba(245, 247, 255, 0.97), rgba(245, 247, 255, 0.90) 82%, rgba(245, 247, 255, 0));
  backdrop-filter: blur(6px);
}

.dashboard-hero {
  margin-bottom: 10px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(1.7rem, 1.8vw, 2.2rem);
}

.subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 0.95rem;
}

.refresh-progress {
  margin-top: 14px;
  max-width: 420px;
  padding: 12px 14px;
  border: 1px solid rgba(92, 56, 244, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 28px rgba(92, 56, 244, 0.08);
}

.refresh-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.refresh-progress-meta strong {
  font-size: 0.92rem;
}

.refresh-progress-meta span {
  color: var(--purple);
  font-weight: 700;
  font-size: 0.9rem;
}

.refresh-progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #eceffd;
}

.refresh-progress-bar {
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--purple), var(--purple-dark));
  transition: width 0.25s ease;
}

.compact-subtitle {
  margin-top: 6px;
  font-size: 0.92rem;
}

.script-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.script-steps {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
}

.script-steps strong {
  display: block;
  margin-bottom: 10px;
}

.script-steps p {
  margin: 0 0 8px;
  color: var(--muted);
}

.script-steps p:last-child {
  margin-bottom: 0;
}

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

.hero-update-box,
.panel,
.stat-card {
  background: var(--panel);
  border: 1px solid rgba(231, 233, 244, 0.95);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.hero-update-box {
  min-width: 175px;
  padding: 10px 14px;
}

.hero-update-label {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  margin-bottom: 2px;
}

.primary-button,
.ghost-button,
.copy-button,
.telegram-hide-button,
.sell-link,
.button-link,
.pager-button {
  border-radius: 14px;
  cursor: pointer;
}

.primary-button {
  border: 0;
  padding: 12px 18px;
  color: #fff;
  font-weight: 700;
  background: linear-gradient(135deg, var(--purple), var(--purple-dark));
  box-shadow: 0 14px 30px rgba(92, 56, 244, 0.26);
}

.ghost-button,
.copy-button,
.telegram-hide-button,
.pager-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  padding: 12px 16px;
  font-weight: 600;
}

.telegram-hide-button {
  min-width: 88px;
}

.telegram-hide-button.active {
  color: #b42318;
  border-color: rgba(239, 68, 68, 0.28);
  background: rgba(254, 242, 242, 0.92);
}

.violet-text { color: var(--purple); }
.green-text { color: var(--green); }
.red-text { color: var(--red); }

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

.dashboard-stats-grid {
  gap: 10px;
  margin-bottom: 10px;
}

.stat-card {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 22px;
}

.dashboard-stats-grid .stat-card {
  padding: 12px 14px;
  border-radius: 16px;
}

.stat-card strong {
  display: block;
  font-size: 2rem;
  margin-bottom: 4px;
}

.dashboard-stats-grid .stat-card strong {
  font-size: 1.4rem;
}

.dashboard-stats-grid .stat-card span {
  font-size: 0.92rem;
}

.dashboard-stats-grid .stat-card small {
  margin-top: 3px;
  font-size: 0.78rem;
}

.stat-card span {
  display: block;
  font-weight: 700;
}

.stat-card small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

.stat-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  font-size: 1.1rem;
  font-weight: 800;
}

.stat-card.violet .stat-icon { background: linear-gradient(135deg, rgba(92,56,244,0.14), rgba(92,56,244,0.04)); }
.stat-card.green .stat-icon { background: linear-gradient(135deg, rgba(34,197,94,0.14), rgba(34,197,94,0.04)); }
.stat-card.blue .stat-icon { background: linear-gradient(135deg, rgba(37,99,235,0.14), rgba(37,99,235,0.04)); }
.stat-card.orange .stat-icon { background: linear-gradient(135deg, rgba(245,158,11,0.14), rgba(245,158,11,0.04)); }
.rows-icon { color: var(--purple-dark); }
.rate-icon { color: #149144; }
.date-icon { color: #2563eb; }
.page-icon { color: #d97706; }

.panel {
  padding: 20px;
  margin-bottom: 18px;
}

.panel-grid {
  display: grid;
  gap: 16px;
}

.filters-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.profit-grid {
  grid-template-columns: 1.2fr 1.2fr 1.2fr 1.6fr;
}

.dashboard-filter-panel,
.dashboard-profit-panel {
  padding: 10px 12px;
  margin-bottom: 10px;
}

.dashboard-filters-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}

.dashboard-profit-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}

.dashboard-filter-panel .field,
.dashboard-profit-panel .field {
  gap: 4px;
}

.dashboard-filter-panel .field span,
.dashboard-profit-panel .field span {
  font-size: 0.78rem;
}

.dashboard-filter-panel .field input,
.dashboard-filter-panel .field select,
.dashboard-profit-panel .field input,
.dashboard-profit-panel .field select {
  height: 36px;
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 0.86rem;
}

.method-multiselect-field,
.multi-filter-field {
  position: relative;
}

.multi-filter-trigger-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.multi-select-trigger,
.multi-filter-trigger {
  width: 100%;
  height: 36px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.multi-select-menu,
.multi-filter-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 12;
  min-width: 100%;
  max-width: 100%;
  overflow: hidden;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 30px rgba(32, 47, 86, 0.14);
}

.multi-select-menu[hidden],
.multi-filter-menu[hidden] {
  display: none;
}

.multi-select-option,
.multi-filter-option {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  align-items: center;
  column-gap: 6px;
  width: 100%;
  min-height: 22px;
  padding: 2px 6px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.72rem;
  color: var(--text);
}

.multi-select-option[hidden],
.multi-filter-option[hidden] {
  display: none !important;
}

.multi-select-option:hover,
.multi-filter-option:hover {
  background: rgba(92, 56, 244, 0.06);
}

.multi-select-option input,
.multi-filter-option input {
  appearance: auto;
  -webkit-appearance: checkbox;
  width: 12px;
  height: 12px;
  margin: 0;
  align-self: center;
  accent-color: var(--purple);
  pointer-events: auto;
}

.multi-filter-option span {
  display: block;
  min-width: 0;
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.1;
  color: var(--text);
  white-space: normal;
  word-break: break-word;
}

.multi-filter-highlight {
  padding: 0 2px;
  border-radius: 4px;
  color: #3b1fd1;
  background: rgba(92, 56, 244, 0.14);
}

.multi-filter-search-wrap {
  padding-bottom: 6px;
  border-bottom: 1px solid #eef1fb;
}

.multi-filter-search {
  width: 100%;
  height: 28px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 0.74rem;
}

.multi-filter-list {
  max-height: 170px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-top: 2px;
}

.dashboard-filter-panel .multi-filter-trigger,
.dashboard-profit-panel .multi-filter-trigger {
  height: 36px;
  padding: 6px 10px;
  font-size: 0.84rem;
}

.multi-filter-clear-button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: #64748b;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.multi-filter-clear-button:hover {
  color: var(--red);
  border-color: rgba(239, 68, 68, 0.28);
  background: rgba(254, 242, 242, 0.92);
}

.dashboard-inline-actions {
  margin-top: 0;
  align-items: end;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: nowrap;
}

.dashboard-inline-actions .primary-button,
.dashboard-inline-actions .ghost-button,
.dashboard-profit-panel .settings-actions .ghost-button {
  padding: 9px 14px;
  border-radius: 10px;
}

.dashboard-profit-panel .settings-actions {
  margin-top: 0;
  justify-content: flex-start;
  gap: 8px;
}

.dashboard-profit-panel .settings-actions {
  flex-wrap: wrap;
}

.table-panel .table-wrap thead th {
  position: sticky;
  top: 0;
  z-index: 18;
  background: linear-gradient(180deg, #f5f2ff, #f9f8ff);
}

.settings-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.telegram-template-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.buyer-settings-grid {
  grid-template-columns: 1fr 1.2fr 1.2fr 0.9fr;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field span {
  font-size: 0.92rem;
  font-weight: 700;
  color: #39445f;
}

.field-hint {
  font-size: 0.72rem;
  color: #8a94aa;
  line-height: 1.2;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  background: #fff;
  color: var(--text);
}

.field textarea {
  resize: vertical;
  min-height: 140px;
}

.checkbox-field {
  justify-content: flex-end;
}

.checkbox-field input {
  width: 24px;
  height: 24px;
  margin-top: 8px;
}

.panel-actions,
.settings-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.settings-actions.no-margin {
  margin-top: 0;
}

.info-card {
  min-height: 56px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--muted);
  line-height: 1.55;
}

.table-panel {
  overflow: hidden;
}

.table-headline,
.table-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.table-headline {
  margin-bottom: 14px;
}

.table-headline span,
.table-footer span {
  color: var(--muted);
}

.table-wrap {
  overflow: auto;
  border: 1px solid #eceffd;
  border-radius: 18px;
  background: #fff;
}

.table-panel .table-wrap {
  max-height: calc(100vh - var(--sticky-stack-offset, 0px) - 110px);
}

table {
  width: 100%;
  min-width: 1600px;
  border-collapse: collapse;
}

thead {
  background: linear-gradient(180deg, #f5f2ff, #f9f8ff);
}

th,
td {
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid #eef1fb;
}

tbody tr:hover {
  background: #fbfbff;
}

.buyer-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.slug {
  color: var(--muted);
  font-size: 0.82rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--green);
  background: rgba(34, 197, 94, 0.12);
}

.status-pill.offline {
  color: var(--muted);
  background: rgba(148, 163, 184, 0.16);
}

.action-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.action-group.stacked {
  flex-direction: column;
  align-items: stretch;
}

.sell-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 78px;
  padding: 11px 14px;
  text-decoration: none;
  color: #fff;
  font-weight: 700;
  background: linear-gradient(135deg, var(--purple), var(--purple-dark));
}

.button-link {
  border: 0;
}

.copy-button {
  min-width: 110px;
}

.table-input {
  width: 100%;
  min-width: 92px;
  height: 38px;
  padding: 8px 11px;
  border: 1px solid #dbe2f2;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
  color: var(--text);
  line-height: 1.2;
  box-shadow: inset 0 1px 2px rgba(23, 32, 51, 0.03);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.table-input::placeholder {
  color: #94a3b8;
}

.table-input:hover {
  border-color: #cbd5e1;
}

.table-input:focus {
  outline: none;
  border-color: rgba(92, 56, 244, 0.55);
  box-shadow: 0 0 0 4px rgba(92, 56, 244, 0.10);
  background: #fff;
}

.table-input:disabled {
  color: #64748b;
  border-color: #e2e8f0;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  cursor: not-allowed;
  opacity: 1;
}

.telegram-checkbox {
  width: 18px;
  height: 18px;
}

.telegram-method-picker {
  position: relative;
  min-width: 108px;
}

.telegram-method-picker summary {
  list-style: none;
}

.telegram-method-picker summary::-webkit-details-marker {
  display: none;
}

.telegram-method-summary {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 11px;
  border: 1px solid #dbe2f2;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
  color: var(--text);
  cursor: pointer;
  user-select: none;
}

.telegram-method-summary::after {
  content: "▾";
  color: var(--muted);
  font-size: 0.82rem;
}

.telegram-method-picker[open] .telegram-method-summary {
  border-color: rgba(92, 56, 244, 0.55);
  box-shadow: 0 0 0 4px rgba(92, 56, 244, 0.10);
  background: #fff;
}

.telegram-method-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 20;
  min-width: 128px;
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid #dbe2f2;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 38px rgba(23, 32, 51, 0.12);
}

.telegram-method-option {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--text);
}

.telegram-method-option input {
  width: 14px;
  height: 14px;
  margin: 0;
}

.telegram-preview {
  margin: 0;
  padding: 18px;
  border: 1px solid #eceffd;
  border-radius: 18px;
  background: #fff;
  color: var(--text);
  white-space: normal;
  word-break: break-word;
  line-height: 1.65;
  font-family: Consolas, "Courier New", monospace;
}

.telegram-preview-header {
  margin-bottom: 14px;
}

.telegram-preview-section {
  margin-bottom: 14px;
}

.telegram-preview-section-title {
  margin-bottom: 3px;
}

.telegram-preview-row {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.telegram-preview-remove {
  flex: 0 0 auto;
  border: 0;
  width: 22px;
  height: 22px;
  padding: 0;
  color: #e11d48;
  background: transparent;
  font: inherit;
  font-weight: 900;
  line-height: 22px;
  cursor: pointer;
}

.telegram-preview-remove:hover {
  color: #9f1239;
  transform: scale(1.08);
}

.telegram-preview-footer {
  margin-top: 4px;
}

.telegram-preview-panel {
  margin-bottom: 18px;
}

.telegram-preview-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.75fr);
  gap: 14px;
  align-items: stretch;
}

.telegram-send-history {
  min-width: 0;
  max-height: 560px;
  padding: 14px;
  border: 1px solid #e3e7f5;
  border-radius: 18px;
  background: #f8f9ff;
  overflow: hidden;
}

.telegram-send-history-head,
.telegram-send-history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.telegram-auto-countdown-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 9px;
  border-bottom: 1px solid #e1e6f3;
}

.telegram-auto-countdown-head span { color: var(--muted); font-size: 0.74rem; }
.telegram-auto-countdowns { display: grid; gap: 7px; margin: 10px 0 14px; }
.telegram-auto-countdown { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 10px; border: 1px solid #d9e1f1; border-radius: 10px; background: #fff; }
.telegram-auto-countdown > div { display: grid; min-width: 0; gap: 2px; }
.telegram-auto-countdown strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.telegram-auto-countdown small { color: var(--muted); font-size: 0.7rem; }
.telegram-auto-countdown > span { flex: 0 0 auto; color: #4f35d9; font-weight: 850; font-variant-numeric: tabular-nums; }
.telegram-auto-countdown.problem { border-color: #fecaca; background: #fff5f5; }
.telegram-auto-countdown.problem > span,
.telegram-auto-countdown.problem small { color: #dc2626; }

.telegram-send-history-head > div {
  display: grid;
  gap: 2px;
}

.telegram-send-history-head span,
.telegram-send-history-item small {
  color: var(--muted);
  font-size: 0.76rem;
}

.telegram-send-history-list {
  display: grid;
  gap: 8px;
  max-height: 485px;
  margin-top: 12px;
  overflow-y: auto;
  padding-right: 3px;
}

.telegram-send-history-item {
  padding: 10px 11px;
  border: 1px solid #dfe4f3;
  border-left: 4px solid #94a3b8;
  border-radius: 11px;
  background: #fff;
}

.telegram-send-history-item.success { border-left-color: #16a34a; }
.telegram-send-history-item.floodwait,
.telegram-send-history-item.error { border-left-color: #dc2626; background: #fff7f7; }
.telegram-send-history-item.success .telegram-send-history-row span { color: #15803d; }
.telegram-send-history-item.floodwait .telegram-send-history-row span,
.telegram-send-history-item.error .telegram-send-history-row span { color: #dc2626; }
.telegram-send-history-row strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.telegram-send-history-row span { flex: 0 0 auto; font-size: 0.68rem; font-weight: 800; }
.telegram-send-history-empty { padding: 28px 10px; color: var(--muted); text-align: center; }

@media (max-width: 980px) {
  .telegram-preview-layout { grid-template-columns: 1fr; }
  .telegram-send-history { max-height: 360px; }
  .telegram-send-history-list { max-height: 285px; }
}

.telegram-preview-headline {
  align-items: center;
}

.telegram-preview-headline > div {
  display: grid;
  gap: 4px;
}

.telegram-preview-headline > .telegram-copy-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.telegram-copy-status {
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.telegram-copy-status.success {
  color: #08783f;
  background: #dff8e9;
  border: 1px solid #a7e6bf;
}

.telegram-copy-status.error {
  color: #b42318;
  background: #fff0ef;
  border: 1px solid #ffc9c5;
}

.empty-state {
  padding: 30px;
}

.empty-state p {
  margin-bottom: 0;
  color: var(--muted);
}

.table-footer {
  margin-top: 16px;
}

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

.pager-button {
  width: 42px;
  height: 42px;
  padding: 0;
}

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

.sales-headbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  margin-bottom: 16px;
  padding: 18px 20px;
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(112, 92, 255, 0.14), transparent 28%),
    radial-gradient(circle at top left, rgba(79, 209, 197, 0.10), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 249, 255, 0.96));
  border: 1px solid rgba(92, 56, 244, 0.10);
  border-radius: 22px;
  box-shadow: 0 22px 50px rgba(32, 47, 86, 0.14);
  backdrop-filter: blur(10px);
}

.sales-headbar[hidden] {
  display: none !important;
}

.sales-headbar-summary {
  display: grid;
  gap: 10px;
  padding-left: 14px;
  border-left: 3px solid var(--purple);
}

.sales-headbar-title {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--purple);
}

.sales-headbar-date {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--muted);
}

.sales-headbar-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.sales-profit-audit-total {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 12px;
  padding-left: 12px;
  border-left: 1px solid rgba(92, 56, 244, 0.18);
  color: var(--muted);
  font-size: 0.82rem;
}

.sales-profit-audit-total strong,
.pricing-detail.total-profit-highlight strong {
  color: #079447;
}

.sales-profit-audit-total.after-usdt {
  border-left-color: rgba(7, 148, 71, 0.24);
}

.latest-settlement-ticker {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 250px;
  max-width: 430px;
  color: #156b3a;
  text-decoration: none;
  font-size: 0.76rem;
  overflow: hidden;
}

.order-alert-tickers {
  display: flex;
  align-items: stretch;
  gap: 8px;
  min-width: 0;
}

.reconciliation-alert-ticker {
  border-color: rgba(239, 68, 68, 0.28);
  background: rgba(254, 242, 242, 0.96);
}

.reconciliation-alert-ticker > span {
  color: #b91c1c;
  background: #fee2e2;
}

.reconciliation-alert-ticker > div {
  min-width: 0;
}

.reconciliation-alert-ticker b {
  color: #991b1b;
}

.reconciliation-alert-ticker small {
  color: #dc2626;
  font-size: 0.66rem;
  font-weight: 900;
  text-transform: uppercase;
}

.latest-settlement-ticker[hidden] { display: none; }

.latest-settlement-ticker > span {
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: 999px;
  background: #daf8e7;
  color: #08783c;
  font-size: 0.64rem;
  font-weight: 900;
}

.latest-settlement-ticker > div {
  overflow: hidden;
  white-space: nowrap;
}

.latest-settlement-ticker b {
  display: inline-block;
  padding-left: 100%;
  animation: settlement-running-text 12s linear infinite;
}

@keyframes settlement-running-text {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}

.bijiaqi-notification-wrap { position: relative; }

.notification-bell-button {
  position: relative;
  min-width: 42px;
  padding-inline: 10px;
}

.notification-bell-button span {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ef4444;
  color: white;
  font-size: 0.66rem;
  font-weight: 900;
  line-height: 19px;
}

.bijiaqi-notification-panel {
  position: absolute;
  z-index: 120;
  top: calc(100% + 8px);
  right: 0;
  width: min(380px, calc(100vw - 28px));
  padding: 10px;
  border: 1px solid #dce3f4;
  border-radius: 14px;
  background: white;
  box-shadow: 0 18px 45px rgba(27, 39, 79, 0.18);
}

.bijiaqi-notification-title {
  padding: 4px 5px 10px;
  color: #17223b;
  font-size: 0.82rem;
  font-weight: 900;
}

.bijiaqi-notification-list {
  display: grid;
  gap: 6px;
  max-height: 390px;
  overflow-y: auto;
}

.bijiaqi-notification-item {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 10px;
  border: 1px solid #f2c8c8;
  border-radius: 10px;
  background: #fff8f8;
  color: #26324b;
  text-align: left;
  cursor: pointer;
}

.bijiaqi-notification-item.read { border-color: #e5e9f2; background: #f8f9fc; opacity: 0.72; }
.bijiaqi-notification-item strong { color: #d92d20; font-size: 0.75rem; }
.bijiaqi-notification-item span { font-size: 0.78rem; line-height: 1.4; }
.bijiaqi-notification-item small,
.bijiaqi-notification-empty { color: var(--muted); font-size: 0.68rem; }

@media (max-width: 700px) {
  .order-list-heading {
    flex-wrap: wrap;
  }

  .sales-profit-audit-total {
    width: 100%;
    margin: 6px 0 0 24px;
    padding-left: 0;
    border-left: 0;
  }

  .latest-settlement-ticker { width: 100%; max-width: none; }

  .bijiaqi-notification-panel {
    position: fixed;
    top: 72px;
    right: 12px;
    left: 12px;
    width: auto;
  }
}

body.sales-order-page .sales-headbar-summary > .sales-headbar-stats {
  display: none;
}

.sales-headbar-stat {
  padding: 12px 14px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(243, 246, 255, 0.96));
  border: 1px solid rgba(92, 56, 244, 0.10);
}

.sales-headbar-stat span,
.sales-headbar-box-label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #5a6785;
}

.sales-headbar-stat strong {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--purple-dark);
}

.sales-headbar-side {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
}

.sales-headbar-side small {
  color: var(--muted);
  line-height: 1.45;
  white-space: nowrap;
}

.headbar-inline-note {
  display: block;
  margin-top: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}

.unsettled-headbar-stat {
  border-color: rgba(239, 68, 68, 0.22);
  background: linear-gradient(180deg, rgba(255, 247, 247, 0.98), rgba(255, 235, 235, 0.92));
}

.unsettled-headbar-stat strong {
  color: #dc2626;
}

.cny-reconciliation {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(92, 56, 244, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
}

.cny-reconciliation-entry {
  display: grid;
  grid-template-columns: repeat(6, minmax(125px, 1fr)) auto;
  gap: 8px;
  align-items: end;
}

.cny-reconciliation-entry label {
  display: grid;
  gap: 5px;
}

.cny-reconciliation-entry label span,
.cny-reconciliation-summary span {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.cny-reconciliation-entry input,
.cny-reconciliation-entry select {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
}

.cny-reconciliation-entry .primary-button {
  min-height: 38px;
  white-space: nowrap;
}

.cny-reconciliation-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.cny-reconciliation-summary > div {
  display: grid;
  gap: 4px;
  padding: 9px 10px;
  border: 1px solid rgba(92, 56, 244, 0.1);
  border-radius: 11px;
  background: #f8f9ff;
}

.cny-reconciliation-summary strong {
  font-size: 1rem;
  color: var(--purple-dark);
}

.cny-reconciliation-summary small {
  font-size: 0.68rem;
  color: var(--muted);
}

#reconDifferenceCard.is-match {
  border-color: rgba(22, 163, 74, 0.3);
  background: rgba(240, 253, 244, 0.94);
}

#reconDifferenceCard.is-match strong,
#reconDifferenceCard.is-match small {
  color: #15803d;
}

#reconDifferenceCard.is-warning {
  border-color: rgba(220, 38, 38, 0.3);
  background: rgba(254, 242, 242, 0.94);
}

#reconDifferenceCard.is-warning strong,
#reconDifferenceCard.is-warning small {
  color: #dc2626;
}

.finance-summary-groups {
  display: grid;
  gap: 10px;
}

.finance-summary-group {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid rgba(92, 56, 244, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.65);
}

.finance-summary-group h3 {
  margin: 0;
  font-size: 0.76rem;
  color: var(--purple-dark);
}

#financeDifferenceCard.is-match {
  border-color: rgba(22, 163, 74, 0.3);
  background: rgba(240, 253, 244, 0.94);
}

#financeDifferenceCard.is-match strong,
#financeDifferenceCard.is-match small {
  color: #15803d;
}

#financeDifferenceCard.is-warning {
  border-color: rgba(220, 38, 38, 0.3);
  background: rgba(254, 242, 242, 0.94);
}

#financeDifferenceCard.is-warning strong,
#financeDifferenceCard.is-warning small {
  color: #dc2626;
}

.finance-warning {
  padding: 8px 10px;
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 9px;
  color: #92400e;
  background: #fffbeb;
  font-size: 0.75rem;
  font-weight: 700;
}

.cny-inflow-history {
  display: grid;
  gap: 7px;
  padding-top: 9px;
  border-top: 1px solid rgba(92, 56, 244, 0.1);
}

.cny-inflow-history > strong {
  font-size: 0.76rem;
  color: var(--purple-dark);
}

.cny-inflow-history-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  font-size: 0.74rem;
  color: var(--muted);
}

.cny-inflow-history-row {
  display: grid;
  gap: 3px;
  padding: 8px 9px;
  border: 1px solid rgba(92, 56, 244, 0.1);
  border-radius: 9px;
  background: #fff;
}

.cny-inflow-history-row strong {
  color: var(--text);
}

.cny-inflow-history-row small {
  color: var(--muted);
}

.alipay-settlement-group-cell {
  min-width: 132px;
  vertical-align: middle;
}

.alipay-settlement-toggle {
  display: grid;
  justify-items: center;
  gap: 6px;
  width: 100%;
  border: 0;
  padding: 8px 6px;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
}

.alipay-settlement-toggle strong {
  font-size: 0.74rem;
}

.alipay-toggle-track {
  position: relative;
  display: block;
  width: 44px;
  height: 24px;
  border-radius: 999px;
  transition: background 160ms ease;
}

.alipay-toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 7px rgba(15, 23, 42, 0.28);
  transition: transform 160ms ease;
}

.alipay-settlement-toggle.settled {
  color: #08783f;
  background: rgba(34, 197, 94, 0.10);
}

.alipay-settlement-toggle.settled .alipay-toggle-track {
  background: #22c55e;
}

.alipay-settlement-toggle.settled .alipay-toggle-thumb {
  transform: translateX(20px);
}

.alipay-settlement-toggle.unsettled {
  color: #dc2626;
  background: rgba(239, 68, 68, 0.10);
}

.alipay-settlement-toggle.unsettled .alipay-toggle-track {
  background: #ef4444;
}

.alipay-settlement-waiting {
  display: inline-flex;
  padding: 6px 8px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(148, 163, 184, 0.13);
  font-size: 0.7rem;
  font-weight: 700;
  text-align: center;
}

/* Order Data card redesign */
.order-page-title-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.order-page-icon {
  display: inline-grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 15px;
  color: #fff;
  font-size: 1.5rem;
  background: linear-gradient(135deg, #7048f5, #4c25d6);
  box-shadow: 0 12px 25px rgba(92, 56, 244, 0.25);
}

.mobile-sales-menu-button {
  display: none;
}

.order-list-heading {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 10px !important;
}

.sales-detail-panel {
  background: rgba(255, 255, 255, 0.72);
}

.order-card-list {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.order-card-empty {
  padding: 42px 20px;
  border: 1px dashed rgba(92, 56, 244, 0.20);
  border-radius: 16px;
  color: var(--muted);
  background: #fff;
  text-align: center;
}

.order-data-card {
  --order-tone: #7657f5;
  --order-tone-soft: rgba(118, 87, 245, 0.045);
  --order-tone-border: rgba(118, 87, 245, 0.24);
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--order-tone-border);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 5px 18px rgba(38, 48, 82, 0.07);
}

.order-status-ready {
  --order-tone: #7666a8;
  --order-tone-soft: rgba(118, 102, 168, 0.14);
  --order-tone-border: rgba(118, 102, 168, 0.38);
}

.order-status-sent {
  --order-tone: #3b82c4;
  --order-tone-soft: rgba(59, 130, 196, 0.15);
  --order-tone-border: rgba(59, 130, 196, 0.42);
}

.order-status-hold {
  --order-tone: #b58a22;
  --order-tone-soft: rgba(181, 138, 34, 0.16);
  --order-tone-border: rgba(181, 138, 34, 0.45);
}

.order-status-waiting {
  --order-tone: #d47724;
  --order-tone-soft: rgba(212, 119, 36, 0.16);
  --order-tone-border: rgba(212, 119, 36, 0.46);
}

.order-status-completed {
  --order-tone: #269467;
  --order-tone-soft: rgba(38, 148, 103, 0.15);
  --order-tone-border: rgba(38, 148, 103, 0.44);
}

.order-status-cancelled {
  --order-tone: #c65b67;
  --order-tone-soft: rgba(198, 91, 103, 0.15);
  --order-tone-border: rgba(198, 91, 103, 0.42);
}

.order-card-entry {
  border-left: 4px solid var(--order-tone);
  background: linear-gradient(105deg, var(--order-tone-soft), rgba(255, 255, 255, 0.8) 58%);
}

.order-card-entry .order-card-header {
  background: linear-gradient(90deg, var(--order-tone-soft), #fff 38%, #fcfbff);
}

.merged-order-card {
  border-width: 2px;
  box-shadow: 0 8px 24px rgba(38, 48, 82, 0.10), 0 0 0 3px var(--order-tone-soft);
}

.merged-order-card .order-card-entry + .order-card-entry {
  border-top: 4px solid var(--order-tone-border);
}

.merged-order-card .order-card-entry {
  background-color: var(--order-tone-soft);
  background-image: linear-gradient(90deg, var(--order-tone-soft), rgba(255, 255, 255, 0.72) 48%);
}

.merged-order-badge {
  padding: 5px 8px;
  border: 1px solid var(--order-tone-border);
  border-radius: 999px;
  background: var(--order-tone-soft);
  color: var(--order-tone);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.merged-order-card .order-no-pill {
  box-shadow: inset 0 0 0 1px var(--order-tone-border);
}

.order-card-entry + .order-card-entry {
  border-top: 3px solid var(--order-tone-border);
}

.order-card-entry.order-row-dirty {
  background: rgba(59, 130, 246, 0.025);
}

.order-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 11px 16px;
  border-bottom: 1px solid rgba(92, 56, 244, 0.10);
  background: linear-gradient(180deg, #fff, #fcfbff);
}

.order-card-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex-wrap: wrap;
}

.order-card-date {
  color: #68748f;
  font-size: 0.82rem;
  font-weight: 600;
}

.order-card-grid {
  display: grid;
  grid-template-columns: 1.08fr 1.08fr 1fr 1.12fr 0.82fr 1fr;
  min-width: 0;
  padding: 14px 10px;
}

.order-card-section {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
  padding: 0 14px;
}

.order-card-section + .order-card-section {
  border-left: 1px solid #e8eaf3;
}

.order-card-section h3 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 4px;
  color: #28324a;
  font-size: 0.88rem;
  font-weight: 800;
}

.order-card-section h3 span {
  color: var(--purple);
  font-size: 1rem;
}

.order-card-detail,
.pricing-detail {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.order-card-detail > span,
.pricing-detail > span,
.order-card-field > span {
  color: #778198;
  font-size: 0.7rem;
  font-weight: 600;
}

.order-card-detail strong,
.pricing-detail strong {
  overflow-wrap: anywhere;
  color: #263149;
  font-size: 0.81rem;
  line-height: 1.35;
}

.pricing-detail {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.pricing-detail > span {
  font-size: 0.75rem;
}

.pricing-detail strong {
  text-align: right;
}

.pricing-detail.pricing-editable {
  gap: 8px;
}

.pricing-input-wrap {
  display: grid;
  grid-template-columns: auto minmax(64px, 92px) auto;
  align-items: center;
  gap: 4px;
  color: #263149;
  font-size: 0.75rem;
  font-weight: 700;
}

.sales-detail-panel .pricing-rate-input {
  width: 100%;
  min-width: 0;
  height: 32px;
  padding: 5px 7px;
  border-radius: 8px;
  text-align: right;
  font-size: 0.76rem;
}

.pricing-input-wrap small {
  white-space: nowrap;
  color: #778198;
  font-size: 0.66rem;
}

.order-input-dialog {
  width: min(960px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: transparent;
  box-shadow: 0 28px 80px rgba(17, 27, 45, 0.28);
}

.order-input-dialog::backdrop {
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(3px);
}

.order-input-modal {
  display: grid;
  gap: 16px;
  padding: 22px;
  background: #fff;
  color: #172033;
}

.order-input-header,
.order-input-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.order-input-header h2,
.order-input-header p {
  margin: 0;
}

.order-input-header p {
  margin-top: 4px;
  color: #718096;
  font-size: 0.82rem;
}

.order-input-fields {
  display: grid;
  grid-template-columns: minmax(280px, 1.5fr) minmax(150px, 0.6fr) auto;
  align-items: end;
  gap: 12px;
}

.order-allocation-message {
  padding: 10px 12px;
  border-radius: 10px;
  background: #f4f1ff;
  color: #5936d8;
  font-size: 0.82rem;
  font-weight: 700;
}

.order-allocation-message.error {
  background: #fff1f2;
  color: #dc2626;
}

.order-allocation-list {
  display: grid;
  gap: 8px;
  max-height: 420px;
  overflow: auto;
}

.order-allocation-row {
  display: grid;
  grid-template-columns: 28px minmax(130px, 1.1fr) repeat(2, minmax(92px, 0.65fr)) repeat(3, minmax(76px, 0.5fr)) minmax(120px, 0.8fr);
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid #e5e7f0;
  border-radius: 11px;
  background: #fbfbfe;
}

.order-allocation-row.selected {
  border-color: #7657f5;
  background: #f7f4ff;
}

.order-allocation-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

.order-allocation-cell {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.order-allocation-cell span {
  color: #7b8498;
  font-size: 0.65rem;
  text-transform: uppercase;
}

.order-allocation-cell strong {
  overflow-wrap: anywhere;
  font-size: 0.78rem;
}

.order-allocation-method strong {
  color: #5936d8;
}

.order-input-footer {
  padding-top: 14px;
  border-top: 1px solid #e8eaf2;
  font-weight: 800;
}

@media (max-width: 760px) {
  .order-input-modal {
    padding: 16px;
  }
  .order-input-fields,
  .order-allocation-row {
    grid-template-columns: 1fr;
  }
  .order-allocation-row {
    position: relative;
    padding-left: 42px;
  }
  .order-allocation-row > input[type="checkbox"] {
    position: absolute;
    top: 14px;
    left: 14px;
  }
  .order-input-footer {
    align-items: stretch;
    flex-direction: column;
  }
}

.pricing-detail.profit-value {
  padding-top: 7px;
  border-top: 1px dashed #d9dceb;
}

.pricing-detail.profit-value strong {
  color: #16a34a;
  font-weight: 800;
}

.pricing-detail.pricing-divider {
  padding-top: 7px;
  border-top: 1px dashed #d9dceb;
}

.pricing-detail.total-idr-highlight {
  margin-top: 2px;
  padding: 10px;
  border-radius: 9px;
  background: rgba(92, 56, 244, 0.09);
}

.pricing-detail.total-idr-highlight span,
.pricing-detail.total-idr-highlight strong {
  color: #5429d8;
  font-weight: 800;
}

.order-card-field {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.sales-detail-panel .order-card-field .table-input,
.sales-detail-panel .status-section .table-input {
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 7px 9px;
  border-radius: 9px;
  font-size: 0.78rem;
}

.gold-highlight .gold-qty-input {
  color: #db8300;
  font-size: 1rem !important;
  font-weight: 800 !important;
  border-color: rgba(245, 158, 11, 0.28) !important;
  background: rgba(255, 248, 230, 0.9) !important;
}

.bijiaqi-order-synced strong {
  color: #078348 !important;
}

.bijiaqi-order-pending strong {
  color: #b7791f !important;
  font-size: 0.72rem !important;
}

.bijiaqi-api-status strong {
  color: #b7791f;
}

.bijiaqi-api-status.status-completed strong {
  color: #078348;
}

.bijiaqi-api-status[class*="status-canceled"] strong,
.bijiaqi-api-status.status-in-dispute strong {
  color: #c62828;
}

.bijiaqi-video-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px dashed #7c5cff;
  border-radius: 8px;
  color: #5936d8;
  background: #f7f4ff;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.bijiaqi-video-link.disabled {
  cursor: not-allowed;
  opacity: 0.62;
  pointer-events: none;
}

.bijiaqi-order-input {
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.bijiaqi-action-status {
  grid-column: 1 / -1;
  padding: 7px 9px;
  border: 1px solid rgba(91, 62, 228, 0.2);
  border-radius: 8px;
  background: rgba(91, 62, 228, 0.07);
  color: #5b3ee4;
  font-size: 0.68rem;
  line-height: 1.35;
  text-align: center;
}

.bijiaqi-action-status.completed {
  border-color: rgba(7, 131, 72, 0.25);
  background: rgba(7, 131, 72, 0.08);
  color: #078348;
}

.bijiaqi-action-status.problem {
  border-color: rgba(198, 40, 40, 0.25);
  background: rgba(198, 40, 40, 0.07);
  color: #c62828;
}

.bijiaqi-action-status.pending {
  border-color: rgba(183, 121, 31, 0.25);
  background: rgba(183, 121, 31, 0.08);
  color: #9a6700;
}

.telegram-accent-input,
.telegram-value strong {
  color: #2563eb !important;
}

.payment-safety-note {
  margin-top: 2px;
  padding: 8px 9px;
  border: 1px solid rgba(37, 99, 235, 0.15);
  border-radius: 8px;
  color: #31517f;
  background: rgba(37, 99, 235, 0.06);
  font-size: 0.65rem;
  line-height: 1.3;
}

.status-section .status-cell {
  display: grid;
  gap: 9px;
}

.status-section .video-status-note.waiting,
.status-section .video-status-note.hold {
  display: grid;
  place-items: center;
  min-height: 78px;
  padding: 10px;
  border: 1px solid rgba(245, 158, 11, 0.38);
  border-radius: 12px;
  color: #a85f00;
  background: rgba(255, 247, 225, 0.9);
  font-size: 0.82rem;
  font-weight: 800;
  text-align: center;
}

.order-alipay-block {
  margin-top: 4px;
}

.order-card-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.order-card-actions .copy-button,
.order-card-actions .sell-link {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 8px 7px;
  border-radius: 8px;
  font-size: 0.72rem;
}

.order-card-actions .action-save,
.order-card-actions .sell-link {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--purple), var(--purple-dark));
}

.order-card-actions .edit-row-button,
.order-card-actions .seller-copy-button {
  color: var(--purple);
  border-color: rgba(92, 56, 244, 0.42);
  background: #fff;
}

.order-card-actions .delete-row-button {
  color: #dc2626;
  border-color: rgba(239, 68, 68, 0.42);
  background: #fff;
}

.order-card-actions .seller-send-button {
  color: #2563eb;
  border-color: rgba(37, 99, 235, 0.38);
  background: #fff;
}

.order-card-actions .action-wide {
  grid-column: 1 / -1;
}

.order-card-entry.order-row-locked .table-input:disabled {
  color: #4b5563;
  opacity: 0.82;
  background: #f6f7fb;
}

@media (min-width: 1181px) {
  body.sales-order-page .sales-headbar-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  body.sales-order-page .unsettled-headbar-stat {
    grid-column: auto;
  }
}

/* Tablet: keep cards readable — avoid 3-column squeeze that overlaps controls */
@media (max-width: 1180px) {
  .order-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 12px;
  }

  .order-card-section:nth-child(odd) {
    border-left: 0;
  }

  .order-card-section:nth-child(n + 3) {
    border-top: 1px solid #e8eaf3;
    margin-top: 4px;
    padding-top: 14px;
  }
}

@media (max-width: 980px) {
  body.sales-order-page .order-card-grid {
    grid-template-columns: 1fr;
    padding: 4px 10px 10px;
    row-gap: 0;
  }

  body.sales-order-page .order-card-section + .order-card-section,
  body.sales-order-page .order-card-section:nth-child(n) {
    border-left: 0;
    border-top: 1px solid #e8eaf3;
  }

  body.sales-order-page .order-card-section {
    gap: 4px;
    padding: 8px 0;
  }

  body.sales-order-page .order-card-section h3 {
    margin: 0 0 2px;
    font-size: 0.72rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
  }

  body.sales-order-page .order-card-section h3 span {
    font-size: 0.78rem;
  }

  body.sales-order-page .order-card-detail {
    grid-template-columns: minmax(72px, 0.85fr) minmax(0, 1.15fr);
    align-items: baseline;
    column-gap: 8px;
    row-gap: 0;
  }

  body.sales-order-page .order-card-detail > span {
    font-size: 0.62rem;
  }

  body.sales-order-page .order-card-detail strong {
    font-size: 0.74rem;
    text-align: right;
    line-height: 1.25;
  }

  body.sales-order-page .order-card-field {
    gap: 2px;
  }

  body.sales-order-page .order-card-field > span {
    font-size: 0.62rem;
  }

  body.sales-order-page .sales-detail-panel .order-card-field .table-input,
  body.sales-order-page .sales-detail-panel .status-section .table-input {
    height: 32px;
    padding: 5px 8px;
    font-size: 0.74rem;
  }

  body.sales-order-page .gold-highlight .gold-qty-input {
    font-size: 0.88rem !important;
  }

  body.sales-order-page .bijiaqi-video-link {
    min-height: 30px;
    padding: 5px 8px;
    font-size: 0.68rem;
  }

  body.sales-order-page .pricing-detail {
    gap: 2px 8px;
    padding: 1px 0;
  }

  body.sales-order-page .pricing-detail > span {
    font-size: 0.66rem;
  }

  body.sales-order-page .pricing-detail strong {
    font-size: 0.74rem;
  }

  body.sales-order-page .pricing-detail.total-idr-highlight,
  body.sales-order-page .pricing-detail.total-profit-highlight {
    margin-top: 2px;
    padding: 6px 8px;
  }

  body.sales-order-page .pricing-detail.pricing-divider,
  body.sales-order-page .pricing-detail.profit-value {
    padding-top: 4px;
  }

  body.sales-order-page .sales-detail-panel .pricing-rate-input {
    height: 28px;
    font-size: 0.72rem;
  }

  body.sales-order-page .payment-safety-note {
    padding: 6px 8px;
    font-size: 0.68rem;
  }

  body.sales-order-page .order-card-header {
    min-height: 0;
    padding: 8px 10px;
    gap: 6px;
  }

  body.sales-order-page .order-card-identity {
    gap: 6px;
  }

  body.sales-order-page .order-no-pill,
  body.sales-order-page .work-admin-badge,
  body.sales-order-page .order-card-date {
    font-size: 0.68rem;
  }

  body.sales-order-page .order-card-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  body.sales-order-page .order-card-actions .copy-button,
  body.sales-order-page .order-card-actions .sell-link {
    min-height: 36px;
    padding: 6px 6px;
    font-size: 0.72rem;
    line-height: 1.15;
    white-space: normal;
  }

  body.sales-order-page .order-card-actions .action-wide {
    grid-column: 1 / -1;
  }

  body.sales-order-page .bijiaqi-action-status {
    padding: 5px 7px;
    font-size: 0.62rem;
  }

  body.sales-order-page .sales-control-panel .filters-grid,
  body.sales-order-page .sales-filters-inline {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  body.sales-order-page .sales-filter-actions-inline {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  body.sales-order-page .hero-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
  }

  body.sales-order-page .hero-actions .bijiaqi-notification-wrap {
    grid-column: 1 / -1;
    justify-self: stretch;
  }

  body.sales-order-page .hero-actions .bijiaqi-notification-wrap .notification-bell-button {
    width: 100%;
  }

  body.sales-order-page .hero-actions .bijiaqi-notification-wrap,
  body.sales-order-page .hero-actions .mobile-sales-menu-button {
    min-width: 0;
  }

  body.sales-order-page #openOrderInputButton {
    grid-column: 1 / -1;
  }

  body.sales-order-page #exportSalesXlsxButton {
    grid-column: 1 / -1;
  }

  body.sales-order-page #syncBijiaqiOrdersButton,
  body.sales-order-page #refreshSalesButton {
    min-width: 0;
  }

  body.sales-order-page .hero-actions button,
  body.sales-order-page .hero-actions .notification-bell-button {
    width: 100%;
    min-width: 0;
    min-height: 42px;
  }

  body.sales-order-page .order-list-heading {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  body.sales-order-page .sales-profit-audit-total {
    width: 100%;
    white-space: normal;
  }

  body.sales-order-page .pricing-input-wrap {
    grid-template-columns: auto minmax(0, 1fr) auto;
    width: 100%;
  }
}

@media (max-width: 760px) {
  body.sales-order-page {
    overflow-x: hidden;
  }

  body.sales-order-page .layout-shell {
    display: block;
    min-width: 0;
  }

  body.sales-order-page .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1000;
    width: min(310px, 86vw);
    height: 100dvh;
    transform: translateX(-105%);
    transition: transform 180ms ease;
    box-shadow: 18px 0 45px rgba(8, 18, 40, 0.30);
  }

  body.sales-order-page.sales-mobile-menu-open .sidebar {
    transform: translateX(0);
  }

  body.sales-order-page.sales-mobile-menu-open::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 999;
    background: rgba(10, 18, 38, 0.48);
  }

  body.sales-order-page .main-shell {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 12px;
  }

  body.sales-order-page .main-shell > *,
  body.sales-order-page .panel,
  body.sales-order-page .sales-headbar,
  body.sales-order-page .order-data-card,
  body.sales-order-page .order-card-entry,
  body.sales-order-page .order-card-grid,
  body.sales-order-page .order-card-section {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  body.sales-order-page .hero {
    align-items: stretch;
    gap: 12px;
    padding: 14px;
  }

  body.sales-order-page .hero-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  body.sales-order-page .hero-actions button {
    width: 100%;
    min-width: 0;
    padding-inline: 8px;
    font-size: 0.82rem;
  }

  .mobile-sales-menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  body.sales-order-page .hero-actions .bijiaqi-notification-wrap {
    grid-column: auto;
  }

  body.sales-order-page .hero-actions .mobile-sales-menu-button {
    grid-column: auto;
  }

  body.sales-order-page .sales-headbar {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  body.sales-order-page .sales-headbar-summary {
    min-width: 0;
    padding-left: 10px;
  }

  body.sales-order-page .sales-headbar-stats {
    grid-template-columns: 1fr;
  }

  body.sales-order-page .sales-headbar-stat {
    min-width: 0;
  }

  body.sales-order-page .sales-headbar-stat strong {
    font-size: 1.08rem;
    overflow-wrap: anywhere;
  }

  body.sales-order-page .headbar-inline-note {
    overflow-wrap: anywhere;
  }

  body.sales-order-page .sales-headbar-side {
    justify-content: flex-start;
  }

  body.sales-order-page .sales-headbar-side small {
    white-space: normal;
  }

  body.sales-order-page .cny-reconciliation-entry,
  body.sales-order-page .cny-reconciliation-summary,
  body.sales-order-page .cny-inflow-history-list {
    grid-template-columns: 1fr;
  }

  body.sales-order-page .sales-control-panel .panel-grid,
  body.sales-order-page .sales-filters-inline {
    grid-template-columns: 1fr;
  }

  body.sales-order-page .sales-filter-actions-inline {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    min-width: 0;
  }

  body.sales-order-page .sales-filter-actions-inline button {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    padding-inline: 8px;
  }

  body.sales-order-page .sales-detail-panel {
    padding: 12px;
  }

  body.sales-order-page .table-footer {
    grid-template-columns: 1fr auto;
    gap: 12px;
  }

  body.sales-order-page .table-footer .rows-inline {
    display: none;
  }

  body.sales-order-page .table-headline {
    align-items: flex-start;
  }

  .order-card-header,
  .order-card-identity {
    align-items: flex-start;
  }

  .order-card-header {
    display: grid;
    gap: 6px;
    min-height: 0;
    padding: 8px 10px;
  }

  .order-card-identity {
    gap: 6px;
  }

  .order-card-grid {
    grid-template-columns: 1fr;
    padding: 2px 10px 8px;
  }

  .order-card-detail,
  .pricing-detail,
  .order-card-field,
  .order-card-actions {
    max-width: 100%;
    min-width: 0;
  }

  .order-card-section {
    gap: 4px;
    padding: 7px 0;
  }

  .order-card-section + .order-card-section,
  .order-card-section:nth-child(4) {
    border-left: 0;
    border-top: 1px solid #e8eaf3;
    margin-top: 0;
    padding-top: 7px;
  }

  .order-card-actions .copy-button,
  .order-card-actions .sell-link {
    min-height: 36px;
    font-size: 0.72rem;
  }

  .sales-headbar-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .unsettled-headbar-stat {
    grid-column: 1 / -1;
  }

  body.sales-order-page .order-card-actions {
    grid-template-columns: 1fr 1fr;
  }

  body.sales-order-page .status-section .status-cell,
  body.sales-order-page .order-alipay-block,
  body.sales-order-page .bijiaqi-video-link {
    width: 100%;
    max-width: 100%;
  }

  body.sales-order-page .bijiaqi-action-status {
    grid-column: 1 / -1;
    overflow-wrap: anywhere;
  }
}

.sales-filter-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.sales-filter-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
}

.sales-filter-badge.violet {
  color: #e9e0ff;
  background: rgba(92, 56, 244, 0.20);
  border-color: rgba(147, 119, 255, 0.28);
}

.sales-filter-badge.blue {
  color: #d8ebff;
  background: rgba(37, 99, 235, 0.18);
  border-color: rgba(96, 165, 250, 0.28);
}

.sales-filter-badge.orange {
  color: #fff0cc;
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(251, 191, 36, 0.26);
}

.sales-filter-badge.green {
  color: #ddffe9;
  background: rgba(22, 163, 74, 0.18);
  border-color: rgba(74, 222, 128, 0.26);
}

.sales-filter-badge.red {
  color: #ffe1e1;
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(248, 113, 113, 0.26);
}

.sales-control-panel,
.sales-action-panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(248, 250, 255, 0.94));
}

.sales-control-panel {
  padding: 10px 12px;
}

.sales-control-panel .filters-grid {
  grid-template-columns: minmax(180px, 1.5fr) minmax(120px, 0.9fr) minmax(132px, 0.8fr) minmax(132px, 0.8fr) minmax(130px, 0.9fr) 92px auto;
  gap: 8px;
  align-items: end;
}

.sales-control-panel .field {
  gap: 4px;
}

.sales-control-panel .field span {
  font-size: 0.72rem;
}

.sales-control-panel .field input,
.sales-control-panel .field select {
  height: 36px;
  min-width: 0;
  padding: 7px 9px;
  border-radius: 10px;
  font-size: 0.8rem;
}

.sales-status-filter {
  position: relative;
  min-width: 0;
}

.sales-status-filter .multi-filter-trigger {
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 7px 9px;
  border-radius: 10px;
  font-size: 0.8rem;
  text-align: left;
}

.sales-status-menu {
  top: calc(100% + 6px);
  right: auto;
  left: 0;
  z-index: 90;
  width: max(100%, 230px);
  max-width: min(300px, 86vw);
  padding: 7px;
}

.sales-status-menu .multi-filter-list {
  max-height: 230px;
}

.sales-control-panel .panel-actions {
  margin-top: 0;
}

.sales-control-panel .primary-button,
.sales-control-panel .ghost-button {
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 0.78rem;
}

/* Tablet lebar saja — di bawah 981px filter sudah 1 kolom (lihat block sales mobile) */
@media (max-width: 1279px) and (min-width: 981px) {
  .sales-control-panel .filters-grid {
    grid-template-columns: minmax(180px, 1.4fr) minmax(130px, 1fr) repeat(2, minmax(130px, 0.85fr));
    gap: 8px;
  }

  .sales-filter-actions-inline {
    gap: 6px;
  }

  .sales-control-panel .primary-button,
  .sales-control-panel .ghost-button {
    padding-inline: 9px;
  }
}

.proof-preview-modal.hidden {
  display: none;
}

.transfer-operation-popup {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(8, 17, 37, 0.64);
  backdrop-filter: blur(5px);
}

.transfer-operation-popup-card {
  width: min(460px, 100%);
  padding: 24px;
  border: 1px solid rgba(239, 68, 68, 0.24);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 28px 70px rgba(8, 17, 37, 0.34);
}

.transfer-operation-popup.warning .transfer-operation-popup-card {
  border-color: rgba(245, 158, 11, 0.38);
}

.transfer-operation-popup-card h3 {
  margin: 0 0 10px;
  color: #dc2626;
  font-size: 1.15rem;
}

.transfer-operation-popup.warning .transfer-operation-popup-card h3 {
  color: #b45309;
}

.transfer-operation-popup-card p {
  margin: 0 0 18px;
  color: #4b5563;
  line-height: 1.55;
  white-space: pre-line;
}

.transfer-operation-popup-card button {
  width: 100%;
}

.proof-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
}

.proof-preview-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 18, 32, 0.56);
  backdrop-filter: blur(3px);
}

.proof-preview-card {
  position: relative;
  z-index: 1;
  width: min(1080px, calc(100vw - 40px));
  margin: 32px auto;
  border: 1px solid rgba(92, 56, 244, 0.12);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 80px rgba(19, 28, 55, 0.22);
  overflow: hidden;
}

.proof-preview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at top right, rgba(92, 56, 244, 0.09), transparent 30%),
    linear-gradient(180deg, rgba(245, 247, 255, 0.98), rgba(255, 255, 255, 0.98));
}

.proof-preview-head strong {
  display: block;
  font-size: 1rem;
}

.proof-preview-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.proof-preview-close {
  min-width: 88px;
}

.proof-preview-body {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.8fr);
  gap: 18px;
  padding: 18px 20px 20px;
  max-height: calc(100vh - 110px);
}

.proof-preview-image-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 360px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, #fcfdff, #f6f8ff);
  overflow: auto;
}

.proof-preview-image {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 180px);
  object-fit: contain;
}

.proof-preview-side {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 14px;
  min-width: 0;
}

.proof-preview-box {
  display: grid;
  gap: 8px;
}

.proof-preview-label {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #3b4b71;
}

.proof-preview-caption {
  width: 100%;
  min-height: 220px;
  resize: none;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fbfcff;
  color: var(--text);
  line-height: 1.5;
}

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

.proof-preview-actions .primary-button,
.proof-preview-actions .ghost-button {
  min-width: 130px;
}

.sales-filter-actions-inline {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: nowrap;
}

.sales-action-grid {
  grid-template-columns: 1.2fr 1.2fr 1fr;
  align-items: end;
}

.hidden-selection-panel[hidden] {
  display: none !important;
}

.sales-action-buttons {
  display: grid;
  gap: 10px;
}

.sales-merge-button {
  color: var(--purple);
  border-color: rgba(92, 56, 244, 0.18);
  background: rgba(92, 56, 244, 0.06);
}

.sales-delete-button {
  color: var(--red);
  border-color: rgba(239, 68, 68, 0.18);
  background: rgba(239, 68, 68, 0.06);
}

.sales-panel-note {
  justify-content: flex-start;
  margin-top: 14px;
}

.sales-panel-note span {
  color: var(--muted);
  font-size: 0.9rem;
}

.sales-summary-panel {
  border-color: rgba(92, 56, 244, 0.10);
}

.sales-summary-panel .table-wrap,
.sales-detail-panel .table-wrap {
  border-color: rgba(92, 56, 244, 0.10);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 255, 0.98));
}

.sales-summary-panel table,
.sales-detail-panel table {
  min-width: 1480px;
}

.sales-summary-panel thead,
.sales-detail-panel thead {
  background: linear-gradient(180deg, #f3f1ff, #f8f7ff);
}

.sales-summary-panel th,
.sales-detail-panel th {
  color: #4b3ea8;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sales-summary-panel td,
.sales-detail-panel td {
  font-size: 0.92rem;
}

.sales-summary-panel tbody tr:nth-child(even),
.sales-detail-panel tbody tr:nth-child(even) {
  background: rgba(92, 56, 244, 0.018);
}

.sales-summary-panel tbody tr:hover,
.sales-detail-panel tbody tr:hover {
  background: rgba(92, 56, 244, 0.05);
}

.sales-detail-panel .table-input {
  min-width: 84px;
  height: 34px;
  padding: 6px 9px;
  font-size: 0.8rem;
  font-weight: 600;
  border-color: rgba(92, 56, 244, 0.12);
  background: rgba(255, 255, 255, 0.98);
}

.sales-detail-panel .action-group.stacked {
  min-width: 110px;
}

.single-order-grid {
  grid-template-columns: 1.1fr 0.9fr;
}

.order-no-group-cell,
.seller-telegram-group-cell,
.seller-bank-group-cell {
  vertical-align: top;
  background: rgba(92, 56, 244, 0.02);
}

.order-no-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  min-height: 30px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--purple);
  background: rgba(92, 56, 244, 0.10);
  border: 1px solid rgba(92, 56, 244, 0.18);
}

.seller-telegram-input {
  display: block;
  min-width: 112px;
  width: 120px;
  margin-top: 0;
}

.seller-bank-input {
  display: block;
  min-width: 124px;
  width: 132px;
  margin-top: 0;
}

.seller-account-group-cell {
  vertical-align: top;
  background: rgba(92, 56, 244, 0.02);
}

.seller-account-input {
  display: block;
  min-width: 130px;
  width: 144px;
  margin-top: 0;
}

.gold-cell {
  width: 72px;
}

.gold-qty-input {
  min-width: 54px;
  width: 60px;
  text-align: center;
  padding-left: 6px;
  padding-right: 6px;
}

.buyer-id-input {
  min-width: 88px;
  width: 96px;
}

.delivery-via-input {
  min-width: 78px;
  width: 84px;
}

.buy-cny-cell {
  white-space: nowrap;
}

.order-no-group-cell {
  width: 52px;
}

.seller-copy-button {
  border-color: rgba(37, 99, 235, 0.16);
  background: rgba(37, 99, 235, 0.06);
  color: var(--blue);
}

.edit-row-button {
  border-color: rgba(245, 158, 11, 0.2);
  background: rgba(245, 158, 11, 0.08);
  color: #b45309;
}

.delete-row-button {
  border-color: rgba(239, 68, 68, 0.18);
  background: rgba(239, 68, 68, 0.08);
  color: #b91c1c;
}

.sales-detail-panel th,
.sales-detail-panel td {
  padding: 7px 8px;
}

.sales-detail-panel td.seller-telegram-group-cell,
.sales-detail-panel td.seller-bank-group-cell,
.sales-detail-panel td.order-no-group-cell {
  padding-top: 7px;
}

.order-row td {
  border-bottom: 1px solid rgba(226, 232, 255, 0.9);
}

.order-row-locked td {
  background: rgba(148, 163, 184, 0.10);
}

.order-row-editing td {
  background: rgba(245, 158, 11, 0.08);
}

.order-row-dirty td {
  background: rgba(59, 130, 246, 0.06);
}

.order-group-start td {
  border-top: 2px solid rgba(92, 56, 244, 0.10);
}

.order-group-child td {
  background: rgba(92, 56, 244, 0.012);
}

.order-group-end td {
  border-bottom: 1px solid rgba(92, 56, 244, 0.18);
}

.order-action-group {
  gap: 6px;
  flex-wrap: wrap;
}

.order-action-cell {
  display: grid;
  gap: 6px;
  align-content: start;
}

.order-action-notes {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  min-height: 24px;
}

.order-action-group .copy-button,
.order-action-group .sell-link {
  min-width: 84px;
  padding: 9px 12px;
}

.order-unsaved-note {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #1d4ed8;
  background: rgba(59, 130, 246, 0.10);
  border: 1px solid rgba(59, 130, 246, 0.18);
}

.order-unsaved-note[hidden] {
  display: none;
}

.order-saved-note {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #166534;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.order-saved-note[hidden] {
  display: none;
}

.status-cell {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.video-status-note {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
}

.video-status-note.waiting {
  color: #92400e;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.video-status-note.done {
  color: #166534;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.video-status-note.hold {
  color: #6d28d9;
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.22);
}

.transfer-action-button {
  min-width: 150px;
  padding: 10px 14px;
}

.transfer-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}

.transfer-status-badge.waiting {
  color: #92400e;
  background: rgba(245, 158, 11, 0.15);
}

.transfer-status-badge.paid {
  color: #166534;
  background: rgba(34, 197, 94, 0.15);
}

.transfer-status-badge.completed {
  color: #166534;
  background: rgba(34, 197, 94, 0.15);
}

.transfer-status-badge.hold {
  color: #6d28d9;
  background: rgba(139, 92, 246, 0.15);
}

.transfer-status-stack {
  display: grid;
  gap: 6px;
}

.transfer-hold-note {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
}

.transfer-hold-note.waiting {
  color: #6d28d9;
  background: rgba(139, 92, 246, 0.10);
}

.transfer-hold-note.done {
  color: #166534;
  background: rgba(34, 197, 94, 0.12);
}

.transfer-section-row td {
  padding: 10px 12px;
  background: linear-gradient(180deg, #f5f2ff, #f9f8ff);
  border-bottom: 1px solid rgba(92, 56, 244, 0.12);
}

.transfer-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.82rem;
  font-weight: 800;
  color: #4b3ea8;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.transfer-section-title span {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 700;
}

.transfer-headline-main {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.transfer-count-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.transfer-summary-headbar .sales-headbar-title {
  color: #f59e0b;
}

.transfer-summary-headbar .sales-headbar-summary {
  border-left-color: #f59e0b;
}

.transfer-headbar-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.transfer-summary-headbar .sales-headbar-stat strong {
  color: #111827;
}

.transfer-row-completed td {
  background: rgba(34, 197, 94, 0.04);
}

.transfer-section-empty td {
  color: var(--muted);
  background: #fff;
}

.transfer-row-group-start td {
  border-top: 2px solid rgba(92, 56, 244, 0.18);
}

.transfer-row-group-child td {
  background: rgba(92, 56, 244, 0.018);
}

.transfer-row-group-end td {
  border-bottom: 1px solid rgba(92, 56, 244, 0.24);
}

.sales-detail-panel .transfer-row-group-start:hover td,
.sales-detail-panel .transfer-row-group-child:hover td,
.sales-detail-panel .transfer-row-group-end:hover td {
  background: rgba(92, 56, 244, 0.05);
}

.transfer-account-cell {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.transfer-breakdown-cell {
  min-width: 170px;
}

.transfer-breakdown {
  display: grid;
  gap: 4px;
}

.transfer-breakdown-line {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
  text-transform: none;
}

.transfer-breakdown-line.total {
  color: #6b7280;
}

.transfer-breakdown-line.fee {
  color: #dc2626;
}

.transfer-breakdown-line.final {
  color: #15803d;
  font-size: 0.86rem;
  font-weight: 800;
}

.transfer-breakdown-line.warning {
  color: #b91c1c;
  font-size: 0.74rem;
  font-weight: 800;
}

.transfer-copy-badge {
  min-width: auto;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
}

.transfer-mobile-list {
  display: none;
}

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

  .sidebar {
    position: static;
    top: auto;
    height: auto;
    overflow: visible;
    align-self: auto;
    padding: 16px 14px;
    gap: 14px;
  }

  .side-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .side-card {
    margin-top: 0;
  }

  .main-shell {
    padding: 20px;
  }
}

@media (max-width: 980px) {
  .sales-headbar,
  .sales-headbar-stats,
  .sales-action-grid,
  .hero,
  .hero-actions,
  .table-headline,
  .table-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .sales-headbar,
  .stats-grid,
  .filters-grid,
  .sales-action-grid,
  .profit-grid {
    grid-template-columns: 1fr;
  }

  .settings-grid,
  .telegram-template-grid,
  .buyer-settings-grid,
  .dashboard-filters-grid,
  .dashboard-profit-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-sticky-stack,
  .sales-sticky-stack {
    position: static;
    top: auto;
    padding-top: 0;
    padding-bottom: 0;
    background: transparent;
    backdrop-filter: none;
  }

  .hero-update-box,
  .refresh-progress {
    max-width: none;
  }

  .panel-actions,
  .settings-actions,
  .dashboard-inline-actions {
    justify-content: stretch;
  }

  .panel-actions .primary-button,
  .panel-actions .ghost-button,
  .settings-actions .primary-button,
  .settings-actions .ghost-button,
  .dashboard-inline-actions .primary-button,
  .dashboard-inline-actions .ghost-button {
    width: 100%;
  }

  .proof-preview-card {
    width: min(96vw, 1080px);
    margin: 18px auto;
  }

  .proof-preview-body {
    grid-template-columns: 1fr;
    max-height: calc(100vh - 72px);
  }

  .proof-preview-image {
    max-height: 42vh;
  }
}

@media (max-width: 860px) {
  .order-alert-tickers {
    width: 100%;
    flex-direction: column;
  }

  .side-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pagination,
  .rows-inline {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 560px) {
  .side-nav {
    grid-template-columns: 1fr;
  }

  .main-shell {
    padding: 14px 12px 22px;
  }

  .hero h1 {
    font-size: 1.5rem;
  }

  .subtitle {
    font-size: 0.88rem;
  }

  .stat-card {
    padding: 14px;
  }

  .stat-card strong {
    font-size: 1.2rem;
  }

  .table-panel tbody td {
    grid-template-columns: 82px minmax(0, 1fr);
    padding: 9px 10px;
  }

  .table-input,
  .field input,
  .field select,
  .field textarea,
  .multi-filter-trigger,
  .multi-select-trigger,
  .multi-filter-clear-button {
    min-height: 42px;
  }
}

body.transfer-portal-page .transfer-stage-filter {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

body.transfer-portal-page .transfer-stage-card {
  min-height: 74px;
  padding: 12px 14px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.82);
  color: #f8fafc;
  text-align: left;
  cursor: pointer;
}

body.transfer-portal-page .transfer-stage-card span {
  display: block;
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.035em;
}

body.transfer-portal-page .transfer-stage-card strong {
  display: block;
  margin-top: 6px;
  font-size: 1.5rem;
  line-height: 1;
}

body.transfer-portal-page .transfer-stage-card.waiting strong {
  color: #facc15;
}

body.transfer-portal-page .transfer-stage-card.completed strong {
  color: #34d399;
}

body.transfer-portal-page .transfer-stage-card.hold strong {
  color: #fb7185;
}

body.transfer-portal-page .transfer-stage-card.problem strong {
  color: #f87171;
}

body.transfer-portal-page .transfer-stage-card.total.active {
  border-color: #f59e0b;
  box-shadow: inset 0 0 0 1px #f59e0b;
}

body.transfer-portal-page .transfer-stage-card.waiting.active {
  border-color: #f59e0b;
  box-shadow: inset 0 0 0 1px #f59e0b;
}

body.transfer-portal-page .transfer-stage-card.completed.active {
  border-color: #10b981;
  box-shadow: inset 0 0 0 1px #10b981;
}

body.transfer-portal-page .transfer-stage-card.hold.active {
  border-color: #fb7185;
  box-shadow: inset 0 0 0 1px #fb7185;
}

body.transfer-portal-page .transfer-stage-card.problem.active {
  border-color: #ef4444;
  box-shadow: inset 0 0 0 1px #ef4444;
}

body.transfer-portal-page .transfer-visible-count {
  margin: 8px 2px 0;
  color: #94a3b8;
  font-size: 0.76rem;
}

.work-admin-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border: 1px solid rgba(124, 58, 237, 0.22);
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.10);
  color: #6d4bff;
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}

body.transfer-portal-page .work-admin-badge {
  color: #c4b5fd;
  border-color: rgba(196, 181, 253, 0.22);
  background: rgba(124, 58, 237, 0.16);
}

input[type="date"] {
  color-scheme: light;
}

body.transfer-portal-page input[type="date"] {
  color-scheme: dark;
}

body.transfer-portal-page .transfer-mobile-compact-preview {
  display: none;
}

@media (max-width: 860px) {
  body.transfer-portal-page .main-shell {
    padding: 8px 8px 20px;
  }

  body.transfer-portal-page .transfer-mobile-topbar {
    min-height: 48px;
    margin: 0 -8px 8px;
    padding: 7px 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    background: #101a31;
  }

  body.transfer-portal-page .hero,
  body.transfer-portal-page .sales-headbar,
  body.transfer-portal-page .panel {
    border-radius: 0;
  }

  body.transfer-portal-page .hero {
    padding: 10px 12px;
  }

  body.transfer-portal-page .hero h1 {
    font-size: 1.1rem;
  }

  body.transfer-portal-page .hero .subtitle,
  body.transfer-portal-page .transfer-hero-kicker {
    font-size: 0.68rem;
  }

  body.transfer-portal-page .hero-actions .primary-button {
    min-height: 38px;
    padding: 8px 12px;
    border-radius: 0;
    font-size: 0.78rem;
  }

  body.transfer-portal-page .sales-headbar {
    padding: 10px 12px;
  }

  body.transfer-portal-page .sales-headbar-title {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  body.transfer-portal-page .sales-headbar-date {
    font-size: 0.72rem;
  }

  body.transfer-portal-page .transfer-headbar-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 6px;
  }

  body.transfer-portal-page .sales-headbar-stat {
    min-height: 74px;
    padding: 9px 8px;
    border-radius: 0;
  }

  body.transfer-portal-page .sales-headbar-stat span,
  body.transfer-portal-page .sales-headbar-stat small {
    font-size: 0.62rem;
  }

  body.transfer-portal-page .sales-headbar-stat strong {
    margin-top: 5px;
    font-size: 0.88rem;
    overflow-wrap: anywhere;
  }

  body.transfer-portal-page .sales-control-panel {
    padding: 8px;
  }

  body.transfer-portal-page .sales-control-panel .panel-grid,
  body.transfer-portal-page .panel-grid.filters-grid {
    grid-template-columns: 1fr !important;
    gap: 7px;
  }

  body.transfer-portal-page .sales-control-panel .field {
    gap: 3px;
  }

  body.transfer-portal-page .sales-control-panel .field span {
    font-size: 0.66rem;
    text-transform: uppercase;
  }

  body.transfer-portal-page .sales-control-panel .field input,
  body.transfer-portal-page .sales-control-panel .field select {
    min-height: 36px;
    padding: 7px 9px;
    border-radius: 0;
    font-size: 0.78rem;
  }

  body.transfer-portal-page .panel-actions {
    gap: 6px;
  }

  body.transfer-portal-page .panel-actions button {
    min-height: 36px;
    padding: 7px 10px;
    border-radius: 0;
    font-size: 0.75rem;
  }

  body.transfer-portal-page .transfer-stage-filter {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  body.transfer-portal-page .transfer-stage-card {
    min-height: 72px;
    padding: 10px 11px;
    border-radius: 0;
  }

  body.transfer-portal-page .transfer-stage-card span {
    font-size: 0.68rem;
  }

  body.transfer-portal-page .transfer-stage-card strong {
    margin-top: 7px;
    font-size: 1.42rem;
  }

  body.transfer-portal-page .transfer-visible-count {
    margin: 7px 0;
    font-size: 0.69rem;
  }

  body.transfer-portal-page .table-panel.sales-detail-panel {
    padding: 8px;
  }

  body.transfer-portal-page .table-headline {
    margin-bottom: 8px;
    padding: 8px 10px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(15, 23, 42, 0.75);
  }

  body.transfer-portal-page .table-headline strong {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
  }

  body.transfer-portal-page .transfer-count-badges,
  body.transfer-portal-page #transferStatusMessage {
    display: none;
  }

  body.transfer-portal-page .transfer-mobile-list {
    gap: 8px;
  }

  body.transfer-portal-page .transfer-mobile-section-head {
    padding: 8px 10px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: #111b32;
    font-size: 0.7rem;
  }

  body.transfer-portal-page .transfer-mobile-card-list {
    gap: 8px;
  }

  body.transfer-portal-page .transfer-mobile-card {
    border-radius: 0;
    border-width: 1px;
    background: #111b32;
    box-shadow: none;
  }

  body.transfer-portal-page .transfer-mobile-card.waiting {
    border-color: rgba(245, 158, 11, 0.76);
    box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.18);
  }

  body.transfer-portal-page .transfer-mobile-card.hold {
    border-color: rgba(251, 113, 133, 0.76);
  }

  body.transfer-portal-page .transfer-mobile-card.completed {
    border-color: rgba(16, 185, 129, 0.72);
  }

  body.transfer-portal-page .transfer-mobile-card-head {
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: start;
    padding: 10px 12px 8px;
  }

  body.transfer-portal-page .transfer-mobile-card-badge {
    width: auto;
    height: auto;
    min-width: 0;
    padding: 5px 8px;
    border-radius: 0;
    background: #334155;
    font-size: 0.63rem;
    white-space: nowrap;
  }

  body.transfer-portal-page .transfer-mobile-card-title-wrap {
    grid-column: 1 / 3;
    grid-row: 2;
    margin-top: 6px;
  }

  body.transfer-portal-page .transfer-mobile-card-title-wrap strong {
    font-size: 0.82rem;
  }

  body.transfer-portal-page .transfer-mobile-card-title-wrap span {
    margin-top: 2px;
    font-size: 0.67rem;
    line-height: 1.35;
  }

  body.transfer-portal-page .transfer-mobile-card-meta {
    grid-column: 3;
    grid-row: 1 / 3;
    align-items: flex-end;
  }

  body.transfer-portal-page .transfer-mobile-status {
    padding: 6px 8px;
    border-radius: 0;
    border: 1px solid currentColor;
    font-size: 0.61rem;
    text-transform: uppercase;
    white-space: nowrap;
  }

  body.transfer-portal-page .transfer-mobile-toggle {
    margin-top: 5px;
  }

  body.transfer-portal-page .transfer-mobile-card-body {
    gap: 7px;
    padding: 0 12px 12px;
  }

  body.transfer-portal-page .transfer-mobile-stage-banner {
    padding: 8px 10px;
    border: 1px solid currentColor;
    color: #fbbf24;
    background: rgba(180, 83, 9, 0.22);
    font-size: 0.68rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.035em;
  }

  body.transfer-portal-page .transfer-mobile-stage-banner.completed {
    color: #6ee7b7;
    background: rgba(5, 150, 105, 0.22);
  }

  body.transfer-portal-page .transfer-mobile-stage-banner.hold {
    color: #fda4af;
    background: rgba(159, 18, 57, 0.20);
  }

  body.transfer-portal-page .transfer-mobile-section-label {
    padding: 5px 0 1px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
    color: #94a3b8;
    font-size: 0.65rem;
    font-weight: 900;
    text-transform: uppercase;
  }

  body.transfer-portal-page .transfer-mobile-account-box,
  body.transfer-portal-page .transfer-mobile-compact-account {
    display: grid;
    gap: 3px;
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: #030718;
  }

  body.transfer-portal-page .transfer-mobile-account-box span,
  body.transfer-portal-page .transfer-mobile-compact-account span {
    color: #94a3b8;
    font-size: 0.68rem;
  }

  body.transfer-portal-page .transfer-mobile-account-box strong,
  body.transfer-portal-page .transfer-mobile-compact-account strong {
    color: #f8fafc;
    font-size: 0.78rem;
    line-height: 1.35;
  }

  body.transfer-portal-page .transfer-mobile-copy-account,
  body.transfer-portal-page .transfer-mobile-detail-button {
    justify-self: start;
    margin-top: 4px;
    padding: 5px 9px;
    border: 1px solid #475569;
    border-radius: 0;
    background: #334155;
    color: #f8fafc;
    font-size: 0.67rem;
    font-weight: 800;
  }

  body.transfer-portal-page .transfer-mobile-fields {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  body.transfer-portal-page .transfer-mobile-field {
    min-height: 54px;
    padding: 8px;
    border-radius: 0;
    background: #030718;
  }

  body.transfer-portal-page .transfer-mobile-field span {
    font-size: 0.64rem;
  }

  body.transfer-portal-page .transfer-mobile-field strong {
    font-size: 0.75rem;
  }

  body.transfer-portal-page .transfer-mobile-field.emphasis strong,
  body.transfer-portal-page .transfer-mobile-compact-account b {
    color: #34d399;
    font-size: 0.86rem;
  }

  body.transfer-portal-page .transfer-mobile-breakdown,
  body.transfer-portal-page .transfer-mobile-proof-row {
    padding: 9px 10px;
    border-radius: 0;
    background: #030718;
  }

  body.transfer-portal-page .transfer-mobile-actions {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
    padding: 0;
  }

  body.transfer-portal-page .transfer-mobile-actions .transfer-action-button,
  body.transfer-portal-page .transfer-mobile-actions .transfer-proof-link,
  body.transfer-portal-page .transfer-mobile-actions .transfer-copy-badge {
    min-width: 0;
    min-height: 34px;
    padding: 6px 5px;
    border-radius: 0;
    font-size: 0.63rem;
  }

  body.transfer-portal-page .transfer-mobile-actions .primary-button {
    grid-column: auto;
  }

  body.transfer-portal-page .transfer-mobile-compact-preview {
    display: grid;
    gap: 8px;
    padding: 0 12px 12px;
  }

  body.transfer-portal-page .transfer-mobile-card:not(.collapsed) .transfer-mobile-compact-preview {
    display: none;
  }

  body.transfer-portal-page .transfer-mobile-detail-button {
    justify-self: end;
    text-transform: uppercase;
  }
}

@media (max-width: 420px) {
  body.transfer-portal-page .transfer-headbar-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  body.transfer-portal-page .sales-headbar-stat {
    padding: 8px 6px;
  }

  body.transfer-portal-page .sales-headbar-stat strong {
    font-size: 0.78rem;
  }

  body.transfer-portal-page .transfer-mobile-fields {
    grid-template-columns: 1fr;
  }

  body.transfer-portal-page .transfer-mobile-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  body.mobile-transfer-view {
    background:
      radial-gradient(circle at top right, rgba(92, 56, 244, 0.12), transparent 20%),
      linear-gradient(180deg, #0f172a 0%, #101a2d 100%);
    color: #e5eefb;
  }

  body.mobile-transfer-view .layout-shell {
    grid-template-columns: 1fr;
  }

  body.mobile-transfer-view .sidebar {
    padding: 14px 12px;
    background: linear-gradient(180deg, #131d33 0%, #101a2d 100%);
  }

  body.mobile-transfer-view .main-shell {
    padding: 12px;
  }

  body.mobile-transfer-view .sales-sticky-stack {
    position: static;
  }

  body.mobile-transfer-view .hero,
  body.mobile-transfer-view .hero-actions,
  body.mobile-transfer-view .table-headline,
  body.mobile-transfer-view .table-footer,
  body.mobile-transfer-view .panel-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  body.mobile-transfer-view .hero,
  body.mobile-transfer-view .sales-headbar,
  body.mobile-transfer-view .panel {
    border-radius: 18px;
    background: rgba(17, 27, 47, 0.96);
    border-color: rgba(148, 163, 184, 0.12);
    box-shadow: 0 18px 40px rgba(2, 6, 23, 0.34);
  }

  body.mobile-transfer-view .subtitle,
  body.mobile-transfer-view .field span,
  body.mobile-transfer-view .table-headline span,
  body.mobile-transfer-view .table-footer span,
  body.mobile-transfer-view .hero-update-label,
  body.mobile-transfer-view .headbar-inline-note {
    color: #94a3b8;
  }

  body.mobile-transfer-view .hero h1,
  body.mobile-transfer-view .sales-headbar-title,
  body.mobile-transfer-view .sales-headbar-stat strong,
  body.mobile-transfer-view .table-headline strong {
    color: #f8fafc;
  }

  body.mobile-transfer-view .sales-headbar-summary {
    border-left-color: #7c3aed;
  }

  body.mobile-transfer-view .transfer-summary-headbar .sales-headbar-summary,
  body.mobile-transfer-view .transfer-summary-headbar .sales-headbar-side {
    width: 100%;
  }

  body.mobile-transfer-view .sales-headbar-stat {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(148, 163, 184, 0.12);
  }

  body.mobile-transfer-view .transfer-headbar-stats {
    display: grid;
    grid-template-columns: 1fr !important;
    gap: 10px;
  }

  body.mobile-transfer-view .sales-control-panel .panel-grid,
  body.mobile-transfer-view .panel-grid.filters-grid {
    display: grid;
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

  body.mobile-transfer-view .sales-control-panel .field,
  body.mobile-transfer-view .sales-control-panel .field input,
  body.mobile-transfer-view .sales-control-panel .field select {
    width: 100%;
  }

  body.mobile-transfer-view .primary-button,
  body.mobile-transfer-view .ghost-button,
  body.mobile-transfer-view .copy-button,
  body.mobile-transfer-view .pager-button {
    width: 100%;
    min-height: 46px;
  }

  body.mobile-transfer-view .field input,
  body.mobile-transfer-view .field select,
  body.mobile-transfer-view .field textarea,
  body.mobile-transfer-view .info-card {
    background: rgba(15, 23, 42, 0.92);
    color: #f8fafc;
    border-color: rgba(148, 163, 184, 0.18);
  }

  body.mobile-transfer-view .table-wrap {
    display: none;
  }

  body.mobile-transfer-view .table-footer {
    margin-top: 14px;
  }

  body.mobile-transfer-view .transfer-mobile-list {
    display: grid;
    gap: 14px;
  }

  body.mobile-transfer-view .transfer-mobile-card.expanded .transfer-mobile-card-body {
    display: grid;
  }

  body.mobile-transfer-view .transfer-mobile-empty {
    display: grid;
    gap: 4px;
    padding: 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    color: #cbd5e1;
  }

  body.mobile-transfer-view .transfer-mobile-section {
    display: grid;
    gap: 10px;
  }

  body.mobile-transfer-view .transfer-mobile-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #e2e8f0;
    font-size: 0.9rem;
    font-weight: 800;
  }

  body.mobile-transfer-view .transfer-mobile-section-head span {
    color: #94a3b8;
    font-size: 0.78rem;
  }

  body.mobile-transfer-view .transfer-mobile-card-list {
    display: grid;
    gap: 10px;
  }

  body.mobile-transfer-view .transfer-mobile-card {
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 18px;
    background: rgba(20, 29, 52, 0.98);
    overflow: hidden;
  }

  body.mobile-transfer-view .transfer-mobile-card-head {
    width: 100%;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 14px;
    border: 0;
    background: transparent;
    color: #f8fafc;
    text-align: left;
  }

  body.mobile-transfer-view .transfer-mobile-card-badge {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, #6d4bff, #5330e0);
  }

  body.mobile-transfer-view .transfer-mobile-card-title-wrap {
    display: grid;
    gap: 3px;
    min-width: 0;
  }

  body.mobile-transfer-view .transfer-mobile-card-title-wrap strong {
    font-size: 1rem;
    color: #f8fafc;
  }

  body.mobile-transfer-view .transfer-mobile-card-title-wrap span {
    color: #94a3b8;
    font-size: 0.76rem;
  }

  body.mobile-transfer-view .transfer-mobile-card-meta {
    display: grid;
    justify-items: end;
    gap: 6px;
  }

  body.mobile-transfer-view .transfer-mobile-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
  }

  body.mobile-transfer-view .transfer-mobile-status.waiting {
    color: #facc15;
    background: rgba(250, 204, 21, 0.12);
  }

  body.mobile-transfer-view .transfer-mobile-status.hold {
    color: #c084fc;
    background: rgba(192, 132, 252, 0.14);
  }

  body.mobile-transfer-view .transfer-mobile-status.completed {
    color: #4ade80;
    background: rgba(74, 222, 128, 0.14);
  }

  body.mobile-transfer-view .transfer-mobile-toggle {
    color: #94a3b8;
    transition: transform 0.2s ease;
  }

  body.mobile-transfer-view .transfer-mobile-card.collapsed .transfer-mobile-toggle {
    transform: rotate(180deg);
  }

  body.mobile-transfer-view .transfer-mobile-card-body {
    display: grid;
    gap: 12px;
    padding: 0 14px 14px;
  }

  body.mobile-transfer-view .transfer-mobile-card.collapsed .transfer-mobile-card-body {
    display: none;
  }

  body.mobile-transfer-view .transfer-mobile-fields {
    display: grid;
    gap: 8px;
    padding-top: 4px;
  }

  body.mobile-transfer-view .transfer-mobile-field {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
  }

  body.mobile-transfer-view .transfer-mobile-field span {
    color: #94a3b8;
    font-size: 0.78rem;
  }

  body.mobile-transfer-view .transfer-mobile-field strong {
    color: #f8fafc;
    font-size: 0.9rem;
    text-align: right;
  }

  body.mobile-transfer-view .transfer-mobile-field.emphasis {
    border: 1px solid rgba(74, 222, 128, 0.22);
    background: rgba(22, 163, 74, 0.08);
  }

  body.mobile-transfer-view .transfer-mobile-field.emphasis strong {
    color: #4ade80;
    font-size: 1rem;
  }

  body.mobile-transfer-view .transfer-mobile-breakdown {
    display: grid;
    gap: 6px;
    padding: 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
  }

  body.mobile-transfer-view .transfer-mobile-actions {
    display: grid;
    gap: 8px;
  }

  body.mobile-transfer-view .transfer-mobile-actions .transfer-action-button,
  body.mobile-transfer-view .transfer-mobile-actions .transfer-proof-link,
  body.mobile-transfer-view .transfer-mobile-actions .transfer-copy-badge {
    width: 100%;
    min-height: 46px;
    justify-content: center;
  }

  body.mobile-transfer-view .table-footer {
    gap: 12px;
  }

  body.mobile-transfer-view .pagination,
  body.mobile-transfer-view .rows-inline {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
}

body.transfer-portal-page {
  color-scheme: dark;
  background:
    radial-gradient(circle at top right, rgba(92, 56, 244, 0.16), transparent 24%),
    linear-gradient(180deg, #0a1222 0%, #111b2d 100%);
  color: #e2e8f0;
}

body.transfer-portal-page .main-shell {
  max-width: 1460px;
  margin: 0 auto;
  padding: 16px 18px 26px;
}

body.transfer-portal-page .sales-sticky-stack {
  background:
    linear-gradient(180deg, rgba(10, 18, 34, 0.96), rgba(10, 18, 34, 0.88) 82%, rgba(10, 18, 34, 0));
  backdrop-filter: blur(10px);
}

body.transfer-portal-page .hero,
body.transfer-portal-page .panel,
body.transfer-portal-page .sales-headbar,
body.transfer-portal-page .proof-preview-card {
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: linear-gradient(180deg, rgba(18, 28, 48, 0.98), rgba(16, 26, 45, 0.98));
  box-shadow: 0 22px 44px rgba(2, 6, 23, 0.34);
}

body.transfer-portal-page .hero {
  padding: 18px 22px;
  margin-bottom: 10px;
}

body.transfer-portal-page .transfer-hero-kicker {
  margin-bottom: 8px;
  color: #f59e0b;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

body.transfer-portal-page .hero h1,
body.transfer-portal-page .table-headline strong,
body.transfer-portal-page .sales-headbar-title,
body.transfer-portal-page .sales-headbar-stat strong,
body.transfer-portal-page .brand-title {
  color: #f8fafc;
}

body.transfer-portal-page .subtitle,
body.transfer-portal-page .field span,
body.transfer-portal-page .table-headline span,
body.transfer-portal-page .table-footer span,
body.transfer-portal-page .headbar-inline-note,
body.transfer-portal-page .sales-headbar-date,
body.transfer-portal-page .sales-headbar-side small,
body.transfer-portal-page .range-note {
  color: #93a4bf;
}

body.transfer-portal-page .sales-headbar {
  padding: 18px 20px;
  gap: 18px;
  align-items: stretch;
}

body.transfer-portal-page .sales-headbar-summary {
  border-left-color: #7c3aed;
  padding-left: 16px;
}

body.transfer-portal-page .transfer-headbar-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

body.transfer-portal-page .sales-headbar-stat {
  border-radius: 18px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

body.transfer-portal-page .sales-headbar-stat span {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.transfer-portal-page .sales-headbar-stat strong {
  margin-top: 7px;
  font-size: 1.6rem;
  line-height: 1.05;
}

body.transfer-portal-page .sales-headbar-side {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
}

body.transfer-portal-page .sales-control-panel .panel-grid {
  grid-template-columns: 1.6fr 1fr 0.9fr;
  gap: 12px;
}

body.transfer-portal-page .sales-control-panel .panel-actions {
  margin-top: 14px;
  justify-content: flex-end;
}

body.transfer-portal-page .field input,
body.transfer-portal-page .field select,
body.transfer-portal-page .field textarea {
  color: #f8fafc;
  background: rgba(10, 18, 34, 0.76);
  border-color: rgba(148, 163, 184, 0.18);
}

body.transfer-portal-page .field input::placeholder,
body.transfer-portal-page .field textarea::placeholder {
  color: #6f839f;
}

body.transfer-portal-page .primary-button {
  color: #fff;
  border-color: rgba(124, 58, 237, 0.28);
  background: linear-gradient(135deg, #6d4bff, #4f2ff1);
  box-shadow: 0 14px 28px rgba(79, 47, 241, 0.28);
}

body.transfer-portal-page .ghost-button,
body.transfer-portal-page .copy-button {
  color: #e2e8f0;
  border-color: rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.04);
}

body.transfer-portal-page .table-panel .table-wrap,
body.transfer-portal-page .sales-detail-panel .table-wrap {
  border-color: rgba(148, 163, 184, 0.14);
  background: rgba(11, 19, 35, 0.84);
}

body.transfer-portal-page .table-panel {
  padding: 18px 18px 16px;
}

body.transfer-portal-page .sales-detail-panel thead,
body.transfer-portal-page .sales-detail-panel tbody tr:nth-child(even),
body.transfer-portal-page .sales-detail-panel tbody tr:hover {
  background: transparent;
}

body.transfer-portal-page .sales-detail-panel th {
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.03);
  border-bottom-color: rgba(148, 163, 184, 0.14);
  font-size: 0.72rem;
  padding: 11px 12px;
  position: sticky;
  top: 0;
  z-index: 2;
}

body.transfer-portal-page .sales-detail-panel td,
body.transfer-portal-page .table-wrap td {
  color: #e2e8f0;
  border-bottom-color: rgba(148, 163, 184, 0.09);
  background: rgba(15, 23, 42, 0.46);
  padding: 11px 12px;
  font-size: 0.84rem;
}

body.transfer-portal-page .transfer-section-row td {
  background: rgba(123, 92, 255, 0.09);
  border-bottom-color: rgba(124, 58, 237, 0.14);
  padding: 10px 12px;
}

body.transfer-portal-page .transfer-section-title {
  color: #f8fafc;
}

body.transfer-portal-page .transfer-section-title span {
  color: #c4b5fd;
}

body.transfer-portal-page .transfer-section-row.problem td {
  background: rgba(239, 68, 68, 0.12);
  border-bottom-color: rgba(248, 113, 113, 0.30);
}

body.transfer-portal-page .transfer-section-row.problem .transfer-section-title {
  color: #fca5a5;
}

body.transfer-portal-page .transfer-row-problem td {
  background: rgba(127, 29, 29, 0.12);
}

body.transfer-portal-page .transfer-row-group-start td {
  border-top: 2px solid rgba(124, 58, 237, 0.44);
}

body.transfer-portal-page .transfer-row-group-child td {
  background: rgba(16, 26, 45, 0.88);
}

body.transfer-portal-page .transfer-row-group-end td {
  border-bottom: 1px solid rgba(124, 58, 237, 0.30);
}

body.transfer-portal-page .order-no-group-cell,
body.transfer-portal-page .seller-bank-group-cell,
body.transfer-portal-page .seller-account-group-cell {
  background: rgba(18, 28, 48, 0.94);
}

body.transfer-portal-page .order-no-pill {
  color: #fff;
  background: linear-gradient(135deg, #6d4bff, #4f2ff1);
  border-color: rgba(124, 58, 237, 0.40);
}

body.transfer-portal-page .transfer-account-cell {
  display: grid;
  gap: 8px;
}

body.transfer-portal-page .transfer-breakdown-cell {
  min-width: 196px;
}

body.transfer-portal-page .transfer-status-badge.waiting,
body.transfer-portal-page .transfer-mobile-status.waiting {
  color: #facc15;
  background: rgba(250, 204, 21, 0.14);
}

body.transfer-portal-page .transfer-status-badge.hold,
body.transfer-portal-page .transfer-mobile-status.hold {
  color: #c084fc;
  background: rgba(192, 132, 252, 0.16);
}

body.transfer-portal-page .transfer-status-badge.completed,
body.transfer-portal-page .transfer-mobile-status.completed {
  color: #4ade80;
  background: rgba(74, 222, 128, 0.15);
}

body.transfer-portal-page .transfer-status-badge.problem,
body.transfer-portal-page .transfer-mobile-status.problem {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.16);
}

body.transfer-portal-page .transfer-copy-badge:disabled,
body.transfer-portal-page .transfer-mobile-copy-account:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  color: #94a3b8;
  background: #1e293b;
}

.transfer-invoice-history-panel {
  margin-top: 16px;
}

.transfer-history-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}

.transfer-history-heading h2 {
  margin: 3px 0 4px;
  font-size: 18px;
}

.transfer-history-heading p,
.transfer-history-heading > strong {
  margin: 0;
  color: var(--muted-text, #71809b);
  font-size: 12px;
}

.transfer-history-kicker {
  color: #6537f5;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
}

.transfer-invoice-history-list {
  display: grid;
  gap: 8px;
}

.transfer-history-item {
  display: grid;
  grid-template-columns: minmax(150px, .8fr) minmax(260px, 1.5fr) minmax(210px, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid #e0e5f0;
  border-left: 4px solid #18a66b;
  border-radius: 12px;
  background: #fbfcff;
}

.transfer-history-time,
.transfer-history-detail,
.transfer-history-amount {
  display: grid;
  gap: 3px;
}

.transfer-history-item strong {
  color: #182239;
  font-size: 13px;
}

.transfer-history-item span {
  color: #748099;
  font-size: 11px;
}

.transfer-history-amount > strong {
  color: #098751;
  font-size: 15px;
}

.transfer-history-action .ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  white-space: nowrap;
  text-decoration: none;
}

.transfer-history-empty {
  padding: 22px;
  border: 1px dashed #cfd7e6;
  border-radius: 12px;
  color: #748099;
  text-align: center;
}

@media (max-width: 760px) {
  .transfer-history-heading {
    gap: 10px;
  }

  .transfer-history-item {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .transfer-history-action .ghost-button {
    width: 100%;
  }
}

body.transfer-portal-page .transfer-breakdown {
  gap: 5px;
}

body.transfer-portal-page .transfer-breakdown-line.total {
  color: #94a3b8;
}

body.transfer-portal-page .transfer-breakdown-line.fee {
  color: #fb7185;
}

body.transfer-portal-page .transfer-breakdown-line.final {
  color: #4ade80;
  font-size: 0.92rem;
}

body.transfer-portal-page .transfer-action-button {
  min-width: 128px;
  padding: 9px 11px;
  font-size: 0.78rem;
  font-weight: 700;
}

body.transfer-portal-page .action-group.stacked {
  gap: 7px;
}

body.transfer-portal-page .transfer-proof-meta {
  color: #4ade80;
  font-size: 0.72rem;
  font-weight: 700;
}

body.transfer-portal-page .transfer-proof-error,
body.transfer-portal-page .transfer-mobile-proof-error {
  display: block;
  margin-top: 6px;
  padding: 8px 10px;
  border: 1px solid #fecaca;
  border-radius: 9px;
  color: #b91c1c;
  background: #fff1f2;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

body.transfer-portal-page .transfer-proof-empty {
  color: #94a3b8;
  font-size: 0.74rem;
}

body.transfer-portal-page .table-headline {
  align-items: flex-start;
  margin-bottom: 12px;
}

body.transfer-portal-page .transfer-count-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

body.transfer-portal-page .sales-filter-badge.orange {
  color: #facc15;
  background: rgba(250, 204, 21, 0.14);
}

body.transfer-portal-page .sales-filter-badge.violet {
  color: #c084fc;
  background: rgba(192, 132, 252, 0.16);
}

body.transfer-portal-page .sales-filter-badge.green {
  color: #4ade80;
  background: rgba(74, 222, 128, 0.14);
}

body.transfer-portal-page .table-footer {
  margin-top: 14px;
}

body.transfer-portal-page .proof-preview-head p,
body.transfer-portal-page .proof-preview-label {
  color: #93a4bf;
}

body.transfer-portal-page .proof-preview-caption {
  color: #f8fafc;
  background: rgba(10, 18, 34, 0.82);
  border-color: rgba(148, 163, 184, 0.18);
}

body.transfer-portal-page .transfer-mobile-topbar {
  display: none;
}

body.transfer-portal-page .mobile-sidebar-backdrop {
  display: none;
}

@media (max-width: 860px) {
  body.transfer-portal-page {
    overflow-x: hidden;
  }

  body.transfer-portal-page.transfer-sidebar-open {
    overflow: hidden;
  }

  body.transfer-portal-page .layout-shell {
    grid-template-columns: 1fr;
  }

  body.transfer-portal-page .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(82vw, 290px);
    height: 100vh;
    z-index: 80;
    transform: translateX(-108%);
    transition: transform 0.24s ease;
  }

  body.transfer-portal-page .sidebar.is-open {
    transform: translateX(0);
  }

  body.transfer-portal-page .mobile-sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 70;
    border: 0;
    background: rgba(2, 6, 23, 0.68);
  }

  body.transfer-portal-page .mobile-sidebar-backdrop.is-open {
    display: block;
  }

  body.transfer-portal-page .transfer-mobile-topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding: 10px 2px 2px;
  }

  body.transfer-portal-page .transfer-mobile-menu {
    width: 42px;
    height: 42px;
    display: grid;
    gap: 4px;
    align-content: center;
    justify-content: center;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(255, 255, 255, 0.04);
  }

  body.transfer-portal-page .transfer-mobile-menu span {
    width: 16px;
    height: 2px;
    border-radius: 999px;
    background: #f8fafc;
  }

  body.transfer-portal-page .transfer-mobile-brand .brand-title {
    font-size: 1.35rem;
    line-height: 1;
  }

  body.transfer-portal-page .transfer-mobile-brand .brand-subtitle {
    font-size: 0.7rem;
    letter-spacing: 0.12em;
  }

  body.transfer-portal-page .main-shell {
    padding: 12px 12px 24px;
  }

  body.transfer-portal-page .sales-sticky-stack {
    position: static;
    padding-top: 0;
    background: transparent;
    backdrop-filter: none;
  }

  body.transfer-portal-page .hero,
  body.transfer-portal-page .sales-headbar,
  body.transfer-portal-page .panel {
    border-radius: 20px;
  }

  body.transfer-portal-page .hero {
    padding: 18px 18px 16px;
  }

  body.transfer-portal-page .hero-actions .primary-button {
    width: 100%;
  }

  body.transfer-portal-page .sales-headbar {
    padding: 18px;
  }

  body.transfer-portal-page .transfer-headbar-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 10px;
  }

  body.transfer-portal-page .sales-headbar-stat {
    min-width: 0;
    padding: 14px 12px;
  }

  body.transfer-portal-page .sales-headbar-stat strong {
    font-size: 1rem;
  }

  body.transfer-portal-page .sales-control-panel .panel-grid,
  body.transfer-portal-page .panel-grid.filters-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 10px;
  }

  body.transfer-portal-page .sales-control-panel .field span {
    font-size: 0.75rem;
  }

  body.transfer-portal-page .sales-control-panel .field input,
  body.transfer-portal-page .sales-control-panel .field select {
    min-height: 42px;
    padding: 10px 12px;
    font-size: 0.9rem;
  }

  body.transfer-portal-page .panel-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  body.transfer-portal-page .panel-actions .primary-button,
  body.transfer-portal-page .panel-actions .ghost-button {
    width: 100%;
  }

  body.transfer-portal-page .table-headline {
    gap: 10px;
  }

  body.transfer-portal-page .transfer-mobile-list {
    display: grid;
    gap: 12px;
  }

  body.transfer-portal-page .transfer-mobile-section {
    gap: 8px;
  }

  body.transfer-portal-page .transfer-mobile-section-head {
    padding: 0 2px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }

  body.transfer-portal-page .transfer-mobile-card {
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: linear-gradient(180deg, rgba(17, 27, 47, 0.98), rgba(14, 22, 40, 0.98));
    box-shadow: 0 14px 32px rgba(2, 6, 23, 0.28);
  }

  body.transfer-portal-page .transfer-mobile-card-head {
    padding: 12px 14px;
    grid-template-columns: 34px minmax(0, 1fr) auto;
  }

  body.transfer-portal-page .transfer-mobile-card-badge {
    width: 28px;
    height: 28px;
    font-size: 0.82rem;
  }

  body.transfer-portal-page .transfer-mobile-card-title-wrap strong {
    font-size: 0.94rem;
    line-height: 1.25;
  }

  body.transfer-portal-page .transfer-mobile-card-title-wrap span,
  body.transfer-portal-page .transfer-mobile-status {
    font-size: 0.72rem;
  }

  body.transfer-portal-page .transfer-mobile-card-body {
    gap: 10px;
    padding: 0 14px 14px;
  }

  body.transfer-portal-page .transfer-mobile-summary-box {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(148, 163, 184, 0.10);
  }

  body.transfer-portal-page .transfer-mobile-summary-box strong {
    display: block;
    margin-top: 4px;
    color: #f8fafc;
    font-size: 0.84rem;
    line-height: 1.25;
  }

  body.transfer-portal-page .transfer-mobile-summary-label {
    color: #7c93b5;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
  }

  body.transfer-portal-page .transfer-mobile-fields {
    gap: 8px;
    grid-template-columns: 1fr 1fr;
  }

  body.transfer-portal-page .transfer-mobile-field {
    padding: 9px 10px;
    border-radius: 12px;
    min-height: 52px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
  }

  body.transfer-portal-page .transfer-mobile-field span {
    font-size: 0.75rem;
  }

  body.transfer-portal-page .transfer-mobile-field strong {
    font-size: 0.84rem;
    text-align: left;
    line-height: 1.3;
  }

  body.transfer-portal-page .transfer-mobile-field.emphasis strong {
    font-size: 0.98rem;
  }

  body.transfer-portal-page .transfer-mobile-breakdown {
    gap: 5px;
    padding: 12px;
    border-radius: 14px;
  }

  body.transfer-portal-page .transfer-mobile-proof-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(148, 163, 184, 0.10);
  }

  body.transfer-portal-page .transfer-mobile-proof-state {
    font-size: 0.76rem;
    font-weight: 700;
    color: #cbd5e1;
  }

  body.transfer-portal-page .transfer-mobile-proof-state.ready {
    color: #4ade80;
  }

  body.transfer-portal-page .transfer-mobile-proof-state.empty {
    color: #94a3b8;
  }

  body.transfer-portal-page .inline-proof-link {
    min-width: auto;
    padding: 7px 10px;
    font-size: 0.74rem;
  }

  body.transfer-portal-page .transfer-mobile-actions {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  body.transfer-portal-page .transfer-mobile-actions .transfer-action-button,
  body.transfer-portal-page .transfer-mobile-actions .transfer-proof-link,
  body.transfer-portal-page .transfer-mobile-actions .transfer-copy-badge {
    min-height: 42px;
    padding: 10px 10px;
    font-size: 0.8rem;
  }

  body.transfer-portal-page .transfer-mobile-actions .primary-button {
    grid-column: span 2;
  }

  body.transfer-portal-page .table-footer {
    gap: 10px;
  }
}

@media (max-width: 560px) {
  body.transfer-portal-page .transfer-headbar-stats,
  body.transfer-portal-page .sales-control-panel .panel-grid,
  body.transfer-portal-page .panel-grid.filters-grid {
    grid-template-columns: 1fr !important;
  }

  body.transfer-portal-page .panel-actions,
  body.transfer-portal-page .transfer-mobile-actions {
    grid-template-columns: 1fr;
  }

  body.transfer-portal-page .transfer-mobile-fields {
    grid-template-columns: 1fr;
  }

  body.transfer-portal-page .transfer-mobile-summary-box,
  body.transfer-portal-page .transfer-mobile-proof-row {
    grid-template-columns: 1fr;
    display: grid;
  }

  body.transfer-portal-page .transfer-mobile-actions .primary-button {
    grid-column: auto;
  }
}

/* Final mobile parity pass for the legacy Transfer Admin layout. */
@media (max-width: 860px) {
  body.transfer-portal-page.mobile-transfer-view .main-shell {
    padding: 8px 8px 20px;
  }

  body.transfer-portal-page.mobile-transfer-view .transfer-mobile-topbar {
    min-height: 48px;
    margin: 0 -8px 8px;
    padding: 7px 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    background: #101a31;
  }

  body.transfer-portal-page.mobile-transfer-view .hero,
  body.transfer-portal-page.mobile-transfer-view .sales-headbar,
  body.transfer-portal-page.mobile-transfer-view .panel,
  body.transfer-portal-page.mobile-transfer-view .sales-headbar-stat,
  body.transfer-portal-page.mobile-transfer-view input,
  body.transfer-portal-page.mobile-transfer-view select,
  body.transfer-portal-page.mobile-transfer-view button {
    border-radius: 0;
  }

  body.transfer-portal-page.mobile-transfer-view .hero {
    padding: 10px 12px;
  }

  body.transfer-portal-page.mobile-transfer-view .hero h1 {
    font-size: 1.1rem;
  }

  body.transfer-portal-page.mobile-transfer-view .hero .subtitle,
  body.transfer-portal-page.mobile-transfer-view .transfer-hero-kicker {
    font-size: 0.68rem;
  }

  body.transfer-portal-page.mobile-transfer-view .sales-headbar {
    padding: 10px 12px;
  }

  body.transfer-portal-page.mobile-transfer-view .transfer-headbar-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 6px;
  }

  body.transfer-portal-page.mobile-transfer-view .sales-headbar-stat {
    min-width: 0;
    min-height: 74px;
    padding: 9px 7px;
  }

  body.transfer-portal-page.mobile-transfer-view .sales-headbar-stat span,
  body.transfer-portal-page.mobile-transfer-view .sales-headbar-stat small {
    font-size: 0.6rem;
  }

  body.transfer-portal-page.mobile-transfer-view .sales-headbar-stat strong {
    margin-top: 5px;
    font-size: 0.82rem;
    overflow-wrap: anywhere;
  }

  body.transfer-portal-page.mobile-transfer-view .sales-control-panel {
    padding: 8px;
  }

  body.transfer-portal-page.mobile-transfer-view .sales-control-panel .panel-grid,
  body.transfer-portal-page.mobile-transfer-view .panel-grid.filters-grid {
    grid-template-columns: 1fr !important;
    gap: 7px;
  }

  body.transfer-portal-page.mobile-transfer-view .sales-control-panel .field {
    gap: 3px;
  }

  body.transfer-portal-page.mobile-transfer-view .sales-control-panel .field span {
    font-size: 0.66rem;
    text-transform: uppercase;
  }

  body.transfer-portal-page.mobile-transfer-view .sales-control-panel .field input,
  body.transfer-portal-page.mobile-transfer-view .sales-control-panel .field select,
  body.transfer-portal-page.mobile-transfer-view .panel-actions button {
    min-height: 36px;
    padding: 7px 9px;
    font-size: 0.76rem;
  }

  body.transfer-portal-page.mobile-transfer-view .transfer-stage-filter {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  body.transfer-portal-page.mobile-transfer-view .transfer-stage-card {
    min-height: 72px;
    padding: 10px 11px;
  }

  body.transfer-portal-page.mobile-transfer-view .transfer-stage-card span {
    font-size: 0.68rem;
  }

  body.transfer-portal-page.mobile-transfer-view .transfer-stage-card strong {
    margin-top: 7px;
    font-size: 1.42rem;
  }

  body.transfer-portal-page.mobile-transfer-view .transfer-stage-card.problem {
    grid-column: 1 / -1;
  }

  body.transfer-portal-page.mobile-transfer-view .table-panel.sales-detail-panel {
    padding: 8px;
  }

  body.transfer-portal-page.mobile-transfer-view .table-headline {
    margin-bottom: 8px;
    padding: 8px 10px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: #111b32;
  }

  body.transfer-portal-page.mobile-transfer-view .transfer-count-badges,
  body.transfer-portal-page.mobile-transfer-view #transferStatusMessage {
    display: none;
  }

  body.transfer-portal-page.mobile-transfer-view .transfer-mobile-list,
  body.transfer-portal-page.mobile-transfer-view .transfer-mobile-card-list {
    gap: 8px;
  }

  body.transfer-portal-page.mobile-transfer-view .transfer-mobile-section-head {
    padding: 8px 10px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: #111b32;
    font-size: 0.7rem;
  }

  body.transfer-portal-page.mobile-transfer-view .transfer-mobile-card {
    border-radius: 0;
    border: 1px solid rgba(148, 163, 184, 0.20);
    background: #111b32;
    box-shadow: none;
  }

  body.transfer-portal-page.mobile-transfer-view .transfer-mobile-card.waiting {
    border-color: rgba(245, 158, 11, 0.80);
  }

  body.transfer-portal-page.mobile-transfer-view .transfer-mobile-card.hold {
    border-color: rgba(251, 113, 133, 0.80);
  }

  body.transfer-portal-page.mobile-transfer-view .transfer-mobile-card.completed {
    border-color: rgba(16, 185, 129, 0.80);
  }

  body.transfer-portal-page.mobile-transfer-view .transfer-mobile-card.problem {
    border-color: rgba(248, 113, 113, 0.92);
    box-shadow: inset 3px 0 0 rgba(239, 68, 68, 0.72);
  }

  body.transfer-portal-page.mobile-transfer-view .transfer-mobile-card-head {
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: start;
    padding: 10px 12px 8px;
  }

  body.transfer-portal-page.mobile-transfer-view .transfer-mobile-card-badge {
    width: auto;
    height: auto;
    padding: 5px 8px;
    background: #334155;
    font-size: 0.63rem;
    white-space: nowrap;
  }

  body.transfer-portal-page.mobile-transfer-view .transfer-mobile-card-title-wrap {
    grid-column: 1 / 3;
    grid-row: 2;
    margin-top: 6px;
  }

  body.transfer-portal-page.mobile-transfer-view .transfer-mobile-card-title-wrap strong {
    font-size: 0.82rem;
  }

  body.transfer-portal-page.mobile-transfer-view .transfer-mobile-card-title-wrap span {
    margin-top: 2px;
    font-size: 0.67rem;
    line-height: 1.35;
  }

  body.transfer-portal-page.mobile-transfer-view .transfer-mobile-card-meta {
    grid-column: 3;
    grid-row: 1 / 3;
    align-items: flex-end;
  }

  body.transfer-portal-page.mobile-transfer-view .transfer-mobile-status {
    padding: 6px 8px;
    border: 1px solid currentColor;
    font-size: 0.61rem;
    text-transform: uppercase;
    white-space: nowrap;
  }

  body.transfer-portal-page.mobile-transfer-view .transfer-mobile-card-body {
    gap: 7px;
    padding: 0 12px 12px;
  }

  body.transfer-portal-page.mobile-transfer-view .transfer-mobile-stage-banner {
    padding: 8px 10px;
    border: 1px solid currentColor;
    color: #fbbf24;
    background: rgba(180, 83, 9, 0.22);
    font-size: 0.68rem;
    font-weight: 900;
    text-transform: uppercase;
  }

  body.transfer-portal-page.mobile-transfer-view .transfer-mobile-stage-banner.completed {
    color: #6ee7b7;
    background: rgba(5, 150, 105, 0.22);
  }

  body.transfer-portal-page.mobile-transfer-view .transfer-mobile-stage-banner.hold {
    color: #fda4af;
    background: rgba(159, 18, 57, 0.20);
  }

  body.transfer-portal-page.mobile-transfer-view .transfer-mobile-stage-banner.problem {
    color: #fecaca;
    background: rgba(127, 29, 29, 0.34);
  }

  body.transfer-portal-page.mobile-transfer-view .transfer-mobile-section-label {
    padding: 5px 0 1px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
    color: #94a3b8;
    font-size: 0.65rem;
    font-weight: 900;
    text-transform: uppercase;
  }

  body.transfer-portal-page.mobile-transfer-view .transfer-mobile-account-box,
  body.transfer-portal-page.mobile-transfer-view .transfer-mobile-compact-account {
    display: grid;
    gap: 3px;
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: #030718;
  }

  body.transfer-portal-page.mobile-transfer-view .transfer-mobile-account-box span,
  body.transfer-portal-page.mobile-transfer-view .transfer-mobile-compact-account span {
    color: #94a3b8;
    font-size: 0.68rem;
  }

  body.transfer-portal-page.mobile-transfer-view .transfer-mobile-account-box strong,
  body.transfer-portal-page.mobile-transfer-view .transfer-mobile-compact-account strong {
    color: #f8fafc;
    font-size: 0.78rem;
    line-height: 1.35;
  }

  body.transfer-portal-page.mobile-transfer-view .transfer-mobile-copy-account,
  body.transfer-portal-page.mobile-transfer-view .transfer-mobile-detail-button {
    justify-self: start;
    margin-top: 4px;
    padding: 5px 9px;
    border: 1px solid #475569;
    background: #334155;
    color: #f8fafc;
    font-size: 0.67rem;
    font-weight: 800;
  }

  body.transfer-portal-page.mobile-transfer-view .transfer-mobile-fields {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  body.transfer-portal-page.mobile-transfer-view .transfer-mobile-field,
  body.transfer-portal-page.mobile-transfer-view .transfer-mobile-breakdown,
  body.transfer-portal-page.mobile-transfer-view .transfer-mobile-proof-row {
    min-height: 0;
    padding: 9px 10px;
    border-radius: 0;
    background: #030718;
  }

  body.transfer-portal-page.mobile-transfer-view .transfer-mobile-field {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  body.transfer-portal-page.mobile-transfer-view .transfer-mobile-field span {
    font-size: 0.68rem;
  }

  body.transfer-portal-page.mobile-transfer-view .transfer-mobile-field strong {
    font-size: 0.78rem;
    text-align: right;
  }

  body.transfer-portal-page.mobile-transfer-view .transfer-mobile-field.emphasis strong,
  body.transfer-portal-page.mobile-transfer-view .transfer-mobile-compact-account b {
    color: #34d399;
    font-size: 0.88rem;
  }

  body.transfer-portal-page.mobile-transfer-view .transfer-mobile-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
  }

  body.transfer-portal-page.mobile-transfer-view .transfer-mobile-actions .transfer-action-button,
  body.transfer-portal-page.mobile-transfer-view .transfer-mobile-actions .transfer-proof-link,
  body.transfer-portal-page.mobile-transfer-view .transfer-mobile-actions .transfer-copy-badge {
    min-width: 0;
    min-height: 35px;
    padding: 6px 5px;
    font-size: 0.64rem;
  }

  body.transfer-portal-page.mobile-transfer-view .transfer-mobile-actions .primary-button {
    grid-column: auto;
  }

  body.transfer-portal-page.mobile-transfer-view .transfer-mobile-compact-preview {
    display: grid;
    gap: 8px;
    padding: 0 12px 12px;
  }

  body.transfer-portal-page.mobile-transfer-view .transfer-mobile-card:not(.collapsed) .transfer-mobile-compact-preview {
    display: none;
  }

  body.transfer-portal-page.mobile-transfer-view .transfer-mobile-detail-button {
    justify-self: end;
    text-transform: uppercase;
  }
}

@media (min-width: 861px) {
  body.transfer-portal-page .main-shell {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 14px 18px 26px;
  }

  body.transfer-portal-page .sales-sticky-stack {
    position: static;
    top: auto;
    padding-top: 0;
    background: transparent;
    backdrop-filter: none;
  }

  body.transfer-portal-page .sales-detail-panel .table-wrap {
    max-height: calc(100vh - 150px);
  }

  body.transfer-portal-page .sales-detail-panel table {
    min-width: 2200px;
    table-layout: auto;
  }

  body.transfer-portal-page .sales-detail-panel th,
  body.transfer-portal-page .sales-detail-panel td {
    padding: 12px 14px;
    white-space: nowrap;
  }

  body.transfer-portal-page .sales-detail-panel td[data-label="Game"],
  body.transfer-portal-page .sales-detail-panel td[data-label="Server"],
  body.transfer-portal-page .sales-detail-panel td[data-label="Buyer"] {
    min-width: 150px;
    white-space: normal;
  }

  body.transfer-portal-page .sales-detail-panel td[data-label="No Rek"] {
    min-width: 230px;
    white-space: normal;
  }

  body.transfer-portal-page .sales-detail-panel td[data-label="Proof"],
  body.transfer-portal-page .sales-detail-panel td[data-label="Action"] {
    min-width: 150px;
  }
}
.capital-page{background:#f4f7fb;color:#16213a}.capital-main{padding:22px;display:grid;gap:14px}.capital-hero,.capital-input-panel,.capital-guide,.capital-status{background:#fff;border:1px solid #e2e8f4;border-radius:18px;box-shadow:0 8px 30px rgba(20,35,70,.06)}.capital-hero{padding:20px 24px;display:flex;align-items:center;justify-content:space-between;gap:16px}.capital-hero h1{margin:3px 0 5px;font-size:30px}.capital-hero p{margin:0;color:#68758f}.capital-eyebrow,.capital-section-heading span{font-size:11px;font-weight:800;letter-spacing:.12em;color:#6038ec}.capital-actions{display:flex;gap:8px}.capital-menu-button{display:none}.capital-status{padding:10px 15px;font-size:13px}.capital-status.success{color:#087443;background:#effcf5}.capital-status.error{color:#b42318;background:#fff1f0}.capital-input-panel,.capital-guide{padding:18px}.capital-section-heading{display:flex;justify-content:space-between;align-items:end;margin-bottom:14px}.capital-section-heading h2{font-size:18px;margin:3px 0 0}.capital-section-heading small{color:#78849b}.capital-input-grid{display:grid;grid-template-columns:repeat(5,minmax(140px,1fr));gap:12px}.capital-input-grid label{display:grid;gap:6px;font-size:12px;font-weight:700;color:#53617a}.capital-input-grid input,.capital-input-grid textarea{width:100%;box-sizing:border-box;border:1px solid #dce3ef;border-radius:10px;padding:10px 12px;background:#fbfcff;color:#17213a}.capital-input-grid .capital-check{display:flex;align-items:center;align-self:end;height:39px;padding:0 10px;border:1px solid #dce3ef;border-radius:10px}.capital-check input{width:15px}.capital-note{grid-column:1/-1}.capital-summary-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:10px}.capital-summary-grid article{background:#fff;border:1px solid #e2e8f4;border-top:3px solid #718096;border-radius:15px;padding:15px;display:grid;gap:6px}.capital-summary-grid article.blue{border-top-color:#2484e8}.capital-summary-grid article.purple{border-top-color:#6535ed}.capital-summary-grid article.green,.capital-summary-grid article.balanced{border-top-color:#16a36a}.capital-summary-grid article.negative{border-top-color:#e5484d;background:#fff8f8}.capital-summary-grid article.positive{border-top-color:#f0a000;background:#fffcf3}.capital-summary-grid span{font-size:11px;text-transform:uppercase;color:#6d7890;font-weight:800}.capital-summary-grid strong{font-size:20px}.capital-summary-grid small{color:#7d879a}.capital-detail-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.capital-detail-card{background:#111c30;color:#edf3ff;border:1px solid #253550;border-radius:16px;padding:17px}.capital-detail-card h3{margin:0 0 12px;color:#fff}.capital-detail-card dl{margin:0}.capital-detail-card dl div{display:flex;justify-content:space-between;gap:12px;padding:8px 0;border-bottom:1px solid #263750}.capital-detail-card dt{color:#aebbd1}.capital-detail-card dd{margin:0;font-weight:700;text-align:right}.capital-detail-card .total{color:#65e6a7;border-bottom:0;font-size:15px}.capital-guide ol{margin:0;padding-left:20px;display:grid;gap:8px;color:#4c5870}.capital-formula{margin-top:15px;border-left:4px solid #6535ed;background:#f7f4ff;padding:12px 14px;border-radius:8px;color:#38445c}
@media(max-width:1100px){.capital-summary-grid{grid-template-columns:repeat(2,1fr)}.capital-input-grid{grid-template-columns:repeat(2,1fr)}.capital-detail-grid{grid-template-columns:1fr}.capital-summary-grid article:last-child{grid-column:1/-1}}
@media(max-width:700px){.capital-main{padding:12px;gap:10px}.capital-hero{padding:16px;align-items:flex-start}.capital-hero h1{font-size:24px}.capital-hero p{font-size:12px}.capital-actions{flex-wrap:wrap;justify-content:flex-end}.capital-menu-button{display:inline-flex}.capital-input-grid,.capital-summary-grid{grid-template-columns:1fr}.capital-summary-grid article:last-child{grid-column:auto}.capital-section-heading{align-items:flex-start;gap:8px}.capital-section-heading small{font-size:10px}.capital-input-panel,.capital-guide{padding:14px}.capital-summary-grid article{padding:13px}.capital-summary-grid strong{font-size:18px}}
.capital-auto-info{display:grid;gap:2px;align-self:end;min-height:39px;padding:7px 10px;border:1px solid #cfdcff;border-radius:10px;background:#f5f8ff}.capital-auto-info span{font-size:10px;color:#65728a}.capital-auto-info strong{font-size:13px;color:#3d27c9}.capital-auto-info small{font-size:9px;color:#8290a8}
.capital-inflow-history{display:grid;gap:8px}.capital-inflow-history article{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:11px 13px;border:1px solid #e0e7f2;border-radius:11px;background:#fafcff}.capital-inflow-history article div{display:grid;gap:3px}.capital-inflow-history article span,.capital-inflow-history article small{font-size:11px;color:#71809a}.capital-inflow-history article strong{font-size:14px;color:#17213a}.capital-inflow-empty{padding:16px;text-align:center;color:#77849b;background:#f7f9fc;border-radius:10px}.capital-inflow-empty.error{color:#b42318;background:#fff1f0}@media(max-width:700px){.capital-inflow-history article{align-items:flex-start;flex-direction:column}.capital-inflow-history article small{line-height:1.5}}
.finance-summary-groups[hidden],.cny-inflow-history[hidden]{display:none!important}
.audit-open-button{border:0;border-radius:10px;padding:10px 14px;background:#fff1f0;color:#c32828;font-weight:800;cursor:pointer;box-shadow:inset 0 0 0 1px #ffc9c6}.audit-open-button[hidden]{display:none}.capital-audit-page{margin:0;background:#f3f6fb;color:#17213a;font-family:Inter,Segoe UI,Arial,sans-serif}.capital-audit-shell{max-width:1320px;margin:auto;padding:22px;display:grid;gap:14px}.capital-audit-hero,.capital-audit-findings,.capital-audit-grid article{background:#fff;border:1px solid #e0e7f2;border-radius:17px;box-shadow:0 8px 25px rgba(20,35,70,.05)}.capital-audit-hero{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:20px}.capital-audit-hero span{font-size:11px;font-weight:800;letter-spacing:.12em;color:#6038ec}.capital-audit-hero h1{margin:4px 0;font-size:28px}.capital-audit-hero p{margin:0;color:#69778f}.capital-audit-hero>div:last-child{display:flex;gap:8px}.capital-audit-hero a{text-decoration:none}.capital-audit-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.capital-audit-cards article{display:grid;gap:6px;padding:17px;background:#111c30;color:#fff;border-radius:15px;border:1px solid #263752}.capital-audit-cards span{font-size:11px;color:#aab8d0;text-transform:uppercase;font-weight:800}.capital-audit-cards strong{font-size:22px}.capital-audit-cards small{color:#91a0ba}.capital-audit-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}.capital-audit-grid article,.capital-audit-findings{padding:18px}.capital-audit-grid h2,.capital-audit-findings h2{margin:0 0 12px;font-size:17px}.capital-audit-grid dl{margin:0}.capital-audit-grid dl div{display:flex;justify-content:space-between;gap:12px;padding:9px 0;border-bottom:1px solid #e9eef6}.capital-audit-grid dt{color:#68758d}.capital-audit-grid dd{margin:0;font-weight:800;text-align:right}.capital-audit-findings>div{display:grid;gap:8px}.capital-audit-findings article{padding:12px 14px;border-radius:10px;border-left:4px solid #1ba66a;background:#f1fbf6}.capital-audit-findings article.warn{border-color:#e59b00;background:#fffaec}.capital-audit-findings article.bad{border-color:#e5484d;background:#fff2f1}.capital-audit-findings article p{margin:4px 0 0;color:#5d6980}.negative{color:#dc353c!important}.positive{color:#d88400!important}.balanced{color:#15975f!important}@media(max-width:760px){.capital-audit-shell{padding:12px}.capital-audit-hero{align-items:flex-start;flex-direction:column}.capital-audit-cards,.capital-audit-grid{grid-template-columns:1fr}.capital-audit-hero h1{font-size:23px}.capital-audit-cards strong{font-size:19px}}
.capital-summary-grid article.alipay{border-top-color:#d79a08;background:linear-gradient(145deg,#fff,#fffaf0)}.capital-summary-grid article.alipay strong{color:#9b6900}
.capital-payout-form{display:grid;grid-template-columns:repeat(4,minmax(140px,1fr));gap:10px;margin-bottom:8px}.capital-payout-form label{display:grid;gap:5px;font-size:11px;font-weight:700;color:#5a6880}.capital-payout-form input,.capital-payout-form select{width:100%;box-sizing:border-box;padding:10px 11px;border:1px solid #dce3ef;border-radius:9px;background:#fbfcff;color:#17213a}.capital-payout-form .primary-button{align-self:end;min-height:39px}.capital-rate-note{margin:5px 0 12px;padding:8px 10px;border-radius:8px;background:#f5f8ff;color:#697893;font-size:11px}@media(max-width:1000px){.capital-payout-form{grid-template-columns:repeat(2,1fr)}}@media(max-width:600px){.capital-payout-form{grid-template-columns:1fr}}
body.profit-audit-page { background: #f3f6fc; }
.profit-audit-main { display: grid; gap: 14px; }
.profit-audit-hero { display:flex;align-items:center;justify-content:space-between;gap:18px;padding:20px 22px;border:1px solid #e1e6f2;border-radius:18px;background:white;box-shadow:0 8px 24px rgba(38,55,94,.06); }
.profit-audit-hero span,.profit-section-title span { color:#5c38f4;font-size:.66rem;font-weight:900;letter-spacing:.12em; }
.profit-audit-hero h1 { margin:4px 0;font-size:1.8rem;color:#12203a; }.profit-audit-hero p { margin:0;color:#66738d;font-size:.84rem; }
.profit-audit-actions { display:flex;gap:8px;align-items:center; }.profit-menu-button { display:none; }
.profit-filter-panel,.profit-adjustment-form { display:grid;grid-template-columns:repeat(2,minmax(180px,1fr)) auto auto;gap:10px;align-items:end;padding:14px;border:1px solid #e0e6f2;border-radius:16px;background:white; }
.profit-filter-panel label,.profit-adjustment-form label { display:grid;gap:6px;color:#53617a;font-size:.72rem;font-weight:800; }.profit-filter-panel input,.profit-adjustment-form input { min-height:42px;padding:0 12px;border:1px solid #dce3f1;border-radius:10px;background:#fbfcff; }
.profit-summary-grid { display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px; }.profit-summary-grid article { min-height:94px;padding:14px;border:1px solid #dfe5f1;border-radius:14px;background:white; }.profit-summary-grid span { display:block;margin-bottom:12px;color:#697791;font-size:.68rem;font-weight:900;text-transform:uppercase; }.profit-summary-grid strong { color:#18243c;font-size:1.12rem; }.profit-summary-grid .green strong { color:#079447; }.profit-summary-grid .red strong { color:#dc2626; }.profit-summary-grid .purple strong { color:#5c38f4; }
.profit-chart-card,.profit-data-card,.profit-adjustment-card { padding:16px;border:1px solid #dfe5f1;border-radius:16px;background:white;box-shadow:0 7px 22px rgba(34,52,91,.05); }.profit-section-title { display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px; }.profit-section-title h2 { margin:3px 0 0;color:#16233c;font-size:1rem; }.profit-section-title small { color:#66738d;font-size:.72rem; }
.profit-chart-wrap { width:100%;min-height:300px;overflow-x:auto;border-radius:12px;background:linear-gradient(180deg,#f8faff,#fff); }.profit-chart-wrap canvas { display:block; }
.profit-table-wrap { overflow:auto; }.profit-table { width:100%;border-collapse:collapse;white-space:nowrap;font-size:.75rem; }.profit-table th { position:sticky;top:0;padding:10px;background:#f4f1ff;color:#30245f;text-align:right; }.profit-table th:first-child,.profit-table td:first-child { text-align:left; }.profit-table td { padding:11px 10px;border-bottom:1px solid #edf0f6;text-align:right;color:#35415a; }.profit-table .tax-cell,.profit-table .minus-cell { color:#dc2626; }.profit-table .net-profit-cell { color:#079447;font-weight:900; }.profit-table .net-profit-cell.negative { color:#dc2626; }
.profit-adjustment-form { grid-template-columns:180px 220px minmax(280px,1fr) auto;padding:0;border:0; }.minus-history { display:grid;gap:7px;margin-top:14px;color:#68758d;font-size:.76rem; }.minus-history article { display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:12px;align-items:center;padding:10px 12px;border:1px solid #f4d5d5;border-radius:10px;background:#fff9f9; }.minus-history article div { display:grid;gap:3px; }.minus-history b { color:#dc2626; }.minus-history button { padding:6px 10px;border:1px solid #f0bcbc;border-radius:8px;background:white;color:#c62828;cursor:pointer; }
@media(max-width:1050px){.profit-summary-grid{grid-template-columns:repeat(3,1fr)}.profit-adjustment-form{grid-template-columns:repeat(2,1fr)}.profit-adjustment-form button{min-height:42px}}
@media(max-width:760px){body.profit-mobile-menu-open .sidebar{transform:translateX(0)}body.profit-mobile-menu-open .mobile-sidebar-backdrop{display:block}.profit-menu-button{display:inline-flex}.profit-audit-hero{align-items:flex-start;flex-direction:column;padding:16px}.profit-audit-actions{flex-wrap:wrap;justify-content:stretch;width:100%}.profit-audit-actions .primary-button,.profit-audit-actions .ghost-button,.profit-menu-button{min-height:42px;flex:1 1 auto}.profit-filter-panel{grid-template-columns:1fr}.profit-filter-panel input,.profit-filter-panel select,.profit-filter-panel button{min-height:42px;width:100%}.profit-summary-grid{grid-template-columns:1fr}.profit-summary-grid article{min-width:0}.profit-summary-grid strong{overflow-wrap:anywhere}.profit-summary-grid article:last-child{grid-column:auto}.profit-adjustment-form{grid-template-columns:1fr}.minus-history article{grid-template-columns:1fr auto}.minus-history article div{grid-column:1/-1}.profit-chart-card,.profit-data-card,.profit-adjustment-card{padding:12px}.profit-table-wrap{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}}

/* ===== Mobile/tablet polish (non-transfer pages) — desktop unchanged ===== */
@media (max-width: 980px) {
  body:not(.transfer-portal-page) .main-shell {
    min-width: 0;
    overflow-x: hidden;
  }

  body:not(.transfer-portal-page) .hero,
  body:not(.transfer-portal-page) .panel,
  body:not(.transfer-portal-page) .table-panel {
    min-width: 0;
    max-width: 100%;
  }

  body:not(.transfer-portal-page):not(.sales-order-page) .hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
  }

  body:not(.transfer-portal-page):not(.sales-order-page) .hero-actions > * {
    min-width: 0;
  }

  body:not(.transfer-portal-page):not(.sales-order-page) .hero-actions .primary-button,
  body:not(.transfer-portal-page):not(.sales-order-page) .hero-actions .ghost-button {
    min-height: 42px;
  }

  body:not(.transfer-portal-page) .panel-grid,
  body:not(.transfer-portal-page) .filters-grid,
  body:not(.transfer-portal-page) .settings-grid,
  body:not(.transfer-portal-page) .telegram-template-grid,
  body:not(.transfer-portal-page) .buyer-settings-grid {
    min-width: 0;
  }

  body:not(.transfer-portal-page) .table-wrap,
  body:not(.transfer-portal-page) .data-table-wrap,
  body:not(.transfer-portal-page) .listings-table-wrap {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  body:not(.transfer-portal-page) .multi-filter-menu {
    max-width: min(92vw, 360px);
  }
}

@media (max-width: 760px) {
  body:not(.transfer-portal-page) .side-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body:not(.transfer-portal-page) .side-nav .nav-item {
    min-width: 0;
    overflow-wrap: anywhere;
    white-space: normal;
    line-height: 1.25;
  }

  body:not(.transfer-portal-page) .stats-grid,
  body:not(.transfer-portal-page) .dashboard-stats-grid {
    grid-template-columns: 1fr;
  }

  body:not(.transfer-portal-page) .stat-card strong {
    overflow-wrap: anywhere;
  }

  body:not(.transfer-portal-page):not(.sales-order-page) .panel-actions,
  body:not(.transfer-portal-page) .settings-actions,
  body:not(.transfer-portal-page) .dashboard-inline-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    width: 100%;
  }

  body:not(.transfer-portal-page):not(.sales-order-page) .panel-actions .primary-button,
  body:not(.transfer-portal-page):not(.sales-order-page) .panel-actions .ghost-button,
  body:not(.transfer-portal-page) .settings-actions .primary-button,
  body:not(.transfer-portal-page) .settings-actions .ghost-button,
  body:not(.transfer-portal-page) .dashboard-inline-actions .primary-button,
  body:not(.transfer-portal-page) .dashboard-inline-actions .ghost-button {
    width: 100%;
    min-height: 42px;
  }

  body:not(.transfer-portal-page) .telegram-preview-headline,
  body:not(.transfer-portal-page) .telegram-copy-actions {
    flex-wrap: wrap;
    align-items: stretch;
  }

  body:not(.transfer-portal-page) .telegram-copy-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    gap: 8px;
  }

  body:not(.transfer-portal-page) .telegram-copy-actions .primary-button,
  body:not(.transfer-portal-page) .telegram-copy-actions .ghost-button {
    width: 100%;
    min-height: 42px;
  }

  body:not(.transfer-portal-page) .order-input-dialog,
  body:not(.transfer-portal-page) .order-input-modal {
    max-width: 100%;
  }

  body:not(.transfer-portal-page) .order-input-modal {
    width: min(100vw - 16px, 640px);
  }
}

@media (max-width: 420px) {
  body.sales-order-page .sales-headbar-stats {
    grid-template-columns: 1fr;
  }

  body.sales-order-page .unsettled-headbar-stat {
    grid-column: auto;
  }

  body.sales-order-page .order-card-actions {
    grid-template-columns: 1fr;
  }

  body.sales-order-page .order-card-actions .action-wide {
    grid-column: auto;
  }

  body.sales-order-page .hero-actions {
    grid-template-columns: 1fr;
  }
}

/* Login page */
body.login-page {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at top right, rgba(92, 56, 244, 0.18), transparent 28%),
    linear-gradient(180deg, #101a2f 0%, #0b1220 100%);
}

.login-shell {
  width: min(420px, calc(100vw - 28px));
  padding: 18px 0;
}

.login-card {
  padding: 28px 24px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 60px rgba(8, 17, 37, 0.35);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.login-brand strong {
  display: block;
  color: #12203a;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
}

.login-brand span {
  color: #6d7891;
  font-size: 0.75rem;
}

.login-card h1 {
  margin: 0 0 6px;
  font-size: 1.45rem;
  color: #12203a;
}

.login-subtitle {
  margin: 0 0 18px;
  color: #66738d;
  font-size: 0.86rem;
  line-height: 1.45;
}

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

.login-form .field span {
  display: block;
  margin-bottom: 5px;
  color: #53617a;
  font-size: 0.72rem;
  font-weight: 800;
}

.login-form input {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid #dce3f1;
  border-radius: 10px;
  background: #fbfcff;
  color: #17213a;
  font-size: 0.95rem;
}

.login-form .primary-button {
  min-height: 46px;
  margin-top: 4px;
  width: 100%;
}

.login-message {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #fecaca;
  border-radius: 10px;
  color: #b91c1c;
  background: #fff1f2;
  font-size: 0.82rem;
  font-weight: 700;
}
