/* MonLeo Daylight Prestige Design System — Enterprise Fintech & 2D Interactive Telemetry */
:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-subtle: #f1f5f9;
  --surface-muted: #e2e8f0;
  --surface-dark: #0f172a;
  --surface-dark-2: #1e293b;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --ink: #0f172a;
  --ink-secondary: #334155;
  --ink-muted: #64748b;
  --primary: #00b14f;
  --primary-hover: #009944;
  --primary-soft: #e8f8f0;
  --primary-border: #a7f3d0;
  --accent-teal: #0d9488;
  --accent-amber: #f59e0b;
  --success: #047857;
  --success-bg: #ecfdf5;
  --success-border: #a7f3d0;
  --warning: #b45309;
  --warning-bg: #fffbeb;
  --warning-border: #fde68a;
  --danger: #b91c1c;
  --danger-bg: #fef2f2;
  --danger-border: #fecaca;
  --info: #0369a1;
  --info-bg: #f0f9ff;
  --info-border: #bae6fd;
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.07), 0 1px 3px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 16px 36px rgba(15, 23, 42, 0.14), 0 4px 10px rgba(15, 23, 42, 0.06);
  --font-sans: "Be Vietnam Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Be Vietnam Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
}

h1,
h2,
h3,
h4,
p,
dl,
dd,
pre,
figure,
fieldset {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

code,
pre,
kbd,
samp {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

code {
  font-size: 0.875em;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 0.1rem 0.35rem;
  color: var(--ink);
}

pre code {
  background: transparent;
  border: 0;
  padding: 0;
  color: inherit;
}

kbd {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.38rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-secondary);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: var(--radius-xs);
  line-height: 1.2;
}

/* Global Defensive SVG Guard — Prevents Unbounded Flex SVG Expansion (Fixes DEF-04 & DEF-05) */
.icon {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

.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;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 1rem;
  z-index: 1000;
  padding: 0.5rem 0.85rem;
  background: var(--surface-dark);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.skip-link:focus {
  top: 0.75rem;
}

.is-view-hidden {
  display: none !important;
}

.muted {
  color: var(--ink-muted);
}

.align-right {
  text-align: right !important;
}

/* 1. TOPBAR & GLOBAL SHELL */
.topbar,
.landing-header,
.landing-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.topbar__inner,
.landing-header__frame,
.landing-topbar__inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  text-decoration: none !important;
  flex-shrink: 0;
}

.brand__mark,
.mobile-brand-mark {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--surface-dark) 0%, #1e293b 100%);
  border: 1px solid #334155;
  color: #34d399;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  font-family: var(--font-mono);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 2px rgba(15, 23, 42, 0.12);
}

.mobile-brand-mark {
  display: none;
  margin-bottom: 0.5rem;
}

.brand__copy {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand__copy strong {
  font-size: 0.96rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.brand__copy small {
  font-size: 0.72rem;
  color: var(--ink-muted);
  font-weight: 500;
}

.primary-nav,
.landing-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link,
.landing-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink-secondary);
  text-decoration: none !important;
  transition: background-color 120ms ease, color 120ms ease, box-shadow 120ms ease;
}

.nav-link svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.85;
  flex-shrink: 0;
}

.nav-link:hover,
.landing-nav a:hover {
  background: var(--surface-subtle);
  color: var(--ink);
}

.nav-link.is-active {
  background: var(--primary-soft);
  color: var(--primary);
  box-shadow: inset 0 0 0 1px var(--primary-border);
}

.account-menu,
.landing-header__actions,
.landing-topbar__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cmdk-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  height: 34px;
  padding: 0 0.65rem;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--ink-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 120ms ease, background-color 120ms ease, color 120ms ease;
}

.cmdk-trigger:hover {
  border-color: var(--border-strong);
  background: var(--surface);
  color: var(--ink);
}

.cmdk-trigger svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  flex-shrink: 0;
}

/* Language Switcher Pill (VI / EN i18n) */
.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  height: 34px;
  padding: 0 0.58rem;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--ink-secondary);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 120ms ease;
}

.lang-switcher:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}

.lang-switcher__globe {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  flex-shrink: 0;
}

.account-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.22rem 0.6rem 0.22rem 0.28rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.account-chip__avatar {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-xs);
  background: var(--primary-soft);
  color: var(--primary);
  border: 1px solid var(--primary-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.74rem;
  font-weight: 700;
}

.account-chip__copy {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.account-chip__copy strong {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink);
}

.account-chip__copy small {
  font-size: 0.68rem;
  color: var(--ink-muted);
}

.mobile-nav-toggle {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.mobile-nav-toggle svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* 2. PAGE CONTAINERS, HEADINGS & TELEMETRY */
.page-shell {
  max-width: 1380px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 3.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.page-shell--wide {
  max-width: 1440px;
}

.page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.eyebrow,
.bgw-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.page-heading h1 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.25;
}

.page-heading p {
  font-size: 0.9rem;
  color: var(--ink-secondary);
  margin-top: 0.2rem;
  max-width: 72ch;
}

.heading-telemetry-wrap {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.telemetry-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.65rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  height: 34px;
}

.telemetry-sparkline {
  width: 96px;
  height: 22px;
  display: block;
}

.telemetry-pill small {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
}

.heading-status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  height: 34px;
  padding: 0 0.75rem;
  border-radius: var(--radius-sm);
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  color: var(--success);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 177, 79, 0.18);
}

/* 3. WORKSPACE VIEW SWITCHER BAR & QUICK CHIPS */
.workspace-view-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.4rem 0.55rem;
  box-shadow: var(--shadow-xs);
}

.workspace-view-tabs {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.view-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  padding: 0.42rem 0.75rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink-secondary);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease;
}

.view-tab-btn svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.view-tab-btn:hover {
  background: var(--surface-subtle);
  color: var(--ink);
}

.view-tab-btn.is-active {
  background: var(--surface-dark);
  color: #fff;
  border-color: var(--surface-dark);
}

.workspace-view-quick,
.pattern-quick-chips,
.bank-category-pills,
.task-filter-pills {
  display: flex;
  align-items: center;
  gap: 0.38rem;
  flex-wrap: wrap;
}

.pattern-quick-chips>span {
  font-size: 0.75rem;
  color: var(--ink-muted);
  font-weight: 500;
}

.chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.6rem;
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--ink-secondary);
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all 120ms ease;
}

.chip-btn code {
  background: transparent;
  border: 0;
  padding: 0;
  font-weight: 700;
  color: var(--primary);
}

.chip-btn:hover,
.chip-btn.is-active {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: var(--primary-border);
}

.chip-btn--emerald {
  background: var(--success-bg);
  color: var(--success);
  border-color: var(--success-border);
}

.chip-btn--emerald:hover {
  background: #d1fae5;
}

/* 4. PANELS, CARDS, WALLET BANNER & STATS GRIDS */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-xs);
}

.panel--sticky {
  position: sticky;
  top: 74px;
  align-self: start;
}

.panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border);
}

.panel__header--responsive {
  flex-wrap: wrap;
}

.panel__header h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.panel__description {
  font-size: 0.83rem;
  color: var(--ink-muted);
  margin-top: 0.2rem;
}

.panel-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.wallet-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid var(--border-strong);
  border-left: 4px solid var(--primary);
  padding: 1rem 1.25rem;
}

.wallet-banner__metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 1.25rem;
  flex: 1;
}

.wallet-metric {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding-right: 1rem;
  border-right: 1px solid var(--border);
}

.wallet-metric:last-child {
  border-right: 0;
  padding-right: 0;
}

.wallet-metric>span {
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
}

.wallet-metric>strong {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.wallet-metric--primary>strong {
  color: var(--primary);
}

.wallet-metric>small {
  font-size: 0.75rem;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

.wallet-key-inline {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.15rem;
}

.wallet-key-inline strong {
  cursor: pointer;
}

.wallet-key-btn {
  padding: 0.18rem 0.48rem;
  font-size: 0.72rem;
  font-weight: 600;
  font-family: inherit;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink-secondary);
  cursor: pointer;
}

.wallet-key-btn:hover {
  background: var(--surface-subtle);
  color: var(--ink);
}

.wallet-key-btn--copy {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: var(--primary-border);
}

.wallet-banner__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.wallet-coverage-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.32rem 0.65rem;
  font-size: 0.76rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  background: var(--info-bg);
  color: var(--info);
  border: 1px solid var(--info-border);
  font-variant-numeric: tabular-nums;
}

.wallet-coverage-chip.is-low {
  background: var(--warning-bg);
  color: var(--warning);
  border-color: var(--warning-border);
}

/* Stats Grid & Stat Card Hierarchy (Fixes DEF-03 Glued Numbers & Labels across all screens) */
.stats-grid,
.stats-grid--admin {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

.stats-grid--user-six {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.stats-grid--admin-tasks {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.stats-grid--compact {
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: 0.65rem;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.95rem 1.05rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  box-shadow: var(--shadow-xs);
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.stat-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.stat-card>div:not(.stat-card__icon) {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  min-width: 0;
}

.stat-card__icon {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.15rem;
  background: var(--surface-subtle);
  color: var(--ink-secondary);
  flex-shrink: 0;
}

.stat-card__icon svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.stat-card__icon--teal,
.stat-card__icon--green {
  background: var(--success-bg);
  color: var(--success);
}

.stat-card__icon--blue {
  background: var(--primary-soft);
  color: var(--primary);
}

.stat-card__icon--amber {
  background: var(--warning-bg);
  color: var(--warning);
}

.stat-card__icon--red {
  background: var(--danger-bg);
  color: var(--danger);
}

.stat-card span:not(.stat-card__icon) {
  display: block;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--ink-secondary);
  line-height: 1.3;
}

.stat-card strong {
  display: block;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.stat-card small {
  display: block;
  font-size: 0.73rem;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
}

/* 5. BUTTONS, INPUTS, FORMS & CONTROLS */
.button,
.action-button,
[data-reset-auth] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  height: 36px;
  padding: 0 0.9rem;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none !important;
  white-space: nowrap;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease, transform 100ms ease;
}

.button svg,
.action-button svg,
[data-reset-auth] svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.button:disabled,
.action-button:disabled,
[data-reset-auth]:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.button--primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 1px 2px rgba(0, 177, 79, 0.22);
}

.button--primary:hover:not(:disabled) {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

.button--secondary,
.action-button,
[data-reset-auth] {
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.88) 0%, rgba(248, 250, 252, 0.72) 100%);
  backdrop-filter: blur(14px) saturate(180%);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: var(--radius-sm);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.98),
    0 2px 5px rgba(15, 23, 42, 0.05),
    0 0 0 1px rgba(203, 213, 225, 0.70);
  transition: all 160ms var(--spring-ease);
}

.button--secondary:hover:not(:disabled),
.action-button:hover:not(:disabled),
[data-reset-auth]:hover:not(:disabled) {
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.98) 0%, rgba(241, 245, 249, 0.88) 100%);
  border-color: rgba(255, 255, 255, 1);
  box-shadow:
    inset 0 1px 1.5px rgba(255, 255, 255, 1),
    0 6px 16px -4px rgba(15, 23, 42, 0.10),
    0 0 0 1px rgba(148, 163, 184, 0.65);
  transform: translateY(-1px);
}

.button--ghost {
  background: rgba(255, 255, 255, 0.40);
  backdrop-filter: blur(10px) saturate(160%);
  -webkit-backdrop-filter: blur(10px) saturate(160%);
  color: var(--ink-secondary);
  border: 1px solid rgba(255, 255, 255, 0.50);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.60);
  transition: all 160ms ease;
}

.button--ghost:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(14px) saturate(180%);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  color: var(--ink);
  border-color: rgba(255, 255, 255, 0.95);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.98),
    0 4px 12px -2px rgba(15, 23, 42, 0.08),
    0 0 0 1px rgba(203, 213, 225, 0.50);
  transform: translateY(-1px);
}

.button--danger,
.action-button--danger {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: var(--danger-border);
}

.button--danger:hover:not(:disabled),
.action-button--danger:hover:not(:disabled) {
  background: #fee2e2;
  border-color: #fca5a5;
}

.button--compact,
.action-button,
[data-reset-auth] {
  height: 31px;
  padding: 0 0.68rem;
  font-size: 0.78rem;
}

[data-reset-auth] {
  height: 26px;
  padding: 0 0.55rem;
  font-size: 0.72rem;
  margin-top: 0.25rem;
}

.button--large {
  height: 40px;
  padding: 0 1.15rem;
  font-size: 0.9rem;
}

.button--full,
.button--block {
  width: 100%;
}

.icon-button {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 120ms ease;
}

.icon-button svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  flex-shrink: 0;
}

.icon-button:hover {
  background: var(--surface-subtle);
  color: var(--ink);
  border-color: var(--border-strong);
}

.icon-button--danger {
  color: var(--danger);
  border-color: var(--danger-border);
  background: var(--danger-bg);
}

.text-button {
  background: none;
  border: 0;
  padding: 0;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
}

.text-button:hover {
  text-decoration: underline;
}

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.form-grid {
  display: grid;
  gap: 0.85rem;
}

.form-grid--one {
  grid-template-columns: 1fr;
}

.form-grid--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
}

.field__label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.field__label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink);
}

.field__hint {
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.field__error {
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--danger);
}

.field__error:empty {
  display: none;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="url"],
input[type="email"],
select,
textarea,
.input,
.select,
.textarea {
  width: 100%;
  height: 36px;
  padding: 0 0.75rem;
  font-family: inherit;
  font-size: 0.86rem;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid rgba(203, 213, 225, 0.82);
  border-radius: 10px;
  box-shadow:
    inset 0 1px 2px rgba(15, 23, 42, 0.04),
    0 1px 2px rgba(15, 23, 42, 0.02);
  transition: border-color 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

input[type="text"]:hover,
input[type="password"]:hover,
input[type="number"]:hover,
input[type="search"]:hover,
input[type="url"]:hover,
input[type="email"]:hover,
select:hover,
textarea:hover,
.input:hover,
.select:hover,
.textarea:hover {
  background: rgba(255, 255, 255, 0.94);
  border-color: #94a3b8;
}

textarea,
.textarea,
.code-input {
  height: auto;
  padding: 0.6rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.45;
  resize: vertical;
  border-radius: 10px;
}

input:focus,
select:focus,
textarea:focus,
.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: #00b14f;
  background: rgba(255, 255, 255, 0.98);
  box-shadow:
    0 0 0 3px rgba(0, 177, 79, 0.18),
    inset 0 1px 2px rgba(0, 177, 79, 0.04);
}

input[aria-invalid="true"] {
  border-color: var(--danger);
}

.input-shell {
  position: relative;
  display: flex;
  align-items: center;
}

.input-shell>svg {
  position: absolute;
  left: 0.7rem;
  width: 16px;
  height: 16px;
  stroke: var(--ink-muted);
  stroke-width: 1.8;
  fill: none;
  pointer-events: none;
}

.input-shell>input {
  padding-left: 2.25rem;
}

.input-shell--password>input {
  padding-right: 2.35rem;
}

.input-action {
  position: absolute;
  right: 0.35rem;
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  color: var(--ink-muted);
  border-radius: var(--radius-xs);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.input-action:hover {
  color: var(--ink);
  background: var(--surface-subtle);
}

.input-action svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
}

.input-action .eye-closed {
  display: none;
}

.input-action[aria-pressed="true"] .eye-open {
  display: none;
}

.input-action[aria-pressed="true"] .eye-closed {
  display: block;
}

.field-group,
.bank-picker {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  background: var(--surface-subtle);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.field-group legend,
.bank-picker legend {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink);
  padding: 0 0.35rem;
}

.segmented-control {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem;
  background: var(--surface);
  padding: 0.22rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.segmented-control label {
  position: relative;
  cursor: pointer;
}

.segmented-control input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented-control span {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  border-radius: var(--radius-xs);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-secondary);
}

.segmented-control input:checked+span {
  background: var(--surface-dark);
  color: #fff;
}

.check-row,
.switch-row {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.82rem;
  color: var(--ink-secondary);
  cursor: pointer;
}

.check-row input,
.switch-row input {
  width: 16px;
  height: 16px;
  margin-top: 0.15rem;
  accent-color: var(--primary);
  flex-shrink: 0;
}

.check-row__box {
  display: none;
}

.check-row span {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.check-row strong {
  color: var(--ink);
  font-weight: 600;
}

.check-row small {
  color: var(--ink-muted);
  font-size: 0.74rem;
}

.advanced-fields {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  background: var(--surface);
}

.advanced-fields summary {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-secondary);
  cursor: pointer;
}

.advanced-fields[open] summary {
  margin-bottom: 0.75rem;
}

/* 6. BANK PICKER, EMBLEMS & VERIFIED BANK CARD */
.bank-picker__tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.selection-count {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}

.bank-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 0.45rem;
  max-height: 240px;
  overflow-y: auto;
  padding: 0.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.bank-grid--dialog {
  max-height: 210px;
}

.bank-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.42rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 120ms ease, background-color 120ms ease;
}

.bank-option:hover {
  border-color: var(--border-strong);
  background: var(--surface-subtle);
}

.bank-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.bank-option.is-selected,
.bank-option:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.bank-option__emblem,
.bank-emblem-svg {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: block;
}

.bank-option__copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
  line-height: 1.2;
}

.bank-option__copy strong {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bank-option__copy small {
  font-size: 0.68rem;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bank-option__tick {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  flex-shrink: 0;
}

.bank-option.is-selected .bank-option__tick,
.bank-option:has(input:checked) .bank-option__tick {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.bank-option__tick svg {
  width: 11px;
  height: 11px;
  stroke: currentColor;
  stroke-width: 2.5;
  fill: none;
}

.bank-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  padding: 0.16rem 0.48rem;
  border-radius: var(--radius-xs);
  font-size: 0.74rem;
  font-weight: 600;
  background: var(--bank-bg, var(--surface-subtle));
  color: var(--bank-color, var(--ink-secondary));
  border: 1px solid var(--bank-border, var(--border));
}

.bank-chip__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--bank-color, var(--primary));
}

.bank-chip__bin {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  opacity: 0.8;
}

.verified-bank-card {
  background: linear-gradient(145deg, var(--surface-dark) 0%, #1e293b 100%);
  color: #f8fafc;
  border: 1px solid #334155;
  border-top: 3px solid var(--bank-brand, var(--primary));
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.verified-bank-card--placeholder {
  opacity: 0.94;
}

.verified-bank-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.verified-bank-card__issuer {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.verified-bank-card__issuer strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
}

.verified-bank-card__issuer small {
  display: block;
  font-size: 0.7rem;
  color: #94a3b8;
  font-family: var(--font-mono);
}

.verified-bank-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-xs);
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(52, 211, 153, 0.35);
  color: #6ee7b7;
  font-size: 0.68rem;
  font-weight: 700;
}

.verified-bank-card__badge i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
}

.verified-bank-card__chip-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.emv-chip-svg {
  width: 34px;
  height: 24px;
}

.verified-bank-card__latency {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.06);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-xs);
}

.verified-bank-card__number small,
.verified-bank-card__holder small {
  display: block;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #94a3b8;
  text-transform: uppercase;
}

.verified-bank-card__number-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.15rem;
}

.verified-bank-card__number-row code {
  background: transparent;
  border: 0;
  padding: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.04em;
}

.verified-bank-card__holder {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.verified-bank-card__holder strong {
  font-size: 0.98rem;
  font-weight: 700;
  color: #34d399;
  letter-spacing: 0.02em;
}

.verified-bank-card__verified-seal {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: #6ee7b7;
}

.verified-bank-card__verified-seal svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2.4;
  fill: none;
}

/* 7. QUICK LOOKUP DECK, USAGE METERS & WORKSPACE GRID (/app, /admin/tasks) */
.quick-lookup-deck__grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.25rem;
  align-items: start;
}

.quick-lookup-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 0.75rem;
  align-items: end;
}

.quick-lookup-submit-wrap {
  display: flex;
  align-items: flex-end;
}

.workspace-grid {
  display: grid;
  grid-template-columns: 420px minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.pattern-preview {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.65rem 0.85rem;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  color: var(--ink-secondary);
  font-variant-numeric: tabular-nums;
}

.pattern-preview>div,
.pattern-preview>span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.pattern-preview strong {
  color: var(--primary);
  font-family: var(--font-mono);
  font-weight: 700;
}

.selection-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--ink-secondary);
  padding: 0.35rem 0;
}

.step-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-xs);
  background: var(--primary-soft);
  border: 1px solid var(--primary-border);
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.user-analytics-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1rem;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 0.9rem;
}

.toolbar__spacer {
  flex: 1;
}

.toolbar__group {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  padding: 0.2rem 0.35rem;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.search-input {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 220px;
}

.search-input--wide {
  flex: 1;
  min-width: 260px;
}

.search-input--compact {
  min-width: 180px;
}

.search-input svg {
  position: absolute;
  left: 0.68rem;
  width: 15px;
  height: 15px;
  stroke: var(--ink-muted);
  stroke-width: 2;
  fill: none;
  pointer-events: none;
}

.search-input input {
  padding-left: 2.1rem;
}

.compact-select select {
  height: 36px;
  min-width: 150px;
}

.task-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.task-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.task-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-xs);
}

.task-card__top,
.task-card__footer,
.task-progress__labels {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.task-card__identity {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.task-card__identity strong {
  font-size: 0.94rem;
  color: var(--ink);
}

.task-card__badges,
.task-actions,
.table-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.task-card__meta,
.task-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

.task-meta__banks {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  flex-wrap: wrap;
}

/* Progress Bars & Usage Meters (Fixes DEF-03 Missing Fill & Glued Labels) */
.usage-meter {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 155px;
}

.usage-meter__label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.76rem;
  color: var(--ink-secondary);
  font-variant-numeric: tabular-nums;
}

.usage-meter__label strong {
  font-weight: 700;
  color: var(--ink);
}

.progress-bar {
  width: 100%;
  height: 7px;
  background: var(--surface-subtle);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.progress-bar > span, .progress-bar > div, .progress-bar > i {
  display: block;
  height: 100%;
  width: var(--progress, 0%);
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent-teal) 100%);
  border-radius: 999px;
  transition: width 220ms ease;
}

/* Task Result Box (Fixes DEF-04 Giant Black Triangle) */
.task-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.75rem 0.95rem;
  border-radius: var(--radius-sm);
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  color: var(--success);
  font-size: 0.84rem;
}

.task-result > svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.task-result>div:not(.task-result__actions) {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 1;
  min-width: 0;
}

.task-result>div:not(.task-result__actions) strong {
  font-weight: 700;
  color: #065f46;
}

.task-result>div:not(.task-result__actions) span {
  font-size: 0.78rem;
  color: var(--success);
}

.task-result__actions {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.task-result--error {
  background: var(--danger-bg);
  border-color: var(--danger-border);
  color: var(--danger);
}

.task-result--error>div:not(.task-result__actions) strong {
  color: var(--danger);
}

/* 8. TABLES, STATUS BADGES, CHARTS & LOGS */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 14px;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.88) 0%, rgba(248, 250, 252, 0.75) 100%);
  backdrop-filter: blur(20px) saturate(190%);
  -webkit-backdrop-filter: blur(20px) saturate(190%);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.98),
    inset 0 -1px 1px rgba(15, 23, 42, 0.02),
    0 8px 24px -10px rgba(15, 23, 42, 0.06),
    0 0 0 1px rgba(226, 232, 240, 0.65);
}

.table-wrap::-webkit-scrollbar {
  height: 6px;
}

.table-wrap::-webkit-scrollbar-track {
  background: rgba(241, 245, 249, 0.60);
  border-radius: 4px;
}

.table-wrap::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.45);
  border-radius: 4px;
}

.table-wrap::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.60);
}

.table-wrap--dialog {
  max-height: 360px;
  overflow-y: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.83rem;
  font-variant-numeric: tabular-nums;
}

.data-table th {
  background: rgba(241, 245, 249, 0.82);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  color: var(--ink-secondary);
  font-size: 0.73rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: left;
  padding: 0.72rem 0.95rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
  white-space: nowrap;
}

.data-table td {
  padding: 0.72rem 0.95rem;
  border-bottom: 1px solid rgba(241, 245, 249, 0.95);
  color: var(--ink);
  vertical-align: middle;
}

.data-table tbody tr {
  background: rgba(255, 255, 255, 0.40);
  transition: background-color 160ms ease, box-shadow 160ms ease;
}

.data-table tbody tr:hover {
  background-color: rgba(236, 253, 245, 0.72);
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.table-primary {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.table-primary--with-emblem {
  flex-direction: row;
  align-items: center;
  gap: 0.55rem;
}

.table-loading td {
  text-align: center;
  padding: 2rem !important;
  color: var(--ink-muted);
}

/* Account Table & Status Stack Refinements (Fixes DEF-01) */
.status-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
}

.status-stack small {
  font-size: 0.74rem;
  color: var(--ink-secondary);
  line-height: 1.35;
}

.proxy-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3rem;
}

.status-badge,
.metric-pill,
.scope-chip,
.level-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  padding: 0.18rem 0.55rem;
  border-radius: var(--radius-xs);
  font-size: 0.73rem;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  color: var(--ink-secondary);
  font-variant-numeric: tabular-nums;
}

.status-badge--healthy,
.status-badge--completed,
.status-badge--found,
.status-badge--active,
.status-badge--approved,
.status-badge--paid,
.metric-pill--green {
  background: var(--success-bg);
  color: var(--success);
  border-color: var(--success-border);
}

.status-badge--running,
.status-badge--queued,
.metric-pill--blue {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: var(--primary-border);
}

.status-badge--cooldown,
.status-badge--paused,
.status-badge--pending,
.status-badge--warning,
.metric-pill--amber {
  background: var(--warning-bg);
  color: var(--warning);
  border-color: var(--warning-border);
}

.status-badge--error,
.status-badge--failed,
.status-badge--rejected,
.status-badge--locked,
.metric-pill--red {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: var(--danger-border);
}

.status-badge--disabled,
.status-badge--cancelled,
.status-badge--not_found,
.metric-pill--slate {
  background: var(--surface-subtle);
  color: var(--ink-muted);
  border-color: var(--border);
}

.user-stats-summary-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.user-stats-summary-bar>div {
  padding: 0.75rem 0.9rem;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.user-stats-summary-bar span {
  font-size: 0.74rem;
  color: var(--ink-muted);
  font-weight: 600;
}

.user-stats-summary-bar strong {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.user-stats-summary-bar small {
  font-size: 0.72rem;
  color: var(--ink-muted);
}

.user-detail-charts,
.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.chart-widget {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.9rem;
  background: var(--surface);
}

.chart-widget h3 {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.65rem;
}

.chart-widget__canvas-wrap {
  position: relative;
  height: 180px;
}

.chart-widget__caption {
  font-size: 0.74rem;
  color: var(--ink-muted);
  margin-top: 0.5rem;
  text-align: center;
}

/* Capacity Donut Ring (Fixes DEF-02 --value / --pct mismatch) */
.capacity-chart {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-subtle);
  margin-top: 0.85rem;
}

.capacity-chart__ring {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: conic-gradient(var(--primary) calc(var(--value, var(--pct, 0)) * 1%), var(--border-strong) 0);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
}

.capacity-chart__ring::before {
  content: "";
  position: absolute;
  inset: 9px;
  background: var(--surface);
  border-radius: 50%;
}

.capacity-chart__ring strong,
.capacity-chart__ring span {
  position: relative;
  z-index: 1;
}

.capacity-chart__ring strong {
  font-size: 1rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.capacity-chart__ring span {
  font-size: 0.65rem;
  color: var(--ink-muted);
}

.capacity-chart__legend {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem 1rem;
  flex: 1;
  font-size: 0.8rem;
}

.capacity-chart__legend>div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.capacity-chart__legend dt {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--ink-secondary);
}

.capacity-chart__legend dd {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.legend-dot,
.health-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  background: var(--ink-muted);
}

.legend-dot--green,
.health-row.is-ok .health-dot {
  background: var(--primary);
}

.legend-dot--amber {
  background: var(--warning);
}

.legend-dot--red,
.health-row.is-error .health-dot {
  background: var(--danger);
}

.legend-dot--slate {
  background: var(--ink-muted);
}

.health-list,
.log-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.health-row,
.log-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 0.82rem;
}

.health-message,
.proxy-account-order {
  margin-top: 0.65rem;
  padding: 0.65rem 0.8rem;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  overflow-x: auto;
}

.state-card {
  padding: 2rem 1.25rem;
  text-align: center;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface-subtle);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
}

.state-card--compact {
  padding: 1.25rem;
}

.state-card--error {
  border-color: var(--danger-border);
  background: var(--danger-bg);
}

.state-card__icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-muted);
}

.state-card__icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
}

.state-card h3 {
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--ink);
}

.state-card p {
  font-size: 0.82rem;
  color: var(--ink-muted);
  max-width: 48ch;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 0.85rem;
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

/* 9. LOGIN & ENTERPRISE PORTAL PAGE (/login, /register) */
.landing-main {
  display: flex;
  flex-direction: column;
}

.bgw-frame {
  max-width: 1340px;
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

.bgw-hero {
  padding: 2.5rem 0 3rem;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(circle at 12% 10%, rgba(0, 177, 79, 0.06), transparent 40%),
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) 430px;
  gap: 2.5rem;
  align-items: start;
}

.login-intro {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.login-intro__body {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.bgw-headline {
  font-size: 2.15rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.18;
  color: var(--ink);
}

.bgw-hero-lead {
  font-size: 0.98rem;
  color: var(--ink-secondary);
  line-height: 1.6;
  max-width: 66ch;
}

.lookup-illust-card {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  box-shadow: var(--shadow-sm);
}

.lookup-illust-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--border);
}

.lookup-illust-card__tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink-secondary);
  letter-spacing: 0.04em;
}

.lookup-illust-card__speed {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--success);
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  padding: 0.14rem 0.5rem;
  border-radius: var(--radius-xs);
}

.lookup-illust-card__flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.65rem;
  align-items: center;
}

.lookup-illust-box {
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-subtle);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.lookup-illust-box small {
  font-size: 0.7rem;
  color: var(--ink-muted);
  font-weight: 600;
}

.lookup-illust-box strong {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--ink);
}

.lookup-illust-box--result {
  background: var(--success-bg);
  border-color: var(--success-border);
}

.lookup-illust-box--result strong {
  color: var(--success);
}

.lookup-illust-arrow svg {
  width: 18px;
  height: 18px;
  stroke: var(--ink-muted);
  stroke-width: 2;
  fill: none;
}

.lookup-illust-presets {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  font-size: 0.76rem;
  color: var(--ink-muted);
}

.flow-preset {
  padding: 0.25rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--surface-subtle);
  color: var(--ink-secondary);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.flow-preset code {
  border: 0;
  background: transparent;
  padding: 0;
  color: inherit;
}

.flow-preset.is-active,
.flow-preset:hover {
  background: var(--primary-soft);
  border-color: var(--primary-border);
  color: var(--primary);
}

.feature-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.feature-list li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.8rem 0.9rem;
  font-size: 0.8rem;
  color: var(--ink-secondary);
  line-height: 1.45;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.feature-list li>span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--primary);
}

.feature-list li strong {
  color: var(--ink);
}

.login-intro__foot {
  font-size: 0.78rem;
  color: var(--ink-muted);
}

.login-panel {
  position: sticky;
  top: 78px;
}

.login-card {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-top: 3px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.login-card__tabs,
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem;
  background: var(--surface-subtle);
  padding: 0.22rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.login-tab,
.auth-tab {
  height: 32px;
  border: 0;
  border-radius: var(--radius-xs);
  background: transparent;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-secondary);
  cursor: pointer;
}

.login-tab.is-active,
.auth-tab.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-xs);
}

.login-card__heading h2,
.login-card__header h1,
.login-card__header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.015em;
}

.login-card__heading p:not(.eyebrow),
.login-card__header p:not(.eyebrow) {
  font-size: 0.82rem;
  color: var(--ink-muted);
  margin-top: 0.2rem;
}

.inline-alert,
.alert {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.65rem 0.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 500;
}

.inline-alert svg,
.alert svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.inline-alert--error,
.alert--error {
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  color: var(--danger);
}

.inline-alert--success,
.alert--success {
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  color: var(--success);
}

.login-help,
.auth-switch-hint {
  font-size: 0.8rem;
  color: var(--ink-muted);
  text-align: center;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.login-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
}

.text-link {
  color: var(--ink-secondary);
  font-weight: 600;
  text-decoration: none;
}

.text-link:hover {
  color: var(--primary);
  text-decoration: underline;
}

.bgw-section {
  padding: 2.75rem 0;
  border-bottom: 1px solid var(--border);
}

.bgw-section--banks {
  background: var(--surface);
}

.bgw-section__head,
.bgw-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.bgw-section__head h2,
.bgw-section-head h2,
.bgw-integration-copy h2 {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.bgw-section__head p,
.bgw-section-head p,
.bgw-integration-copy>p {
  font-size: 0.9rem;
  color: var(--ink-secondary);
  margin-top: 0.25rem;
  max-width: 65ch;
}

.bgw-bank-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.65rem;
}

.bgw-bank-chip {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.bgw-bank-chip__badge {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-xs);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--surface);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.bgw-bank-chip__badge--svg {
  border: 0;
  background: transparent;
}

.bgw-bank-chip strong {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink);
}

.bgw-bank-chip small {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-muted);
}

.bgw-integration-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 2rem;
  align-items: start;
}

.bgw-steps {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.bgw-step {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 0.9rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.bgw-step__num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid var(--primary-border);
  padding: 0.15rem 0.42rem;
  border-radius: var(--radius-xs);
}

.bgw-step h3 {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink);
}

.bgw-step p {
  font-size: 0.8rem;
  color: var(--ink-secondary);
  margin-top: 0.15rem;
}

.bgw-code-box {
  background: var(--surface-dark);
  border: 1px solid #334155;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.bgw-code-box__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.85rem;
  background: #090d16;
  border-bottom: 1px solid #1e293b;
  flex-wrap: wrap;
}

.bgw-lang-tabs {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.bgw-lang-tab {
  padding: 0.25rem 0.6rem;
  border: 1px solid transparent;
  border-radius: var(--radius-xs);
  background: transparent;
  color: #94a3b8;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.bgw-lang-tab.is-active {
  background: #1e293b;
  color: #fff;
  border-color: #334155;
}

.bgw-code-box__endpoint {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.bgw-code-box__endpoint code {
  background: transparent;
  border: 0;
  color: #cbd5e1;
  font-size: 0.76rem;
}

.bgw-method-badge {
  padding: 0.12rem 0.4rem;
  border-radius: var(--radius-xs);
  background: rgba(0, 177, 79, 0.25);
  border: 1px solid rgba(52, 211, 153, 0.4);
  color: #6ee7b7;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
}

.bgw-copy-btn {
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-xs);
  border: 1px solid #334155;
  background: #1e293b;
  color: #e2e8f0;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
}

.bgw-terminal__body {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
}

.bgw-terminal__pane {
  padding: 0.9rem 1rem;
  overflow-x: auto;
}

.bgw-terminal__pane--response {
  border-left: 1px solid #1e293b;
  background: rgba(15, 23, 42, 0.6);
}

.bgw-terminal__caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 0.55rem;
  text-transform: uppercase;
}

.bgw-status-200 {
  color: #34d399;
}

.bgw-terminal pre {
  font-size: 0.76rem;
  line-height: 1.5;
  color: #e2e8f0;
  overflow-x: auto;
}

.landing-footer {
  padding: 1.5rem 0;
  background: var(--surface);
}

.landing-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.landing-footer__links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  font-size: 0.82rem;
}

.landing-footer__links a {
  color: var(--ink-secondary);
}

/* 10. API PLAYGROUND (/api-playground — Fixes DEF-05 Black Copy Squares & Glued Headers) */
.api-security-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: linear-gradient(145deg, rgba(240, 249, 255, 0.88) 0%, rgba(224, 242, 254, 0.68) 100%);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(186, 230, 253, 0.88);
  border-left: 4px solid var(--info);
  border-radius: 12px;
  font-size: 0.82rem;
  color: var(--ink-secondary);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.96),
    0 4px 14px -3px rgba(3, 105, 161, 0.08);
}

.api-security-banner__icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(186, 230, 253, 0.90);
  color: var(--info);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: inset 0 1px 1px #fff, 0 1px 3px rgba(3, 105, 161, 0.10);
}

.api-security-banner__icon svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.api-security-banner strong {
  display: block;
  color: var(--ink);
  margin-bottom: 0.1rem;
}

.api-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.api-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: sticky;
  top: 74px;
}

.api-endpoint-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.api-endpoint {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  text-align: left;
  cursor: pointer;
  transition: border-color 120ms ease, background-color 120ms ease;
}

.api-endpoint:hover {
  border-color: var(--border-strong);
  background: var(--surface-subtle);
}

.api-endpoint.is-active {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.api-endpoint span:last-child {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.api-endpoint strong {
  font-size: 0.82rem;
  color: var(--ink);
}

.api-endpoint code {
  background: transparent;
  border: 0;
  padding: 0;
  font-size: 0.72rem;
  color: var(--ink-muted);
}

.api-method {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  padding: 0.16rem 0.4rem;
  border-radius: var(--radius-xs);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
}

.api-method--get {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid var(--success-border);
}

.api-method--post {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: var(--primary-border);
}

.api-quick-guide {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-size: 0.8rem;
  color: var(--ink-secondary);
}

.api-inline-code {
  padding: 0.45rem 0.65rem;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.api-scope-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding-top: 0.4rem;
  border-top: 1px solid var(--border);
}

.api-scope-list>div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.api-workspace {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.api-request-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.2rem;
}

.api-request-title code {
  font-size: 0.95rem;
  font-weight: 700;
}

.api-key-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.65rem;
  align-items: end;
  padding: 0.85rem;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.86) 0%, rgba(241, 245, 249, 0.72) 100%);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.94);
  border-radius: 12px;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.98),
    inset 0 -1px 1px rgba(15, 23, 42, 0.02),
    0 4px 14px -3px rgba(15, 23, 42, 0.05),
    0 0 0 1px rgba(226, 232, 240, 0.65);
  margin-bottom: 1rem;
}

.api-key-box .field__error {
  grid-column: 1 / -1;
}

.api-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  font-size: 0.8rem;
}

.api-section-title span {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
  font-weight: 600;
  display: block;
}

.api-parameter-grid {
  grid-template-columns: 1.2fr 1fr 1fr;
  align-items: center;
}

.api-send-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.api-preview-grid,
.api-reference-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 0.75rem;
}

.api-code-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.88) 0%, rgba(241, 245, 249, 0.72) 100%);
  backdrop-filter: blur(18px) saturate(185%);
  -webkit-backdrop-filter: blur(18px) saturate(185%);
  border: 1px solid rgba(255, 255, 255, 0.94);
  border-radius: 14px;
  padding: 0.75rem;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.98),
    inset 0 -1px 1px rgba(15, 23, 42, 0.02),
    0 8px 24px -8px rgba(15, 23, 42, 0.06),
    0 0 0 1px rgba(226, 232, 240, 0.65);
}

.api-code-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.75);
}

.api-code-card header>div {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.api-code-card header>div>span {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.12rem 0.42rem;
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(203, 213, 225, 0.70);
  color: var(--ink-muted);
}

.api-code-card header>div>strong {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ink);
}

.api-copy-button {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  height: 28px;
  padding: 0 0.65rem;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink-secondary);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 120ms ease;
  flex-shrink: 0;
}

.api-copy-button:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}

.api-copy-button svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.api-code-card pre,
.api-response-code {
  padding: 0.9rem;
  background: var(--surface-dark);
  color: #e2e8f0;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  line-height: 1.5;
  overflow-x: auto;
  max-height: 420px;
}

.api-code-note,
.api-code-card__note,
.api-parameter-note {
  font-size: 0.75rem;
  color: var(--ink-muted);
  line-height: 1.45;
}

.api-send-row>p {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  color: var(--ink-secondary);
}

.api-response-meta {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.api-reference-card {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
}

.api-reference-card__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-xs);
  background: var(--primary-soft);
  border: 1px solid var(--primary-border);
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 800;
  flex-shrink: 0;
}

.api-reference-card h2 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.25rem;
}

.api-reference-card p {
  font-size: 0.82rem;
  color: var(--ink-secondary);
  line-height: 1.5;
}

.api-response-meta>span {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.55rem 0.75rem;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.api-response-meta>span>small {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
}

.api-response-meta>span>strong {
  font-family: var(--font-mono);
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* 11. DIALOGS, COMMAND PALETTE (Ctrl+K), VIETQR & TOASTS */
.dialog {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 0;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-lg);
  max-width: 600px;
  width: calc(100% - 2rem);
}

.dialog--small {
  max-width: 440px;
}

.dialog::backdrop {
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(2px);
}

.dialog__surface {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dialog__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.dialog__header h2 {
  font-size: 1.05rem;
  font-weight: 700;
}

.dialog__message {
  font-size: 0.85rem;
  color: var(--ink-secondary);
}

.dialog__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.deposit-qr-panel {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 1rem;
  padding: 0.9rem;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  align-items: center;
}

.deposit-qr-panel__img {
  width: 100%;
  max-width: 200px;
  height: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #fff;
  padding: 0.35rem;
}

.deposit-qr-panel__details dl,
.usage-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  margin-top: 0.5rem;
}

.deposit-qr-panel__details dt,
.usage-detail-grid dt {
  font-size: 0.72rem;
  color: var(--ink-muted);
}

.deposit-qr-panel__details dd,
.usage-detail-grid dd {
  font-size: 0.84rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.secret-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  background: var(--surface-subtle);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
}

.secret-box code {
  border: 0;
  background: transparent;
  font-size: 0.84rem;
  font-weight: 700;
  word-break: break-all;
}

.cmdk-dialog {
  max-width: 560px;
  overflow: hidden;
}

.cmdk-surface {
  display: flex;
  flex-direction: column;
}

.cmdk-search-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}

.cmdk-search-bar svg {
  width: 18px;
  height: 18px;
  stroke: var(--ink-muted);
  stroke-width: 2;
  fill: none;
}

.cmdk-search-bar input {
  border: 0 !important;
  box-shadow: none !important;
  padding: 0;
  height: 28px;
  font-size: 0.92rem;
}

.cmdk-esc {
  padding: 0.15rem 0.45rem;
  font-size: 0.7rem;
  font-weight: 700;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--surface-subtle);
  color: var(--ink-muted);
  cursor: pointer;
}

.cmdk-list {
  max-height: 320px;
  overflow-y: auto;
  padding: 0.4rem;
}

.cmdk-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.75rem;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  text-align: left;
  font-family: inherit;
  font-size: 0.84rem;
  color: var(--ink);
  cursor: pointer;
}

.cmdk-item:hover,
.cmdk-item.is-active {
  background: var(--primary-soft);
  color: var(--primary);
}

.cmdk-item__hint {
  font-size: 0.72rem;
  color: var(--ink-muted);
  font-family: var(--font-mono);
}

.cmdk-footer {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 1rem;
  background: var(--surface-subtle);
  border-top: 1px solid var(--border);
  font-size: 0.72rem;
  color: var(--ink-muted);
}

.toast-region {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 380px;
}

.toast {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0.95rem;
  background: var(--surface-dark);
  color: #fff;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  font-size: 0.82rem;
  border-left: 4px solid var(--primary);
}

.toast svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.toast__body {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  flex: 1;
}

.toast--success {
  border-left-color: #10b981;
}

.toast--error {
  border-left-color: #ef4444;
}

.toast__close {
  background: transparent;
  border: 0;
  color: #94a3b8;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
}

.mobile-bottom-dock {
  display: none;
}

/* 12. RESPONSIVE BREAKPOINTS & MOBILE NAVIGATION */
@media (max-width: 1120px) {

  .login-shell,
  .workspace-grid,
  .quick-lookup-deck__grid,
  .bgw-integration-grid,
  .api-layout {
    grid-template-columns: 1fr;
  }

  .login-panel,
  .panel--sticky,
  .api-sidebar {
    position: static;
  }

  .stats-grid--user-six,
  .stats-grid--admin,
  .stats-grid--admin-tasks {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .bgw-bank-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .wallet-banner__metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {

  .mobile-nav-toggle,
  .icon-button.mobile-nav-toggle {
    display: inline-flex;
  }

  .primary-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(24px) saturate(190%);
    -webkit-backdrop-filter: blur(24px) saturate(190%);
    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: 16px;
    box-shadow: 0 20px 44px -12px rgba(15, 23, 42, 0.16);
    padding: 0.75rem 1rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    z-index: 60;
  }

  .primary-nav.is-open {
    display: flex;
  }

  .primary-nav .nav-link {
    width: 100%;
    padding: 0.6rem 0.85rem;
  }

  .account-chip__copy {
    display: none;
  }
}

@media (max-width: 768px) {
  .page-shell {
    padding: 1rem 1rem 5.25rem;
  }

  .page-heading,
  .bgw-terminal__body,
  .user-detail-charts,
  .admin-grid,
  .form-grid--two,
  .form-grid--three,
  .quick-lookup-inputs,
  .feature-list,
  .api-preview-grid,
  .api-reference-grid,
  .deposit-qr-panel {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .stats-grid,
  .stats-grid--user-six,
  .stats-grid--admin,
  .stats-grid--admin-tasks,
  .bgw-bank-grid,
  .api-response-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wallet-banner__metrics {
    grid-template-columns: 1fr;
  }

  .wallet-metric {
    border-right: 0;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.55rem;
  }

  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table-wrap .data-table,
  .data-table {
    min-width: 660px;
  }

  .landing-nav {
    display: none;
  }

  .cmdk-trigger span {
    display: none;
  }

  .mobile-bottom-dock {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(64px, 1fr));
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 55;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-strong);
    padding: 0.35rem 0.5rem calc(0.35rem + env(safe-area-inset-bottom));
    box-shadow: 0 -2px 10px rgba(15, 23, 42, 0.06);
  }

  .mobile-bottom-dock__item,
  .mobile-dock-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    padding: 0.35rem 0.25rem;
    border-radius: var(--radius-xs);
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--ink-secondary);
    text-decoration: none !important;
    background: transparent;
    border: 0;
    font-family: inherit;
    cursor: pointer;
  }

  .mobile-bottom-dock__item svg,
  .mobile-dock-item svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 1.8;
    fill: none;
  }

  .mobile-bottom-dock__item.is-active,
  .mobile-dock-item.is-active {
    color: var(--primary);
    background: var(--primary-soft);
  }
}

/* 13. DEDICATED INDEX, VIETQR BANK LOGOS, MARQUEE, ARCHITECTURE SLA & AUTH PORTAL */
.bank-logo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 9px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  padding: 3px;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.bank-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.bank-chip__logo {
  width: 18px;
  height: 18px;
  object-fit: contain;
  border-radius: 4px;
  background: #ffffff;
  padding: 1px;
  flex-shrink: 0;
}

.landing-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.68rem;
  border-radius: 999px;
  background: var(--primary-soft);
  border: 1px solid var(--primary-border);
  color: var(--success);
  font-size: 0.72rem;
  font-weight: 700;
  font-family: var(--font-mono);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
  display: inline-block;
}

.status-dot--live {
  box-shadow: 0 0 0 0 rgba(0, 177, 79, 0.6);
  animation: status-pulse 2s infinite;
}

@keyframes status-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 177, 79, 0.55);
  }

  70% {
    box-shadow: 0 0 0 7px rgba(0, 177, 79, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(0, 177, 79, 0);
  }
}

.bgw-main {
  display: flex;
  flex-direction: column;
}

.bgw-hero {
  padding: 3.5rem 0 3.25rem;
  background:
    radial-gradient(circle at 14% 12%, rgba(0, 177, 79, 0.07), transparent 36%),
    radial-gradient(circle at 86% 20%, rgba(13, 148, 136, 0.06), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-bottom: 1px solid var(--border);
}

.bgw-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, 0.95fr);
  gap: 2.5rem;
  align-items: center;
}

.bgw-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.32rem 0.78rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--ink-secondary);
  margin-bottom: 1.1rem;
  box-shadow: var(--shadow-xs);
}

.bgw-hero__title {
  font-size: clamp(2.15rem, 3.8vw, 3.25rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-bottom: 1rem;
}

.bgw-hero__title>span:not([class]) {
  color: var(--primary);
}

.bgw-hero__subtitle {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink-secondary);
  max-width: 58ch;
  margin-bottom: 1.5rem;
}

.bgw-hero__cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 2rem;
}

.bgw-kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  padding-top: 1.35rem;
  border-top: 1px solid var(--border);
}

.bgw-kpi-item strong {
  display: block;
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1.15;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.028em;
}

.bgw-kpi-item strong span {
  font-size: inherit !important;
  font-weight: inherit !important;
  line-height: inherit !important;
  color: inherit !important;
}

.bgw-kpi-item>span {
  display: block;
  margin-top: 0.22rem;
  font-size: 0.8rem;
  color: var(--ink-secondary);
  font-weight: 600;
}

.bgw-inspector-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.15rem;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.bgw-inspector-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.bgw-inspector-card__title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--ink-secondary);
}

.bgw-inspector-card__tag {
  padding: 0.18rem 0.5rem;
  border-radius: var(--radius-xs);
  background: var(--primary-soft);
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
}

.bgw-preset-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.bgw-preset-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--ink-secondary);
  cursor: pointer;
  transition: all 140ms ease;
}

.bgw-preset-chip img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  background: #ffffff;
  border-radius: 4px;
  padding: 1px;
}

.bgw-preset-chip:hover {
  border-color: var(--border-strong);
  background: var(--surface);
  color: var(--ink);
}

.bgw-preset-chip.is-active {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary);
}

.bgw-flow-stage {
  background: var(--surface-dark);
  border-radius: var(--radius-md);
  border: 1px solid #1e293b;
  overflow: hidden;
  height: 148px;
  position: relative;
}

.bgw-flow-canvas {
  width: 100%;
  height: 148px;
  display: block;
}

.bgw-inspector-json {
  background: #0b1120;
  border: 1px solid #1e293b;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.bgw-inspector-json__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 0.75rem;
  background: #0f172a;
  border-bottom: 1px solid #1e293b;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: #94a3b8;
}

.bgw-inspector-json pre {
  margin: 0;
  padding: 0.65rem 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  line-height: 1.45;
  color: #e2e8f0;
  overflow-x: auto;
}

/* 4 Core Products Grid */
.bgw-product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.bgw-product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.85rem;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.bgw-product-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary-border);
  box-shadow: var(--shadow-md);
}

.bgw-product-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.bgw-product-card__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--primary-soft);
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 800;
}

.bgw-product-card__tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--ink-muted);
  letter-spacing: 0.05em;
}

.bgw-product-card h3 {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--ink);
}

.bgw-product-card p {
  font-size: 0.83rem;
  color: var(--ink-secondary);
  line-height: 1.55;
}

.bgw-io-spec {
  margin: 0;
  padding: 0.65rem;
  border-radius: var(--radius-sm);
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.76rem;
}

.bgw-io-spec div {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.bgw-io-spec dt {
  color: var(--ink-muted);
  font-weight: 600;
}

.bgw-io-spec dd {
  margin: 0;
  font-weight: 700;
  color: var(--ink);
  text-align: right;
}

.bgw-product-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
}

.bgw-product-card__foot a {
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}

/* Dual-Row Infinite VietQR Bank Logo Marquee & Directory */
.bgw-section--banks {
  background: var(--surface);
}

.bgw-bank-controls {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.bgw-bank-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 300px;
}

.bgw-bank-search-wrap svg {
  position: absolute;
  left: 0.7rem;
  width: 15px;
  height: 15px;
  stroke: var(--ink-muted);
  stroke-width: 2;
  fill: none;
  pointer-events: none;
}

.bgw-bank-search-wrap input {
  padding-left: 2.15rem;
  height: 36px;
  font-size: 0.82rem;
}

.bgw-marquee-shell {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  overflow: hidden;
  padding: 0.65rem 0;
  margin-bottom: 1.25rem;
  mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
}

.bgw-marquee-track {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: max-content;
  animation: bgw-marquee-scroll 38s linear infinite;
}

.bgw-marquee-track--reverse {
  animation-direction: reverse;
  animation-duration: 42s;
}

.bgw-marquee-shell:hover .bgw-marquee-track,
.bgw-marquee-shell.is-paused .bgw-marquee-track {
  animation-play-state: paused;
}

@keyframes bgw-marquee-scroll {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

.bgw-marquee-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid var(--border);
  white-space: nowrap;
}

.bgw-marquee-pill img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  background: #ffffff;
  border-radius: 6px;
  padding: 2px;
  border: 1px solid var(--border);
}

.bgw-marquee-pill__meta strong {
  display: block;
  font-size: 0.8rem;
  color: var(--ink);
}

.bgw-marquee-pill__meta small {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--ink-muted);
}

.bgw-bank-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.bgw-filter-pill {
  padding: 0.38rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-secondary);
  cursor: pointer;
  transition: all 120ms ease;
}

.bgw-filter-pill.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.bgw-bank-directory {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.bgw-bank-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color 150ms ease, transform 150ms ease, background 150ms ease;
}

.bgw-bank-card:hover {
  border-color: var(--primary);
  background: var(--surface);
  transform: translateY(-1px);
}

.bgw-bank-card__logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
  background: #ffffff;
  border-radius: 8px;
  padding: 3px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.bgw-bank-card__info {
  flex: 1;
  min-width: 0;
}

.bgw-bank-card__info strong {
  display: block;
  font-size: 0.84rem;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bgw-bank-card__info small {
  display: block;
  font-size: 0.72rem;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

.bgw-bank-card__code {
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--ink-secondary);
}

/* Enterprise Architecture & Security SLA Grid (Replaces deprecated public pricing) */
.bgw-sla-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.bgw-sla-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  box-shadow: var(--shadow-xs);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.bgw-sla-card:hover {
  border-color: var(--primary-border);
  box-shadow: var(--shadow-sm);
}

.bgw-sla-card__badge {
  align-self: flex-start;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  background: var(--primary-soft);
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 800;
}

.bgw-sla-card h3 {
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--ink);
}

.bgw-sla-card p {
  font-size: 0.84rem;
  color: var(--ink-secondary);
  line-height: 1.55;
}

.bgw-sla-card ul {
  margin: 0;
  padding-left: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--ink-secondary);
}

/* FAQ & Policy Mini Cards */
.bgw-faq-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 2rem;
}

.bgw-policy-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 1.25rem;
}

.bgw-policy-mini-card {
  display: block;
  padding: 0.8rem 0.95rem;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  text-decoration: none;
  transition: border-color 150ms ease;
}

.bgw-policy-mini-card:hover {
  border-color: var(--primary);
  text-decoration: none;
}

.bgw-policy-mini-card strong {
  display: block;
  font-size: 0.84rem;
  color: var(--ink);
  margin-bottom: 0.15rem;
}

.bgw-policy-mini-card small {
  font-size: 0.74rem;
  color: var(--primary);
  font-weight: 600;
}

.bgw-faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.bgw-faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.1rem;
}

.bgw-faq-item summary {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--ink);
  cursor: pointer;
}

.bgw-faq-item p {
  margin-top: 0.6rem;
  font-size: 0.84rem;
  color: var(--ink-secondary);
  line-height: 1.6;
}

/* Multi-column Footer */
.landing-footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--border);
}

.landing-footer__brand p {
  margin-top: 0.65rem;
  font-size: 0.82rem;
  color: var(--ink-muted);
  max-width: 42ch;
}

.landing-footer__col {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.landing-footer__col strong {
  font-size: 0.82rem;
  color: var(--ink);
  margin-bottom: 0.2rem;
}

.landing-footer__col a {
  font-size: 0.8rem;
  color: var(--ink-secondary);
  text-decoration: none;
}

.landing-footer__col a:hover {
  color: var(--primary);
}

.landing-footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 1.15rem;
  font-size: 0.78rem;
  color: var(--ink-muted);
}

.landing-footer--compact {
  padding: 1.25rem 0;
}

.landing-footer--compact .landing-footer__bottom {
  padding-top: 0;
}

/* Dedicated Auth Portal Page (/login, /register) */
.auth-portal-main {
  min-height: calc(100vh - 125px);
  display: flex;
  align-items: center;
  padding: 2.25rem 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(0, 177, 79, 0.06), transparent 38%),
    var(--bg);
}

.auth-portal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(380px, 440px);
  gap: 2.5rem;
  align-items: center;
}

.auth-trust-panel__title {
  font-size: clamp(1.45rem, 2.3vw, 1.95rem);
  font-weight: 800;
  line-height: 1.22;
  margin-bottom: 0.65rem;
}

.auth-trust-panel__desc {
  font-size: 0.9rem;
  color: var(--ink-secondary);
  margin-bottom: 1.25rem;
  max-width: 56ch;
}

.auth-trust-panel__inspector {
  margin-bottom: 1.15rem;
}

.auth-security-badges {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.auth-security-badge {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
}

.auth-security-badge svg {
  width: 20px;
  height: 20px;
  stroke: var(--primary);
  stroke-width: 2;
  fill: none;
  flex-shrink: 0;
}

.auth-security-badge strong {
  display: block;
  font-size: 0.8rem;
  color: var(--ink);
}

.auth-security-badge small {
  font-size: 0.73rem;
  color: var(--ink-muted);
}

/* Dedicated Policies Page (/policies) */
.policy-hero {
  padding: 2.75rem 0 2.25rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.policy-hero h1 {
  font-size: clamp(1.75rem, 2.8vw, 2.4rem);
  margin: 0.35rem 0 0.6rem;
}

.policy-hero p {
  font-size: 0.95rem;
  color: var(--ink-secondary);
  max-width: 72ch;
}

.policy-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}

.policy-toc {
  position: sticky;
  top: 76px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.policy-toc strong {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
  margin-bottom: 0.25rem;
}

.policy-toc a {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-secondary);
  padding: 0.35rem 0.5rem;
  border-radius: var(--radius-xs);
  text-decoration: none;
}

.policy-toc a:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

.policy-content {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.policy-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  scroll-margin-top: 80px;
}

.policy-card__head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.policy-card__head h2 {
  font-size: 1.12rem;
}

.policy-card__head small {
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.policy-card p {
  font-size: 0.88rem;
  color: var(--ink-secondary);
  margin-bottom: 0.75rem;
  line-height: 1.65;
}

.policy-card ul {
  margin: 0;
  padding-left: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--ink-secondary);
  line-height: 1.6;
}

@media (max-width: 1120px) {

  .bgw-hero__grid,
  .auth-portal-grid,
  .bgw-product-grid,
  .bgw-sla-grid,
  .bgw-faq-layout,
  .landing-footer__grid,
  .policy-layout {
    grid-template-columns: 1fr;
  }

  .bgw-bank-directory {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .policy-toc {
    position: static;
  }
}

@media (max-width: 640px) {

  .bgw-kpi-strip,
  .bgw-bank-directory,
  .bgw-policy-mini-grid,
  .auth-security-badges,
  .api-response-meta {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   14. APPLE-INSPIRED LIQUID GLASS DESIGN SYSTEM, AURORA MESH & FLUID MOTION
   ========================================================================== */

:root {
  --font-sans: "Be Vietnam Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Be Vietnam Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  --glass-bg: linear-gradient(150deg, rgba(255, 255, 255, 0.86) 0%, rgba(255, 255, 255, 0.68) 100%);
  --glass-bg-elevated: linear-gradient(145deg, rgba(255, 255, 255, 0.94) 0%, rgba(255, 255, 255, 0.78) 100%);
  --glass-bg-subtle: rgba(255, 255, 255, 0.58);
  --glass-border: rgba(255, 255, 255, 0.88);
  --glass-border-outer: rgba(148, 163, 184, 0.24);
  --glass-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.96),
    inset 0 -1px 1px rgba(15, 23, 42, 0.03),
    0 14px 34px -12px rgba(15, 23, 42, 0.08),
    0 2px 6px rgba(15, 23, 42, 0.03);
  --glass-shadow-hover:
    inset 0 1px 2px rgba(255, 255, 255, 1),
    0 20px 42px -12px rgba(0, 177, 79, 0.14),
    0 4px 12px rgba(15, 23, 42, 0.06);
  --spring-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html,
body {
  font-family: var(--font-sans);
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
}

h1,
h2,
h3,
.bgw-hero__title,
.brand__copy strong,
.stat-card strong,
.bgw-kpi-item strong,
.wallet-metric>strong {
  font-family: var(--font-display);
  letter-spacing: -0.028em;
}

/* Expressive Gradient Typography, Text Highlights & Animated Word Rotator */
.text-gradient-emerald,
.hero-gradient-text,
.bgw-hero__title .hero-gradient-text {
  background: linear-gradient(110deg, #00b14f 0%, #059669 32%, #0284c7 68%, #00b14f 100%);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: liquidTextFlow 6.5s linear infinite;
}

.hero-title-line,
.bgw-hero__title .hero-title-line {
  display: block;
  color: var(--ink);
}

.hero-gradient-text {
  display: block;
  padding-bottom: 0.06em;
}

.hero-rotator-wrap,
.bgw-hero__title .hero-rotator-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin-top: 0.55rem;
  padding: 0.36rem 0.85rem 0.36rem 0.45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(167, 243, 208, 0.95);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.96),
    0 8px 20px -8px rgba(0, 177, 79, 0.22);
  font-size: clamp(0.88rem, 1.35vw, 1.08rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--ink);
}

.hero-rotator-prefix,
.bgw-hero__title .hero-rotator-prefix {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  font-family: var(--font-sans);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.18);
}

.hero-rotator-prefix::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  flex-shrink: 0;
}

.hero-rotator-word,
.bgw-hero__title .hero-rotator-word {
  display: inline-block;
  color: #047857 !important;
  -webkit-text-fill-color: #047857;
  font-family: var(--font-sans);
  font-weight: 800;
  transform-origin: 50% 50%;
}

.hero-rotator-word.is-flipping {
  animation: heroWordFlip 460ms var(--spring-ease) both;
}

@keyframes heroWordFlip {
  0% {
    opacity: 0;
    transform: translateY(10px) rotateX(-35deg) scale(0.96);
    filter: blur(3px);
  }

  100% {
    opacity: 1;
    transform: translateY(0) rotateX(0deg) scale(1);
    filter: blur(0);
  }
}

@keyframes liquidTextFlow {
  0% {
    background-position: 0% center;
  }

  100% {
    background-position: 220% center;
  }
}

.inline-glow-pill {
  display: inline-block;
  padding: 0.06rem 0.48rem;
  border-radius: 6px;
  background: linear-gradient(135deg, rgba(232, 248, 240, 0.95) 0%, rgba(209, 250, 229, 0.85) 100%);
  border: 1px solid rgba(110, 231, 183, 0.85);
  color: #065f46;
  font-weight: 700;
  box-shadow: 0 2px 8px -2px rgba(0, 177, 79, 0.16);
}

.text-emphasis {
  color: var(--ink);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(0, 177, 79, 0.45);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

/* Ambient Animated Liquid Aurora Mesh Backdrop */
body {
  position: relative;
  overflow-x: hidden;
  background-color: #eef4f8;
  background-image:
    radial-gradient(at 12% 8%, rgba(0, 177, 79, 0.13) 0px, transparent 46%),
    radial-gradient(at 88% 12%, rgba(14, 165, 233, 0.12) 0px, transparent 44%),
    radial-gradient(at 52% 88%, rgba(13, 148, 136, 0.10) 0px, transparent 50%),
    linear-gradient(180deg, #f4f9fc 0%, #edf3f8 52%, #f1f6f9 100%);
  background-attachment: fixed;
}

body::before,
body::after {
  content: "";
  position: fixed;
  pointer-events: none;
  z-index: -1;
  border-radius: 50%;
  filter: blur(68px);
  opacity: 0.62;
  will-change: transform;
}

body::before {
  width: 540px;
  height: 540px;
  top: -140px;
  left: -110px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.24) 0%, rgba(14, 165, 233, 0.08) 65%, transparent 100%);
  animation: liquidAuroraFloat 18s ease-in-out infinite alternate;
}

body::after {
  width: 580px;
  height: 580px;
  bottom: -180px;
  right: -120px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.20) 0%, rgba(0, 177, 79, 0.10) 65%, transparent 100%);
  animation: liquidAuroraFloat 22s ease-in-out infinite alternate-reverse;
}

@keyframes liquidAuroraFloat {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }

  50% {
    transform: translate3d(36px, 24px, 0) scale(1.06);
  }

  100% {
    transform: translate3d(-24px, 42px, 0) scale(0.96);
  }
}

@keyframes liquidSpringIn {
  0% {
    opacity: 0;
    transform: translate3d(0, 14px, 0) scale(0.985);
  }

  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes liquidButtonSheen {
  0% {
    transform: translateX(-140%) skewX(-22deg);
  }

  100% {
    transform: translateX(240%) skewX(-22deg);
  }
}

@keyframes topbarEntrance {
  0% {
    opacity: 0;
    transform: translate3d(0, -14px, 0);
  }

  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes topbarBorderSweep {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

@keyframes heroCardFloat {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-6px);
  }
}

.is-liquid-entering {
  animation: liquidSpringIn 380ms var(--spring-ease) both;
}

/* Topbar: Sleek Translucent Liquid Glass, Spotlight, Animated Border Sweep & Desktop Mobile-Toggle Fix */
.icon-button.mobile-nav-toggle,
.mobile-nav-toggle {
  display: none;
}

@media (max-width: 900px) {

  .icon-button.mobile-nav-toggle,
  .mobile-nav-toggle {
    display: inline-flex;
  }
}

.topbar,
.landing-header,
.landing-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background:
    radial-gradient(340px circle at var(--topbar-spot-x, 50%) var(--topbar-spot-y, 50%), rgba(0, 177, 79, 0.08), transparent 72%),
    rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(26px) saturate(195%);
  -webkit-backdrop-filter: blur(26px) saturate(195%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.88);
  box-shadow:
    inset 0 -1px 0 rgba(148, 163, 184, 0.18),
    0 8px 28px -12px rgba(15, 23, 42, 0.07);
  animation: topbarEntrance 460ms var(--spring-ease) both;
  transition: background 220ms ease, box-shadow 220ms ease, backdrop-filter 220ms ease;
}

.topbar::after,
.landing-topbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, rgba(0, 177, 79, 0.55) 35%, rgba(14, 165, 233, 0.55) 65%, transparent 100%);
  background-size: 200% 100%;
  animation: topbarBorderSweep 8s linear infinite;
  opacity: 0.75;
  pointer-events: none;
}

.topbar.is-scrolled,
.landing-topbar.is-scrolled {
  background:
    radial-gradient(340px circle at var(--topbar-spot-x, 50%) var(--topbar-spot-y, 50%), rgba(0, 177, 79, 0.10), transparent 72%),
    rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(32px) saturate(210%);
  -webkit-backdrop-filter: blur(32px) saturate(210%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 14px 34px -10px rgba(15, 23, 42, 0.12);
}

.brand__mark {
  transition: transform 240ms var(--spring-ease), box-shadow 240ms var(--spring-ease);
}

.brand:hover .brand__mark {
  transform: scale(1.08) rotate(-4deg);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    0 0 0 4px rgba(0, 177, 79, 0.18),
    0 6px 14px -4px rgba(0, 177, 79, 0.4);
}

.topbar__inner,
.landing-header__frame,
.landing-topbar__inner {
  height: 64px;
  max-width: 1420px;
}

/* Floating Liquid Glass Pill Capsule for Primary Navigation & Landing Nav */
@media (min-width: 901px) {

  .primary-nav,
  .landing-nav {
    padding: 0.26rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.64);
    border: 1px solid rgba(255, 255, 255, 0.92);
    box-shadow:
      inset 0 1px 1px rgba(255, 255, 255, 0.96),
      0 4px 14px -4px rgba(15, 23, 42, 0.06);
    gap: 0.2rem;
  }
}

.nav-link,
.landing-nav a {
  position: relative;
  border-radius: 999px;
  padding: 0.4rem 0.74rem;
  font-size: 0.82rem;
  font-weight: 650;
  white-space: nowrap;
  transition: all 200ms var(--spring-ease);
}

.landing-status-pill,
.landing-topbar__actions,
.landing-topbar__actions .button,
.brand {
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-link:hover,
.landing-nav a:hover {
  background: rgba(255, 255, 255, 0.9);
  color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px -4px rgba(0, 177, 79, 0.18);
}

.nav-link.is-active {
  background: linear-gradient(135deg, #00b14f 0%, #059669 100%);
  color: #ffffff !important;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.38),
    0 6px 16px -4px rgba(0, 177, 79, 0.42);
}

.nav-link.is-active svg {
  opacity: 1;
  stroke: #ffffff;
}

.account-menu {
  gap: 0.42rem;
}

.cmdk-trigger,
.lang-switcher,
.account-chip {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.92);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.95),
    0 2px 8px -2px rgba(15, 23, 42, 0.06);
  transition: all 180ms var(--spring-ease);
}

.cmdk-trigger:hover,
.lang-switcher:hover,
.account-chip:hover {
  background: rgba(255, 255, 255, 0.95);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px -4px rgba(15, 23, 42, 0.1);
}

.account-chip__avatar {
  border-radius: 50%;
}

/* Compact Page Heading on Workspace Screens so Core Content Sits Higher */
.page-shell {
  max-width: 1420px;
  padding: 1rem 1.5rem 3rem;
  gap: 0.9rem;
}

.page-heading {
  padding: 0.85rem 1.2rem;
  border-radius: 18px;
  background: var(--glass-bg);
  backdrop-filter: blur(22px) saturate(185%);
  -webkit-backdrop-filter: blur(22px) saturate(185%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  align-items: center;
}

.page-heading h1 {
  font-size: 1.35rem;
  font-weight: 800;
}

.page-heading p {
  font-size: 0.84rem;
  margin-top: 0.12rem;
}

.panel__header--compact {
  margin-bottom: 0.75rem;
  padding-bottom: 0.65rem;
}

/* Sticky Liquid Glass Workspace View Bar & Quick Wallet Pill */
.workspace-view-bar {
  position: sticky;
  top: 68px;
  z-index: 32;
  padding: 0.42rem 0.65rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(26px) saturate(195%);
  -webkit-backdrop-filter: blur(26px) saturate(195%);
  border: 1px solid rgba(255, 255, 255, 0.92);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.98),
    0 12px 28px -10px rgba(15, 23, 42, 0.09),
    0 2px 6px rgba(15, 23, 42, 0.03);
}

.view-tab-btn {
  border-radius: 11px;
  padding: 0.44rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--ink-secondary);
  transition: all 200ms var(--spring-ease);
}

.view-tab-btn:hover {
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  transform: translateY(-1px);
}

.view-tab-btn.is-active {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.24),
    0 8px 18px -6px rgba(15, 23, 42, 0.35);
}

.quick-wallet-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.72rem;
  border-radius: 999px;
  background: rgba(236, 253, 245, 0.88);
  border: 1px solid rgba(167, 243, 208, 0.95);
  font-size: 0.78rem;
  color: #065f46;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.quick-wallet-pill__label {
  font-weight: 600;
  opacity: 0.85;
}

.quick-wallet-pill__amount {
  font-family: var(--font-mono);
  font-weight: 800;
  color: #047857;
  font-variant-numeric: tabular-nums;
}

/* Liquid Glass Panels, Cards & Interactive Elevation */
.panel,
.stat-card,
.task-card,
.login-card,
.bgw-inspector-card,
.bgw-product-card,
.bgw-sla-card,
.policy-card,
.dialog {
  background: var(--glass-bg);
  backdrop-filter: blur(22px) saturate(185%);
  -webkit-backdrop-filter: blur(22px) saturate(185%);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  box-shadow: var(--glass-shadow);
  transition:
    transform 240ms var(--spring-ease),
    box-shadow 240ms var(--spring-ease),
    border-color 200ms ease,
    background 200ms ease;
}

.bgw-inspector-card {
  animation: heroCardFloat 6.5s ease-in-out infinite;
}

.bgw-inspector-card:hover {
  animation-play-state: paused;
}

.stat-card:hover,
.task-card:hover,
.bgw-product-card:hover,
.bgw-sla-card:hover {
  transform: translateY(-3px);
  background: var(--glass-bg-elevated);
  border-color: rgba(167, 243, 208, 0.95);
  box-shadow: var(--glass-shadow-hover);
}

/* Shimmering Primary Buttons */
.button--primary {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background: linear-gradient(135deg, #00b14f 0%, #059669 100%);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.42),
    0 8px 20px -6px rgba(0, 177, 79, 0.45);
  transition: transform 180ms var(--spring-ease), box-shadow 180ms var(--spring-ease);
}

.button--primary::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 45%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  transform: translateX(-160%) skewX(-22deg);
  pointer-events: none;
}

.button--primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.55),
    0 12px 24px -6px rgba(0, 177, 79, 0.55);
}

.button--primary:hover:not(:disabled)::after {
  animation: liquidButtonSheen 750ms var(--spring-ease);
}

/* Redesigned Quick 1-Account Lookup Deck (/app) */
.quick-lookup-deck {
  padding: 1rem 1.25rem;
}

.quick-lookup-deck__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(320px, 0.68fr);
  gap: 1.25rem;
  align-items: center;
}

.quick-lookup-inputs {
  display: grid;
  grid-template-columns: minmax(190px, 0.95fr) minmax(200px, 1.05fr) auto;
  gap: 0.75rem;
  align-items: end;
}

.quick-bank-chips {
  margin-top: 0.65rem;
}

.chip-btn--logo {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  padding: 0.26rem 0.68rem 0.26rem 0.36rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(203, 213, 225, 0.85);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  font-weight: 700;
}

.chip-btn--logo img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  border-radius: 4px;
  background: #ffffff;
  padding: 1px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  flex-shrink: 0;
}

.chip-btn--logo.is-active,
.chip-btn--logo:hover {
  background: linear-gradient(135deg, rgba(232, 248, 240, 0.98) 0%, rgba(209, 250, 229, 0.9) 100%);
  border-color: var(--primary);
  color: #065f46;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px -4px rgba(0, 177, 79, 0.25);
}

/* Action-First Workspace Grid (60% Studio Left / 40% Compact Task Feed Right) */
.workspace-grid {
  grid-template-columns: minmax(0, 1.48fr) minmax(370px, 0.92fr);
  gap: 1.25rem;
  align-items: start;
}

.create-task-top-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  align-items: stretch;
}

.create-task-col {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.45rem;
}

.field-group--compact {
  padding: 0.65rem 0.8rem;
  gap: 0.48rem;
}

.match-rules-row {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.check-row--compact {
  align-items: center;
}

.field-group,
.bank-picker {
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 14px;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.03);
}

.bank-picker__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.search-input--bank {
  flex: 1;
  min-width: 210px;
  max-width: 290px;
}

.bank-grid {
  grid-template-columns: repeat(auto-fill, minmax(192px, 1fr));
  gap: 0.5rem;
  max-height: 256px;
  padding: 0.42rem;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: 12px;
}

/* Fix Bank Option Logo Alignment (No More 40px Overflow Inside 28px Wrapper!) */
.bank-option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.48rem 0.65rem;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 2px 5px rgba(15, 23, 42, 0.03);
  transition: all 160ms var(--spring-ease);
}

.bank-option__emblem {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.bank-option__emblem .bank-logo-badge,
.bank-option .bank-logo-badge {
  width: 36px;
  height: 36px;
  padding: 3px;
  border-radius: 9px;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.bank-option__emblem .bank-emblem-svg {
  width: 34px;
  height: 34px;
  display: block;
}

.bank-option:hover {
  transform: translateY(-1px);
  background: #ffffff;
  border-color: rgba(0, 177, 79, 0.45);
  box-shadow: 0 6px 14px -4px rgba(0, 177, 79, 0.14);
}

.bank-option.is-selected,
.bank-option:has(input:checked) {
  background: linear-gradient(135deg, rgba(232, 248, 240, 0.96) 0%, rgba(209, 250, 229, 0.88) 100%);
  border-color: var(--primary);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 6px 14px -4px rgba(0, 177, 79, 0.2);
}

.bank-option__copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  flex: 1;
  line-height: 1.25;
}

.bank-option__copy strong {
  font-size: 0.82rem;
  font-weight: 750;
  letter-spacing: -0.01em;
}

.create-task-footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(226, 232, 240, 0.85);
}

.create-task-submit-btn {
  min-width: 215px;
  flex-shrink: 0;
}

/* Task List Toolbar Row & Mini KPI Strip */
.task-toolbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.75);
}

.task-mini-kpis {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.mini-kpi-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.22rem 0.58rem;
  border-radius: 999px;
  font-size: 0.73rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(203, 213, 225, 0.8);
  color: var(--ink-secondary);
  font-variant-numeric: tabular-nums;
}

.mini-kpi-pill strong {
  font-family: var(--font-mono);
  font-weight: 800;
  color: var(--ink);
}

.mini-kpi-pill--blue {
  background: rgba(240, 249, 255, 0.88);
  border-color: rgba(186, 230, 253, 0.95);
  color: #0369a1;
}

.mini-kpi-pill--blue strong {
  color: #0284c7;
}

.mini-kpi-pill--emerald {
  background: rgba(236, 253, 245, 0.88);
  border-color: rgba(167, 243, 208, 0.95);
  color: #047857;
}

.mini-kpi-pill--emerald strong {
  color: #059669;
}

/* Dedicated Personal Analytics Deck Layout (Stats Tab) */
.user-analytics-deck .user-analytics-card {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.8fr);
  gap: 1.25rem;
  align-items: stretch;
  margin-bottom: 0;
}

.user-analytics-deck .stats-grid--user-six {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.user-analytics-deck .chart-widget {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 16px;
}

/* Wallet Banner Collision Fix & Clean Grid Alignment */
.wallet-banner {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1rem;
  border-left: 4px solid var(--primary);
}

.wallet-banner__metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  width: 100%;
}

.wallet-metric {
  min-width: 0;
  padding-right: 0.85rem;
}

.wallet-key-inline {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  min-width: 0;
}

.wallet-key-inline strong {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wallet-banner__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(226, 232, 240, 0.75);
}

/* SVG & Progress Bar Defect Guards */
.is-admin-tab-hidden {
  display: none !important;
}

.task-result > svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.api-copy-button svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.health-message {
  display: inline-block;
  line-height: 1.45;
}

.health-message__actions {
  margin-top: 0.42rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.action-button--compact {
  padding: 0.24rem 0.62rem;
  font-size: 0.74rem;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(203, 213, 225, 0.95);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.action-button--compact:hover:not(:disabled) {
  background: #ffffff;
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

.progress-bar > span, .progress-bar > div, .progress-bar > i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary) 0%, #10b981 50%, #0ea5e9 100%);
  background-size: 200% 100%;
  animation: topbarBorderSweep 4s linear infinite;
  transition: width 260ms var(--spring-ease);
}

/* ==========================================================================
   15. CROSS-PAGE MOTION ENGINE & LIQUID CRYSTAL DIALOG / POPUP OVERHAUL
   ========================================================================== */

.has-stagger-entrance {
  animation: liquidSpringIn 460ms var(--spring-ease) var(--stagger-delay, 0ms) both;
}

.page-heading {
  position: relative;
  overflow: hidden;
}

.page-heading::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, rgba(0, 177, 79, 0.45) 35%, rgba(14, 165, 233, 0.45) 65%, transparent 100%);
  background-size: 200% 100%;
  animation: topbarBorderSweep 9s linear infinite;
  pointer-events: none;
}

/* Interactive Cursor Spotlight on Glass Cards Across All Pages */
.stat-card,
.task-card,
.policy-card,
.bgw-product-card,
.bgw-sla-card,
.auth-security-badge,
.api-guide-card {
  position: relative;
  background:
    radial-gradient(280px circle at var(--card-spot-x, 50%) var(--card-spot-y, 50%), rgba(0, 177, 79, 0.09), transparent 72%),
    var(--glass-bg);
}

.stat-card__icon {
  transition: transform 240ms var(--spring-ease), box-shadow 240ms var(--spring-ease);
}

.stat-card:hover .stat-card__icon {
  transform: scale(1.1) rotate(-5deg);
  box-shadow: 0 6px 14px -4px rgba(0, 177, 79, 0.25);
}

.auth-security-badge,
.api-guide-card {
  transition: transform 220ms var(--spring-ease), box-shadow 220ms var(--spring-ease), border-color 200ms ease;
}

.auth-security-badge:hover,
.api-guide-card:hover {
  transform: translateY(-3px);
  border-color: rgba(167, 243, 208, 0.95);
  box-shadow: var(--glass-shadow-hover);
}

.data-table tbody tr {
  transition: background-color 160ms ease;
}

.data-table tbody tr:hover {
  background-color: rgba(236, 253, 245, 0.55);
}

@keyframes liveDotPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.55);
  }

  70% {
    box-shadow: 0 0 0 7px rgba(16, 185, 129, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.live-dot:not(.is-paused),
.status-dot--live {
  animation: liveDotPulse 2.2s infinite;
}

/* Complete Overhaul for All <dialog class="dialog"> Modals & Popups */
@keyframes dialogPopIn {
  0% {
    opacity: 0;
    transform: translate3d(0, 16px, 0) scale(0.96);
  }

  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes dialogBackdropFade {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.dialog {
  margin: auto;
  padding: 0;
  max-width: 680px;
  width: calc(100% - 2rem);
  max-height: calc(100vh - 2.5rem);
  overflow: hidden;
  border-radius: 22px;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.96) 100%);
  backdrop-filter: blur(28px) saturate(200%);
  -webkit-backdrop-filter: blur(28px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.96);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 1),
    0 28px 70px -16px rgba(15, 23, 42, 0.30),
    0 0 0 1px rgba(148, 163, 184, 0.24);
  color: var(--ink);
}

.dialog[open] {
  animation: dialogPopIn 280ms var(--spring-ease) both;
}

.dialog::backdrop {
  background: radial-gradient(circle at 50% 35%, rgba(15, 23, 42, 0.42), rgba(15, 23, 42, 0.68));
  backdrop-filter: blur(8px) saturate(140%);
  -webkit-backdrop-filter: blur(8px) saturate(140%);
  animation: dialogBackdropFade 220ms ease both;
}

.dialog--small {
  max-width: 550px;
}

.dialog--medium,
#edit-task-dialog,
#admin-edit-task-dialog,
#key-dialog,
#account-dialog,
#batch-account-dialog,
#proxy-dialog,
#account-bulk-result-dialog {
  max-width: 760px;
}

#user-stats-dialog,
#user-billing-dialog,
#ledger-dialog {
  max-width: 900px;
}

.dialog__surface {
  padding: 1.4rem 1.5rem;
  max-height: calc(100vh - 2.5rem);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.dialog__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.dialog__header h2 {
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.dialog__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
  flex-wrap: wrap;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(226, 232, 240, 0.9);
}

.dialog__actions--between {
  justify-content: space-between;
}

.pagination--dialog {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.pagination__label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-secondary);
  padding: 0 0.35rem;
  font-variant-numeric: tabular-nums;
}

/* Fix 6-Card Grid Inside #user-stats-dialog (3x2 instead of 6x1 Crushed Columns) */
.dialog .stats-grid--user-six {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.dialog .user-stats-summary-bar {
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
}

.dialog .bank-grid--dialog {
  grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
  max-height: 230px;
}

/* Fix Deposit Modal Presets (.user-stat-pills), QR Panel, Switch Rows & Copyable Fields */
.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: 11px;
  background: rgba(248, 250, 252, 0.92);
  border: 1px solid rgba(226, 232, 240, 0.95);
}

.switch-row span {
  display: flex;
  flex-direction: column;
  gap: 0.14rem;
  line-height: 1.35;
}

.switch-row strong {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ink);
}

.switch-row small {
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.user-stat-pills {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.copyable-dd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0.35rem 0.55rem;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
}

.deposit-qr-panel {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  gap: 1.2rem;
  padding: 1.1rem;
  background: rgba(248, 250, 252, 0.92);
  border: 1px solid rgba(203, 213, 225, 0.9);
  border-radius: 16px;
  align-items: center;
}

.deposit-qr-panel__img {
  width: 224px;
  max-width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  background: #ffffff;
  padding: 0.5rem;
  box-shadow: 0 8px 20px -6px rgba(15, 23, 42, 0.1);
}

.deposit-qr-panel__img img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

/* Global Safety Rule: Prevent Any Unclassed Button Inside Dialogs/Tables From Looking Default */
.dialog button:not([class]),
.health-message button:not([class]),
.table-actions button:not([class]) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.36rem 0.78rem;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: #ffffff;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 650;
  cursor: pointer;
  transition: all 160ms var(--spring-ease);
}

.dialog button:not([class]):hover:not(:disabled),
.health-message button:not([class]):hover:not(:disabled),
.table-actions button:not([class]):hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}

@media (max-width: 1120px) {

  .workspace-grid,
  .quick-lookup-deck__grid,
  .create-task-top-grid,
  .user-analytics-deck .user-analytics-card {
    grid-template-columns: 1fr;
  }

  .wallet-banner__metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ==========================================================================
   16. MOBILE-FIRST ARCHITECTURE: FLOATING CAPSULE TOPBAR, GLASS DRAWER SHEET,
       BOTTOM SHEET MODALS & ZERO-OVERFLOW RESPONSIVE GRID (<= 900px / <= 768px)
   ========================================================================== */

/* Global Horizontal Overflow Lock */
html,
body {
  max-width: 100%;
  overflow-x: clip;
}

.bgw-frame,
.workspace-shell,
.topbar__inner,
.landing-topbar__inner,
.panel,
.card,
.quick-lookup-deck,
.wallet-banner,
.task-card,
.bgw-inspector-card,
.login-card,
.auth-trust-panel {
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* Desktop Defaults for Mobile Drawer Elements (> 900px) */
.mobile-drawer-profile,
.mobile-drawer-actions,
.landing-nav__mobile-footer {
  display: none;
}

.mobile-drawer-links,
.landing-nav__links {
  display: contents;
}

.mobile-nav-toggle__close {
  display: none;
}

.mobile-nav-toggle[aria-expanded="true"] .mobile-nav-toggle__open {
  display: none;
}

.mobile-nav-toggle[aria-expanded="true"] .mobile-nav-toggle__close {
  display: block;
}

@keyframes mobileDrawerReveal {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* 16.1 Dedicated Mobile Floating Capsule Topbar & Slide-Down Glass Drawer (<= 900px) */
@media (max-width: 900px) {

  .topbar,
  .landing-topbar {
    position: sticky;
    top: 0.45rem;
    z-index: 130;
    margin: 0.45rem 0.65rem 0;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(22px) saturate(190%);
    -webkit-backdrop-filter: blur(22px) saturate(190%);
    border: 1px solid rgba(255, 255, 255, 0.96);
    box-shadow:
      0 12px 28px -10px rgba(15, 23, 42, 0.14),
      0 2px 6px rgba(16, 185, 129, 0.08);
  }

  .topbar__inner,
  .landing-topbar__inner {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    min-height: 52px;
    padding: 0.35rem 0.65rem !important;
    width: 100%;
    max-width: 100%;
  }

  .topbar .brand,
  .landing-topbar .brand {
    min-width: 0;
    flex: 1 1 auto;
    gap: 0.5rem;
  }

  .topbar .brand__mark,
  .landing-topbar .brand__mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 0.78rem;
    flex-shrink: 0;
  }

  .topbar .brand__copy,
  .landing-topbar .brand__copy {
    min-width: 0;
  }

  .topbar .brand__copy strong,
  .landing-topbar .brand__copy strong {
    font-size: 0.94rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
  }

  .topbar .brand__copy small,
  .landing-topbar .brand__copy small {
    display: none !important;
  }

  .account-menu,
  .landing-topbar__actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
  }

  /* Compact Topbar Controls on Mobile */
  .topbar .cmdk-trigger span,
  .topbar .cmdk-trigger kbd {
    display: none !important;
  }

  .topbar .cmdk-trigger {
    width: 34px;
    height: 34px;
    min-height: 34px;
    padding: 0;
    justify-content: center;
    border-radius: 10px;
  }

  .topbar .account-chip {
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
  }

  .topbar .account-chip__copy {
    display: none !important;
  }

  .topbar .account-chip__avatar {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    font-size: 0.78rem;
  }

  .topbar .topbar-logout-btn,
  .landing-status-pill,
  .landing-register-btn,
  .auth-portal-page .landing-login-btn {
    display: none !important;
  }

  .landing-login-btn {
    min-height: 34px !important;
    padding: 0.28rem 0.65rem !important;
    font-size: 0.76rem !important;
    border-radius: 10px !important;
  }

  .lang-switcher {
    height: 34px;
    min-height: 34px;
    padding: 0 0.5rem;
    border-radius: 10px;
    font-size: 0.74rem;
  }

  .mobile-nav-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    min-height: 36px;
    padding: 0;
    border-radius: 11px;
    flex-shrink: 0;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.14), rgba(20, 184, 166, 0.08));
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #065f46;
    transition: all 180ms var(--spring-ease);
  }

  .mobile-nav-toggle svg {
    width: 18px;
    height: 18px;
  }

  .mobile-nav-toggle[aria-expanded="true"] {
    background: #0f172a;
    color: #ffffff;
    border-color: #0f172a;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.22);
  }

  /* Slide-Down Liquid Glass Drawer Sheet */
  .primary-nav,
  .landing-nav {
    display: none !important;
  }

  .primary-nav.is-open,
  .landing-nav.is-open {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 0.75rem;
    position: fixed;
    top: 4.15rem;
    left: 0.65rem;
    right: 0.65rem;
    width: auto !important;
    z-index: 160;
    max-height: calc(100dvh - 5rem);
    overflow-y: auto;
    padding: 0.95rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(28px) saturate(200%);
    -webkit-backdrop-filter: blur(28px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.98);
    box-shadow:
      0 26px 58px -12px rgba(15, 23, 42, 0.28),
      0 0 0 1px rgba(16, 185, 129, 0.16);
    animation: mobileDrawerReveal 210ms cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  .mobile-drawer-profile {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.7rem 0.85rem;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(240, 253, 244, 0.95), rgba(248, 250, 252, 0.95));
    border: 1px solid rgba(16, 185, 129, 0.22);
  }

  .mobile-drawer-profile[hidden] {
    display: none !important;
  }

  .mobile-drawer-profile__copy {
    min-width: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
  }

  .mobile-drawer-profile__copy strong {
    font-size: 0.88rem;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mobile-drawer-profile__copy small {
    font-size: 0.72rem;
    color: var(--ink-muted);
  }

  .mobile-drawer-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    padding: 0.22rem 0.52rem;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.12);
    color: #047857;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.04em;
  }

  .mobile-drawer-links,
  .landing-nav__links {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.45rem;
    width: 100% !important;
  }

  .mobile-drawer-links .nav-link,
  .landing-nav__links a {
    display: flex !important;
    align-items: center;
    justify-content: flex-start !important;
    width: 100% !important;
    box-sizing: border-box !important;
    gap: 0.48rem;
    padding: 0.68rem 0.75rem !important;
    min-height: 44px;
    border-radius: 13px !important;
    background: #f8fafc !important;
    border: 1px solid rgba(226, 232, 240, 0.95) !important;
    font-size: 0.81rem !important;
    font-weight: 650 !important;
    color: #0f172a !important;
    text-decoration: none;
  }

  .mobile-drawer-links .nav-link[hidden] {
    display: none !important;
  }

  .mobile-drawer-links .nav-link.is-active {
    background: linear-gradient(135deg, #00b14f, #059669) !important;
    color: #ffffff !important;
    border-color: transparent !important;
    box-shadow: 0 8px 18px -6px rgba(0, 177, 79, 0.45);
  }

  .mobile-drawer-links .nav-link.is-active svg {
    color: #ffffff;
  }

  .mobile-drawer-actions,
  .landing-nav__mobile-footer {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-top: 0.65rem;
    border-top: 1px solid rgba(226, 232, 240, 0.85);
    width: 100%;
  }

  .mobile-drawer-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .mobile-drawer-actions .button,
  .landing-nav__mobile-ctas .button {
    width: 100%;
    justify-content: center;
    min-height: 40px;
  }

  .landing-nav__mobile-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.4rem 0.65rem;
    border-radius: 10px;
    background: rgba(240, 253, 244, 0.9);
    color: #065f46;
    font-size: 0.74rem;
    font-weight: 700;
  }

  .landing-nav__mobile-ctas {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }
}

/* 16.2 Comprehensive Mobile Page & Component Layouts (<= 768px) */
@media (max-width: 768px) {
  body.app-page {
    padding-bottom: 5.2rem;
  }

  .page-shell,
  .page-shell--wide,
  .workspace-shell,
  .bgw-frame {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 0.65rem !important;
    padding-right: 0.65rem !important;
    box-sizing: border-box !important;
  }

  /* Strict Min-Width Zero Lock on Every Grid & Flex Child to Prevent 1fr Expansion */
  .bgw-hero__grid>*,
  .quick-lookup-deck__grid>*,
  .quick-lookup-inputs>*,
  .workspace-grid>*,
  .create-task-top-grid>*,
  .api-layout>*,
  .api-parameter-grid>*,
  .api-key-box>*,
  .code-grid>*,
  .admin-grid>*,
  .ops-split>*,
  .auth-portal-grid>*,
  .policy-layout>*,
  .field,
  .field-group,
  .bank-picker {
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  select,
  input:not([type="checkbox"]):not([type="radio"]),
  textarea {
    min-width: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    text-overflow: ellipsis;
  }

  /* Mobile Data Table Horizontal Swipe Scroll Safety */
  .table-wrap {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    position: relative;
    border-radius: 14px !important;
  }

  .table-wrap .data-table,
  .table-wrap>.data-table,
  .data-table {
    min-width: 660px !important;
    width: 100%;
  }

  /* App Workspace Hero & Page Heading */
  .page-heading,
  .workspace-hero {
    padding: 0.95rem 1rem !important;
    border-radius: 16px !important;
    gap: 0.65rem !important;
    margin-bottom: 0.75rem !important;
  }

  .page-heading h1,
  .workspace-hero h1 {
    font-size: 1.32rem !important;
    line-height: 1.22 !important;
  }

  .page-heading p,
  .workspace-hero__lead {
    font-size: 0.82rem !important;
    line-height: 1.45 !important;
  }

  .heading-telemetry-wrap,
  .workspace-hero__meta {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.4rem;
  }

  /* Workspace View Switcher Bar — Horizontal Swipeable Strip */
  .workspace-view-bar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.5rem !important;
    padding: 0.55rem !important;
    border-radius: 16px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .workspace-view-tabs {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 0.38rem !important;
    padding-bottom: 2px;
    width: 100% !important;
  }

  .workspace-view-tabs::-webkit-scrollbar {
    display: none;
  }

  .view-tab-btn,
  .workspace-view-tab {
    flex: 0 0 auto !important;
    width: auto !important;
    white-space: nowrap !important;
    padding: 0.44rem 0.78rem !important;
    font-size: 0.79rem !important;
    min-height: 36px !important;
    border-radius: 11px !important;
  }

  .workspace-view-quick,
  .workspace-view-bar__quick-wallet {
    width: 100%;
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 0.38rem !important;
    padding-top: 0.4rem;
    border-top: 1px solid rgba(226, 232, 240, 0.75);
  }

  .workspace-view-quick::-webkit-scrollbar,
  .workspace-view-bar__quick-wallet::-webkit-scrollbar {
    display: none;
  }

  .workspace-view-quick>*,
  .workspace-view-bar__quick-wallet>* {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
  }

  /* Quick 1-Account Lookup Deck — Zero Overflow */
  .quick-lookup-deck {
    padding: 0.9rem !important;
    border-radius: 18px !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }

  .quick-lookup-deck__grid {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 0.85rem !important;
    width: 100% !important;
  }

  .quick-lookup-inputs {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 0.55rem !important;
    width: 100% !important;
  }

  .quick-lookup-submit {
    width: 100% !important;
    min-height: 44px !important;
    justify-content: center !important;
  }

  .quick-bank-chips {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 0.35rem !important;
    padding-bottom: 2px;
    width: 100% !important;
  }

  .quick-bank-chips::-webkit-scrollbar {
    display: none;
  }

  .quick-bank-chip {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
  }

  .verified-bank-card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 0.9rem !important;
    border-radius: 16px !important;
    box-sizing: border-box !important;
  }

  .verified-bank-card__top {
    gap: 0.5rem !important;
  }

  .verified-bank-card__number {
    font-size: 1.05rem !important;
    letter-spacing: 0.05em !important;
    word-break: break-all;
  }

  .verified-bank-card__owner strong {
    font-size: 0.95rem !important;
    word-break: break-word;
  }

  /* Create Task Studio & Workspace Grid */
  .workspace-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 0.85rem !important;
    width: 100% !important;
  }

  .panel,
  .card {
    padding: 0.9rem !important;
    border-radius: 18px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  .create-task-top-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 0.75rem !important;
    width: 100% !important;
  }

  .pattern-preview {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 0.35rem !important;
    padding: 0.55rem 0.65rem !important;
  }

  .pattern-preview>div {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
  }

  .pattern-preview span {
    font-size: 0.67rem !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .pattern-preview strong {
    font-size: 0.78rem !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .bank-category-pills {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    scrollbar-width: none;
    gap: 0.35rem !important;
  }

  .bank-category-pills::-webkit-scrollbar {
    display: none;
  }

  .bank-category-pills .chip-btn {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .bank-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.42rem !important;
    max-height: 250px !important;
  }

  .bank-option__body {
    padding: 0.42rem 0.48rem !important;
    gap: 0.38rem !important;
  }

  .bank-option__title strong {
    font-size: 0.74rem !important;
  }

  .bank-option__code {
    font-size: 0.63rem !important;
    padding: 0.08rem 0.28rem !important;
  }

  .create-task-footer {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.65rem !important;
  }

  .create-task-submit-btn {
    width: 100% !important;
    justify-content: center !important;
  }

  /* Task List & Analytics */
  .panel__header--responsive,
  .toolbar,
  .panel-actions {
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100% !important;
    gap: 0.5rem !important;
  }

  .search-input,
  .search-input--wide,
  .search-input--compact,
  .compact-select,
  .compact-select select {
    width: 100% !important;
    min-width: 0 !important;
  }

  .task-toolbar-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.5rem !important;
  }

  .task-filter-pills {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 0.35rem !important;
    width: 100%;
  }

  .task-filter-pills::-webkit-scrollbar {
    display: none;
  }

  .task-filter-pills .chip-btn {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
  }

  .user-analytics-deck .stats-grid--user-six,
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.5rem !important;
  }

  .wallet-banner {
    padding: 0.9rem !important;
    border-radius: 18px !important;
  }

  .wallet-banner__metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.5rem !important;
  }

  .wallet-metric--key {
    grid-column: 1 / -1 !important;
  }

  .wallet-banner__actions {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.45rem !important;
  }

  .wallet-banner__actions> :first-child {
    grid-column: 1 / -1 !important;
  }

  .wallet-banner__actions .button {
    width: 100%;
    justify-content: center;
  }

  /* Landing Page (/index) Mobile Overhaul */
  .bgw-hero {
    padding: 0.95rem 0 1.8rem !important;
  }

  .bgw-hero__grid {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 1.15rem !important;
    width: 100% !important;
  }

  .bgw-pill-badge {
    max-width: 100%;
    white-space: normal !important;
    font-size: 0.73rem !important;
    line-height: 1.35 !important;
    padding: 0.36rem 0.68rem !important;
  }

  .bgw-hero__title {
    font-size: clamp(1.72rem, 7.2vw, 2.2rem) !important;
    line-height: 1.14 !important;
  }

  .hero-rotator-wrap {
    max-width: 100%;
    padding: 0.3rem 0.6rem 0.3rem 0.35rem !important;
    font-size: 0.76rem !important;
    flex-wrap: wrap;
    gap: 0.35rem !important;
  }

  .hero-rotator-word {
    min-width: 0 !important;
    font-size: 0.78rem !important;
  }

  .bgw-hero__subtitle {
    font-size: 0.88rem !important;
    line-height: 1.55 !important;
  }

  .bgw-hero__cta-row {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.5rem !important;
  }

  .bgw-hero__cta-row>.button--primary {
    grid-column: 1 / -1 !important;
  }

  .bgw-hero__cta-row>.button {
    width: 100% !important;
    justify-content: center !important;
    padding: 0.65rem 0.85rem !important;
    font-size: 0.84rem !important;
  }

  /* 2x2 Bento KPI Grid on Mobile */
  .bgw-kpi-strip {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.55rem !important;
    padding-top: 0.65rem !important;
    border-top: none !important;
  }

  .bgw-kpi-item {
    padding: 0.75rem 0.85rem !important;
    border-radius: 14px !important;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(226, 232, 240, 0.92);
    box-shadow: 0 6px 16px -8px rgba(15, 23, 42, 0.08);
  }

  .bgw-kpi-item strong {
    font-size: 1.32rem !important;
  }

  .bgw-kpi-item span {
    font-size: 0.74rem !important;
  }

  .bgw-inspector-card {
    padding: 0.85rem !important;
    border-radius: 18px !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }

  .bgw-inspector-card__header {
    flex-wrap: wrap;
    gap: 0.4rem;
  }

  .bgw-preset-bar {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 0.38rem !important;
    padding-bottom: 2px;
  }

  .bgw-preset-bar::-webkit-scrollbar {
    display: none;
  }

  .bgw-preset-chip {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
  }

  .bgw-canvas-stage {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }

  .bgw-terminal-split,
  .bgw-telemetry-row {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 0.55rem !important;
  }

  .bgw-bank-directory {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.5rem !important;
  }

  .bgw-bank-card {
    padding: 0.55rem 0.65rem !important;
    gap: 0.45rem !important;
  }

  .bgw-bank-card__logo {
    width: 32px !important;
    height: 32px !important;
  }

  .bgw-bank-card__info strong {
    font-size: 0.78rem !important;
  }

  .bgw-bank-card__info small {
    font-size: 0.65rem !important;
  }

  /* Login & Register Portal (/login, /register) — Form First on Mobile */
  .auth-portal-main {
    padding: 0.9rem 0 2rem !important;
  }

  .auth-portal-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 1.1rem !important;
  }

  .auth-portal-grid>.login-card {
    order: -1;
  }

  .login-card {
    padding: 1.1rem !important;
    border-radius: 18px !important;
  }

  /* Policies Page (/policies) — Sticky Swipeable Pill TOC */
  .policy-hero {
    padding: 1.25rem 0 1rem !important;
  }

  .policy-layout {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 0.85rem !important;
  }

  .policy-toc {
    position: sticky !important;
    top: 4.1rem !important;
    z-index: 40;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 0.4rem !important;
    padding: 0.5rem 0.65rem !important;
    border-radius: 14px !important;
    background: rgba(255, 255, 255, 0.92) !important;
    backdrop-filter: blur(16px);
  }

  .policy-toc::-webkit-scrollbar {
    display: none;
  }

  .policy-toc strong {
    display: none !important;
  }

  .policy-toc a {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    padding: 0.35rem 0.68rem !important;
    border-radius: 999px !important;
    background: #f1f5f9;
    font-size: 0.75rem !important;
  }

  /* API Playground & Admin Pages */
  .api-layout,
  .api-parameter-grid,
  .api-key-box,
  .code-grid,
  .admin-grid,
  .ops-split,
  .form-grid--two,
  .form-grid--three {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .capacity-chart {
    grid-template-columns: minmax(0, 1fr) !important;
    justify-items: center;
  }

  /* Native Mobile Bottom Sheet Modals (<dialog class="dialog">) */
  .dialog {
    width: 100% !important;
    max-width: 100% !important;
    margin: auto 0 0 0 !important;
    border-radius: 22px 22px 0 0 !important;
    max-height: 90dvh !important;
  }

  .dialog__surface {
    padding: 1rem !important;
    border-radius: 22px 22px 0 0 !important;
    max-height: 90dvh !important;
    overflow-y: auto !important;
  }

  .dialog .stats-grid--user-six {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.45rem !important;
  }

  .deposit-qr-panel {
    grid-template-columns: minmax(0, 1fr) !important;
    justify-items: center;
    text-align: center;
    padding: 0.85rem !important;
  }

  .deposit-qr-panel__img {
    width: 176px !important;
    margin: 0 auto;
  }

  .dialog__actions {
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 0.45rem !important;
  }

  .dialog__actions>.button {
    flex: 1 1 calc(50% - 0.45rem);
    justify-content: center;
  }

  /* Floating iOS Liquid Glass Bottom Dock */
  .mobile-bottom-dock {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(52px, 1fr));
    position: fixed;
    bottom: 0.45rem;
    left: 0.55rem;
    right: 0.55rem;
    height: 58px;
    padding: 0.22rem 0.3rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(22px) saturate(190%);
    -webkit-backdrop-filter: blur(22px) saturate(190%);
    border: 1px solid rgba(255, 255, 255, 0.96);
    box-shadow:
      0 14px 32px -8px rgba(15, 23, 42, 0.22),
      0 0 0 1px rgba(16, 185, 129, 0.14);
    z-index: 120;
  }

  .mobile-dock-item,
  .mobile-bottom-dock__item {
    border-radius: 13px;
    font-size: 0.65rem;
    gap: 0.18rem;
  }

  .mobile-dock-item.is-active,
  .mobile-bottom-dock__item.is-active {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
  }
}

@media (max-width: 340px) {

  .mobile-drawer-links,
  .landing-nav__links {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}