:root {
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-pill: 999px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 48px;
  --font-xs: 0.75rem;
  --font-sm: 0.8125rem;
  --font-base: 0.9375rem;
  --font-md: 1rem;
  --font-lg: 1.125rem;
  --font-xl: 1.5rem;
  --font-2xl: 2rem;
  --font-display: clamp(2rem, 4vw, 2.75rem);
  --transition-fast: 0.15s ease;
  --transition: 0.2s ease;
  --transition-slow: 0.3s ease;
}

html[data-theme-resolved="dark"] {
  color-scheme: dark;
  --bg: #000000;
  --bg-secondary: #040404;
  --bg-tertiary: #080808;
  --bg-accent: rgba(194, 177, 117, 0.05);
  --sidebar: #070707;
  --panel: #0b0b0b;
  --panel-strong: #101010;
  --panel-muted: #080808;
  --panel-soft: rgba(255, 255, 255, 0.04);
  --border: rgba(207, 189, 129, 0.28);
  --border-strong: rgba(207, 189, 129, 0.42);
  --text: #f5f7fa;
  --muted: #b3bdcc;
  --accent: #bca561;
  --accent-strong: #d8c280;
  --accent-soft: rgba(188, 165, 97, 0.14);
  --success: #4ec497;
  --warning: #d7b561;
  --danger: #d67269;
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.18);
  --shadow-md: 0 14px 36px rgba(0, 0, 0, 0.24);
  --shadow-lg: 0 28px 68px rgba(0, 0, 0, 0.38);
  --shadow: var(--shadow-md);
}

html[data-theme-resolved="light"] {
  color-scheme: light;
  --bg: #f3f2ee;
  --bg-secondary: #ece8df;
  --bg-tertiary: #ffffff;
  --bg-accent: rgba(164, 138, 61, 0.08);
  --sidebar: rgba(255, 255, 255, 0.97);
  --panel: rgba(255, 255, 255, 0.98);
  --panel-strong: rgba(249, 247, 241, 0.99);
  --panel-muted: rgba(243, 239, 230, 0.96);
  --panel-soft: rgba(0, 0, 0, 0.02);
  --border: rgba(106, 92, 49, 0.12);
  --border-strong: rgba(106, 92, 49, 0.22);
  --text: #17191c;
  --muted: #5a616b;
  --accent: #b59a42;
  --accent-strong: #d4bc6d;
  --accent-soft: rgba(181, 154, 66, 0.14);
  --success: #2e9b74;
  --warning: #a67a26;
  --danger: #c05d55;
  --shadow-sm: 0 6px 18px rgba(20, 23, 29, 0.05);
  --shadow-md: 0 24px 60px rgba(20, 23, 29, 0.08);
  --shadow-lg: 0 36px 88px rgba(20, 23, 29, 0.14);
  --shadow: var(--shadow-md);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background:
    radial-gradient(ellipse at 20% 0%, rgba(188, 165, 97, 0.06), transparent 45%),
    radial-gradient(ellipse at 80% 100%, rgba(188, 165, 97, 0.04), transparent 50%),
    #000000;
  color: var(--text);
  font-family: "Manrope", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
}

body.sidebar-open {
  overflow: hidden;
}

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

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

.layout {
  display: grid;
  grid-template-columns: 228px minmax(0, 1fr);
  gap: 8px;
  min-height: 100vh;
  padding: 8px;
}

.sidebar-overlay {
  display: none;
}

.sidebar {
  position: sticky;
  top: 8px;
  height: calc(100vh - 16px);
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 20%), var(--sidebar);
  box-shadow: var(--shadow);
}

.sidebar-shell {
  display: flex;
  height: 100%;
  flex-direction: column;
  gap: 12px;
  padding: 12px 10px 10px;
}

.sidebar-top,
.sidebar-foot {
  flex: 0 0 auto;
}

.sidebar-top {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar-scroll {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 12px;
  overflow: auto;
  padding-right: 2px;
}

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

.brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  position: relative;
  display: inline-flex;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
}

.brand-mark-core,
.brand-mark-tail {
  position: absolute;
  display: block;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 10px 22px rgba(198, 180, 114, 0.18);
  transform: skewX(-18deg);
}

.brand-mark-core {
  width: 12px;
  height: 18px;
  left: 9px;
  top: 8px;
}

.brand-mark-tail {
  width: 14px;
  height: 8px;
  right: 8px;
  bottom: 9px;
}

.brand-flush {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-soft);
  position: relative;
}

.brand-flush::before,
.brand-flush::after {
  content: "";
  position: absolute;
  top: 13px;
  width: 8px;
  height: 2px;
  border-radius: 999px;
  background: var(--muted);
}

.brand-flush::before {
  left: 8px;
  transform: rotate(45deg);
}

.brand-flush::after {
  right: 8px;
  transform: rotate(-45deg);
}

.brand-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.brand-copy strong {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.brand-copy small {
  color: var(--muted);
  font-size: 0.72rem;
}

.sidebar-settings-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel-muted);
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 800;
}

.workspace-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel-muted);
}

.workspace-card-guest {
  background: var(--panel-muted);
}

.workspace-icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  background: rgba(188, 165, 97, 0.14);
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 800;
}

.workspace-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.workspace-copy strong {
  font-size: 0.9rem;
  font-weight: 800;
}

.workspace-copy small {
  color: var(--muted);
  font-size: 0.72rem;
}

.sidebar-group-label {
  margin: 4px 8px 2px;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

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

.nav-link,
.nav-link-static {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 8px 10px 8px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--muted);
  background: transparent;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.nav-link::before,
.nav-link-static::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 999px;
  background: transparent;
}

.nav-link:hover,
.nav-link.is-active,
.nav-stack.is-active > .nav-link {
  border-color: rgba(255, 255, 255, 0.04);
  background: rgba(255, 255, 255, 0.025);
  transform: translateX(1px);
}

.nav-link.is-active::before,
.nav-stack.is-active > .nav-link::before {
  background: linear-gradient(180deg, var(--accent), var(--accent-strong));
}

.nav-link-static {
  opacity: 0.72;
}

.nav-icon {
  position: relative;
  display: inline-flex;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.nav-icon::before,
.nav-icon::after {
  content: "";
  position: absolute;
}

.nav-icon-cash::before {
  inset: 8px 7px;
  border: 2px solid var(--accent-strong);
  border-radius: 8px;
}

.nav-icon-cash::after {
  left: 14px;
  right: 14px;
  top: 15px;
  height: 2px;
  background: var(--accent-strong);
}

.nav-icon-analytics::before {
  left: 9px;
  bottom: 8px;
  width: 4px;
  height: 12px;
  border-radius: 999px;
  background: var(--accent-strong);
  box-shadow: 8px -6px 0 0 var(--accent-strong), 16px -2px 0 0 var(--accent-strong);
}

.nav-icon-operations::before {
  inset: 8px;
  border: 2px solid var(--accent-strong);
  border-radius: 8px;
}

.nav-icon-operations::after {
  left: 11px;
  right: 11px;
  top: 16px;
  height: 2px;
  background: var(--accent-strong);
  box-shadow: 0 -6px 0 0 var(--accent-strong), 0 6px 0 0 var(--accent-strong);
}

.nav-icon-settings::before {
  inset: 8px;
  border: 2px solid var(--accent-strong);
  border-radius: 999px;
}

.nav-icon-settings::after {
  inset: 4px;
  border: 1px dashed rgba(239, 226, 173, 0.45);
  border-radius: 999px;
}

.nav-icon-register::before,
.nav-icon-login::before {
  left: 9px;
  right: 9px;
  top: 9px;
  bottom: 9px;
  border: 2px solid var(--accent-strong);
  border-radius: 8px;
}

.nav-icon-login::after {
  left: 16px;
  top: 8px;
  width: 2px;
  height: 18px;
  background: var(--accent-strong);
}

.nav-icon-help::before {
  inset: 8px;
  border: 2px solid var(--accent-strong);
  border-radius: 999px;
}

.nav-icon-help::after {
  content: "?";
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--accent-strong);
  font-size: 0.92rem;
  font-weight: 900;
}

.nav-icon-home::before {
  left: 10px;
  right: 10px;
  bottom: 8px;
  height: 12px;
  border: 2px solid var(--accent-strong);
  border-top: none;
  border-radius: 0 0 6px 6px;
}

.nav-icon-home::after {
  left: 11px;
  top: 8px;
  width: 14px;
  height: 14px;
  border-top: 2px solid var(--accent-strong);
  border-left: 2px solid var(--accent-strong);
  transform: rotate(45deg);
}

.nav-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.nav-copy strong {
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 800;
}

.nav-copy small {
  display: none;
}

.nav-submenu {
  margin-left: 42px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-subitem {
  display: flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.nav-subitem.is-active {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
}

.nav-subitem.is-static {
  opacity: 0.62;
  pointer-events: none;
}

.sidebar-note,
.support-card {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel-muted);
}

.sidebar-note {
  display: none;
}

.sidebar-note strong,
.support-title {
  display: block;
  margin-bottom: 6px;
  font-size: 0.95rem;
  font-weight: 800;
}

.sidebar-note span,
.support-card p {
  color: var(--muted);
  font-size: 0.85rem;
}

.support-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.support-label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.support-card p {
  margin: 0;
}

.support-card form {
  display: contents;
}

.sidebar-foot-action {
  display: block;
}

.main-shell {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 10px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--sidebar);
  box-shadow: var(--shadow);
}

.topbar-group,
.topbar-controls,
.topbar-pills {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-controls {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.topbar-merchant {
  display: none;
}

.project-chip {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.project-chip-icon {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  background: rgba(188, 165, 97, 0.14);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 800;
}

.project-chip-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.project-chip-copy strong {
  font-size: 0.9rem;
  font-weight: 800;
}

.project-chip-copy small {
  color: var(--muted);
  font-size: 0.72rem;
}

.topbar-chip {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.topbar-chip.is-active {
  color: var(--text);
}

.theme-toggle {
  display: flex;
  align-items: center;
}

.theme-toggle-buttons {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 32px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel-soft);
}

.theme-option {
  min-height: 24px;
  padding: 0 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.72rem;
  transition: background 0.18s ease, color 0.18s ease;
}

.theme-option[aria-pressed="true"] {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #17120a;
  font-weight: 800;
}

.theme-settings-row {
  display: grid;
  gap: 14px;
}

.theme-settings-row .theme-toggle-buttons {
  width: fit-content;
  max-width: 100%;
}

.sidebar-toggle {
  display: none;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel-muted);
  color: inherit;
  cursor: pointer;
}

.sidebar-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: currentColor;
}

.page-shell {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 14px;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.page-header-compact {
  align-items: center;
}

.page-title {
  margin: 8px 0 6px;
  font-size: clamp(1.7rem, 2.6vw, 2.35rem);
  font-weight: 800;
  line-height: 1.08;
}

.page-subtitle {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.btn {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.theme-option:focus-visible,
.sidebar-toggle:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 2px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #191309;
  box-shadow: none;
}

.btn-secondary {
  border-color: var(--border);
  background: var(--panel-muted);
  color: var(--text);
}

.btn-block {
  width: 100%;
}

.btn-plus {
  display: inline-grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.14);
  font-size: 0.95rem;
  line-height: 1;
}

.btn-gear {
  display: inline-flex;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  color: var(--accent-strong);
  font-size: 0.95rem;
  line-height: 1;
}

.topbar-settings-link {
  min-width: 0;
  gap: 10px;
}

.topbar-cta {
  min-width: 148px;
}

.surface {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.012), transparent 14%), var(--panel);
  box-shadow: var(--shadow);
}

.surface-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.surface-head h2,
.surface-head h3 {
  margin: 8px 0 0;
}

.surface-badge {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-layout,
.checkout-layout,
.gateway-layout,
.account-layout,
.auth-layout,
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.9fr);
  gap: 18px;
}

.auth-layout-narrow {
  grid-template-columns: minmax(0, 760px);
}

.surface-hero,
.surface-side,
.form-surface,
.auth-card,
.auth-side,
.account-panel,
.chart-surface,
.table-surface,
.status-surface {
  padding: 22px;
}

.section-block {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.section-headline h2 {
  margin: 8px 0 0;
}

.plans-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.plan-card {
  padding: 22px;
}

.plan-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.plan-period {
  color: var(--muted);
  font-size: 0.84rem;
}

.plan-card h3 {
  margin: 14px 0 10px;
}

.plan-price,
.gateway-price {
  margin: 18px 0 0;
  font-size: clamp(1.95rem, 3vw, 2.7rem);
  font-weight: 900;
  line-height: 1;
}

.plan-card.is-featured {
  border-color: var(--border-strong);
  box-shadow: 0 28px 80px rgba(198, 180, 114, 0.08);
}

.mini-stat-list,
.step-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mini-stat-list div,
.step-list div,
.preview-metric,
.preview-list div,
.workflow-step,
.compact-info-grid div {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), var(--panel-muted));
}

.mini-stat-list span,
.step-list span,
.preview-metric span,
.preview-list span,
.workflow-step span,
.compact-info-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.mini-stat-list strong,
.step-list strong,
.preview-metric strong,
.preview-list strong,
.workflow-step strong,
.compact-info-grid strong {
  display: block;
  margin-top: 6px;
  font-size: 1rem;
}

.compact-info-grid small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

.compact-info-grid {
  display: grid;
  gap: 12px;
}

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

.workflow-step small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.86rem;
}

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

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

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

.stat-card {
  padding: 18px;
}

.stat-card strong {
  display: block;
  margin: 12px 0 4px;
  font-size: clamp(1.5rem, 2vw, 2.1rem);
  line-height: 1;
}

.stat-card small {
  color: var(--muted);
  font-size: 0.8rem;
}

.stat-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.stat-card-accent {
  border-color: var(--border-strong);
  background: linear-gradient(180deg, rgba(188, 165, 97, 0.08), var(--panel));
}

.kpi-card {
  min-height: 138px;
}

.kpi-card-secondary {
  border-color: rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), var(--panel));
}

.kpi-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.kpi-icon {
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}

.kpi-unit {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.toolbar-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.toolbar-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel-muted);
}

.toolbar-chip {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel-muted);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.toolbar-group .toolbar-chip {
  min-height: 28px;
  padding: 0 12px;
  border-color: transparent;
  background: transparent;
}

.toolbar-chip.is-active {
  border-color: rgba(0, 0, 0, 0.04);
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #17120a;
}

.toolbar-chip-wide {
  min-width: 132px;
}

.analytics-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 272px;
  gap: 16px;
}

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

.analytics-panel {
  padding: 16px;
}

.analytics-panel-head {
  margin-bottom: 14px;
}

.section-headline .muted-copy {
  margin: 8px 0 0;
  max-width: 720px;
}

.analytics-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.mini-kpi {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel-muted);
}

.mini-kpi span {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
}

.mini-kpi strong {
  display: block;
  margin-top: 6px;
  font-size: 1.2rem;
}

.line-chart-shell {
  padding: 8px 0 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.012), transparent 20%), var(--panel-muted);
}

.chart-empty-state {
  margin-top: 14px;
}

.chart-note {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.95rem;
}

.line-chart-svg {
  display: block;
  width: 100%;
  height: auto;
}

.chart-grid-lines line {
  stroke: rgba(255, 255, 255, 0.05);
  stroke-width: 1;
}

.chart-axis-labels text {
  fill: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.line-chart-total,
.line-chart-paid {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.line-chart-total {
  stroke: rgba(198, 180, 114, 0.34);
}

.line-chart-paid {
  stroke: var(--accent-strong);
}

.line-chart-dot {
  stroke-width: 2;
}

.line-chart-dot-total {
  fill: rgba(198, 180, 114, 0.3);
  stroke: rgba(198, 180, 114, 0.18);
}

.line-chart-dot-paid {
  fill: var(--accent-strong);
  stroke: rgba(12, 17, 24, 0.9);
}

.chart-label-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
  padding: 0 40px 0 56px;
}

.chart-label-item {
  display: flex;
  flex: 1 1 0;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-width: 0;
}

.chart-label-item strong {
  font-size: 0.84rem;
  color: var(--muted);
}

.chart-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 0.82rem;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.legend-dot-primary {
  background: rgba(198, 180, 114, 0.45);
}

.legend-dot-secondary {
  background: var(--accent-strong);
}

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

.status-grid-compact {
  grid-template-columns: 1fr;
}

.status-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
}

.status-card strong {
  display: block;
  font-size: 1.18rem;
}

.status-card span:last-child {
  color: var(--muted);
}

.status-dot {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  border-radius: 999px;
}

.status-dot.is-success {
  background: var(--success);
}

.status-dot.is-warning {
  background: var(--warning);
}

.status-dot.is-danger {
  background: var(--danger);
}

.status-dot.is-primary {
  background: var(--accent);
}

.table-surface {
  overflow: hidden;
}

.table-surface-dense {
  padding-top: 6px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

tbody tr:last-child td {
  border-bottom: 0;
}

td strong {
  display: block;
}

td small {
  color: var(--muted);
}

.table-pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.79rem;
  font-weight: 800;
}

.table-pill.success {
  background: rgba(78, 196, 151, 0.12);
  color: var(--success);
}

.table-pill.warning {
  background: rgba(215, 181, 97, 0.14);
  color: var(--warning);
}

.table-pill.danger {
  background: rgba(214, 114, 105, 0.12);
  color: var(--danger);
}

.table-pill.neutral {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.form-grid,
.form-stack {
  display: grid;
  gap: 16px;
}

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

.form-grid > button {
  grid-column: 1 / -1;
}

.form-grid label,
.form-stack label {
  display: grid;
  gap: 8px;
  font-weight: 700;
}

.checkbox-field {
  display: flex !important;
  align-items: center;
  gap: 12px;
  font-weight: 600;
}

.checkbox-field input[type="checkbox"] {
  width: 18px;
  min-height: 18px;
  height: 18px;
  margin: 0;
}

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

textarea {
  min-height: 120px;
  padding: 14px 16px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: var(--muted);
}

input:disabled,
select:disabled,
textarea:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  border-color: var(--accent-strong);
  box-shadow: 0 0 0 1px var(--accent-strong), 0 0 0 4px rgba(188, 165, 97, 0.22);
}

input[type="checkbox"],
input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--border-strong);
  background: var(--panel-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  flex-shrink: 0;
  margin: 0;
  padding: 0;
  display: inline-block;
  vertical-align: middle;
}

input[type="checkbox"] {
  border-radius: 5px;
}

input[type="radio"] {
  border-radius: 50%;
}

input[type="checkbox"]:hover,
input[type="radio"]:hover {
  border-color: var(--accent);
}

input[type="checkbox"]:checked,
input[type="radio"]:checked {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  border-color: var(--accent-strong);
}

input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 4px;
  height: 9px;
  border: solid #0b0d12;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

input[type="radio"]:checked::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: #0b0d12;
}

input[type="checkbox"]:focus-visible,
input[type="radio"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(188, 165, 97, 0.28);
}

input[type="checkbox"]:disabled,
input[type="radio"]:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.form-grid label[data-required] > :first-child::after,
.form-stack label[data-required] > :first-child::after,
label[data-required]::after {
  content: " *";
  color: var(--accent);
  font-weight: 800;
}

.field-hint {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.form-field.has-error input,
.form-field.has-error select,
.form-field.has-error textarea,
input.is-invalid,
select.is-invalid,
textarea.is-invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(214, 114, 105, 0.16);
}

.form-error {
  color: var(--danger);
  font-size: 0.8rem;
  font-weight: 600;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
  grid-column: 1 / -1;
  margin-top: 4px;
}

.side-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.detail-grid div {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), var(--panel-muted));
}

.detail-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
}

.detail-grid strong {
  display: block;
  margin-top: 6px;
}

.gateway-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.notice {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel-muted);
  font-weight: 700;
}

.notice-error {
  border-color: rgba(214, 114, 105, 0.3);
  background: rgba(214, 114, 105, 0.1);
  color: #f0bab4;
}

.notice-success {
  border-color: rgba(78, 196, 151, 0.28);
  background: rgba(78, 196, 151, 0.1);
  color: #9fe2c6;
}

.status-layout {
  display: grid;
  min-height: 62vh;
  place-items: center;
}

.status-surface {
  width: min(780px, 100%);
}

.status-surface.status-success {
  border-color: rgba(78, 196, 151, 0.3);
}

.status-surface.status-warning {
  border-color: rgba(215, 181, 97, 0.3);
}

.status-surface.status-danger {
  border-color: rgba(214, 114, 105, 0.3);
}

.preview-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

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

.auth-inline-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin-top: 18px;
}

.auth-inline-links a {
  color: var(--accent-strong);
  font-weight: 700;
}

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

.empty-state {
  padding: 22px;
  border: 1px dashed var(--border-strong);
  border-radius: 16px;
  background: linear-gradient(180deg, var(--panel-muted), transparent);
}

.empty-state h3 {
  margin: 0 0 8px;
}

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

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

  .sidebar {
    position: fixed;
    inset: 14px auto 14px 14px;
    width: min(320px, calc(100vw - 32px));
    height: auto;
    max-height: calc(100vh - 28px);
    transform: translateX(calc(-100% - 28px));
    transition: transform 0.22s ease;
    z-index: 40;
  }

  .sidebar[data-open="true"] {
    transform: translateX(0);
  }

  .sidebar-overlay[data-visible="true"] {
    position: fixed;
    inset: 0;
    display: block;
    border: 0;
    background: rgba(0, 0, 0, 0.54);
    z-index: 30;
  }

  .sidebar-toggle {
    display: inline-block;
  }

  .topbar {
    position: sticky;
    top: 10px;
    z-index: 10;
  }

  .topbar-merchant {
    display: flex;
  }

  .dashboard-layout,
  .checkout-layout,
  .gateway-layout,
  .account-layout,
  .auth-layout,
  .hero-grid,
  .analytics-layout {
    grid-template-columns: 1fr;
  }

  .primary-stats,
  .primary-stats-3,
  .plans-grid,
  .analytics-mini-grid,
  .workflow-board,
  .preview-metrics,
  .preview-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .toolbar-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workflow-board,
  .analytics-mini-grid,
  .status-grid,
  .detail-grid,
  .preview-metrics,
  .preview-list,
  .chart-label-row,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-grid > button {
    grid-column: auto;
  }

  .chart-label-row {
    padding: 0 12px;
  }
}

@media (max-width: 720px) {
  .layout {
    gap: 12px;
    padding: 12px;
  }

  .topbar,
  .surface-hero,
  .surface-side,
  .form-surface,
  .auth-card,
  .auth-side,
  .account-panel,
  .chart-surface,
  .table-surface,
  .status-surface,
  .plan-card,
  .stat-card,
  .analytics-panel {
    padding: 18px;
  }

  .page-header,
  .topbar,
  .topbar-controls {
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar-controls {
    width: 100%;
  }

  .topbar-pills,
  .theme-toggle,
  .project-chip,
  .topbar-cta {
    width: 100%;
  }

  .theme-toggle-buttons {
    width: 100%;
    flex-wrap: wrap;
  }

  .theme-option {
    flex: 1 1 auto;
  }

  .primary-stats,
  .primary-stats-3,
  .plans-grid,
  .toolbar-row {
    grid-template-columns: 1fr;
  }

  table,
  thead,
  tbody,
  th,
  td,
  tr {
    display: block;
  }

  thead {
    display: none;
  }

  tbody {
    display: grid;
    gap: 14px;
  }

  tbody tr {
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--panel-muted);
  }

  td {
    padding: 6px 0;
    border-bottom: 0;
  }

td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }
}

.layout {
  grid-template-columns: 228px minmax(0, 1fr);
}

.sidebar {
  border-radius: 16px;
}

.project-chip {
  min-width: 220px;
}

.filters-surface {
  padding: 14px 16px;
}

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

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

.filters-grid label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.filters-grid input,
.filters-grid select {
  min-height: 46px;
}

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

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

.method-row {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--panel-soft);
}

.method-row-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.method-row-top strong {
  font-size: 0.94rem;
}

.method-row-top small,
.method-row-meta {
  color: var(--muted);
  font-size: 0.8rem;
}

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

.wallet-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 18%), var(--panel-soft);
}

.wallet-card.is-default {
  border-color: var(--border-strong);
  box-shadow: 0 0 0 1px rgba(198, 180, 114, 0.08);
}

.wallet-card-head,
.wallet-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.wallet-card-head {
  align-items: flex-start;
}

.wallet-card-head small,
.wallet-card-body small,
.wallet-card-body span {
  display: block;
  color: var(--muted);
}

.wallet-card-body {
  display: grid;
  gap: 4px;
}

.wallet-card-actions {
  flex-wrap: wrap;
}

.wallet-card-actions form {
  margin: 0;
}

.btn-compact {
  min-height: 36px;
  padding: 8px 12px;
  font-size: 0.84rem;
}

.wallet-preview-list {
  display: grid;
  gap: 10px;
}

.wallet-preview-item {
  display: grid;
  gap: 2px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel-soft);
}

.wallet-preview-item small,
.wallet-preview-item span,
.muted-copy {
  color: var(--muted);
}

@media (max-width: 1100px) {
  .filters-grid,
  .filters-grid-operations {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-actions {
    width: 100%;
  }
}

@media (max-width: 720px) {
  .filters-grid,
  .filters-grid-operations {
    grid-template-columns: 1fr;
  }

  .wallet-card-head,
  .wallet-card-actions {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Simple console pass */
html[data-theme-resolved="dark"] {
  --bg: #04070a;
  --bg-secondary: #080c11;
  --sidebar: #0d1218;
  --panel: #121922;
  --panel-strong: #131a22;
  --panel-muted: #0f151d;
  --border: rgba(207, 189, 129, 0.08);
  --border-strong: rgba(207, 189, 129, 0.16);
}

body {
  background: linear-gradient(180deg, var(--bg-secondary), var(--bg) 30%, #020407);
}

.layout {
  grid-template-columns: 212px minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
}

.sidebar,
.topbar,
.surface,
.toolbar-group,
.toolbar-chip,
.btn,
.project-chip,
.workspace-card,
.support-card,
.brand-mark,
.nav-link,
.nav-link-static,
.nav-subitem,
.empty-state,
.wallet-card,
.method-row,
.wallet-preview-item,
.mini-kpi,
.line-chart-shell,
.surface-badge,
tbody tr {
  border-radius: 14px;
}

.sidebar {
  background: var(--sidebar);
  box-shadow: none;
  backdrop-filter: none;
}

.sidebar-shell {
  gap: 10px;
  padding: 12px 10px;
}

.brand-copy strong {
  font-size: 0.98rem;
}

.brand-copy small,
.workspace-copy small,
.project-chip-copy small {
  font-size: 0.7rem;
}

.workspace-card,
.support-card {
  padding: 10px;
}

.sidebar-group-label {
  margin: 2px 6px 0;
  font-size: 0.64rem;
  letter-spacing: 0.12em;
}

.sidebar-nav {
  gap: 6px;
}

.nav-link,
.nav-link-static {
  min-height: 52px;
  padding: 9px 10px 9px 12px;
}

.nav-link:hover,
.nav-link.is-active,
.nav-stack.is-active > .nav-link {
  transform: none;
}

.nav-copy {
  gap: 3px;
}

.nav-copy strong {
  font-size: 0.86rem;
}

.nav-copy small {
  display: block;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.3;
}

.nav-submenu {
  display: none;
}

.support-card {
  gap: 8px;
}

.support-title {
  margin-bottom: 4px;
  font-size: 0.9rem;
}

.support-card p {
  font-size: 0.8rem;
}

.topbar {
  gap: 10px;
  padding: 10px 12px;
  box-shadow: none;
}

.topbar-group,
.topbar-controls,
.topbar-pills {
  gap: 10px;
}

.project-chip {
  min-width: 0;
  padding: 6px 8px;
}

.topbar-chip {
  min-height: 28px;
  padding: 0 10px;
  font-size: 0.72rem;
}

.theme-toggle-buttons {
  min-height: 30px;
}

.theme-option {
  min-height: 22px;
  font-size: 0.7rem;
}

.page-shell {
  gap: 12px;
  padding-bottom: 12px;
}

.page-header {
  gap: 12px;
}

.page-title {
  margin: 6px 0 4px;
  font-size: clamp(1.55rem, 2.2vw, 2rem);
}

.page-subtitle {
  max-width: 560px;
  font-size: 0.88rem;
}

.eyebrow {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
}

.btn {
  min-height: 38px;
  padding: 0 13px;
  border-radius: 12px;
}

.btn-plus {
  width: 18px;
  height: 18px;
}

.topbar-cta {
  min-width: 0;
}

.surface {
  background: var(--panel);
  box-shadow: none;
}

.surface-hero,
.surface-side,
.form-surface,
.auth-card,
.auth-side,
.account-panel,
.chart-surface,
.table-surface,
.status-surface,
.plan-card,
.stat-card,
.analytics-panel {
  padding: 18px;
}

.surface-head {
  gap: 12px;
  margin-bottom: 14px;
}

.surface-badge {
  min-height: 28px;
  padding: 0 10px;
  font-size: 0.68rem;
}

.section-block {
  gap: 14px;
}

.section-headline {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.section-headline h2 {
  margin: 6px 0 0;
}

.preview-list,
.compact-info-grid {
  gap: 12px;
}

.preview-list div,
.compact-info-grid div {
  padding: 14px;
  border-radius: 14px;
}

.preview-list small,
.compact-info-grid small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

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

.primary-stats {
  gap: 8px;
}

.stat-card {
  padding: 16px;
}

.stat-card strong {
  margin: 10px 0 4px;
  font-size: clamp(1.4rem, 1.9vw, 1.9rem);
}

.kpi-card {
  min-height: 124px;
}

.kpi-icon {
  width: 24px;
  height: 24px;
  border-radius: 8px;
}

.toolbar-row {
  align-items: center;
  gap: 8px;
}

.toolbar-group {
  gap: 4px;
  padding: 3px;
}

.toolbar-chip {
  min-height: 32px;
  padding: 0 10px;
  font-size: 0.74rem;
}

.toolbar-group .toolbar-chip {
  min-height: 26px;
  padding: 0 10px;
}

.filters-surface {
  padding: 12px 14px;
}

.filters-grid {
  gap: 12px;
}

.filters-grid label {
  gap: 6px;
  font-size: 0.8rem;
}

.filters-grid input,
.filters-grid select,
.form-grid input,
.form-grid select,
.form-stack input,
.form-stack select {
  min-height: 42px;
}

.analytics-panel {
  padding: 16px;
}

.analytics-panel-head {
  margin-bottom: 12px;
}

.analytics-mini-grid {
  gap: 8px;
  margin-bottom: 12px;
}

.mini-kpi {
  padding: 12px;
}

.mini-kpi strong {
  font-size: 1.08rem;
}

.line-chart-shell {
  padding-top: 4px;
}

.table-surface {
  padding: 16px;
}

.table-surface-dense {
  padding: 14px;
}

.wallet-card,
.method-row {
  gap: 10px;
  padding: 12px;
}

.wallet-preview-list {
  gap: 8px;
}

.wallet-preview-item {
  padding: 12px;
}

/* Strict black pass */
html[data-theme-resolved="dark"],
html[data-theme-resolved="light"] {
  color-scheme: dark;
  --bg: #000000;
  --bg-secondary: #010101;
  --bg-tertiary: #060606;
  --bg-accent: rgba(226, 203, 133, 0.05);
  --sidebar: #040404;
  --panel: #070707;
  --panel-strong: #090909;
  --panel-muted: #050505;
  --panel-soft: rgba(255, 255, 255, 0.01);
  --border: #d9c278;
  --border-strong: #ecd99e;
  --text: #ece7d8;
  --muted: #a99f8d;
  --accent: #e2cb85;
  --accent-strong: #f1e0ad;
  --accent-soft: rgba(226, 203, 133, 0.09);
  --shadow: none;
}

body {
  background: #000000;
  color: var(--text);
  font-family: "Manrope", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
}

.layout {
  gap: 10px;
  padding: 10px;
}

.sidebar,
.topbar,
.surface,
.toolbar-group,
.toolbar-chip,
.btn,
.nav-link,
.nav-link-static,
.nav-subitem,
.empty-state,
.wallet-card,
.method-row,
.wallet-preview-item,
.mini-kpi,
.line-chart-shell,
.surface-badge,
tbody tr {
  border-radius: 12px;
}

.sidebar,
.topbar,
.surface,
.toolbar-group,
.toolbar-chip,
.btn,
.nav-link,
.nav-link-static,
.nav-subitem,
.empty-state,
.wallet-card,
.method-row,
.wallet-preview-item,
.mini-kpi,
.line-chart-shell {
  box-shadow: none;
}

.sidebar {
  background: var(--sidebar);
  border: 1px solid var(--border);
  backdrop-filter: none;
}

.sidebar-settings-link {
  display: none !important;
}

.brand-copy strong,
.project-chip-copy strong {
  font-weight: 700;
}

.nav-copy {
  gap: 0;
}

.nav-copy strong {
  font-size: 0.87rem;
  font-weight: 650;
}

.nav-copy small {
  display: none !important;
}

.sidebar-group-label,
.support-label,
.eyebrow {
  font-weight: 700;
  letter-spacing: 0.1em;
}

.topbar {
  display: flex;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  background: var(--sidebar);
}

.topbar-merchant {
  display: flex;
}

.topbar-controls {
  justify-content: flex-end;
}

.page-title {
  font-weight: 600;
}

.page-subtitle {
  color: var(--muted);
  font-size: 0.88rem;
}

.surface-head h2,
.surface-head h3,
.section-headline h2 {
  font-weight: 600;
}

.btn {
  min-height: 38px;
  border-width: 1px;
  font-weight: 600;
}

.btn-primary {
  border-color: var(--border-strong);
  background: #070707;
  color: var(--accent-strong);
}

.btn-secondary {
  border-color: var(--border);
  background: #050505;
  color: var(--text);
}

.nav-link:hover,
.toolbar-chip:hover {
  background: rgba(255, 255, 255, 0.02);
  transform: none;
}

.btn-gear {
  color: var(--accent-strong);
  font-size: 0.98rem;
}

.topbar-settings-link {
  gap: 8px;
}

.surface {
  border: 1px solid var(--border);
  background: var(--panel);
}

.surface-badge {
  border: 1px solid var(--border-strong);
  background: #090909;
  color: var(--accent-strong);
  font-weight: 700;
}

.toolbar-group {
  border: 1px solid var(--border);
  background: #050505;
}

.toolbar-chip {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
}

.toolbar-chip.is-active {
  border-color: var(--border-strong);
  background: #080808;
  color: var(--accent-strong);
}

.nav-link,
.nav-link-static,
.nav-subitem,
.wallet-card,
.method-row,
.wallet-preview-item,
.mini-kpi,
.line-chart-shell {
  border: 1px solid var(--border);
}

.sidebar-toggle,
.filters-grid input,
.filters-grid select,
.form-grid input,
.form-grid select,
.form-stack input,
.form-stack select,
textarea {
  border: 1px solid var(--border);
  background: #060606;
  color: var(--text);
}

.empty-state {
  border: 1px dashed var(--border-strong);
  background: #050505;
}

.preview-list div,
.compact-info-grid div,
.wallet-preview-item {
  border: 1px solid var(--border);
  background: #060606;
}

.notice {
  padding: 12px 14px;
  border-radius: 12px;
}

.status-surface {
  width: min(920px, 100%);
}

@media (max-width: 1180px) {
  .preview-list-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .preview-list-3 {
    grid-template-columns: 1fr;
  }
}

/* Standalone auth screens */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body.auth-standalone-page {
  background:
    radial-gradient(circle at 82% 6%, rgba(97, 67, 180, 0.26), transparent 26%),
    radial-gradient(circle at 8% 100%, rgba(217, 194, 120, 0.18), transparent 34%),
    #040404;
  overflow-x: hidden;
}

.auth-standalone-shell {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px 20px 28px;
}

.auth-standalone-shell::before,
.auth-standalone-shell::after {
  content: "";
  position: absolute;
  inset: auto;
  pointer-events: none;
  z-index: 0;
  filter: blur(18px);
}

.auth-standalone-shell::before {
  width: min(34vw, 420px);
  height: min(34vw, 420px);
  right: -6%;
  top: -3%;
  background: radial-gradient(circle, rgba(101, 73, 193, 0.34), rgba(101, 73, 193, 0));
}

.auth-standalone-shell::after {
  width: min(40vw, 520px);
  height: min(40vw, 520px);
  left: -10%;
  bottom: -18%;
  background: radial-gradient(circle, rgba(198, 169, 86, 0.22), rgba(198, 169, 86, 0));
}

.auth-brand-header,
.auth-stage {
  position: relative;
  z-index: 1;
}

.auth-brand-header {
  margin-bottom: 34px;
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.auth-brand .brand-mark {
  width: 110px;
  height: 66px;
}

.auth-brand-copy {
  color: #f5efe0;
  font-size: 1.24rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.auth-stage {
  width: 100%;
  display: flex;
  justify-content: center;
}

.auth-standalone-card {
  width: min(456px, 100%);
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(22, 22, 22, 0.96), rgba(12, 12, 12, 0.98));
}

.auth-standalone-card-wide {
  width: min(520px, 100%);
}

.auth-card-header {
  margin-bottom: 22px;
  text-align: center;
}

.auth-card-title {
  margin: 0;
  color: #f5efe0;
  font-size: clamp(1.68rem, 2.4vw, 2rem);
  font-weight: 600;
  line-height: 1.1;
}

.auth-card-subtitle {
  margin: 10px 0 0;
  color: rgba(236, 231, 216, 0.72);
  font-size: 0.95rem;
}

.auth-standalone-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-field {
  position: relative;
}

.auth-field input {
  width: 100%;
  min-height: 64px;
  padding: 0 18px;
  border: 1px solid rgba(236, 217, 158, 0.2);
  border-radius: 16px;
  background: rgba(31, 31, 31, 0.92);
  color: #f3ede0;
  font-size: 1rem;
  font-weight: 500;
}

.auth-field input::placeholder {
  color: rgba(236, 231, 216, 0.42);
}

.auth-field input:focus {
  outline: none;
  border-color: var(--border-strong);
  background: rgba(36, 36, 36, 0.96);
}

.auth-password-field input {
  padding-right: 56px;
}

.auth-password-toggle {
  position: absolute;
  top: 50%;
  right: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(236, 231, 216, 0.5);
  transform: translateY(-50%);
  cursor: pointer;
}

.auth-password-toggle:hover {
  color: var(--accent-strong);
}

.auth-password-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-submit {
  width: 100%;
  min-height: 54px;
  margin-top: 10px;
  border-color: var(--border-strong);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(224, 198, 122, 0.18), rgba(214, 192, 140, 0.08));
  color: #f7f1e2;
  font-size: 1rem;
  font-weight: 600;
}

.auth-submit:hover {
  background: linear-gradient(180deg, rgba(236, 217, 158, 0.22), rgba(214, 192, 140, 0.1));
}

.auth-standalone-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px 18px;
  margin-top: 20px;
}

.auth-standalone-links a {
  color: rgba(236, 231, 216, 0.76);
  font-size: 0.92rem;
  font-weight: 500;
}

.auth-standalone-links a:hover {
  color: var(--accent-strong);
}

.auth-standalone-links-single {
  gap: 10px;
}

body.auth-standalone-page .notice {
  margin-bottom: 14px;
  background: rgba(18, 18, 18, 0.94);
}

.auth-notice-card {
  width: min(472px, 100%);
  text-align: center;
}

.auth-notice-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--accent-strong);
  font-size: 0.73rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-notice-success .auth-notice-badge {
  border-color: rgba(155, 214, 169, 0.45);
  color: #b9e8c3;
}

.auth-notice-warning .auth-notice-badge {
  border-color: rgba(236, 217, 158, 0.5);
  color: #f0dfaf;
}

.auth-notice-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 6px;
}

.auth-assist-note {
  margin-top: 16px;
  text-align: left;
}

.auth-inline-link {
  color: var(--accent-strong);
  font-weight: 600;
}

.auth-notice-points {
  margin: 14px 0 0;
  padding-left: 22px;
  color: rgba(236, 231, 216, 0.86);
  text-align: left;
}

.auth-notice-points li + li {
  margin-top: 8px;
}

@media (max-width: 720px) {
  .auth-standalone-shell {
    justify-content: flex-start;
    padding-top: 52px;
  }

  .auth-brand-header {
    margin-bottom: 26px;
  }

  .auth-standalone-card,
  .auth-standalone-card-wide {
    width: 100%;
    padding: 22px;
    border-radius: 24px;
  }

  .auth-card-title {
    font-size: 1.5rem;
  }

  .auth-field input {
    min-height: 60px;
  }
}

/* Modern design pass */
html[data-theme-resolved="dark"],
html[data-theme-resolved="light"] {
  color-scheme: dark;
  --bg: #050505;
  --bg-secondary: #080808;
  --bg-tertiary: #0c0c0c;
  --bg-accent: rgba(217, 194, 120, 0.05);
  --sidebar: #0a0a0a;
  --panel: #111111;
  --panel-strong: #161616;
  --panel-muted: #0d0d0d;
  --panel-soft: rgba(255, 255, 255, 0.018);
  --border: #d8c277;
  --border-strong: #f0dfaf;
  --text: #f5efe2;
  --muted: #a79f8d;
  --accent: #e0c982;
  --accent-strong: #f3e2b1;
  --accent-soft: rgba(217, 194, 120, 0.08);
  --shadow: none;
}

body {
  background:
    radial-gradient(circle at 86% -8%, rgba(217, 194, 120, 0.08), transparent 26%),
    radial-gradient(circle at -4% 104%, rgba(217, 194, 120, 0.07), transparent 28%),
    #050505;
  color: var(--text);
  font-weight: 400;
}

.layout {
  grid-template-columns: 248px minmax(0, 1fr);
  gap: 14px;
  min-height: 100vh;
  padding: 14px;
}

.main-shell {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.page-shell {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-bottom: 24px;
}

.sidebar {
  top: 14px;
  height: calc(100vh - 28px);
  border: 1px solid var(--border);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.012) 22%, transparent 50%),
    linear-gradient(180deg, #0a0a0a, #020202);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.07) inset,
    0 22px 48px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(188, 165, 97, 0.08);
}

.sidebar-shell {
  gap: 16px;
  padding: 16px 14px 14px;
}

.sidebar-scroll {
  gap: 14px;
}

.brand-row {
  min-height: 44px;
}

.brand-mark {
  width: 96px;
  height: 58px;
  border: none;
  border-radius: 0;
  background:
    url("/static/ascent-mark-transparent.png?v=20260411-transparent-1") center/contain no-repeat;
  box-shadow: none;
  filter: drop-shadow(0 6px 18px rgba(188, 165, 97, 0.35));
  overflow: visible;
}

.brand-mark-core,
.brand-mark-tail {
  display: none;
}

.brand-copy strong {
  font-size: 1.02rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.sidebar-group-label,
.support-label,
.eyebrow {
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.sidebar-nav {
  gap: 10px;
}

.nav-link,
.nav-link-static {
  min-height: 50px;
  padding: 10px 12px 10px 14px;
  border-radius: 16px;
  color: rgba(245, 239, 226, 0.76);
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.nav-link:hover,
.nav-link.is-active,
.nav-stack.is-active > .nav-link {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.02);
  transform: none;
}

.nav-link::before,
.nav-link-static::before {
  top: 11px;
  bottom: 11px;
}

.nav-icon {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.01);
}

.nav-copy strong {
  font-size: 0.92rem;
  font-weight: 600;
}

.sidebar-foot .btn {
  min-height: 42px;
}

.topbar {
  position: sticky;
  top: 14px;
  z-index: 25;
  min-height: 60px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.012) 30%, transparent 65%),
    linear-gradient(180deg, #0a0a0a, #030303);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.07) inset,
    0 14px 32px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(188, 165, 97, 0.08);
}

.topbar-group,
.topbar-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-controls {
  margin-left: auto;
  justify-content: flex-end;
}

.sidebar-toggle {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.008);
}

.sidebar-toggle span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--accent-strong);
}

.sidebar-toggle span:nth-child(2) {
  margin: 4px 0;
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 6px 4px 22px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
}

.page-header-compact {
  padding-bottom: 16px;
}

.page-title {
  margin: 8px 0 0;
  color: var(--text);
  font-size: clamp(2rem, 3vw, 2.8rem);
  font-weight: 620;
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.page-subtitle {
  max-width: 760px;
  margin-top: 10px;
  color: rgba(245, 239, 226, 0.72);
  font-size: 0.97rem;
  line-height: 1.55;
}

.section-block {
  gap: 18px;
}

.section-headline {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
}

.section-headline h2,
.surface-head h2,
.surface-head h3 {
  margin: 6px 0 0;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.surface {
  border: 1px solid var(--border-strong);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.012) 22%, transparent 50%),
    linear-gradient(180deg, #0c0c0c, #050505);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.07) inset,
    0 -1px 0 rgba(0, 0, 0, 0.5) inset,
    0 18px 44px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(188, 165, 97, 0.06);
}

.surface-hero,
.surface-side,
.form-surface,
.auth-card,
.auth-side,
.account-panel,
.chart-surface,
.table-surface,
.status-surface,
.plan-card,
.stat-card,
.analytics-panel {
  padding: 22px;
}

.surface-head {
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.surface-badge {
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: rgba(217, 194, 120, 0.06);
  color: var(--accent-strong);
  font-size: 0.69rem;
  font-weight: 650;
  letter-spacing: 0.12em;
}

.primary-stats {
  gap: 16px;
}

.stat-card {
  position: relative;
  overflow: hidden;
  min-height: 176px;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.stat-card::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(188, 165, 97, 0.55), transparent);
  pointer-events: none;
}

.stat-card::after {
  content: "";
  position: absolute;
  right: -20%;
  bottom: -45%;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(217, 194, 120, 0.14), transparent 68%);
  pointer-events: none;
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-lg);
}

.stat-card-accent::after {
  background: radial-gradient(circle, rgba(217, 194, 120, 0.22), transparent 65%);
}

.kpi-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 18px;
}

.kpi-unit {
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.stat-card strong,
.kpi-card strong {
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1;
  letter-spacing: -0.04em;
  font-weight: 620;
}

.stat-label {
  margin-top: 14px;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.stat-card small,
.mini-kpi span,
.preview-list small,
.compact-info-grid small,
.wallet-preview-item span,
.muted-copy,
td small,
.detail-grid small {
  color: rgba(245, 239, 226, 0.58);
}

.preview-list,
.compact-info-grid {
  gap: 16px;
}

.preview-list div,
.compact-info-grid div,
.wallet-preview-item {
  min-height: 118px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.015), rgba(255, 255, 255, 0.006));
}

.preview-list span,
.compact-info-grid span {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.preview-list strong,
.compact-info-grid strong {
  display: block;
  margin-top: 12px;
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.toolbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.toolbar-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.012);
}

.toolbar-chip {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: rgba(245, 239, 226, 0.66);
  font-size: 0.84rem;
  font-weight: 600;
}

.toolbar-chip.is-active {
  border-color: var(--border-strong);
  background: rgba(217, 194, 120, 0.08);
  color: var(--accent-strong);
}

.filters-surface {
  padding: 18px;
}

.filters-grid,
.form-grid {
  gap: 14px 16px;
}

.filters-grid label,
.form-grid label,
.form-stack label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.filters-grid input,
.filters-grid select,
.form-grid input,
.form-grid select,
.form-stack input,
.form-stack select,
textarea {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #0b0b0b;
  color: var(--text);
}

textarea {
  min-height: 124px;
  padding-top: 14px;
  padding-bottom: 14px;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--border-strong);
  box-shadow: 0 0 0 1px rgba(240, 223, 175, 0.2);
}

.btn {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: transparent;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.02);
  border-color: var(--border-strong);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
}

.btn-primary {
  border-color: var(--border-strong);
  background: linear-gradient(180deg, rgba(236, 217, 158, 0.16), rgba(217, 194, 120, 0.08)), #0d0c09;
  color: #fff7e2;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.btn-primary:hover {
  background: linear-gradient(180deg, rgba(240, 223, 175, 0.22), rgba(217, 194, 120, 0.12)), #11100c;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.008);
  color: var(--text);
}

.btn-compact {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 12px;
  font-size: 0.82rem;
}

.btn-block {
  width: 100%;
}

.topbar-settings-link {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 14px;
}

.btn-gear {
  color: var(--accent-strong);
  font-size: 1rem;
}

.table-surface {
  overflow: hidden;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

thead th {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-strong);
  background: var(--panel-strong);
  color: var(--accent);
  font-size: var(--font-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: left;
}

tbody td {
  padding: 16px;
  border-bottom: 1px solid rgba(217, 194, 120, 0.12);
  vertical-align: top;
  transition: background var(--transition-fast);
}

.table-surface-dense tbody td {
  padding: 11px 16px;
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr:hover td {
  background: rgba(255, 255, 255, 0.04);
}

.table-surface-dense tbody tr:nth-child(even):not(:hover) td {
  background: rgba(255, 255, 255, 0.014);
}

td strong {
  font-weight: 600;
}

.table-pill {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  font-size: var(--font-xs);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.table-pill.success {
  border-color: rgba(120, 204, 163, 0.6);
  color: #7bf0c0;
  background: rgba(78, 196, 151, 0.14);
}

.table-pill.warning {
  border-color: rgba(223, 196, 112, 0.6);
  color: #ffd17a;
  background: rgba(217, 194, 120, 0.14);
}

.table-pill.danger {
  border-color: rgba(214, 114, 105, 0.6);
  color: #ff9b8f;
  background: rgba(214, 114, 105, 0.16);
}

.table-pill.neutral {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-strong);
}

.wallet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.wallet-card {
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.018), rgba(255, 255, 255, 0.008));
}

.wallet-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.wallet-card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}

.wallet-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.analytics-mini-grid {
  gap: 14px;
}

.mini-kpi {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.012);
}

.line-chart-shell {
  padding: 22px;
  border-radius: 20px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(188, 165, 97, 0.08), transparent 65%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.022), rgba(255, 255, 255, 0.006));
  border: 1px solid var(--border);
}

.chart-grid-lines line {
  stroke: rgba(217, 194, 120, 0.1);
  stroke-dasharray: 2 4;
}

.chart-axis-labels text,
.chart-label-item small {
  fill: rgba(245, 239, 226, 0.62);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.line-chart-svg .line-chart-total {
  stroke: var(--accent-strong);
  stroke-width: 2.5;
  filter: drop-shadow(0 2px 10px rgba(188, 165, 97, 0.55));
}

.line-chart-svg .line-chart-dot-total {
  fill: var(--accent-strong);
  stroke: #0b0d12;
  stroke-width: 2;
  r: 5;
  filter: drop-shadow(0 0 6px rgba(188, 165, 97, 0.65));
}

.line-chart-svg .line-chart-dot-total:hover {
  r: 7;
}

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

.detail-grid > div {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.01);
}

.detail-grid span {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.gateway-price {
  margin: 22px 0 4px;
  color: var(--accent-strong);
  font-size: clamp(2.6rem, 4vw, 4rem);
  font-weight: 620;
  letter-spacing: -0.05em;
}

.gateway-summary {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 20px;
  padding: 24px 28px 28px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--accent-soft), transparent 70%), var(--panel-muted);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.gateway-order-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.gateway-amount {
  margin: 4px 0 2px;
  color: var(--text);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.gateway-plan {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
}

.gateway-qr {
  display: block;
  width: 100%;
  max-width: 280px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
}

.gateway-qr-shell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--panel-muted);
}

.gateway-qr-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
}

.gateway-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px 24px;
  margin-top: 20px;
  padding: 18px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--panel-soft);
}

.gateway-meta > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.gateway-meta span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.gateway-meta strong {
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 700;
}

.gateway-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.gateway-trust-lock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: var(--accent-strong);
}

.page-actions,
.section-actions,
.gateway-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.status-actions {
  margin-top: 24px;
}

.notice {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.015), rgba(255, 255, 255, 0.006));
  font-weight: 600;
}

.empty-state {
  position: relative;
  padding: 48px 32px;
  border: 1px dashed var(--border-strong);
  border-radius: 20px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(188, 165, 97, 0.1), transparent 60%),
    linear-gradient(180deg, rgba(217, 194, 120, 0.035), rgba(255, 255, 255, 0.008));
  text-align: center;
  overflow: hidden;
}

.empty-state::before {
  content: "";
  display: block;
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 40%, rgba(188, 165, 97, 0.32), transparent 70%),
    linear-gradient(135deg, rgba(188, 165, 97, 0.16), rgba(188, 165, 97, 0.04));
  border: 1px solid rgba(188, 165, 97, 0.38);
  box-shadow: 0 0 28px rgba(188, 165, 97, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.empty-state h3 {
  margin: 0 0 10px;
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.empty-state p {
  margin: 0;
  max-width: 42ch;
  margin-left: auto;
  margin-right: auto;
  color: rgba(245, 239, 226, 0.64);
}

body.auth-standalone-page {
  background:
    radial-gradient(circle at 84% 4%, rgba(217, 194, 120, 0.14), transparent 28%),
    radial-gradient(circle at 6% 96%, rgba(217, 194, 120, 0.1), transparent 32%),
    #050505;
}

.auth-standalone-shell::before {
  background: radial-gradient(circle, rgba(217, 194, 120, 0.18), rgba(217, 194, 120, 0));
}

.auth-standalone-shell::after {
  background: radial-gradient(circle, rgba(96, 79, 35, 0.22), rgba(96, 79, 35, 0));
}

.auth-brand-copy {
  color: #f5efe2;
  font-weight: 650;
}

.auth-standalone-card {
  border: 1px solid var(--border);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(24, 24, 24, 0.96), rgba(11, 11, 11, 0.98));
}

.auth-card-title {
  font-weight: 620;
}

.auth-field input {
  border: 1px solid var(--border);
  background: rgba(17, 17, 17, 0.94);
}

.auth-submit {
  border-color: var(--border-strong);
  background: linear-gradient(180deg, rgba(236, 217, 158, 0.16), rgba(217, 194, 120, 0.08)), #0d0c09;
  color: #fff7e2;
}

.auth-submit:hover {
  background: linear-gradient(180deg, rgba(240, 223, 175, 0.22), rgba(217, 194, 120, 0.12)), #11100c;
}

@media (max-width: 1180px) {
  .layout {
    grid-template-columns: 224px minmax(0, 1fr);
  }

  .primary-stats,
  .preview-list-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .layout {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .sidebar {
    position: fixed;
    left: 12px;
    top: 12px;
    bottom: 12px;
    height: auto;
    width: min(300px, calc(100vw - 24px));
    transform: translateX(calc(-100% - 18px));
    transition: transform 0.22s ease;
    z-index: 40;
  }

  .sidebar[data-open="true"] {
    transform: translateX(0);
  }

  .sidebar-overlay[data-visible="true"] {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.58);
    z-index: 35;
  }

  .topbar {
    top: 12px;
  }

  .page-header,
  .section-headline,
  .toolbar-row {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar-controls {
    margin-left: 0;
  }
}

@media (max-width: 720px) {
  .layout {
    padding: 10px;
  }

  .topbar {
    padding: 10px 12px;
    border-radius: 18px;
  }

  .topbar-controls {
    width: 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
  }

  .topbar-controls .btn {
    flex: 1 1 auto;
  }

  .page-title {
    font-size: clamp(1.72rem, 9vw, 2.22rem);
  }

  .surface-hero,
  .surface-side,
  .form-surface,
  .account-panel,
  .chart-surface,
  .table-surface,
  .status-surface,
  .plan-card,
  .stat-card,
  .analytics-panel {
    padding: 18px;
  }

  .primary-stats,
  .preview-list,
  .preview-list-3,
  .compact-info-grid,
  .wallet-grid {
    grid-template-columns: 1fr;
  }

  thead {
    display: none;
  }

  tbody,
  tr,
  td {
    display: block;
    width: 100%;
  }

  tbody tr {
    border-bottom: 1px solid rgba(217, 194, 120, 0.18);
  }

  tbody tr:last-child {
    border-bottom: none;
  }

  tbody td {
    padding: 10px 0;
    border-bottom: 0;
  }

  tbody td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 6px;
    color: var(--accent);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }
}

/* Professional button pass */
.sidebar-scroll {
  gap: 10px;
}

.btn {
  min-height: 46px;
  padding: 0 18px;
  border-radius: 15px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.016), rgba(255, 255, 255, 0.008));
  color: rgba(248, 240, 222, 0.96);
  font-size: 0.91rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.028), rgba(255, 255, 255, 0.012));
  border-color: var(--border-strong);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.btn:focus-visible {
  outline: none;
  border-color: var(--border-strong);
  box-shadow: 0 0 0 1px rgba(241, 224, 173, 0.28), 0 0 0 4px rgba(241, 224, 173, 0.08);
}

.btn-primary {
  border-color: var(--border-strong);
  background: linear-gradient(180deg, rgba(241, 224, 173, 0.18), rgba(217, 194, 120, 0.08)), #12100b;
  color: #fff8e7;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.btn-primary:hover {
  background: linear-gradient(180deg, rgba(241, 224, 173, 0.24), rgba(217, 194, 120, 0.12)), #15120d;
}

.btn-secondary {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.042), rgba(255, 255, 255, 0.018));
  border-color: var(--border-strong);
  color: #f5ead0;
}

.btn-secondary:hover {
  border-color: var(--accent);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.058), rgba(255, 255, 255, 0.024));
  color: #fff8e7;
}

.btn-danger {
  background: linear-gradient(180deg, rgba(214, 114, 105, 0.22), rgba(214, 114, 105, 0.08));
  border: 1px solid rgba(214, 114, 105, 0.55);
  color: #ffc4bc;
}

.btn-danger:hover {
  border-color: var(--danger);
  background: linear-gradient(180deg, rgba(214, 114, 105, 0.32), rgba(214, 114, 105, 0.14));
  color: #ffe0db;
}

.btn-compact {
  min-height: 36px;
  padding: 0 13px;
  border-radius: 13px;
  font-size: 0.81rem;
}

.btn-block {
  width: 100%;
}

.topbar-settings-link {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 15px;
}

.btn-gear {
  color: var(--accent-strong);
  font-size: 0.98rem;
}

.nav-link,
.nav-link-static {
  min-height: 52px;
  border-radius: 17px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.012), rgba(255, 255, 255, 0.004));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
  position: relative;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.nav-link:hover {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.012));
  border-color: var(--border-strong);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.nav-link.is-active,
.nav-stack.is-active > .nav-link {
  background: linear-gradient(180deg, rgba(188, 165, 97, 0.16), rgba(188, 165, 97, 0.05));
  border-color: rgba(188, 165, 97, 0.38);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.nav-link.is-active::before,
.nav-stack.is-active > .nav-link::before {
  content: "";
  position: absolute;
  left: -4px;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--accent-strong), var(--accent));
  box-shadow: 0 0 12px rgba(188, 165, 97, 0.4);
}

.nav-link.is-active .nav-icon,
.nav-stack.is-active > .nav-link .nav-icon {
  color: var(--accent-strong);
}

.brand-row {
  width: 100%;
}

.brand.brand-sidebar-header {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.02);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.01);
}

.brand.brand-sidebar-header .brand-mark {
  border: none;
  background:
    url("/static/ascent-mark-transparent.png?v=20260411-transparent-1") center/contain no-repeat;
}

.topbar-profile-menu {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0;
}

.topbar-settings-icon {
  width: 44px;
  min-width: 44px;
  padding: 0;
  border-radius: 15px;
}

.profile-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 60;
  display: flex;
  width: min(320px, calc(100vw - 32px));
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.01)), var(--sidebar);
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.38);
}

.profile-menu[hidden] {
  display: none;
}

.profile-menu-form {
  display: block;
}

.profile-menu-item {
  display: flex;
  width: 100%;
  min-height: 68px;
  align-items: center;
  gap: 14px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.012);
  color: var(--text);
  text-align: left;
  text-decoration: none;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.profile-menu-item:hover,
.profile-menu-item:focus-visible {
  transform: translateY(-1px);
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.024);
  outline: none;
}

.profile-menu-item-danger {
  color: #ff877d;
}

.profile-menu-item-danger .profile-menu-icon {
  background: rgba(120, 35, 32, 0.35);
  color: #ff8e84;
}

.profile-menu-icon {
  display: inline-flex;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 14px;
  background: rgba(37, 56, 97, 0.28);
  color: var(--accent-strong);
}

.profile-menu-icon-glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
}

.profile-menu-item-copy {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 2px;
}

.profile-menu-item-copy strong {
  font-size: 0.96rem;
  font-weight: 700;
}

.profile-menu-item-arrow {
  color: var(--muted);
  font-size: 1.3rem;
  line-height: 1;
}

@media (max-width: 720px) {
  .profile-menu {
    right: 0;
    width: min(320px, calc(100vw - 24px));
  }
}
