:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --muted: #64748b;
  --soft: #f1f5f9;
  --line: #e2e8f0;
  --ink: #020617;
  --blue: #2563eb;
  --green: #10b981;
  --orange: #f59e0b;
  --purple: #8b5cf6;
  --red: #ef4444;
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body,
.app-shell {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
a {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

.icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.app-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  z-index: 20;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 34px;
}

.brand-mark,
.avatar {
  display: grid;
  place-items: center;
  background: var(--ink);
  color: white;
  font-weight: 950;
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.18);
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 18px;
  font-size: 24px;
}

.brand h1,
.brand p,
.topbar h2,
.topbar p {
  margin: 0;
}

.brand h1 {
  font-size: 22px;
  letter-spacing: 0;
}

.brand p,
.eyebrow,
.section-label,
small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.nav {
  display: grid;
  gap: 8px;
  padding: 0 22px;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 62px;
  padding: 0 22px;
  border-radius: 24px;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 900;
  transition: 0.2s ease;
}

.nav-item:hover {
  color: var(--ink);
  background: var(--soft);
}

.nav-item.active {
  color: white;
  background: var(--ink);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.25);
}

.nav-item.active::before {
  content: "";
  position: absolute;
  left: 11px;
  width: 5px;
  height: 24px;
  border-radius: 999px;
  background: var(--blue);
}

.sidebar-footer {
  margin-top: auto;
  padding: 24px;
}

.loyalty {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 22px;
  border-radius: 28px;
  background: var(--soft);
}

.loyalty strong {
  display: block;
  margin: 8px 0 2px;
  font-size: 22px;
}

.sidebar-chat,
.primary,
.secondary,
.trade-box button,
.loan-result button {
  border: 0;
  cursor: pointer;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  transition: 0.18s ease;
}

.sidebar-chat {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
  padding: 18px;
  border-radius: 22px;
  background: var(--ink);
  color: white;
  font-size: 10px;
}

.sidebar-chat:hover,
.primary:hover,
.trade-box button:hover {
  background: var(--blue);
}

.reset-form button {
  width: 100%;
  margin-top: 12px;
  border: 0;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}

.main {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 42px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(18px);
}

.topbar-heading {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar-heading > div {
  min-width: 0;
}

.mobile-menu-button,
.sidebar-close {
  width: 48px;
  height: 48px;
  display: none;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
  color: var(--ink);
  cursor: pointer;
}

.sidebar-close {
  margin-left: auto;
  background: var(--soft);
}

.sidebar-backdrop {
  display: none;
}

.topbar h2 {
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: 0;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 22px;
}

.currency-switch {
  display: flex;
  gap: 4px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--soft);
}

.currency-switch a {
  padding: 9px 16px;
  border-radius: 13px;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 950;
}

.currency-switch a.active {
  color: var(--blue);
  background: white;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.icon-button {
  position: relative;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
  cursor: pointer;
}

.icon-button span {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 10px;
  height: 10px;
  border: 2px solid white;
  border-radius: 999px;
  background: var(--blue);
}

.profile {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-left: 20px;
  border-left: 1px solid var(--line);
  text-align: right;
}

.profile strong {
  display: block;
  font-size: 12px;
}

.profile small {
  color: var(--blue);
}

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 18px;
  font-size: 12px;
}

.content {
  max-width: 1800px;
  margin: 0 auto;
  padding: 42px 42px 140px;
  display: grid;
  align-content: start;
  gap: 34px;
}

.logout-form {
  margin: 0;
}

.flash-stack {
  display: grid;
  gap: 10px;
  max-width: 1800px;
  margin: 22px auto 0;
  padding: 0 42px;
}

.flash-stack.inline {
  max-width: none;
  margin: 0;
  padding: 0;
}

.flash {
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
  color: #334155;
  font-size: 12px;
  font-weight: 850;
}

.flash.success {
  border-color: rgba(16, 185, 129, 0.24);
  background: rgba(16, 185, 129, 0.1);
  color: #047857;
}

.flash.error {
  border-color: rgba(239, 68, 68, 0.24);
  background: rgba(239, 68, 68, 0.1);
  color: #b91c1c;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 18% 12%, rgba(37, 99, 235, 0.14), transparent 32%),
    var(--bg);
}

.auth-panel {
  width: min(520px, 100%);
  display: grid;
  gap: 20px;
}

.auth-panel .brand {
  padding: 0;
}

.auth-card {
  display: grid;
  gap: 22px;
  padding: clamp(28px, 5vw, 48px);
  border: 1px solid var(--line);
  border-radius: 34px;
  background: white;
  box-shadow: var(--shadow);
}

.auth-card h2 {
  margin: 8px 0 0;
  font-size: clamp(32px, 8vw, 48px);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.auth-card label {
  display: grid;
  gap: 10px;
}

.auth-card label span {
  padding-left: 12px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.auth-card input {
  min-height: 62px;
  width: 100%;
  border: 0;
  outline: 0;
  border-radius: 22px;
  background: var(--soft);
  color: var(--ink);
  padding: 0 20px;
  font-weight: 850;
}

.auth-card .primary {
  width: 100%;
}

.auth-hint {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.6;
}

.grid {
  display: grid;
}

.gap-md {
  gap: 24px;
}

.gap-lg {
  gap: 34px;
}

.xl-3 {
  grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
}

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

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

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

.trading-grid {
  grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
}

.stack {
  display: grid;
  gap: 24px;
}

.fade-in {
  animation: fade-in 0.3s ease both;
}

@keyframes fade-in {
  from {
    transform: translateY(8px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.panel,
.balance-card,
.stat-card,
.ai-card,
.ticker,
.dark-panel,
.beneficiary-card,
.vision-card,
.bank-card {
  border-radius: 46px;
}

.panel,
.balance-card,
.stat-card,
.ticker,
.beneficiary-card {
  border: 1px solid var(--line);
  background: white;
}

.panel,
.balance-card {
  padding: clamp(28px, 4vw, 52px);
}

.panel.large {
  padding: clamp(32px, 4.5vw, 58px);
}

.panel h3,
.dark-panel h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 30px;
  font-size: 26px;
  letter-spacing: -0.04em;
}

.balance-card,
.ai-card,
.dark-panel,
.vision-card,
.bank-card {
  position: relative;
  overflow: hidden;
}

.ghost-icon {
  position: absolute;
  top: 26px;
  right: 26px;
  opacity: 0.06;
  color: currentColor;
}

.ghost-icon .icon {
  width: 150px;
  height: 150px;
}

.balance-line {
  display: flex;
  align-items: baseline;
  gap: 18px;
  margin: 18px 0 34px;
}

.balance-line strong {
  font-size: clamp(44px, 6vw, 76px);
  line-height: 0.95;
  letter-spacing: -0.07em;
}

.balance-line span {
  color: var(--blue);
  font-size: 28px;
  font-weight: 900;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.primary,
.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 58px;
  padding: 0 28px;
  border-radius: 22px;
  font-size: 11px;
}

.primary {
  background: var(--ink);
  color: white;
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.16);
}

.secondary {
  background: var(--soft);
  color: var(--ink);
}

.compact {
  min-height: 46px;
}

.ai-card {
  display: flex;
  min-height: 280px;
  flex-direction: column;
  justify-content: space-between;
  padding: 44px;
  background: var(--blue);
  color: white;
  box-shadow: 0 28px 55px rgba(37, 99, 235, 0.24);
}

.section-label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.78);
}

.ai-card p {
  margin: 28px 0 0;
  font-size: 26px;
  font-style: italic;
  font-weight: 950;
  line-height: 1.2;
  letter-spacing: -0.035em;
}

.ai-card button {
  min-height: 50px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.12);
  color: white;
  cursor: pointer;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ai-card form,
.loan-result form,
.vision-card form,
.insurance-card form {
  margin: 0;
}

.stat-card {
  padding: 32px;
  transition: 0.2s ease;
}

.stat-card:hover,
.ticker:hover,
.beneficiary-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.stat-icon,
.coin {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 20px;
  background: var(--soft);
  color: var(--blue);
}

.stat-icon.green,
.green {
  color: var(--green);
}

.stat-icon.blue,
.blue {
  color: var(--blue);
}

.stat-icon.purple,
.purple {
  color: var(--purple);
}

.stat-icon.orange,
.orange {
  color: var(--orange);
}

.stat-card .eyebrow,
.ticker .eyebrow {
  display: block;
  margin: 26px 0 10px;
}

.stat-card strong {
  display: block;
  font-size: 30px;
  letter-spacing: -0.05em;
}

.stat-card small,
.ticker small {
  color: var(--blue);
}

.area-chart {
  height: 250px;
}

.area-chart svg {
  width: 100%;
  height: 100%;
}

.grid-line {
  fill: none;
  stroke: #e2e8f0;
  stroke-dasharray: 4 8;
}

.area {
  fill: url(#flowFill);
}

.line {
  fill: none;
  stroke: var(--blue);
  stroke-width: 6;
  stroke-linecap: round;
}

.goal > div:first-child,
.list-row,
.panel-head,
.toggle-row,
.security-row,
.card-top,
.card-bottom,
.limit-block > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.goal strong,
.goal span {
  font-size: 13px;
}

.goal span {
  color: var(--muted);
  font-weight: 800;
}

.progress {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--soft);
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: currentColor;
}

.progress span.green {
  color: var(--green);
}

.progress span.blue {
  color: var(--blue);
}

.ticker {
  padding: 24px;
}

.ticker strong {
  display: block;
  margin-bottom: 6px;
  font-size: 20px;
}

.positive {
  color: var(--green) !important;
}

.negative {
  color: var(--red) !important;
}

.list-row {
  padding: 24px;
  border: 1px solid transparent;
  border-radius: 28px;
  background: var(--soft);
}

.row-main {
  display: flex;
  align-items: center;
  gap: 18px;
}

.row-main small,
.row-value small {
  display: block;
  margin-top: 4px;
}

.row-value {
  text-align: right;
}

.coin {
  background: white;
  font-weight: 950;
}

.coin.dark {
  background: var(--ink);
  color: white;
}

.dark-panel {
  padding: clamp(32px, 4.5vw, 54px);
  background: var(--ink);
  color: white;
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.22);
}

.trade-box label,
.trade-result {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 18px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.05);
}

.trade-box label span,
.trade-result span {
  grid-column: 1 / -1;
  color: #64748b;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.trade-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: white;
  font-size: 26px;
  font-weight: 950;
}

.trade-result strong {
  font-size: 26px;
}

.swap {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  margin: -14px auto;
  border: 4px solid var(--ink);
  border-radius: 16px;
  background: var(--blue);
}

.trade-box button,
.loan-result button {
  width: 100%;
  min-height: 62px;
  border-radius: 24px;
  background: var(--blue);
  color: white;
  font-size: 11px;
}

.trade-box p {
  margin: 10px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 22px;
  color: #64748b;
  font-size: 11px;
  font-style: italic;
  font-weight: 800;
  line-height: 1.6;
  text-align: center;
}

.bank-card {
  min-height: 380px;
  aspect-ratio: 1.62;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(34px, 4vw, 56px);
  background:
    radial-gradient(circle at 88% 10%, rgba(37, 99, 235, 0.3), transparent 28%),
    linear-gradient(135deg, #0f172a, #020617);
  color: white;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.28);
}

.cards-screen {
  align-items: start;
}

.cards-left {
  gap: 24px;
}

.cards-security-panel {
  align-self: start;
  min-height: 0;
}

.cards-panel-head h3 {
  margin: 0;
}

.cards-panel-head > .icon {
  width: 44px;
  height: 44px;
  padding: 10px;
  border-radius: 16px;
  background: var(--soft);
}

.bank-card.frozen {
  filter: grayscale(1) brightness(0.62);
}

.card-top strong {
  display: block;
  font-size: 38px;
  font-style: italic;
  letter-spacing: -0.05em;
}

.card-top small {
  color: var(--blue);
}

.card-top .icon {
  width: 48px;
  height: 48px;
  color: var(--blue);
}

.card-number {
  margin: 0 0 42px;
  font-size: clamp(24px, 4vw, 42px);
  letter-spacing: 0.25em;
}

.card-bottom span {
  display: block;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

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

.card-actions form {
  margin: 0;
}

.card-actions button {
  width: 100%;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: white;
  color: #475569;
  cursor: pointer;
  padding: 14px 16px;
  text-align: left;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.05);
}

.card-actions button .icon {
  width: 42px;
  height: 42px;
  padding: 10px;
  border-radius: 14px;
  background: var(--soft);
  color: var(--blue);
}

.card-actions button span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.card-actions button strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: none;
}

.card-actions button small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.card-actions button.active {
  border-color: var(--blue);
  background: var(--blue);
  color: white;
}

.card-actions button.active .icon {
  background: rgba(255, 255, 255, 0.16);
  color: white;
}

.card-actions button.active strong,
.card-actions button.active small {
  color: white;
}

.toggle-row {
  margin: 0;
  padding: 2px 0;
}

.toggle-row strong {
  display: block;
  margin-bottom: 4px;
  font-size: 18px;
}

.toggle-row small {
  display: block;
}

.toggle {
  position: relative;
  width: 74px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: #cbd5e1;
  cursor: pointer;
  transition: 0.18s ease;
}

.toggle > span {
  position: absolute;
  top: 5px;
  left: 5px;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: white;
  box-shadow: 0 8px 14px rgba(15, 23, 42, 0.18);
  transition: 0.18s ease;
}

.toggle.on {
  background: var(--green);
}

.toggle.on > span {
  transform: translateX(34px);
}

.limit-block {
  display: grid;
  gap: 16px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.limit-block strong {
  font-size: 32px;
  letter-spacing: -0.05em;
}

.slider-row {
  display: grid;
  gap: 16px;
}

.slider-row span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.slider-row strong {
  color: var(--blue);
  font-size: 26px;
}

.slider-row input {
  width: 100%;
  accent-color: var(--blue);
}

.loan-result {
  display: grid;
  align-content: space-between;
  gap: 30px;
}

.loan-result > strong {
  font-size: clamp(48px, 8vw, 88px);
  line-height: 0.9;
  letter-spacing: -0.08em;
}

.loan-result > span {
  color: #64748b;
  font-size: 22px;
  font-weight: 950;
}

.mini {
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.mini small {
  display: block;
  margin-bottom: 8px;
}

.mini b {
  display: block;
  font-size: 24px;
  letter-spacing: -0.04em;
}

.insurance-card {
  display: grid;
  gap: 16px;
}

.insurance-card h3 {
  margin-bottom: 8px;
}

.donut {
  position: relative;
  width: min(360px, 78vw);
  aspect-ratio: 1;
  margin: 10px auto 34px;
  border-radius: 50%;
}

.donut span {
  position: absolute;
  inset: 70px;
  border-radius: inherit;
  background: white;
  box-shadow: inset 0 0 0 1px var(--line);
}

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

.legend-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--soft);
}

.legend-item > span {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  border-radius: 50%;
}

.vision-card {
  padding: 44px;
  background: var(--green);
  color: white;
  box-shadow: 0 28px 55px rgba(16, 185, 129, 0.22);
}

.vision-card h3 {
  margin: 0 0 16px;
  font-size: 30px;
  font-style: italic;
  letter-spacing: -0.04em;
}

.vision-card p {
  max-width: 75%;
  margin: 0 0 32px;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 700;
  line-height: 1.6;
}

.vision-card .progress {
  background: rgba(255, 255, 255, 0.24);
}

.vision-card .progress span {
  background: white;
}

.security-row {
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.05);
}

.security-row > div {
  flex: 1;
}

.security-row small {
  display: block;
  margin-top: 5px;
  color: #64748b;
}

.security-row time {
  color: rgba(255, 255, 255, 0.44);
  font-size: 10px;
  font-weight: 950;
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 18px rgba(16, 185, 129, 0.6);
}

.status-dot.alert {
  background: var(--red);
  box-shadow: 0 0 18px rgba(239, 68, 68, 0.7);
}

.beneficiary-card {
  position: relative;
  padding: 34px;
}

.beneficiary-card h4 {
  margin: 24px 0 8px;
  font-size: 20px;
}

.beneficiary-card p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.beneficiary-actions {
  position: absolute;
  top: 26px;
  right: 26px;
  display: flex;
  gap: 8px;
}

.beneficiary-actions form {
  margin: 0;
}

.beneficiary-actions button {
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: #cbd5e1;
  cursor: pointer;
}

.beneficiary-actions button:hover {
  color: var(--red);
}

.chat-fab {
  position: fixed;
  right: 36px;
  bottom: 36px;
  z-index: 30;
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border: 8px solid white;
  border-radius: 32px;
  background: var(--ink);
  color: white;
  box-shadow: 0 24px 55px rgba(15, 23, 42, 0.26);
  cursor: pointer;
}

.chat-fab.hidden {
  display: none;
}

.chat-fab span {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 28px;
  height: 28px;
  border: 6px solid white;
  border-radius: 999px;
  background: var(--blue);
}

.chat-panel {
  position: fixed;
  right: 36px;
  bottom: 36px;
  z-index: 35;
  transform: translateY(60px) scale(0.96);
  opacity: 0;
  pointer-events: none;
  transition: 0.2s ease;
}

.chat-panel.open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.chat-panel article {
  width: min(480px, calc(100vw - 32px));
  height: min(720px, calc(100vh - 32px));
  display: flex;
  overflow: hidden;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 44px;
  background: white;
  box-shadow: 0 42px 90px rgba(15, 23, 42, 0.28);
}

.chat-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 34px;
  background: var(--ink);
  color: white;
}

.chat-panel header > div {
  display: flex;
  align-items: center;
  gap: 16px;
}

.chat-panel header > div > .icon {
  width: 56px;
  height: 56px;
  padding: 14px;
  border-radius: 18px;
  background: var(--blue);
}

.chat-panel header button {
  border: 0;
  background: transparent;
  color: white;
  cursor: pointer;
  opacity: 0.7;
}

.chat-messages {
  flex: 1;
  display: grid;
  align-content: start;
  gap: 18px;
  overflow: auto;
  padding: 30px;
  background: #f8fafc;
}

.message {
  display: flex;
}

.message.user {
  justify-content: flex-end;
}

.message p {
  max-width: 86%;
  margin: 0;
  padding: 18px 20px;
  border-radius: 24px;
  background: white;
  color: #334155;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.5;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
}

.message.user p {
  border-bottom-right-radius: 6px;
  background: var(--blue);
  color: white;
}

.message.ai p {
  border-bottom-left-radius: 6px;
}

.chat-form {
  display: grid;
  grid-template-columns: 1fr 64px;
  gap: 14px;
  padding: 22px;
  border-top: 1px solid var(--line);
}

.chat-form input,
.modal-card input,
.modal-card select,
.modal-card textarea,
.filter-row select {
  width: 100%;
  border: 0;
  outline: 0;
  border-radius: 22px;
  background: var(--soft);
  color: var(--ink);
  font-weight: 800;
}

.chat-form input {
  padding: 0 22px;
}

.chat-form button {
  height: 64px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 22px;
  background: var(--ink);
  color: white;
  cursor: pointer;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(16px);
}

.modal.open {
  display: grid;
}

.modal-card {
  position: relative;
  width: min(560px, 100%);
  display: grid;
  gap: 22px;
  padding: clamp(28px, 5vw, 56px);
  border-radius: 42px;
  background: white;
  box-shadow: var(--shadow);
}

.modal-card h3 {
  margin: 0 0 12px;
  font-size: 36px;
  letter-spacing: -0.055em;
}

.modal-card label {
  display: grid;
  gap: 10px;
}

.modal-card label span {
  padding-left: 12px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.modal-card input,
.modal-card select {
  min-height: 64px;
  padding: 0 22px;
}

.modal-card textarea {
  min-height: 110px;
  resize: vertical;
  padding: 20px 22px;
}

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

.form-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.6;
}

.compact-stack {
  gap: 12px;
}

.filter-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 12px;
  margin-bottom: 24px;
}

.filter-row select {
  min-height: 46px;
  padding: 0 16px;
}

.transaction-row,
.request-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border-radius: 22px;
  background: var(--soft);
}

.transaction-row small,
.request-row small {
  display: block;
  margin-top: 5px;
}

.request-row.unread {
  box-shadow: inset 4px 0 0 var(--blue);
}

.request-row > span {
  color: var(--blue);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: right;
}

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

.code-grid > div,
.virtual-card-mini {
  display: grid;
  gap: 8px;
  padding: 20px;
  border-radius: 24px;
  background: var(--soft);
}

.code-grid strong {
  font-size: 24px;
  letter-spacing: -0.03em;
}

.virtual-card-mini {
  min-height: 180px;
  align-content: space-between;
  background:
    radial-gradient(circle at 86% 18%, rgba(37, 99, 235, 0.35), transparent 28%),
    linear-gradient(135deg, #0f172a, #020617);
  color: white;
}

.virtual-card-mini strong {
  font-size: 22px;
  font-style: italic;
}

.virtual-card-mini span {
  font-size: 26px;
  font-weight: 950;
  letter-spacing: 0.16em;
}

.account-overview {
  display: grid;
  gap: 20px;
}

.account-list {
  display: grid;
  gap: 12px;
}

.account-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border-radius: 22px;
  background: var(--soft);
}

.account-row strong,
.receipt-grid strong,
.statement-summary strong {
  display: block;
  font-size: 18px;
  letter-spacing: -0.03em;
}

.account-balances {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.account-balances span {
  padding: 8px 10px;
  border-radius: 999px;
  background: white;
  color: #334155;
  font-size: 11px;
  font-weight: 900;
}

.inline-link {
  color: var(--blue);
  font-weight: 950;
}

.statement-filter {
  grid-template-columns: repeat(2, minmax(0, 1fr)) repeat(2, minmax(130px, 0.7fr)) auto;
}

.filter-row input,
.admin-form-grid input,
.admin-form-grid select,
.admin-form-grid textarea,
.inline-admin-form input,
.inline-admin-form select,
.kyc-actions input,
.reversal-form input,
.reversal-form select {
  width: 100%;
  border: 0;
  outline: 0;
  border-radius: 18px;
  background: var(--soft);
  color: var(--ink);
  font-weight: 800;
}

.filter-row input,
.admin-form-grid input,
.admin-form-grid select,
.inline-admin-form input,
.inline-admin-form select,
.kyc-actions input,
.reversal-form input,
.reversal-form select {
  min-height: 46px;
  padding: 0 16px;
}

.statement-summary,
.receipt-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.statement-summary > div,
.receipt-grid > div {
  padding: 18px;
  border-radius: 22px;
  background: var(--soft);
}

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

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

.admin-form-grid label {
  display: grid;
  gap: 8px;
}

.admin-form-grid label span {
  padding-left: 10px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.admin-form-grid textarea {
  min-height: 110px;
  padding: 16px;
  resize: vertical;
}

.inline-admin-form {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto;
  gap: 8px;
  margin: 0 0 10px;
}

.open-account-form {
  grid-template-columns: minmax(130px, 1fr) minmax(110px, 0.6fr) auto;
}

.kyc-actions {
  grid-template-columns: minmax(160px, 1fr) auto auto;
}

.status-pill.active,
.status-pill.approved {
  background: rgba(16, 185, 129, 0.14);
  color: #047857;
}

.status-pill.frozen,
.status-pill.pending_review {
  background: rgba(245, 158, 11, 0.14);
  color: #b45309;
}

.status-pill.closed,
.status-pill.rejected {
  background: rgba(239, 68, 68, 0.14);
  color: #b91c1c;
}

.status-pill.not_submitted {
  background: #e2e8f0;
  color: #334155;
}

.admin-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  background: #f8fafc;
}

.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid var(--line);
  background: white;
}

.admin-nav {
  display: grid;
  gap: 8px;
  padding: 0 22px;
}

.admin-nav a {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 52px;
  padding: 0 18px;
  border-radius: 18px;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}

.admin-nav a.active,
.admin-nav a:hover {
  background: var(--ink);
  color: white;
}

.admin-main {
  min-width: 0;
}

.admin-topbar {
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 42px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px);
}

.admin-topbar h2 {
  margin: 6px 0 0;
  font-size: 32px;
  letter-spacing: -0.045em;
}

.admin-user {
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: right;
}

.admin-user strong,
.admin-table strong {
  display: block;
  font-size: 13px;
}

.admin-user small,
.admin-table small {
  display: block;
  margin-top: 4px;
}

.admin-content {
  max-width: 1700px;
  display: grid;
  gap: 28px;
  margin: 0 auto;
  padding: 36px 42px 100px;
}

.admin-flash {
  max-width: 1700px;
}

.admin-row,
.admin-approval {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--soft);
}

.admin-row small,
.admin-approval small {
  display: block;
  margin-top: 5px;
}

.admin-row > span,
.admin-approval > span {
  color: var(--blue);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: right;
}

.admin-approval {
  align-items: flex-start;
}

.admin-approval p {
  max-width: 760px;
  margin: 10px 0 0;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.approval-side {
  min-width: 260px;
  display: grid;
  justify-items: end;
  gap: 10px;
}

.approval-side b {
  font-size: 18px;
  letter-spacing: -0.03em;
}

.approval-actions {
  display: flex;
  gap: 8px;
  margin: 0;
}

.danger-button {
  color: var(--red);
}

.status-pill {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border-radius: 999px;
  padding: 0 12px;
  background: #e2e8f0;
  color: #334155;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-pill.pending_review {
  background: rgba(245, 158, 11, 0.14);
  color: #b45309;
}

.status-pill.approved {
  background: rgba(16, 185, 129, 0.14);
  color: #047857;
}

.status-pill.rejected {
  background: rgba(239, 68, 68, 0.14);
  color: #b91c1c;
}

.admin-table-wrap {
  overflow-x: auto;
}

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

.admin-table th,
.admin-table td {
  border-bottom: 1px solid var(--line);
  padding: 16px 14px;
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  color: var(--muted);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.admin-table td {
  font-size: 13px;
  font-weight: 800;
}

.vision-card button {
  min-height: 50px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.16);
  color: white;
  cursor: pointer;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding-top: 14px;
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 16px;
  background: var(--soft);
  cursor: pointer;
}

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

  .admin-shell {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .admin-sidebar .brand div:not(.brand-mark),
  .admin-nav span {
    display: none;
  }

  .admin-nav {
    padding: 0 14px;
  }

  .admin-nav a {
    justify-content: center;
    padding: 0;
  }

  .brand {
    justify-content: center;
    padding-inline: 20px;
  }

  .brand div:not(.brand-mark),
  .nav-item span,
  .loyalty,
  .sidebar-chat span,
  .reset-form {
    display: none;
  }

  .nav {
    padding: 0 14px;
  }

  .nav-item {
    justify-content: center;
    padding: 0;
  }

  .sidebar-footer {
    padding: 14px;
  }

  .xl-3,
  .trading-grid,
  .two {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 760px) {
  .app-shell {
    display: block;
  }

  .admin-shell {
    display: block;
  }

  .admin-sidebar {
    position: static;
    height: auto;
  }

  .admin-nav {
    grid-template-columns: repeat(3, minmax(64px, 1fr));
    overflow-x: auto;
    padding-bottom: 16px;
  }

  .admin-topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 24px;
  }

  .admin-content {
    padding: 24px 16px 100px;
  }

  .admin-approval,
  .admin-row {
    align-items: stretch;
    flex-direction: column;
  }

  .approval-side {
    min-width: 0;
    justify-items: stretch;
  }

  .approval-actions {
    flex-direction: column;
  }

  .account-row,
  .inline-admin-form,
  .open-account-form,
  .kyc-actions,
  .statement-filter,
  .statement-summary,
  .receipt-grid {
    grid-template-columns: 1fr;
  }

  .account-balances {
    justify-content: flex-start;
  }

  .mobile-menu-button,
  .sidebar-close {
    display: grid;
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 38;
    display: block;
    border: 0;
    background: rgba(2, 6, 23, 0.42);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
      opacity 0.24s ease,
      visibility 0s linear 0.28s;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 40;
    width: min(340px, 88vw);
    height: 100dvh;
    max-height: 100dvh;
    overflow-y: auto;
    border-right: 1px solid var(--line);
    border-bottom: 0;
    background: white;
    box-shadow: 28px 0 70px rgba(15, 23, 42, 0.18);
    opacity: 0;
    visibility: hidden;
    transform: translateX(-105%);
    transition:
      transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
      opacity 0.24s ease,
      visibility 0s linear 0.32s;
    will-change: transform, opacity;
  }

  body.sidebar-open .sidebar {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    transition:
      transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
      opacity 0.24s ease;
  }

  body.sidebar-open .sidebar-backdrop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.24s ease;
  }

  body.sidebar-open {
    overflow: hidden;
  }

  .brand {
    justify-content: flex-start;
    padding: 28px 20px 22px;
  }

  .brand div:not(.brand-mark) {
    display: block;
  }

  .nav-item span,
  .sidebar-chat span {
    display: inline;
  }

  .loyalty {
    display: flex;
  }

  .reset-form {
    display: block;
  }

  .nav {
    grid-template-columns: 1fr;
    overflow: visible;
    padding: 0 20px;
  }

  .nav-item {
    justify-content: flex-start;
    min-height: 58px;
    padding: 0 20px;
  }

  .sidebar-footer {
    padding: 18px 20px 24px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 24px;
  }

  .topbar-heading {
    width: 100%;
  }

  .topbar-actions {
    width: 100%;
    justify-content: space-between;
    gap: 12px;
  }

  .profile {
    display: none;
  }

  .content {
    padding: 24px 16px 120px;
    gap: 24px;
  }

  .stats-grid,
  .tickers,
  .cards-3,
  .card-actions,
  .legend-grid,
  .filter-row,
  .code-grid {
    grid-template-columns: 1fr;
  }

  .card-actions button {
    aspect-ratio: auto;
    min-height: 72px;
  }

  .balance-line {
    align-items: flex-start;
    flex-direction: column;
  }

  .button-row,
  .modal-actions {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .primary,
  .secondary {
    width: 100%;
  }

  .chat-panel,
  .chat-fab {
    right: 16px;
    bottom: 16px;
  }
}

@media print {
  body {
    background: white;
  }

  .sidebar,
  .topbar,
  .admin-sidebar,
  .admin-topbar,
  .chat-fab,
  .chat-panel,
  .no-print,
  .flash-stack {
    display: none !important;
  }

  .app-shell,
  .admin-shell {
    display: block;
  }

  .content,
  .admin-content {
    max-width: none;
    padding: 0;
  }

  .panel,
  .balance-card,
  .stat-card {
    border-radius: 0;
    box-shadow: none;
  }
}
