@import url('/design-tokens.css');
@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=IBM+Plex+Mono:wght@500;600&display=swap");
/* c2bspan - Retailer Portal Stylesheet */

:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-soft: #f9fafb;
  --surface-muted: #f3f4f6;
  --ink: #111827;
  --ink-soft: #374151;
  --muted: #6b7280;
  --muted-2: #9ca3af;
  --line: #eceef1;
  --accent: #0b5fa5;
  --accent-strong: #094d87;
  --accent-soft: #eff6ff;
  --navy: #0b5fa5;
  --navy-2: #0b5fa5;
  --teal: #16a34a;
  --amber: #d97706;
  --success: #16a34a;
  --success-soft: #f0fdf4;
  --warning: #d97706;
  --warning-soft: #fefce8;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --info: #0284c7;
  --info-soft: #f0f9ff;
  --shadow: 0 1px 2px rgba(17, 24, 39, .04), 0 4px 16px rgba(17, 24, 39, .05);
  --shadow-lg: 0 8px 28px rgba(17, 24, 39, .08);
  --radius-card: 16px;
  --radius-control: 12px;
  --sidebar-width: 248px;
}



* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  max-width: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  max-width: 100%;
}

button, input, select, textarea {
  font: inherit;
  box-sizing: border-box !important;
}
input, select, textarea {
  max-width: 100% !important;
  min-width: 0 !important;
}
button, .btn, .pg-btn, .btn-primary, .btn-secondary, .btn-ghost {
  white-space: nowrap;
}
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.tabular-nums {
  font-variant-numeric: tabular-nums;
}

/* App Layout */
.app {
  min-height: 100vh;
  display: flex;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  flex: 0 0 var(--sidebar-width);
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  padding: 18px 16px 14px;
  background: var(--surface);
  border-right: 1px solid var(--line);
  transition: transform .22s cubic-bezier(0.16, 1, 0.3, 1);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px;
  height: 64px;
  min-height: 64px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}

.brand-logo-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  min-width: 0;
  width: 100%;
}

.brand-c2 {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid var(--line);
  padding: 4px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.brand-c2 img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.brand-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.brand-title {
  font-weight: 800;
  font-size: 17px;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-title span {
  color: var(--accent);
}

.brand-sub {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  margin-top: 2px;
  color: var(--muted);
  text-transform: uppercase;
}

.brand-logo-img {
  height: 36px;
  max-width: 195px;
  width: auto;
  object-fit: contain;
  display: block;
}



.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -.06em;
}

.brand-name {
  font-size: 13px;
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: .02em;
}

.brand-sub {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
}

.side-scroll {
  overflow-y: auto;
  overflow-x: hidden;
  padding: 6px 0 14px;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
  flex: 1;
}

.nav-label {
  padding: 14px 8px 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .14em;
}

.nav-link, .nav-toggle {
  width: 100%;
  min-height: 40px;
  border: 0;
  background: transparent;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  text-align: left;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 500;
  transition: background-color .15s ease, color .15s ease;
}

.nav-link:hover, .nav-toggle:hover {
  background: var(--surface-muted);
  color: var(--ink);
}

.nav-link.active {
  color: #ffffff;
  background: var(--accent);
  font-weight: 600;
}

.nav-icon {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  flex: 0 0 18px;
  color: currentColor;
}

.nav-icon svg,
.icon-btn svg,
.quick-icon svg,
.service-icon svg,
.mini-icon svg,
.metric-icon svg,
.support-icon svg,
.recent-symbol svg,
.wallet-icon svg,
.hero-preview svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-toggle .chevron {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  transition: transform .18s ease;
}

.nav-toggle[aria-expanded="true"] .chevron {
  transform: rotate(180deg);
}

.subnav {
  display: none;
  margin: 2px 0 6px 18px;
  padding: 2px 0 2px 12px;
  border-left: 1px solid var(--line);
}

.subnav.open {
  display: block;
  animation: fadeIn .16s ease;
}

.subnav button, .subnav a {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 7px 8px;
  border-radius: 6px;
  color: var(--muted);
  text-decoration: none;
  font-size: 11px;
  line-height: 1.35;
  cursor: pointer;
  transition: all .15s ease;
}

.subnav button:hover, .subnav a:hover {
  color: var(--accent-strong);
  background: var(--surface-soft);
}

.sidebar-bottom {
  margin-top: auto;
  padding: 12px 0 0;
  border-top: 1px solid var(--line);
}

.profile-mini {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface);
  text-decoration: none;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.profile-mini:hover {
  border-color: var(--accent);
  background: var(--surface-soft);
}

.profile-mini .avatar-initials {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.profile-mini strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 136px;
}

.profile-mini small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 136px;
}

.avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 600;
}

.profile-mini strong {
  display: block;
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
}

.profile-mini small {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 10px;
}

/* Main Area */
.main {
  min-width: 0;
  width: calc(100% - var(--sidebar-width));
  margin-left: var(--sidebar-width);
  padding: 16px 24px 28px;
}

/* Topbar */
.topbar {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  width: 100%;
  box-sizing: border-box;
}

.icon-btn {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: grid;
  place-items: center;
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface);
  color: var(--ink-soft);
  transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}

.icon-btn:hover {
  border-color: var(--line);
  background: var(--surface-soft);
  color: var(--ink);
}

.search-wrap {
  position: relative;
  width: min(360px, 34vw);
  min-width: 170px;
  height: 36px;
  flex: 1 1 220px;
}

.search-wrap > svg {
  position: absolute;
  left: 12px;
  top: 12px;
  width: 16px;
  height: 16px;
  stroke: var(--muted);
  fill: none;
  stroke-width: 1.7;
}

.search-wrap input {
  width: 100%;
  height: 100%;
  padding: 0 58px 0 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  outline: 0;
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.search-wrap input::placeholder { color: var(--muted); }
.search-wrap input:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 2px rgba(120, 120, 128, .15);
}

.shortcut {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.top-spacer { flex: 1; min-width: 8px; }

.balance-pill {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 6px 4px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.balance-pill:hover {
  border-color: var(--ink);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.wallet-icon {
  color: var(--accent-strong);
  display: grid;
  place-items: center;
}

.wallet-icon svg {
  width: 18px;
  height: 18px;
}

.balance-meta {
  min-width: 80px;
}

.balance-meta strong {
  display: block;
  font-size: 14.5px;
  line-height: 1.2;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.balance-meta small {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-weight: 600;
}

.btn-primary {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 6px 14px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  box-shadow: none;
  transition: background-color .15s ease, border-color .15s ease;
}

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

.btn-outline {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 10.5px;
  font-weight: 500;
  transition: background-color .15s ease, border-color .15s ease;
}

.btn-outline:hover {
  background: var(--surface-soft);
  border-color: var(--line);
  color: var(--ink);
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 6px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  transition: all .15s ease;
}
.user-menu:hover {
  background: var(--surface-soft);
  border-color: var(--line);
}

.user-menu strong {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
}

.user-menu small {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 11px;
}

.user-chevron {
  color: var(--muted);
  font-size: 11px;
}

.notification-dot {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 14px;
  height: 14px;
  display: grid;
  place-items: center;
  border: 2px solid var(--bg);
  border-radius: 50%;
  background: #d8a94d;
  color: #34250a;
  font-size: 11px;
  font-weight: 600;
}

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.82fr) minmax(290px, .86fr);
  align-items: start;
  gap: 16px;
  width: 100%;
  max-width: none;
  margin: 0;
}

.primary-col, .rail {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow);
}

/* Hero Section */
.hero {
  min-height: 200px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, .84fr);
  align-items: center;
  gap: 16px;
  overflow: hidden;
  padding: 24px;
}

.hero-copy { min-width: 0; }
.partner-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 600;
  margin-bottom: 8px;
}

.badge-dot-live {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #16a34a;
}

.welcome-heading {
  max-width: 440px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(20px, 2vw, 24px);
  line-height: 1.25;
  letter-spacing: -0.015em;
  font-weight: 600;
}

.welcome-sub {
  max-width: 440px;
  margin: 6px 0 16px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.5;
}

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

.hero-link {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink-soft);
  background: var(--surface);
  text-decoration: none;
  font-size: 10.5px;
  font-weight: 500;
  cursor: pointer;
}
.hero-link:hover {
  border-color: var(--line);
  background: var(--surface-soft);
}

.hero-preview {
  min-height: 156px;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
}

.preview-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 10px;
}
.preview-head strong { color: var(--ink-soft); font-weight: 600; }

.preview-balance {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.preview-balance small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.preview-balance strong {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
  letter-spacing: -.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.preview-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.preview-actions-strip {
  margin: 4px 0 2px;
}
.preview-actions-strip button {
  width: 100%;
  padding: 6px 10px;
  font-size: 11px;
}

.preview-rows {
  display: grid;
  gap: 6px;
}

.preview-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 9.5px;
}

.preview-row .row-icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--muted);
}
.preview-row .row-icon svg { width: 13px; height: 13px; }

.preview-row strong {
  margin-left: auto;
  color: var(--success);
  font-size: 11px;
  font-weight: 600;
}

/* Quick Actions */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.quick-card {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  transition: border-color .15s ease, background-color .15s ease, transform .1s ease;
}

.quick-card:hover {
  border-color: var(--line);
  background: var(--surface-soft);
  transform: translateY(-1px);
}

.quick-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  flex: 0 0 32px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.quick-card strong {
  display: block;
  font-size: 11px;
  line-height: 1.3;
  font-weight: 600;
}

.quick-card small {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 11px;
}

.quick-arrow {
  margin-left: auto;
  color: var(--muted);
  display: grid;
  place-items: center;
  transition: transform .15s ease, color .15s ease;
}
.quick-arrow svg {
  width: 14px;
  height: 14px;
}
.quick-card:hover .quick-arrow {
  transform: translateX(3px);
  color: var(--ink);
}

.icon-arrow {
  width: 14px;
  height: 14px;
  display: inline-block;
  vertical-align: middle;
  transition: transform .15s ease;
  margin-left: 3px;
}
.btn-primary:hover .icon-arrow {
  transform: translateX(3px);
}

/* Section Card */
.section-card {
  padding: 18px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.section-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: 13.5px;
  line-height: 1.3;
  font-weight: 600;
}

.section-head p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.text-link {
  flex-shrink: 0;
  border: 0;
  padding: 4px 6px;
  background: transparent;
  color: var(--accent-strong);
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
}
.text-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Category Filter Tabs */
.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.cat-tab {
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s ease;
}
.cat-tab:hover {
  background: var(--surface-soft);
  color: var(--ink);
  border-color: var(--line);
}
.cat-tab.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-strong);
  font-weight: 600;
}

/* Service Grid */
.service-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.service-tile {
  min-height: 74px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink-soft);
  text-align: left;
  transition: background-color .15s ease, border-color .15s ease, transform .1s ease;
}

.service-tile:hover {
  border-color: var(--line);
  background: var(--surface-soft);
  transform: translateY(-1px);
}

.service-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  flex: 0 0 32px;
  border-radius: 8px;
  background: var(--surface-muted);
  color: var(--accent-strong);
}

.service-meta {
  min-width: 0;
  flex: 1;
}

.service-title {
  display: block;
  font-size: 10.5px;
  line-height: 1.3;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.service-price {
  display: inline-block;
  margin-top: 2px;
  font-size: 11px;
  color: var(--accent-strong);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Two-Up Layout */
.two-up {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}

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

.mini-service {
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink-soft);
  text-align: left;
  transition: background-color .15s ease, border-color .15s ease;
}

.mini-service:hover {
  border-color: var(--line);
  background: var(--surface-soft);
}

.mini-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  flex: 0 0 28px;
  border-radius: 7px;
  background: var(--surface-muted);
  color: var(--accent-strong);
}

.mini-service strong {
  font-size: 9.5px;
  line-height: 1.3;
  font-weight: 600;
}

.recent-list {
  display: flex;
  flex-direction: column;
}

.recent-row {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
  border-bottom: 1px solid var(--line);
}
.recent-row:last-child { border-bottom: 0; }

.recent-symbol {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: var(--surface-muted);
  color: var(--muted);
}

.recent-info { min-width: 0; }
.recent-info strong {
  display: block;
  color: var(--ink);
  font-size: 10.5px;
  font-weight: 600;
}
.recent-info small {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 11px;
}

.recent-time {
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Bottom Grid */
.bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.38fr) minmax(230px, .82fr);
  gap: 12px;
}

.transactions { overflow: hidden; }

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  white-space: nowrap;
}

th {
  padding: 9px 8px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}

td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}

tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--surface-soft); }

.status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 7px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}

.status::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.status.success { background: var(--success-soft); color: var(--success); }
.status.pending, .status.held { background: var(--warning-soft); color: var(--warning); }
.status.failure, .status.expired, .status.bad { background: var(--danger-soft); color: var(--danger); }
.status.reversal { background: var(--info-soft); color: var(--info); }

.alert-list {
  display: flex;
  flex-direction: column;
}

.alert-item {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 10.5px;
  line-height: 1.5;
}
.alert-item:first-child { padding-top: 2px; }
.alert-item:last-child { padding-bottom: 0; border-bottom: 0; }
.alert-item strong { color: var(--ink); font-weight: 600; }
.alert-bullet {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--accent);
}

/* Right Rail Cards */
.rail-card, .overview-card { padding: 16px; }

.wallet-card {
  min-height: 160px;
  position: relative;
  overflow: hidden;
}

.wallet-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.wallet-top h2 {
  margin: 0;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 600;
}

.wallet-top small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.wallet-illustration {
  width: 38px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--accent-strong, #0B5FA5);
}

.wallet-illustration svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wallet-amount {
  margin: 10px 0 14px;
  color: var(--ink);
  font-size: 26px;
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -.6px;
  font-variant-numeric: tabular-nums;
}

.wallet-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.metric {
  min-height: 60px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
}

.metric-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  flex: 0 0 28px;
  border-radius: 7px;
  background: var(--surface-muted);
  color: var(--accent-strong);
}

.metric strong {
  display: block;
  color: var(--ink);
  font-size: 11.5px;
  line-height: 1.25;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.metric small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

/* ========================================================================= */
/* AI STORE COPILOT LAUNCHER CARD (Rail)                                     */
/* ========================================================================= */
.ai-rail-launcher {
  background: var(--surface);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.ai-launcher-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.ai-launcher-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 9999px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  font-size: 9.5px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.ai-sparkle {
  color: var(--ink);
  font-size: 11px;
}

.ai-launcher-title {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

.ai-launcher-desc {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.btn-ai-launch {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--ink);
  border: 1px solid var(--line);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-ai-launch:hover {
  background: var(--ink);
  color: var(--surface);
  border-color: var(--ink);
  transform: translateY(-1px);
}

.ai-key-hint {
  font-size: 10px;
  opacity: 0.7;
  font-weight: 400;
}

/* ========================================================================= */
/* CUSTOMER SUPPORT CENTER (Rail)                                            */
/* ========================================================================= */
.support-card {
  background: var(--surface);
  border: 1px solid var(--border);
}

.support-header {
  margin-bottom: 12px;
}

.support-badge-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.badge-status-online {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 600;
  color: #10b981;
}

.badge-sla {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}

.support-main-title {
  margin: 0 0 3px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.support-main-sub {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.support-actions-v2 {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.support-item-card {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
  box-sizing: border-box;
}

.support-item-card:hover {
  background: var(--surface-soft);
  border-color: var(--ink);
  transform: translateY(-1px);
}

.support-item-icon {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--ink);
  border: 1px solid var(--line);
}

.support-item-content {
  flex: 1;
  min-width: 0;
}

.support-item-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.support-item-title-row strong {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}

.support-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 3px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--muted);
}

.support-tag.priority {
  color: #d97706;
  border-color: #fde68a;
  background: #fffbeb;
}

.support-tag.active {
  color: #059669;
  border-color: #a7f3d0;
  background: #ecfdf5;
}

.support-tag.hours {
  color: var(--muted);
}

.support-item-content small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
  line-height: 1.3;
}

.support-arrow {
  color: var(--muted);
  font-size: 14px;
  transition: transform 0.15s ease;
}

.support-item-card:hover .support-arrow {
  color: var(--ink);
  transform: translateX(2px);
}

.support-footer-info {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 6px;
  background: var(--surface-soft);
  font-size: 10px;
  color: var(--muted);
  border: 1px dashed var(--line);
}

.support-shield-icon {
  font-size: 12px;
}

/* ========================================================================= */
/* FLOATING AI ASSISTANT WIDGET (Bottom Right Corner)                        */
/* ========================================================================= */
.ai-floating-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  pointer-events: none;
}

/* 1. Small Circular Floating Trigger (Chat Icon Only) */
.ai-floating-bar {
  pointer-events: auto;
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  padding: 0;
  border-radius: 50%;
  background: #09090b;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.35), 0 4px 6px -4px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, background 0.2s ease;
  user-select: none;
  font-family: inherit;
}



.ai-floating-bar:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 14px 28px -4px rgba(0, 0, 0, 0.45);
}

.ai-floating-bar:active {
  transform: translateY(0) scale(0.96);
}

.ai-floating-bar .ai-chat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.ai-floating-bar .ai-icon-bubble {
  display: block;
}

.ai-floating-bar .ai-icon-close {
  display: none;
}

.ai-floating-bar.active .ai-icon-bubble {
  display: none;
}

.ai-floating-bar.active .ai-icon-close {
  display: block;
}

.ai-floating-bar .ai-status-dot {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #22c55e;
  border: 2px solid #09090b;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.6);
}



.ai-floating-bar.active .ai-status-dot {
  display: none;
}

/* 2. Floating Chat Window / Expandable Panel */
.ai-chat-panel {
  pointer-events: auto;
  position: absolute;
  bottom: calc(100% + 14px);
  right: 0;
  width: 410px;
  max-width: calc(100vw - 32px);
  height: 560px;
  max-height: calc(100vh - 110px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 24px 56px -12px rgba(0, 0, 0, 0.28), 0 0 0 1px var(--line);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px) scale(0.97);
  transform-origin: bottom right;
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), width 0.22s ease, height 0.22s ease, visibility 0.22s;
}

.ai-chat-panel.expanded {
  width: 540px;
  height: min(680px, calc(100vh - 104px));
}

.ai-chat-panel.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* Panel Header */
.ai-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  background: var(--ink);
  color: var(--surface);
  border-bottom: 1px solid var(--line);
}

.ai-panel-header-left {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.ai-panel-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #ffffff;
  padding: 5px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-sizing: border-box;
}

.ai-header-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.ai-panel-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ai-panel-title-row h4 {
  margin: 0;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--surface);
  letter-spacing: -0.01em;
}

.ai-chip-online {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
}

.ai-dot-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  display: inline-block;
}

.ai-panel-subtitle {
  margin: 2px 0 0;
  font-size: 11px;
  color: var(--surface);
  opacity: 0.72;
}

.ai-panel-controls {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.ai-ctrl-btn {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: var(--surface);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.15s ease, border-color 0.15s ease;
}



.ai-ctrl-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Panel Body */
.ai-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--surface);
}

.assistant-greeting {
  padding: 14px 15px;
  border-radius: 12px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
}

.ai-greet-head {
  margin-bottom: 6px;
}

.ai-greet-badge {
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--surface);
}

.assistant-greeting strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
  margin-bottom: 3px;
}

.assistant-greeting p {
  margin: 0;
}

.suggestions {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.suggestion {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 12px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.12s ease;
}

.suggestion:hover {
  background: var(--surface-soft);
  border-color: var(--ink);
  transform: translateX(2px);
}

.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ai-user-wrap {
  align-self: flex-end;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  max-width: 84%;
}

.ai-msg-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  max-width: 92%;
  animation: fadeIn 0.15s ease;
}

.ai-msg-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.ai-msg-avatar {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 8px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 4px;
  box-sizing: border-box;
}

.ai-msg-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.message {
  padding: 10px 13px;
  border-radius: 14px 14px 14px 4px;
  background: var(--surface-soft);
  color: var(--ink);
  border: 1px solid var(--line);
  font-size: 12.5px;
  line-height: 1.5;
  word-break: break-word;
  animation: fadeIn 0.15s ease;
}

.message.user {
  border-radius: 14px 14px 4px 14px;
  background: var(--ink);
  color: var(--surface);
  border: 1px solid var(--ink);
}

.ai-msg-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-left: 2px;
}

.ai-msg-time {
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  color: var(--muted-2, var(--muted));
}

.ai-copy-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.ai-copy-btn:hover { color: var(--ink); }

.ai-inline-link {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.ai-inline-link:hover { border-color: var(--ink); }

.ai-typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 0;
}

.ai-typing-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
  animation: aiBounce 1.1s infinite ease-in-out;
}

.ai-typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.ai-typing-dots span:nth-child(3) { animation-delay: 0.3s; }

@keyframes aiBounce {
  0%, 80%, 100% { opacity: 0.3; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-3px); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Panel Footer */
.ai-panel-footer {
  padding: 12px 14px 12px;
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.chat-form {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 6px 5px 14px;
  border-radius: 11px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.chat-form:focus-within {
  border-color: var(--ink);
  background: var(--surface);
}

.chat-form input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-family: inherit;
}

.chat-form input::placeholder {
  color: var(--muted);
}

.send-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 0;
  background: var(--ink);
  color: var(--surface);
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: opacity 0.15s ease;
}

.send-btn:hover {
  opacity: 0.85;
}

.ai-disclaimer {
  margin-top: 7px;
  text-align: center;
  font-size: 10px;
  color: var(--muted);
}

.ai-disclaimer span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* Mobile Responsiveness for Floating Chat - NEVER overlap bottom navigation tabs */
@media (max-width: 820px) {
  .ai-floating-container {
    bottom: calc(72px + env(safe-area-inset-bottom)) !important;
    right: 14px !important;
    z-index: 30;
  }
  .ai-floating-bar {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  }
  .ai-floating-bar .ai-icon-bubble,
  .ai-floating-bar .ai-icon-close {
    width: 20px;
    height: 20px;
  }
  .ai-chat-panel {
    position: fixed;
    bottom: calc(122px + env(safe-area-inset-bottom));
    right: 12px;
    left: 12px;
    width: auto;
    max-width: calc(100vw - 24px);
    height: min(480px, calc(100vh - 160px));
    max-height: calc(100vh - 160px);
    z-index: 35;
  }
}

/* Modals & Dialogs */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(22, 35, 29, .42);
  backdrop-filter: blur(2px);
}

.modal-backdrop.show {
  display: flex;
  animation: fadeIn .16s ease;
}

.modal {
  width: min(520px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 18px 48px rgba(20, 35, 28, .18);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.modal-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
}

.close-btn {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 18px;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.close-btn:hover { color: var(--ink); background: var(--surface-muted); }

.modal-desc {
  margin: 4px 0 16px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.5;
}

/* Modal Form Fields */
.m-field {
  margin-bottom: 14px;
}

.m-label {
  display: block;
  margin-bottom: 6px;
  color: var(--ink-soft);
  font-size: 10.5px;
  font-weight: 600;
}

.m-input, .m-select, .m-textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  color: var(--ink);
  background: var(--surface);
  font-size: 12px;
  transition: all .15s ease;
}

.m-input:focus, .m-select:focus, .m-textarea:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 2px rgba(120, 120, 128, .15);
}

.amount-input {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  color: var(--ink);
  background: var(--surface);
  font-size: 20px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.amount-options {
  display: flex;
  gap: 8px;
  margin: 12px 0 16px;
}

.amount-option {
  flex: 1;
  padding: 8px 4px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s ease;
}

.amount-option:hover, .amount-option.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

/* Payment Method Tabs */
.pay-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

.pay-tab {
  flex: 1;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}
.pay-tab.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.upi-qr-box {
  text-align: center;
  padding: 14px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  margin: 12px 0;
}

.upi-qr-img {
  width: 150px;
  height: 150px;
  background: #ffffff;
  border-radius: 8px;
  padding: 4px;
  border: 1px solid var(--line);
  margin: 0 auto 10px;
  display: block;
}

/* Toast */
.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 120;
  max-width: min(420px, calc(100vw - 40px));
  padding: 11px 16px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-card);
  color: var(--ink);
  font-size: 11.5px;
  line-height: 1.4;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  box-shadow: 0 4px 14px rgba(0,0,0,.15);
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.bad {
  background: #521c1c;
  border-color: #8c3232;
}

.mobile-overlay { display: none; }

/* Dark mode tweaks (Pure Black & White Theme) */



































@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive Media Queries */
@media (max-width: 1280px) {
  .dashboard-grid { grid-template-columns: minmax(0, 1.55fr) minmax(280px, .85fr); }
  .service-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero { grid-template-columns: minmax(0, 1fr) minmax(220px, .8fr); }
  .user-menu strong, .user-menu small { display: none; }
}

@media (max-width: 960px) {
  .main { padding: 16px; }
  .dashboard-grid { grid-template-columns: minmax(0, 1fr); }
  .rail { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .wallet-card, .overview-card, .assistant-card, .support-card { min-width: 0; }
  .search-wrap { flex-basis: 340px; }
}

@media (max-width: 820px) {
  .sidebar {
    transform: translateX(-105%);
    box-shadow: 12px 0 30px rgba(20,35,28,.14);
  }
  .sidebar.open { transform: translateX(0); }
  .mobile-overlay.show {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 25;
    background: rgba(20,35,28,.32);
    backdrop-filter: blur(2px);
  }
  .main { width: 100%; margin-left: 0; }
  .menu-toggle { display: grid !important; }
}

@media (max-width: 620px) {
  .main { padding: 12px; max-width: 100vw; overflow-x: hidden; }
  .topbar {
    min-height: 52px;
    gap: 8px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    box-sizing: border-box;
    flex-wrap: nowrap;
  }
  .icon-btn {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
  }
  .search-wrap { flex: 1 1 auto; width: auto; min-width: 60px; height: 38px; }
  .shortcut { display: none; }
  .top-spacer { flex: 1; min-width: 4px; display: block !important; }
  .balance-pill {
    min-height: 40px;
    padding: 3px 6px 3px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    display: inline-flex;
    align-items: center;
    gap: 9px;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  }
  .balance-pill .wallet-icon { display: flex; align-items: center; }
  .balance-pill .wallet-icon svg { width: 16px; height: 16px; }
  .balance-meta { display: flex; flex-direction: column; min-width: 0; }
  .balance-meta strong { font-size: 13.5px; font-weight: 700; line-height: 1.15; white-space: nowrap; color: var(--ink); }
  .balance-meta small { display: none; }
  .balance-pill .btn-primary, .balance-pill .add-money-pill-btn {
    min-height: 30px;
    padding: 4px 11px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    border-radius: 6px;
  }
  .user-menu { display: none; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 18px; }
  .hero h1 { max-width: 330px; font-size: 23px; }
  .hero p { margin: 8px 0 12px; }
  .hero-preview { min-height: 0; }
  .quick-actions { grid-template-columns: 1fr; gap: 8px; }
  .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two-up, .bottom-grid { grid-template-columns: minmax(0, 1fr); }
  .rail { grid-template-columns: minmax(0, 1fr); }
  .transactions, .table-wrap, .app-table-wrap, .ledger-table-wrap, .pg-table-wrap, .api-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    max-width: 100%;
  }
  table { min-width: 520px; }
  .section-card, .rail-card, .overview-card { padding: 14px; }
  .support-layout { align-items: stretch; }
  .headset { display: none; }
}

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

/* ---- c2bspan brand layer (matches home.css) ---- */
:root { --navy: #13294b; --navy-2: #1c3866; }

body, button, input, select, textarea { font-family: "IBM Plex Sans", -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
h1, h2, h3 { font-weight: 600; }
.sidebar svg { color: inherit; }

/* ---- PAN actions / analysis / API token ---- */
.pan-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.pan-action {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left;
  padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
  color: var(--ink); transition: border-color .15s ease, background-color .15s ease;
}
.pan-action:hover { border-color: var(--accent); background: var(--accent-soft); }
.pan-action strong { font-size: 15px; font-weight: 600; }
.pa-code { font-family: "IBM Plex Mono", monospace; font-size: 11px; color: var(--muted); }
.pa-price { font-size: 13px; color: var(--accent); font-variant-numeric: tabular-nums; }
.pan-action:last-child .pa-price { color: var(--muted); }

.ana-range { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); padding: 6px 8px; font-size: 12px; }
.ana-stats { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.ana-stats div { padding: 12px 12px 12px 0; display: flex; flex-direction: column; gap: 2px; }
.ana-stats div + div { padding-left: 12px; border-left: 1px solid var(--line); }
.ana-stats small { font-size: 11px; color: var(--muted); }
.ana-stats strong { font-size: 20px; font-weight: 500; font-variant-numeric: tabular-nums; }
.ana-chart { display: flex; align-items: flex-end; gap: 2px; height: 120px; position: relative; padding-bottom: 20px; }
.ana-bar { flex: 1; height: 100%; display: flex; align-items: flex-end; }
.ana-bar-total { width: 100%; min-height: 1px; background: var(--surface-muted); border-radius: 2px 2px 0 0; display: flex; align-items: flex-end; }
.ana-bar-ok { width: 100%; background: var(--navy, #13294b); border-radius: 2px 2px 0 0; }
.ana-axis { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; font-family: "IBM Plex Mono", monospace; font-size: 10px; color: var(--muted); }
.ana-split { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; font-size: 12px; }
.ana-split div { display: flex; justify-content: space-between; padding: 8px 10px; background: var(--surface-soft); border-radius: 8px; color: var(--muted); }
.ana-split strong { color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }

.api-note { font-size: 13px; color: var(--muted); margin: 0 0 12px; max-width: 64ch; }
.api-note code, .api-key-box code { font-family: "IBM Plex Mono", monospace; font-size: 12px; }
.api-key-box { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-soft); margin-bottom: 8px; }
.api-key-box code { flex: 1; word-break: break-all; }
.api-warn { font-size: 12px; color: var(--accent); margin: 0 0 12px; }
.bottom-grid.single { grid-template-columns: 1fr; }

@media (max-width: 760px) {
  .pan-actions, .ana-split { grid-template-columns: 1fr 1fr; }
  .ana-stats { grid-template-columns: repeat(2, 1fr); }
  .ana-stats div + div { border-left: 0; padding-left: 0; }
}

@media (max-width: 540px) {
  .pan-actions { grid-template-columns: minmax(0, 1fr) !important; }
  .ana-split { grid-template-columns: minmax(0, 1fr) !important; }
}
.nav-link { text-decoration: none; } a.pan-action { text-decoration: none; }

/* Brand palette (matches index.css & App.tsx) */
:root {
  --bg: #FFFFFF; --surface: #FFFFFF; --surface-soft: #F9FAFB; --surface-muted: #F3F4F6;
  --ink: #111827; --ink-soft: #374151; --muted: #6B7280; --muted-2: #9CA3AF;
  --line: #ECEEF1;
  --accent: #0B5FA5; --accent-strong: #094D87; --accent-soft: #EFF6FF;
  --navy: #0B5FA5; --navy-2: #0B5FA5;
  --shadow: 0 1px 2px rgba(17,24,39,.04), 0 4px 16px rgba(17,24,39,.05);
  --shadow-lg: 0 8px 28px rgba(17,24,39,.08);
}
body, button, input, select, textarea { font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }


/* Design system components */
.card, .auth-card, .panel { border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.btn, .btn-primary, button.btn { border-radius: 12px; font-weight: 700; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-strong); }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(11,95,165,.12); }

/* One font everywhere */
html, body, body * { font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif !important; }
.mono, code, pre, .pa-code { font-family: 'IBM Plex Mono', ui-monospace, monospace !important; }

/* Sidebar (new design): white panel, blue active tab */
.sidebar { background: var(--surface); border-right: 1px solid var(--line); padding: 16px 14px; }
.sidebar .brand { border-bottom: 1px solid var(--line); }
.nav-label { margin: 18px 10px 6px; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: none; letter-spacing: 0; }
.nav-link { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 10px 12px; margin: 2px 0; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font-size: 15px; font-weight: 500; text-align: left; cursor: pointer; }
.nav-link:hover { background: var(--surface-soft); color: var(--accent); }
.nav-link.active, .sidebar .active { background: var(--accent) !important; color: #fff !important; box-shadow: none; }
.nav-link.active .nav-icon { color: #fff; background: transparent; }
.nav-icon { width: 22px; height: 22px; display: grid; place-items: center; color: inherit; background: transparent; }
.nav-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#nav-logout-btn { color: #B42318; }
#nav-logout-btn:hover { background: #FEF3F2; color: #B42318; }

.sidebar-bottom { border-top: 1px solid var(--line); padding-top: 12px; }

/* Mobile bottom tab bar */
.bottom-tabs { display: none; }
@media (max-width: 820px) {
  .sidebar { width: min(84vw, 300px); }
  .main { padding-bottom: 84px !important; }
  .bottom-tabs { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--surface); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .bottom-tabs a, .bottom-tabs button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; border: 0; background: none; color: var(--muted); font-size: 11px; font-weight: 600; text-decoration: none; border-radius: 8px; cursor: pointer; }
  .bottom-tabs svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .bottom-tabs .on { color: var(--accent); background: var(--surface-soft); }
  .topbar { flex-wrap: wrap; }
}
@media (max-width: 620px) {
  .service-grid { grid-template-columns: 1fr 1fr; }
  .modal, .modal-card { width: calc(100vw - 24px) !important; max-width: none; }
  input, select, textarea { font-size: 16px; }
}

/* Sign-out popup */
.signout-modal { max-width: 380px; text-align: center; padding: 28px 24px 22px; }
.signout-icon { width: 52px; height: 52px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; background: #FEF3F2; color: #B42318; }
.signout-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.signout-modal h3 { margin: 0 0 6px; font-size: 20px; }
.signout-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.signout-actions .btn { min-height: 44px; justify-content: center; cursor: pointer; }
.btn-danger { background: #B42318; color: #fff; border: 0; }
.btn-danger:hover { background: #912018; }


/* Standalone pages inside the shell */
.main > .pg { max-width: none; margin: 0; padding: 0 0 40px; width: 100%; min-width: 0; box-sizing: border-box; }
.pg-bal { font-size: 14px; font-weight: 600; color: var(--accent); background: var(--surface-soft); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; white-space: nowrap; }
.pg-bal:empty { display: none; }
@media (max-width: 620px) {
  .main > .pg { padding: 4px 0 32px; max-width: 100%; overflow-x: hidden; }
  .pg-grid { grid-template-columns: minmax(0, 1fr) !important; }
}
.signout-actions .btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); } .signout-actions .btn-ghost:hover { background: var(--surface-soft); }
.signout-modal { box-sizing: border-box; width: min(380px, calc(100vw - 32px)) !important; max-width: none; margin: auto; }
.notification-dot[hidden] { display: none !important; }

/* Password Toggle Eye Button */
.password-field-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}
.password-field-wrap input {
  width: 100%;
  padding-right: 40px !important;
}
.password-toggle-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted, #71717a);
  border-radius: 4px;
  transition: color 0.15s ease;
  z-index: 2;
}
.password-toggle-btn:hover {
  color: var(--ink, #09090b);
}

.password-toggle-btn svg {
  width: 16px;
  height: 16px;
  display: block;
}

/* Email verification keeps account setup visible without reading as an alert. */
[hidden] { display: none !important; }
.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;
}
.email-verification-card {
  display: grid;
  grid-template-columns: 38px minmax(200px, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
  border-radius: 8px;
  background: var(--surface);
}
.email-verification-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-strong);
}
.email-verification-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.email-verification-copy { min-width: 0; }
.email-verification-copy .eyebrow { margin: 0 0 2px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.email-verification-copy h2 { margin: 0; font-size: 14px; font-weight: 700; }
.email-verification-copy > p:last-child { margin: 3px 0 0; max-width: 60ch; color: var(--muted); font-size: 12px; }
.email-verification-copy strong { color: var(--ink); font-weight: 700; }
.email-verification-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; max-width: 280px; }
.email-verification-actions input {
  width: 92px;
  height: 34px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .12em;
  text-align: center;
}
.email-verification-actions .btn-primary,
.email-verification-actions .btn-ghost { min-height: 34px; padding: 0 10px; font-size: 12px; }
.email-verification-actions .btn-ghost { border: 1px solid var(--line); background: transparent; color: var(--ink); }
.email-verification-message { flex-basis: 100%; min-height: 16px; color: var(--muted); font-size: 11px; text-align: right; white-space: normal; word-break: break-word; }

/* Dashboard workspace header: context first, tools second. */
.topbar {
  min-height: 58px;
  padding: 0 2px 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
  justify-content: space-between;
}
.topbar {
  gap: 14px;
}
.workspace-context { display: flex; flex-direction: column; flex-shrink: 0; white-space: nowrap; min-width: max-content; }
.workspace-eyebrow { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; margin-top: 2px; }
.workspace-context strong { color: var(--ink); font-size: 18px; line-height: 1.15; font-weight: 800; letter-spacing: -.02em; }
.topbar-tools { display: flex; align-items: center; justify-content: flex-end; gap: 10px; min-width: 0; flex: 1; }
.topbar .search-wrap { width: auto; flex: 1 1 180px; min-width: 140px; max-width: 340px; }
.topbar .search-wrap input { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding-right: 14px; }
.topbar .search-wrap input:focus { background: var(--surface); border-color: var(--accent); }
@media (max-width: 1180px) { .topbar .search-wrap .shortcut { display: none; } }
@media (min-width: 1181px) { .topbar .search-wrap input { padding-right: 60px; } }
.topbar .balance-pill {
  border-radius: 999px; box-shadow: none; height: 36px; min-height: 36px;
  padding: 0 4px 0 12px; gap: 8px; flex-shrink: 0;
}
.topbar .balance-pill .wallet-icon { display: none; }
.topbar .balance-pill .balance-meta { display: flex; flex-direction: row-reverse; align-items: center; gap: 6px; }
.topbar .balance-pill .balance-meta small {
  margin: 0; font-size: 11px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: #16a34a; white-space: nowrap;
}
.topbar .balance-pill .balance-meta strong { font-family: 'IBM Plex Mono', monospace !important; font-size: 12px; font-weight: 600; white-space: nowrap; }
.topbar .balance-pill .btn-primary,
.topbar .balance-pill .add-money-pill-btn {
  height: 28px; min-height: 28px; padding: 0 12px; border-radius: 999px; font-size: 12px;
}
.topbar .user-menu { width: 36px; min-height: 36px; padding: 0; border: 0; border-radius: 50%; background: var(--accent); color: #fff; justify-content: center; flex-shrink: 0; }
.topbar .user-menu .avatar { width: 36px; height: 36px; background: var(--accent); color: #fff; font-weight: 700; font-size: 12px; border-radius: 50%; }
.topbar .user-menu .user-chevron { display: none; }

@media (max-width: 820px) {
  .topbar { padding-bottom: 10px; }
  .workspace-context strong { font-size: 16px; }
  .topbar .search-wrap { width: min(240px, 34vw); }
}

@media (max-width: 620px) {
  .topbar {
    display: grid !important;
    grid-template-columns: 36px minmax(0, 1fr) auto;
    min-height: 42px;
    padding-bottom: 8px;
    gap: 6px;
  }
  .workspace-context { display: none; }
  .menu-toggle { grid-column: 1; grid-row: 1; }
  .topbar-tools { display: contents; }
  .topbar .search-wrap { grid-column: 2; grid-row: 1; width: 100%; min-width: 0; }
  .topbar .search-wrap .shortcut { display: none; }
  .topbar #themeToggle, .topbar #notificationBtn, .topbar .user-menu { display: none !important; }
  .topbar .balance-pill { grid-column: 3; grid-row: 1; }
}

/* ---- Retailer workspace: compact operational layout ----
   This final layer deliberately owns density across every retailer page.
   It prevents page-specific legacy rules from inflating the type scale. */
:root {
  --sidebar-width: 236px;
  --radius-card: 8px;
  --radius-control: 6px;
}

body {
  font-size: 13px;
  line-height: 1.45;
}

.sidebar {
  width: var(--sidebar-width);
  flex-basis: var(--sidebar-width);
  padding: 14px 12px 12px;
}

.brand {
  min-height: 60px;
  padding: 0 6px;
  margin-bottom: 6px;
}

.brand-logo-img { height: 32px; }

.side-scroll {
  padding: 4px 0 10px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.side-scroll::-webkit-scrollbar { width: 0; height: 0; background: transparent; }
.side-scroll::-webkit-scrollbar-thumb,
.side-scroll::-webkit-scrollbar-track { background: transparent; }

.nav-label {
  margin: 14px 8px 4px;
  padding: 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.nav-link,
.nav-toggle {
  min-height: 38px;
  gap: 10px;
  padding: 8px 10px;
  margin: 1px 0;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
}

.nav-icon { width: 18px; height: 18px; flex-basis: 18px; }
.nav-icon svg { width: 18px; height: 18px; stroke-width: 1.8; }

#nav-logout-btn {
  min-height: 36px;
  margin-top: 8px;
  border: 1px solid #fecaca;
  background: #fff5f5;
  color: #b42318;
}
#nav-logout-btn:hover { background: #fee2e2; color: #912018; }

.sidebar-bottom { padding-top: 10px; }
.profile-mini { min-height: 38px; gap: 8px; padding: 6px 8px; }
.profile-mini strong { font-size: 12px; }
.profile-mini small { font-size: 10px; }

.main {
  width: calc(100% - var(--sidebar-width));
  margin-left: var(--sidebar-width);
  padding: 14px 20px 28px;
}

.topbar {
  min-height: 50px;
  gap: 10px;
  margin-bottom: 16px;
}

.icon-btn { width: 36px; height: 36px; flex-basis: 36px; }
.search-wrap { height: 36px; flex: 1 1 200px; min-width: 170px; max-width: 380px; }
.search-wrap > svg { top: 10px; }
.search-wrap input {
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 400;
}

.balance-pill { border-radius: 999px; }
.btn-primary, .btn-outline { border-radius: 12px; }
.dashboard-grid { gap: 20px; max-width: none; }
.primary-col, .rail { gap: 20px; }
.card, .section-card, .rail-card, .overview-card, .pg-card {
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.section-card, .rail-card, .overview-card { padding: 16px; }

h1, .welcome-heading { font-size: clamp(21px, 2vw, 24px); line-height: 1.22; }
h2, .section-head h2, .pg-card h2 { font-size: 15px; line-height: 1.3; }
h3 { font-size: 13px; line-height: 1.35; }
.section-head { margin-bottom: 12px; }
.section-head p, .api-note, .pg-head p { font-size: 12px; }

.pan-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.pan-action {
  gap: 6px; padding: 18px; border-radius: 16px; border: 1px solid var(--line);
  background: var(--surface); box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.pan-action:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: #cbd5e1; background: var(--surface); }
.pan-action-head { width: 100%; display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.pan-action-icon { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--accent); display: grid; place-items: center; }
.pan-action-icon svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }
.pan-action-arrow { color: var(--muted); font-size: 15px; }
.pan-action strong { font-size: 15px; font-weight: 700; color: var(--ink); }
.pa-code { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.pa-desc { font-size: 12px; line-height: 1.45; color: var(--muted); margin: 2px 0 10px; }
.pa-cta { margin-top: auto; width: 100%; height: 38px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: var(--ink); }
.pa-price { font-size: 11.5px; font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums; }
.ana-stats { margin-bottom: 12px; }
.ana-stats div { padding: 10px 10px 10px 0; }
.ana-stats strong { font-size: 17px; }
.ana-stats small, .ana-split { font-size: 11px; }

.pg { max-width: none; padding: 0 0 40px; }
.pg-head { margin-bottom: 18px; }
.pg-head h1 { font-size: 22px; margin: 2px 0 4px; }
.pg-head p { font-size: 12px; }
.pg-card { padding: 16px; }
.pg-field { gap: 5px; margin-bottom: 12px; font-size: 12px; }
.pg-field input { height: 38px; font-size: 13px; }
.pg-btn { height: 40px; font-size: 13px; }
.pg-btn.ghost { height: 34px; font-size: 12px; }

@media (max-width: 820px) {
  .sidebar { width: min(82vw, 280px); }
  .main { width: 100%; margin-left: 0; padding: 12px 14px 80px; }
  .topbar { min-height: 44px; margin-bottom: 12px; }
  .dashboard-grid, .primary-col, .rail { gap: 12px; }
}

@media (max-width: 620px) {
  body { font-size: 13px; }
  .main { padding: 10px 12px 82px; }
  .topbar {
    display: grid !important;
    grid-template-columns: 36px minmax(0, 1fr) auto;
    min-height: 42px;
    gap: 6px;
    flex-wrap: nowrap;
  }
  .menu-toggle { grid-column: 1; grid-row: 1; }
  .search-wrap { grid-column: 2; grid-row: 1; min-width: 0; width: 100%; }
  .top-spacer, #notificationBtn, .user-menu { display: none !important; }
  .topbar > .icon-btn:not(.menu-toggle) { display: none; }
  .balance-pill {
    grid-column: 3;
    grid-row: 1;
    min-height: 36px;
    padding: 3px 5px 3px 8px;
    gap: 5px;
    border-radius: 6px;
  }
  .balance-pill .wallet-icon { display: none; }
  .balance-meta strong { font-size: 12px; }
  .balance-pill .btn-primary, .balance-pill .add-money-pill-btn {
    min-height: 28px;
    padding: 3px 8px;
    font-size: 10px;
    border-radius: 5px;
  }
  .email-verification-card {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 8px;
    padding: 11px 12px;
    margin-bottom: 12px;
    border-radius: 6px;
  }
  .email-verification-icon { width: 32px; height: 32px; }
  .email-verification-icon svg { width: 17px; height: 17px; }
  .email-verification-copy .eyebrow { font-size: 11px; }
  .email-verification-copy h2 { font-size: 13px; }
  .email-verification-copy > p:last-child { font-size: 11px; }
  .email-verification-actions { grid-column: 1 / -1; justify-content: flex-start; width: 100%; }
  .email-verification-actions input { width: 82px; height: 32px; font-size: 12px; }
  .email-verification-actions .btn-primary,
  .email-verification-actions .btn-ghost { min-height: 32px; padding: 0 8px; font-size: 11px; }
  .email-verification-message { text-align: left; }
  .section-card, .rail-card, .overview-card, .pg-card { padding: 14px; }
  h1, .welcome-heading { font-size: 20px; }
  h2, .section-head h2, .pg-card h2 { font-size: 14px; }
  .pan-actions { grid-template-columns: 1fr; }
  .pg { padding: 14px 0 32px; }
}

/* Light theme only: toggle hidden; a stale saved "dark" preference has no styles */
#themeToggle, .theme-toggle-btn { display: none !important; }
