/* eyeiq-front — compiled from Swiss Fintech Company Design System export.
 * Source: design_bundle/colors_and_type.css + preview/component-*.html
 * Do not edit tokens here; regenerate from the design bundle.
 */

/* ==================================================================== *\
 * FONTS
\* ==================================================================== */

@font-face {
  font-family: 'Inter var';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/static/fonts/InterVariable.woff2') format('woff2-variations'),
       url('/static/fonts/InterVariable.woff2') format('woff2');
}

/* ==================================================================== *\
 * PRIMITIVES — colors
\* ==================================================================== */

:root {
  --red-50:   #FFEAEB;
  --red-100:  #FFD1D4;
  --red-200:  #FFA8AE;
  --red-300:  #FF7179;
  --red-400:  #F94148;
  --red-500:  #E30613;
  --red-600:  #C10510;
  --red-700:  #9A030C;
  --red-800:  #6B0108;

  --ink-50:   #F2F3F6;
  --ink-100:  #E1E4EA;
  --ink-200:  #C2C8D3;
  --ink-300:  #94A0B1;
  --ink-400:  #6B7788;
  --ink-500:  #4A5362;
  --ink-600:  #2F3744;
  --ink-700:  #1B222D;
  --ink-800:  #10151E;
  --ink-900:  #0A0E15;

  --paper-0:   #FFFFFF;
  --paper-50:  #FAFBFD;
  --paper-100: #F4F5F8;
  --paper-200: #ECEEF2;
  --paper-300: #DFE2E8;
  --paper-400: #C4C9D2;

  --success-50:  #E3F4EC;
  --success-500: #128C5A;
  --success-700: #0B5E3D;

  --warning-50:  #FBEFD9;
  --warning-500: #D98F1A;
  --warning-700: #8E5A0B;

  --danger-50:   var(--red-50);
  --danger-500:  var(--red-500);
  --danger-700:  var(--red-700);

  --info-50:     #E3EBFB;
  --info-500:    #2D5BD6;
  --info-700:    #1A3B95;

  --crypto-btc:  #F7931A;
  --crypto-eth:  #627EEA;
  --crypto-usdc: #2775CA;
  --crypto-usdt: #26A17B;
  --crypto-sol:  #14F195;
  --crypto-xrp:  #00AAE4;

  /* Semantic aliases — light */
  --bg-canvas:   var(--paper-100);
  --bg-surface:  var(--paper-50);
  --bg-elevated: var(--paper-0);
  --bg-sunken:   var(--paper-200);
  --bg-inverse:  var(--ink-900);

  --fg-1: var(--ink-900);
  --fg-2: var(--ink-600);
  --fg-3: var(--ink-400);
  --fg-4: var(--ink-300);
  --fg-inverse: var(--paper-0);

  --border-subtle: rgba(10,14,21,.08);
  --border-strong: rgba(10,14,21,.16);
  --border-focus:  var(--red-500);

  --accent-fg:       var(--red-500);
  --accent-bg:       var(--red-500);
  --accent-bg-hover: var(--red-600);
  --accent-tint:     var(--red-50);
  --on-accent:       #FFFFFF;

  /* Type scale */
  --font-sans:    'Inter var', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Inter var', 'Inter', -apple-system, sans-serif;
  --font-mono:    ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;

  --text-display-xl-size: 72px; --text-display-xl-lh: 76px; --text-display-xl-weight: 600; --text-display-xl-track: -0.03em;
  --text-display-size:    56px; --text-display-lh:    60px; --text-display-weight:    600; --text-display-track:    -0.025em;
  --text-h1-size:         40px; --text-h1-lh:         44px; --text-h1-weight:         600; --text-h1-track:         -0.02em;
  --text-h2-size:         28px; --text-h2-lh:         32px; --text-h2-weight:         600; --text-h2-track:         -0.015em;
  --text-h3-size:         20px; --text-h3-lh:         26px; --text-h3-weight:         600; --text-h3-track:         -0.005em;
  --text-body-size:       16px; --text-body-lh:       24px; --text-body-weight:       400; --text-body-track:       0;
  --text-small-size:      14px; --text-small-lh:      20px; --text-small-weight:      400; --text-small-track:      0;
  --text-xs-size:         12px; --text-xs-lh:         16px; --text-xs-weight:         500; --text-xs-track:         0.01em;

  /* Spacing */
  --space-0:   0px;
  --space-1:   2px;
  --space-2:   4px;
  --space-3:   8px;
  --space-4:   12px;
  --space-5:   16px;
  --space-6:   20px;
  --space-7:   24px;
  --space-8:   32px;
  --space-9:   40px;
  --space-10:  48px;
  --space-12:  64px;
  --space-14:  96px;

  /* Radii */
  --radius-xs:   6px;
  --radius-sm:   10px;
  --radius-md:   14px;
  --radius-lg:   20px;
  --radius-xl:   28px;
  --radius-2xl:  36px;
  --radius-full: 999px;

  /* Shadows */
  --shadow-card:  0 1px 2px rgba(10,14,21,.04), 0 4px 14px rgba(10,14,21,.05);
  --shadow-pop:   0 4px 12px rgba(10,14,21,.08), 0 20px 40px rgba(10,14,21,.10);
  --shadow-focus: 0 0 0 3px rgba(227,6,19,.25);

  /* Motion */
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --dur-fast:   180ms;
  --dur-base:   320ms;
  --dur-slow:   480ms;
}

:root[data-theme="dark"],
.theme-dark {
  --bg-canvas:   var(--ink-900);
  --bg-surface:  var(--ink-800);
  --bg-elevated: var(--ink-700);
  --bg-sunken:   #050810;
  --bg-inverse:  var(--paper-100);

  --fg-1: #F1F3F7;
  --fg-2: var(--ink-200);
  --fg-3: var(--ink-300);
  --fg-4: var(--ink-400);
  --fg-inverse: var(--ink-900);

  --border-subtle: rgba(255,255,255,.08);
  --border-strong: rgba(255,255,255,.16);

  --accent-fg:       var(--red-400);
  --accent-bg:       var(--red-500);
  --accent-bg-hover: var(--red-400);
  --accent-tint:     rgba(227,6,19,.14);
}

/* ==================================================================== *\
 * BASE
\* ==================================================================== */

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

html, body {
  background: var(--bg-canvas);
  color: var(--fg-1);
  font-family: var(--font-sans);
  font-size: var(--text-body-size);
  line-height: var(--text-body-lh);
  font-weight: var(--text-body-weight);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'tnum' 0, 'ss01' 1;
  margin: 0;
}

.num, .mono, [data-num] { font-feature-settings: 'tnum' 1; }
.mono { font-family: var(--font-mono); }

.text-display-font { font-family: var(--font-display); }

/* ==================================================================== *\
 * TYPOGRAPHY
\* ==================================================================== */

.text-display-xl { font-family: var(--font-display); font-size: var(--text-display-xl-size); line-height: var(--text-display-xl-lh); font-weight: var(--text-display-xl-weight); letter-spacing: var(--text-display-xl-track); }
.text-display    { font-family: var(--font-display); font-size: var(--text-display-size);    line-height: var(--text-display-lh);    font-weight: var(--text-display-weight);    letter-spacing: var(--text-display-track); }
.text-h1         { font-family: var(--font-display); font-size: var(--text-h1-size);         line-height: var(--text-h1-lh);         font-weight: var(--text-h1-weight);         letter-spacing: var(--text-h1-track); }
.text-h2         { font-size: var(--text-h2-size);         line-height: var(--text-h2-lh);         font-weight: var(--text-h2-weight);         letter-spacing: var(--text-h2-track); }
.text-h3         { font-size: var(--text-h3-size);         line-height: var(--text-h3-lh);         font-weight: var(--text-h3-weight);         letter-spacing: var(--text-h3-track); }
.text-body       { font-size: var(--text-body-size);       line-height: var(--text-body-lh);       font-weight: var(--text-body-weight); }
.text-small      { font-size: var(--text-small-size);      line-height: var(--text-small-lh);      font-weight: var(--text-small-weight); color: var(--fg-2); }
.text-xs         { font-size: var(--text-xs-size);         line-height: var(--text-xs-lh);         font-weight: var(--text-xs-weight); letter-spacing: var(--text-xs-track); text-transform: uppercase; color: var(--fg-3); }

h1, .h1 { font-family: var(--font-display); font-size: var(--text-h1-size); line-height: var(--text-h1-lh); font-weight: var(--text-h1-weight); letter-spacing: var(--text-h1-track); margin: 0; }
h2, .h2 { font-size: var(--text-h2-size); line-height: var(--text-h2-lh); font-weight: var(--text-h2-weight); letter-spacing: var(--text-h2-track); margin: 0; }
h3, .h3 { font-size: var(--text-h3-size); line-height: var(--text-h3-lh); font-weight: var(--text-h3-weight); margin: 0; }
p       { margin: 0; }

/* ==================================================================== *\
 * FOCUS
\* ==================================================================== */

.focusable:focus-visible,
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
  border-color: var(--border-focus);
}

/* ==================================================================== *\
 * BUTTONS — from preview/component-buttons.html
\* ==================================================================== */

.btn {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  padding: 10px 18px;
  cursor: pointer;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all var(--dur-fast) var(--ease-out);
}
.btn.primary   { background: var(--red-500); color: #fff; }
.btn.primary:hover { background: var(--red-600); }
.btn.secondary { background: var(--ink-900); color: #fff; }
.btn.secondary:hover { background: var(--ink-700); }
.btn.ghost     { background: transparent; color: var(--ink-900); border-color: var(--border-strong); }
.btn.ghost:hover { background: var(--paper-200); }
.btn.tint      { background: var(--red-50); color: var(--red-700); }
.btn.danger    { background: var(--danger-500); color: #fff; }
.btn.sm        { padding: 6px 12px; font-size: 13px; border-radius: var(--radius-sm); }
.btn.lg        { padding: 14px 22px; font-size: 16px; }

/* ==================================================================== *\
 * INPUTS — from preview/component-inputs.html
\* ==================================================================== */

.field { display: flex; flex-direction: column; gap: 6px; }
.field .lbl { font-size: 12px; font-weight: 500; color: var(--fg-2); }
.input {
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--fg-1);
  outline: none;
  transition: all var(--dur-fast) var(--ease-out);
}
.input:focus { border-color: var(--red-500); box-shadow: var(--shadow-focus); }
.input.mono  { font-family: var(--font-mono); font-size: 13px; }
.input.err   { border-color: var(--danger-500); }
.hint { font-size: 12px; color: var(--fg-3); }
.hint.danger { color: var(--danger-500); }

.amount {
  display: flex;
  gap: 0;
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.amount input {
  border: 0;
  flex: 1;
  padding: 10px 12px;
  font-family: var(--font-sans);
  font-size: 20px;
  font-weight: 600;
  outline: none;
  background: transparent;
}
.amount .suffix {
  background: var(--paper-200);
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--fg-2);
  display: flex;
  align-items: center;
}

/* ==================================================================== *\
 * CARDS — from preview/component-cards.html
\* ==================================================================== */

.card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.hero {
  background: var(--ink-900);
  color: #F1F3F7;
  border-radius: var(--radius-xl);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -60px;
  width: 180px;
  height: 180px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(227,6,19,.35), transparent 70%);
}
.card .row, .hero .row { display: flex; align-items: center; gap: 10px; }
.meta {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--fg-3);
}
.hero .meta { color: rgba(255,255,255,.55); }
.num {
  font-family: var(--font-sans);
  font-weight: 700;
  font-feature-settings: 'tnum' 1;
  letter-spacing: -.02em;
}

/* ==================================================================== *\
 * BADGES — from preview/component-badges.html
\* ==================================================================== */

.b {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
}
.b .dot { width: 6px; height: 6px; border-radius: 999px; background: currentColor; }
.b.success { background: var(--success-50); color: var(--success-700); }
.b.warning { background: var(--warning-50); color: var(--warning-700); }
.b.danger  { background: var(--danger-50);  color: var(--danger-700); }
.b.info    { background: var(--info-50);    color: var(--info-700); }
.b.neutral { background: var(--paper-200);  color: var(--fg-2); }
.b.accent  { background: var(--red-50);     color: var(--red-700); }
.b.sq      { border-radius: var(--radius-xs); }

/* ==================================================================== *\
 * TRANSACTION ROW — from preview/component-transaction-row.html
\* ==================================================================== */

.tx-list { display: flex; flex-direction: column; gap: 0; }
.tx-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-subtle);
  background: #fff;
}
.tx-row:first-child { border-top-left-radius: var(--radius-lg); border-top-right-radius: var(--radius-lg); }
.tx-row:last-child  { border-bottom: 0; border-bottom-left-radius: var(--radius-lg); border-bottom-right-radius: var(--radius-lg); }
.tx-row .ico {
  width: 36px; height: 36px;
  border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.tx-row .ico img { width: 24px; height: 24px; }
.tx-row .txt { flex: 1; min-width: 0; }
.tx-row .t1  { font-size: 14px; font-weight: 500; }
.tx-row .t2  { font-size: 12px; color: var(--fg-3); font-family: var(--font-mono); margin-top: 2px; }
.tx-row .amt { text-align: right; font-weight: 600; font-feature-settings: 'tnum' 1; font-size: 14px; }
.tx-row .amt .sub { font-size: 11px; color: var(--fg-3); font-weight: 400; margin-top: 2px; }
.tx-row .amt.pos, .tx-row .pos { color: var(--success-700); }

/* ==================================================================== *\
 * SPEC §6 — eyeiq-front product primitives
 * Pill buttons, underline inputs, modal sheet, OTP box, red checkbox.
\* ==================================================================== */

/* Pill buttons (solid red / outline red) */
.btn-primary {
  background: var(--accent-bg);
  color: var(--on-accent);
  border-radius: var(--radius-full);
  width: 100%;
  padding: 16px;
  font-weight: 600;
  border: none;
  font-size: 16px;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out);
  font-family: var(--font-sans);
}
.btn-primary:hover:not(:disabled) { background: var(--accent-bg-hover); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary.partial { width: auto; padding: 14px 32px; }

.btn-outline {
  background: transparent;
  color: var(--accent-fg);
  border: 1.5px solid var(--accent-fg);
  border-radius: var(--radius-full);
  padding: 14px 24px;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-out);
  font-family: var(--font-sans);
}
.btn-outline:hover:not(:disabled) { background: var(--accent-tint); }
.btn-outline:disabled { opacity: .5; cursor: not-allowed; }

/* Underline-style field (no box border) */
.field-group {
  border-bottom: 1px solid var(--divider, var(--border-subtle));
  padding: 8px 0;
}
.field-label {
  color: var(--fg-3);
  font-size: .75rem;
  display: block;
  margin-bottom: 4px;
}
.field-input {
  border: none;
  outline: none;
  width: 100%;
  font-size: 1rem;
  color: var(--fg-1);
  background: transparent;
  font-family: var(--font-sans);
  padding: 4px 0;
}
.field-input::placeholder { color: var(--fg-3); }

/* Centered modal — sits proportionally in the upper third of the viewport */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 21, .45);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 12vh 16px 5vh;
  overflow-y: auto;
  z-index: 100;
}
.modal-sheet {
  background: var(--paper-0);
  width: 100%;
  max-width: 440px;
  border-radius: 24px;
  padding: 28px 28px 32px;
  position: relative;
  box-shadow: var(--shadow-pop);
  animation: sheet-in var(--dur-base) var(--ease-out);
}
@keyframes sheet-in {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
@media (max-width: 540px) {
  .modal-overlay { padding: 6vh 12px 2vh; }
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 20px;
  color: var(--fg-3);
  cursor: pointer;
  line-height: 1;
}
.modal-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--fg-1);
  margin-bottom: 16px;
}

/* OTP 6-box input */
.otp-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 24px 0;
}
.otp-box {
  width: 44px;
  height: 52px;
  border: 1.5px solid var(--border-subtle);
  border-radius: 10px;
  text-align: center;
  font-size: 1.5rem;
  font-family: var(--font-mono);
  background: var(--paper-0);
}
.otp-box:focus {
  border-color: var(--accent-fg);
  outline: none;
  box-shadow: var(--shadow-focus);
}

/* Red-filled checkbox */
.rc {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  color: var(--fg-1);
  line-height: 1.4;
}
.rc input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--paper-400);
  border-radius: 4px;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  background: var(--paper-0);
  transition: all var(--dur-fast) var(--ease-out);
}
.rc input[type="checkbox"]:checked {
  background: var(--accent-bg);
  border-color: var(--accent-bg);
}
.rc input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.rc a { color: var(--accent-fg); text-decoration: none; }

/* Form error banner */
.form-error {
  background: var(--danger-50);
  color: var(--danger-700);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 12px;
}

/* Muted link row under primary action */
.muted-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 16px;
  font-size: 14px;
}
.muted-links a { color: var(--fg-3); text-decoration: none; }
.muted-links a:hover { color: var(--fg-2); }

/* ==================================================================== *\
 * APP SHELL — sidebar + topbar (Claude Design bundle port)
\* ==================================================================== */

.app { display: flex; min-height: 100vh; }

.sidebar {
  width: 260px;
  background: var(--paper-0);
  border-right: 1px solid var(--border-subtle);
  padding: 22px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  box-sizing: border-box;
}
.sidebar .sb-brand {
  display: flex;
  align-items: center;
  padding: 6px 12px 22px;
  text-decoration: none;
}
.sidebar .sb-brand img {
  height: 48px;
  width: auto;
  display: block;
}
.sb-section-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--fg-4);
  text-transform: uppercase;
  letter-spacing: .07em;
  padding: 4px 12px 6px;
}
.sb-nav { display: flex; flex-direction: column; gap: 2px; }
.sb-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--fg-2);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  position: relative;
  transition: all var(--dur-fast) var(--ease-out);
}
.sb-item:hover { background: var(--paper-100); color: var(--fg-1); }
.sb-item.active {
  background: var(--red-50);
  color: var(--accent-fg);
  font-weight: 600;
}
.sb-item .sb-rail {
  position: absolute;
  left: -14px;
  top: 10px;
  bottom: 10px;
  width: 3px;
  background: var(--accent-fg);
  border-radius: 3px;
}

.sb-user {
  margin-top: auto;
  padding: 12px;
  background: var(--paper-100);
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sb-avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: var(--ink-900);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}
.sb-who { flex: 1; min-width: 0; }
.sb-name { font-size: 13px; font-weight: 600; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sb-email { font-size: 11px; color: var(--fg-3); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sb-logout {
  border: none;
  background: transparent;
  color: var(--fg-3);
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  display: flex;
}
.sb-logout:hover { color: var(--accent-fg); background: var(--paper-0); }

/* Main column (topbar + content + footer) */
.app-main-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--bg-canvas);
}

.topbar {
  padding: 22px 40px 16px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  background: var(--bg-canvas);
  border-bottom: 1px solid var(--border-subtle);
}
.tb-title h1 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--fg-1);
  margin: 0;
}
.tb-right { display: flex; gap: 10px; align-items: center; }

.content {
  flex: 1;
  padding: 28px 40px 56px;
  min-width: 0;
}

/* Language switcher — button + dropdown */
.lang-switcher { position: relative; }
.lang-switcher > .lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: var(--paper-0);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--fg-1);
  cursor: pointer;
  font-family: var(--font-sans);
  transition: border-color var(--dur-fast) var(--ease-out);
}
.lang-switcher > .lang-btn:hover { border-color: var(--accent-fg); }
.lang-switcher > .lang-btn .chev {
  font-size: 9px;
  color: var(--fg-3);
  margin-left: 2px;
  transition: transform var(--dur-fast) var(--ease-out);
}
.lang-switcher.open > .lang-btn .chev { transform: rotate(180deg); }

.lang-dropdown {
  /* visibility controlled by Alpine x-show; no `display:none` here */
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: var(--paper-0);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-pop);
  min-width: 160px;
  z-index: 60;
  overflow: hidden;
}
.lang-dropdown form { display: block; }
.lang-dropdown button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  background: transparent;
  border: none;
  font-size: 13px;
  color: var(--fg-1);
  cursor: pointer;
  font-family: var(--font-sans);
}
.lang-dropdown button:hover { background: var(--paper-100); }
.lang-dropdown button.active {
  color: var(--accent-fg);
  font-weight: 600;
  background: var(--accent-tint);
}

/* Footer inside main column */
.app-footer {
  padding: 16px 40px;
  border-top: 1px solid var(--border-subtle);
  font-size: 12px;
  color: var(--fg-3);
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

/* Mobile — collapse sidebar to a top bar */
@media (max-width: 820px) {
  .app { flex-direction: column; }
  .sidebar {
    width: 100%;
    height: auto;
    padding: 12px 16px;
    position: static;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    overflow-x: auto;
  }
  .sidebar .sb-brand { padding: 0 8px 0 0; }
  .sidebar .sb-brand img { height: 32px; }
  .sb-section-title { display: none; }
  .sb-nav { flex-direction: row; gap: 2px; flex-wrap: nowrap; }
  .sb-item { padding: 8px 12px; white-space: nowrap; }
  .sb-item .sb-rail { display: none; }
  .sb-user { display: none; }
  .topbar { padding: 16px 20px 12px; }
  .content { padding: 20px 16px 40px; }
}

/* ==================================================================== *\
 * EXCHANGE WIDGET — spec §6 / §8
\* ==================================================================== */

.xc-wrap {
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.xc-card {
  background: var(--paper-0);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  /* Lock height so AVAILABLE/RESERVE toggling doesn't reshuffle the layout. */
  min-height: 160px;
}
.xc-card .xc-label {
  font-size: 13px;
  color: var(--fg-2);
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}
.xc-card .xc-label .arrow { color: var(--accent-fg); font-weight: 700; }

.xc-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  justify-content: space-between;
}
.xc-amount {
  border: none;
  outline: none;
  background: transparent;
  font-size: 32px;
  font-weight: 600;
  font-family: var(--font-sans);
  color: var(--fg-1);
  font-feature-settings: 'tnum' 1;
  letter-spacing: -.02em;
  flex: 1;
  min-width: 0;
  padding: 0;
}
.xc-amount:disabled { color: var(--fg-1); opacity: 1; }
.xc-ticker {
  font-size: 16px;
  font-weight: 600;
  color: var(--fg-2);
  font-family: var(--font-mono);
}

.xc-meta {
  font-size: 11px;
  color: var(--fg-3);
  text-transform: uppercase;
  letter-spacing: .04em;
  font-weight: 500;
  font-family: var(--font-mono);
}

.xc-select {
  border: none;
  background: transparent;
  font-size: 14px;
  font-weight: 500;
  color: var(--fg-1);
  cursor: pointer;
  padding: 6px 0;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%238E8E93' stroke-width='2'><path d='M4 6l4 4 4-4'/></svg>");
  background-repeat: no-repeat;
  background-position: right center;
  padding-right: 20px;
  font-family: var(--font-sans);
}
.xc-select:focus { outline: none; }

.xc-swap {
  align-self: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: none;
  background: var(--ink-900);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: -8px 0;
  position: relative;
  z-index: 2;
  transition: transform var(--dur-fast) var(--ease-out);
}
.xc-swap:hover { transform: rotate(180deg); }

.xc-dest {
  background: var(--paper-0);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  box-shadow: var(--shadow-card);
  font-size: 14px;
}
.xc-dest .xc-dest-label {
  font-size: 11px;
  color: var(--fg-3);
  text-transform: uppercase;
  letter-spacing: .04em;
  font-weight: 500;
  margin-bottom: 6px;
}
.xc-dest select {
  border: none;
  outline: none;
  width: 100%;
  background: transparent;
  font-size: 14px;
  color: var(--fg-1);
  font-family: var(--font-mono);
  padding: 4px 0;
}
.xc-dest .empty {
  color: var(--fg-2);
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.xc-dest .empty a { color: var(--accent-fg); text-decoration: none; font-weight: 500; }

.xc-quote-details {
  font-size: 13px;
  color: var(--fg-2);
  padding: 12px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.xc-quote-details .line { display: flex; justify-content: space-between; }
.xc-quote-details .line .v { font-family: var(--font-mono); color: var(--fg-1); }

.xc-warn {
  background: var(--danger-50);
  color: var(--danger-700);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 13px;
}

.xc-bottom {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}
.xc-bottom .consent-text {
  flex: 1;
  font-size: 12px;
  color: var(--fg-3);
  line-height: 1.4;
}

.xc-recent {
  margin-top: 24px;
}
.xc-recent h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--fg-2);
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.xc-recent h3 a { font-size: 12px; color: var(--accent-fg); text-decoration: none; font-weight: 500; }
.xc-recent .empty { color: var(--fg-3); font-size: 13px; padding: 12px 16px; }

/* ==================================================================== *\
 * WALLETS — designer card layout
\* ==================================================================== */

.wallets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  max-width: 1200px;
}
.wallet-card {
  background: var(--paper-0);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-card);
  transition: border-color var(--dur-fast) var(--ease-out);
}
.wallet-card:hover { border-color: var(--border-strong); }
.wc-head { display: flex; align-items: center; gap: 12px; }
.wc-icon { width: 36px; height: 36px; border-radius: 999px; background: var(--paper-100); padding: 6px; box-sizing: border-box; }
.wc-head-text { min-width: 0; }
.wc-name { font-size: 15px; font-weight: 600; color: var(--fg-1); }
.wc-ccy { font-size: 12px; color: var(--fg-3); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .04em; margin-top: 2px; }
.wc-amount {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-feature-settings: 'tnum' 1;
}
.wc-big { font-size: 26px; font-weight: 700; color: var(--fg-1); letter-spacing: -.02em; }
.wc-ccy-sub { font-size: 13px; color: var(--fg-3); font-family: var(--font-mono); }

.wc-actions { display: flex; gap: 8px; }
.wc-actions > * { flex: 1; }

/* ── Wallets toolbar + table view ────────────────────────────────────── */
.wallets-toolbar .btn-sfc,
.wallets-toolbar .btn-sfc-secondary { padding: 6px 12px; font-size: 13px; }

.wallets-table-wrap {
  max-width: 1200px;
  background: var(--paper-0);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.wallets-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.wallets-table thead th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--fg-3);
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--paper-50, var(--paper-100));
  user-select: none;
}
.wallets-table thead th.sortable { cursor: pointer; }
.wallets-table thead th.sortable:hover { color: var(--fg-1); background: var(--paper-100); }
.wallets-table thead th .sort-ind { color: var(--accent-fg, var(--fg-2)); font-weight: 700; }
.wallets-table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}
.wallets-table tbody tr:last-child td { border-bottom: 0; }
.wt-icon {
  width: 28px; height: 28px;
  min-width: 28px;
  border-radius: 999px;
  background: var(--paper-100);
  padding: 4px;
  box-sizing: border-box;
  flex-shrink: 0;
  object-fit: contain;
}
.wt-asset { font-weight: 600; color: var(--fg-1); }
.wt-asset-sub { font-size: 12px; color: var(--fg-3); margin-top: 1px; }
.wt-net {
  display: inline-block;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .04em;
  border-radius: 999px;
  background: var(--paper-100);
  color: var(--fg-2);
}
.wt-addr {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-2);
}
.btn-sfc-secondary.btn-sm { padding: 6px 10px; font-size: 12px; }

/* Make sure grid icons don't explode either — SVGs without intrinsic size */
.wc-icon { min-width: 36px; flex-shrink: 0; object-fit: contain; }

/* ── Profile (tabbed) ────────────────────────────────────────────────── */
.profile-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
  align-items: start;
}
.profile-side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 20px; }
.profile-side-link {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 14px;
  background: var(--paper-0);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  color: var(--fg-1);
  font-size: 14px;
  text-decoration: none;
  transition: border-color var(--dur-fast) var(--ease-out);
}
.profile-side-link:hover { border-color: var(--border-strong); }

.profile-tabs {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px;
  background: var(--paper-0);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
}
.profile-tabs button {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border: 0;
  background: transparent;
  color: var(--fg-2);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.profile-tabs button:hover { background: var(--paper-100); color: var(--fg-1); }
.profile-tabs button.active { background: var(--accent-bg, var(--paper-100)); color: var(--fg-1); font-weight: 600; }
.pt-ico { width: 18px; text-align: center; font-size: 14px; }

.profile-panel .card { padding: 20px; }
.panel-title { font-size: 16px; font-weight: 600; margin-bottom: 14px; color: var(--fg-1); }

.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 720px) {
  .profile-layout { grid-template-columns: 1fr; }
  .profile-side { position: static; }
  .field-grid { grid-template-columns: 1fr; }
}

.b-sm { font-size: 10px; padding: 2px 6px; }

/* ── Fiat deposit requisites block ───────────────────────────────────── */
.wc-requisites {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  background: var(--paper-50, var(--paper-100));
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 12px;
}
.wc-req-row {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  align-items: center;
  gap: 8px;
}
.wc-req-k { color: var(--fg-3); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.wc-req-v { font-family: var(--font-mono); color: var(--fg-1); word-break: break-all; }

/* ── Wallet deposit modal ────────────────────────────────────────────── */
.wallet-modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(15, 22, 41, 0.55);
  backdrop-filter: blur(3px);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.wallet-modal {
  width: min(520px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: var(--paper-0);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}
.wallet-modal-head {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-subtle);
}
.wm-icon { width: 36px; height: 36px; border-radius: 999px; background: var(--paper-100); padding: 6px; box-sizing: border-box; object-fit: contain; flex-shrink: 0; }
.wm-title { font-size: 16px; font-weight: 600; color: var(--fg-1); }
.wm-sub   { font-size: 12px; color: var(--fg-3); margin-top: 2px; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .04em; }
.wm-close {
  background: transparent;
  border: 0;
  color: var(--fg-3);
  font-size: 16px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: var(--radius-md);
}
.wm-close:hover { background: var(--paper-100); color: var(--fg-1); }

.wallet-modal-body { padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 12px; }
.wm-field {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "k btn" "v btn";
  column-gap: 10px;
  row-gap: 2px;
  align-items: center;
  padding: 10px 12px;
  background: var(--paper-50, var(--paper-100));
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}
.wm-field-k { grid-area: k; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--fg-3); }
.wm-field-v { grid-area: v; font-family: var(--font-mono); font-size: 13px; color: var(--fg-1); word-break: break-all; }
.wm-field .btn-sfc-secondary { grid-area: btn; }

.wm-hint { font-size: 12px; color: var(--fg-3); line-height: 1.4; padding: 0 2px; }

/* ── Modal payment-method tabs (SEPA / BLINC) ───────────────────────── */
.pay-tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.pay-tab {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  background: var(--paper-100);
  color: var(--fg-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out),
              color      var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out);
}
.pay-tab:hover { color: var(--fg-1); border-color: var(--border-strong); }
.pay-tab.active {
  background: var(--fg-1);
  color: var(--paper-0);
  border-color: var(--fg-1);
}
.pay-tab-info {
  color: currentColor;
  text-decoration: none;
  opacity: .7;
  font-size: 11px;
}
.pay-tab-info:hover { opacity: 1; }

.btn-sfc-secondary {
  background: var(--paper-100);
  color: var(--fg-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-sans);
  transition: all var(--dur-fast) var(--ease-out);
}
.btn-sfc-secondary:hover {
  background: var(--paper-0);
  border-color: var(--accent-fg);
  color: var(--accent-fg);
}

.wc-addr {
  background: var(--paper-100);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  word-break: break-all;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}
.wc-addr-val { flex: 1; min-width: 0; }
.wc-copy {
  border: none;
  background: var(--paper-0);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-size: 15px;
  color: var(--fg-2);
  flex-shrink: 0;
}
.wc-copy:hover { color: var(--accent-fg); border-color: var(--accent-fg); }

.empty-state {
  grid-column: 1 / -1;
  background: var(--paper-0);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 40px 20px;
  text-align: center;
  color: var(--fg-3);
  font-size: 14px;
}

/* ==================================================================== *\
 * ORDERS — list tabs + detail card
\* ==================================================================== */

.page-title {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 20px;
  text-align: center;
  letter-spacing: -.015em;
}

.filter-tabs {
  display: inline-flex;
  gap: 4px;
  background: var(--paper-200);
  border-radius: var(--radius-full);
  padding: 4px;
  margin-bottom: 20px;
}
.filter-tabs a {
  padding: 6px 16px;
  border-radius: var(--radius-full);
  color: var(--fg-2);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
}
.filter-tabs a.active {
  color: var(--on-accent);
  background: var(--accent-bg);
}

.order-card {
  background: var(--paper-0);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  box-shadow: var(--shadow-card);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  color: inherit;
  margin-bottom: 10px;
}
.order-card .dir { font-size: 15px; font-weight: 600; }
.order-card .when { font-size: 12px; color: var(--fg-3); margin-top: 4px; font-family: var(--font-mono); }
.order-card .amt { font-family: var(--font-mono); font-size: 14px; color: var(--fg-2); text-align: right; }

/* Detail */
.order-detail {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.od-leg {
  background: var(--paper-0);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-card);
}
.od-leg .lbl {
  font-size: 12px;
  color: var(--fg-3);
  text-transform: uppercase;
  font-weight: 500;
  letter-spacing: .04em;
  margin-bottom: 4px;
}
.od-leg .big {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 600;
  color: var(--fg-1);
  letter-spacing: -.01em;
}

.od-pay {
  background: var(--accent-tint);
  border: 1px solid var(--accent-fg);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.od-pay .lbl { font-size: 12px; text-transform: uppercase; font-weight: 500; color: var(--accent-fg); letter-spacing: .04em; }
.od-pay .addr {
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--paper-0);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  word-break: break-all;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}
.copy-btn {
  border: none;
  background: var(--accent-bg);
  color: #fff;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font-sans);
  flex-shrink: 0;
}
.copy-btn:hover { background: var(--accent-bg-hover); }

/* ==================================================================== *\
 * AFFILIATE-STYLE CARDS — wallets / whitelist / beneficiaries / transfers
\* ==================================================================== */

.aff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  max-width: 1000px;
  margin: 0 auto;
}

.aff-card {
  background: var(--paper-0);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.aff-card .caps {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--fg-3);
  font-weight: 500;
}
.aff-card .big {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 600;
  color: var(--fg-1);
  font-feature-settings: 'tnum' 1;
  letter-spacing: -.01em;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.aff-card .big .ccy { font-size: 14px; color: var(--fg-2); }
.aff-card .sub { font-size: 13px; color: var(--fg-3); font-family: var(--font-mono); }
.aff-card hr {
  border: none;
  border-top: 1px solid var(--border-subtle);
  margin: 6px 0 2px;
}
.aff-card .actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 2px;
}
.aff-card .actions .btn-outline { padding: 10px 18px; font-size: 13px; }

.aff-card .addr-pane {
  background: var(--paper-100);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  word-break: break-all;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}
