/* AgentPay — app stylesheet.
   1. Aurum tokens: light on body.au, dark on body.au[data-theme="dark"] (same values as the canvas's ds/aurum/tokens.json)
   2. Aurum components the app uses (prefix au-), copied from the design system bundle
   3. App layout: a 430px-max centered column on every viewport, exactly as drawn on the canvas */

/* ================= 1. Tokens ================= */
.au {
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-sans: "Manrope", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Menlo, monospace;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 20px; --space-6: 24px; --space-8: 32px; --space-10: 40px; --space-12: 48px;
  --radius-sm: 6px; --radius-md: 10px; --radius-lg: 14px; --radius-xl: 20px; --radius-pill: 999px;
  --bg: #f7f3ea; --surface: #ffffff; --surface-2: #f1ecdf; --surface-3: #e7e0cf; --border: #e2dac8; --border-strong: #8f836a;
  --ink: #1c1810; --ink-2: #5a5243; --ink-3: #746b58;
  --gold: #c9a227; --gold-strong: #ad8a1c; --gold-text: #7a5e0f; --on-gold: #1c1810; --gold-soft: #f5ead0;
  --success: #1e7a4b; --success-soft: #def3e5; --danger: #b3261e; --danger-soft: #fbe3e1; --on-danger: #ffffff;
  --warning: #8a5a00; --warning-soft: #fdf0d3; --info: #1f5fa8; --info-soft: #dfeafa; --focus: #1f5fa8; --overlay: #1c181099;
  --chart-1: #c9a227; --chart-2: #1f5fa8; --chart-3: #1e7a4b; --chart-4: #746b58;
  --shadow-card: 0 1px 2px #1c181014, 0 4px 16px #1c18100f; --shadow-pop: 0 8px 32px #1c181029; --shadow-gold: 0 6px 20px #c9a22740;
  color-scheme: light;
}
.au[data-theme="dark"] {
  --bg: #0f0d0a; --surface: #171411; --surface-2: #211d18; --surface-3: #2b261f; --border: #2e2922; --border-strong: #75695a;
  --ink: #f3ece0; --ink-2: #b6ab96; --ink-3: #948a74;
  --gold: #d9b24a; --gold-strong: #e6c25f; --gold-text: #e3bd55; --on-gold: #1c1810; --gold-soft: #2a2314;
  --success: #6fd49a; --success-soft: #15301f; --danger: #ff8a80; --danger-soft: #3a1b18; --on-danger: #1c1810;
  --warning: #f0b84a; --warning-soft: #332508; --info: #8dbcff; --info-soft: #122540; --focus: #8dbcff; --overlay: #000000b3;
  --chart-1: #d9b24a; --chart-2: #8dbcff; --chart-3: #6fd49a; --chart-4: #948a74;
  --shadow-card: 0 1px 2px #00000066; --shadow-pop: 0 8px 32px #000000a6; --shadow-gold: 0 6px 20px #d9b24a33;
  color-scheme: dark;
}

/* ================= 2. Aurum components ================= */
.au, .au *, .au *::before, .au *::after { box-sizing: border-box; }
.au { font-family: var(--font-sans); font-size: 15px; line-height: 22px; font-weight: 500; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; margin: 0; }
.au a { color: var(--gold-text); text-decoration: none; }
.au a:hover { text-decoration: underline; }
.au :focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--radius-sm); }
.au svg { display: block; }
.au-icon { width: 20px; height: 20px; stroke: currentColor; stroke-width: 1.75; fill: none; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.au-icon--sm { width: 16px; height: 16px; }

.au-label { font-size: 11px; line-height: 16px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.au-small { font-size: 13px; line-height: 18px; color: var(--ink-3); }
.au-mono, .au-amt { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.au-amt { font-size: 14px; line-height: 22px; font-weight: 500; white-space: nowrap; }
.au-amt--strong { font-weight: 600; }
.au-amt--lg { font-size: 22px; line-height: 28px; font-weight: 600; }
.au-amt--xl { font-size: 32px; line-height: 36px; font-weight: 600; letter-spacing: -0.01em; }
.au-in { color: var(--success); }
.au-out { color: var(--danger); }
.au-muted { color: var(--ink-2); }
.au-h1 { font-family: var(--font-display); font-size: 28px; line-height: 34px; font-weight: 600; margin: 0; }
.au-h2 { font-family: var(--font-display); font-size: 22px; line-height: 28px; font-weight: 600; margin: 0; }
.au-h3 { font-size: 17px; line-height: 24px; font-weight: 700; margin: 0; }

/* Button */
.au-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: 44px; padding: 0 var(--space-4); border-radius: var(--radius-md); border: 1px solid transparent; font: inherit; font-weight: 700; cursor: pointer; white-space: nowrap; transition: background-color .15s ease-out, border-color .15s ease-out, color .15s ease-out; text-decoration: none; }
.au-btn--primary, .au a.au-btn--primary { background: var(--gold); color: var(--on-gold); }
.au-btn--primary:hover { background: var(--gold-strong); }
.au-btn--secondary, .au a.au-btn--secondary { background: var(--surface); color: var(--ink); border-color: var(--border-strong); }
.au-btn--secondary:hover { background: var(--surface-2); }
.au-btn--ghost, .au a.au-btn--ghost { background: transparent; color: var(--ink-2); }
.au-btn--ghost:hover { background: var(--surface-2); color: var(--ink); }
.au-btn--danger, .au a.au-btn--danger { background: var(--danger); color: var(--on-danger); }
.au-btn--sm { min-height: 36px; padding: 0 var(--space-3); font-size: 13px; }
.au-btn--icon { width: 44px; padding: 0; }
.au-btn--icon.au-btn--sm { width: 36px; }
.au-btn--block { width: 100%; }
.au-btn--cta { min-height: 52px; font-size: 16px; }
.au-btn[disabled], .au-btn--disabled { opacity: .45; pointer-events: none; }
.au-btn--glow { box-shadow: var(--shadow-gold); }
.au a.au-btn:hover { text-decoration: none; }

/* FormField */
.au-field { display: flex; flex-direction: column; gap: var(--space-2); }
.au-field__label { font-size: 11px; line-height: 16px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.au-field__hint { font-size: 13px; line-height: 18px; color: var(--ink-3); }
.au-field__hint--error { color: var(--danger); }
.au-input, .au-select, .au-textarea { width: 100%; min-height: 44px; padding: 0 var(--space-3); border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); color: var(--ink); font: inherit; transition: border-color .15s ease-out; }
.au-textarea { padding: var(--space-3); min-height: 88px; resize: vertical; }
@media (pointer: coarse) { .au-input, .au-select, .au-textarea { font-size: 16px; } } /* 16px on touch screens: iOS zooms into any smaller field the moment it is focused */
.au-input::placeholder, .au-textarea::placeholder { color: var(--ink-3); }
.au-input:hover, .au-select:hover, .au-textarea:hover { border-color: var(--border-strong); }
.au-input:focus-visible, .au-select:focus-visible, .au-textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--radius-md); }
.au-field--error .au-input { border-color: var(--danger); }
.au-select { appearance: none; -webkit-appearance: none; padding-right: 40px; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23746b58' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>"); background-repeat: no-repeat; background-position: right 12px center; }
.au[data-theme="dark"] .au-select { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23948a74' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>"); }
.au-inputgroup { display: flex; align-items: stretch; }
.au-inputgroup .au-input { border-radius: var(--radius-md) 0 0 var(--radius-md); }
.au-inputgroup__suffix { display: flex; align-items: center; padding: 0 var(--space-3); border: 1px solid var(--border); border-left: 0; border-radius: 0 var(--radius-md) var(--radius-md) 0; background: var(--surface-2); color: var(--ink-2); font-family: var(--font-mono); font-size: 13px; font-weight: 600; }
.au-check { display: inline-flex; align-items: center; gap: var(--space-2); cursor: pointer; min-height: 44px; }
.au-check input { width: 18px; height: 18px; accent-color: var(--gold); margin: 0; }
.au-form { display: flex; flex-direction: column; gap: var(--space-4); }

/* Card / StatTile */
.au-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); padding: var(--space-4); }
.au-stat { display: flex; flex-direction: column; gap: var(--space-1); }
.au-stat__value { margin-top: var(--space-1); }
.au-stat__value--warning { color: var(--warning); }
.au-stat__value--danger { color: var(--danger); }
.au-stat__sub { font-size: 13px; line-height: 18px; color: var(--ink-3); }
.au-stat--gold { background: var(--gold-soft); border-color: var(--gold-strong); }
.au-stat--gold .au-stat__value { color: var(--gold-text); }

/* Badge / Chip */
.au-badge { display: inline-flex; align-items: center; gap: var(--space-1); min-height: 24px; padding: 0 var(--space-2); border-radius: var(--radius-sm); font-size: 13px; line-height: 18px; font-weight: 700; white-space: nowrap; }
.au-badge::before { content: ""; width: 6px; height: 6px; border-radius: var(--radius-pill); background: currentColor; }
.au-badge--neutral { background: var(--surface-2); color: var(--ink-2); }
.au-badge--success { background: var(--success-soft); color: var(--success); }
.au-badge--danger { background: var(--danger-soft); color: var(--danger); }
.au-badge--warning { background: var(--warning-soft); color: var(--warning); }
.au-badge--info { background: var(--info-soft); color: var(--info); }
.au-badge--gold { background: var(--gold-soft); color: var(--gold-text); }
.au-chip { display: inline-flex; align-items: center; gap: var(--space-1); min-height: 28px; padding: 0 var(--space-3); border-radius: var(--radius-pill); border: 1px solid var(--border-strong); background: var(--surface); color: var(--ink-2); font-size: 13px; font-weight: 700; cursor: pointer; }
.au-chip[aria-pressed="true"], .au-chip--active { background: var(--gold-soft); border-color: var(--gold-strong); color: var(--gold-text); }

/* List, key/value, note, misc */
.au-list { display: flex; flex-direction: column; }
.au-list__row { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) 0; border-bottom: 1px solid var(--border); }
.au-list__row:last-child { border-bottom: 0; padding-bottom: 0; }
.au-list__main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.au-list__main .au-small { display: block; }
.au-avatar { width: 36px; height: 36px; border-radius: var(--radius-pill); background: var(--surface-3); color: var(--ink); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.au-avatar--lg { width: 44px; height: 44px; font-size: 15px; }
.au-kv { display: grid; grid-template-columns: auto 1fr; gap: var(--space-2) var(--space-4); align-items: baseline; margin: 0; }
.au-kv dt { font-size: 13px; color: var(--ink-2); font-weight: 700; margin: 0; }
.au-kv dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.au-note { padding: var(--space-3); border-radius: var(--radius-md); background: var(--surface-2); border: 1px dashed var(--border-strong); font-size: 14px; line-height: 21px; }
.au-divider { height: 1px; background: var(--border); margin: 0; border: 0; }
.au-empty { text-align: center; padding: var(--space-6) var(--space-4); color: var(--ink-2); display: flex; flex-direction: column; align-items: center; gap: var(--space-3); }
.au-alert { display: flex; align-items: flex-start; gap: var(--space-2); padding: var(--space-3) 14px; border-radius: var(--radius-md); font-size: 14px; line-height: 20px; font-weight: 600; }
.au-alert--danger { background: var(--danger-soft); color: var(--danger); }
.au-alert--success { background: var(--success-soft); color: var(--success); }
.au-alert--info { background: var(--info-soft); color: var(--info); }

/* ================= 3. App layout ================= */
html { height: 100%; touch-action: manipulation; } /* no double-tap zoom on phones; pinch and scroll stay */
body.au { min-height: 100%; }
.app { position: relative; max-width: 430px; min-height: 100vh; min-height: 100dvh; margin: 0 auto; display: flex; flex-direction: column; background: var(--bg); }
@media (min-width: 600px) {
  body.au { background: var(--surface-2); }
  .app { border-left: 1px solid var(--border); border-right: 1px solid var(--border); }
}

/* Theme toggle shows the sun in dark mode, the moon in light mode */
.au[data-theme="dark"] .ico-moon { display: none; }
.au[data-theme="light"] .ico-sun { display: none; }

/* Brand */
.brand, .au a.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; min-width: 0; }
.brand__mark { width: 32px; height: 32px; border-radius: 10px; background: var(--gold); color: var(--on-gold); display: grid; place-items: center; font-family: var(--font-display); font-weight: 600; font-size: 18px; flex: none; }
.brand__name { font-family: var(--font-display); font-size: 20px; line-height: 24px; font-weight: 600; }
.brand__text { display: flex; flex-direction: column; min-width: 0; }
.brand__sub { font-size: 11px; line-height: 14px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }

/* Splash pages: index and login */
.splash { flex: 1; display: flex; flex-direction: column; gap: 28px; padding: 16px 20px 24px; }
.splash__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.splash__foot { margin-top: auto; display: flex; flex-direction: column; gap: 12px; }
.splash__foot .au-small, .text-center { text-align: center; margin: 0; }

.hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 18px; padding-top: 20px; }
.hero__mark { width: 88px; height: 88px; border-radius: 24px; background: var(--gold); color: var(--on-gold); display: grid; place-items: center; font-family: var(--font-display); font-weight: 600; font-size: 46px; box-shadow: var(--shadow-gold); }
.hero__text { display: flex; flex-direction: column; gap: 8px; }
.hero h1 { margin: 0; font-family: var(--font-display); font-size: 32px; line-height: 38px; font-weight: 600; letter-spacing: -0.01em; }
.hero p { margin: 0; font-size: 15px; line-height: 22px; color: var(--ink-2); }

.features { display: flex; flex-direction: column; gap: 10px; }
.feature { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-card); }
.feature__icon { width: 40px; height: 40px; border-radius: 10px; background: var(--gold-soft); color: var(--gold-text); display: grid; place-items: center; flex: none; }
.feature__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.feature__title { font-weight: 700; }

.page-title { display: flex; flex-direction: column; gap: 6px; padding-top: 12px; }
.page-title h1 { margin: 0; font-family: var(--font-display); font-size: 30px; line-height: 36px; font-weight: 600; letter-spacing: -0.01em; }
.page-title p { margin: 0; font-size: 15px; line-height: 22px; color: var(--ink-2); }

.panel { display: flex; flex-direction: column; gap: 16px; padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow-card); }
.panel__row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.link-strong, .au a.link-strong { font-size: 13px; line-height: 18px; font-weight: 700; color: var(--gold-text); }

.notice { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; }
.notice__icon { width: 36px; height: 36px; border-radius: 10px; background: var(--gold-soft); color: var(--gold-text); display: grid; place-items: center; flex: none; }
.notice .au-small { color: var(--ink-2); }

/* Signed-in pages: header, main, bottom tab bar */
.app-header { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 2; }
.app-header .brand { flex: 1; }
.app-header .brand__name { font-size: 18px; line-height: 22px; }
.app-main { flex: 1; display: flex; flex-direction: column; gap: 16px; padding: 16px; }

.greet { display: flex; align-items: center; gap: 12px; }
.greet__text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.greet h1 { margin: 0; font-family: var(--font-display); font-size: 24px; line-height: 28px; font-weight: 600; }
.badges { display: flex; gap: 6px; flex-wrap: wrap; }

.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.stats .au-stat { padding: 14px; }
.stats .au-stat__value { margin-top: 0; font-size: clamp(15px, 4.4vw, 20px); line-height: 26px; letter-spacing: -0.02em; white-space: normal; overflow-wrap: anywhere; }
.stats .au-stat__sub { overflow-wrap: anywhere; }

.section__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.section__head h2 { margin: 0; font-size: 17px; line-height: 24px; font-weight: 700; }
.row__icon { width: 36px; height: 36px; border-radius: 10px; background: var(--surface-2); color: var(--ink-2); display: grid; place-items: center; font-weight: 700; font-size: 14px; flex: none; }
.row__title { font-weight: 700; }
.row__end { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.row__end .au-small { font-family: var(--font-mono); }

.app-tabbar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin-top: auto; position: sticky; bottom: 0; z-index: 2; background: var(--surface); border-top: 1px solid var(--border); padding-bottom: max(8px, env(safe-area-inset-bottom)); }
.app-tab, .au a.app-tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 60px; font-size: 11px; font-weight: 700; color: var(--ink-2); text-decoration: none; }
.au a.app-tab:hover { text-decoration: none; color: var(--ink); }
.au a.app-tab[aria-current="page"] { color: var(--gold-text); }

/* Page head with a back link (deposit, proof) */
.page-head { display: flex; flex-direction: column; gap: 6px; }
.page-head h1 { margin: 0; font-family: var(--font-display); font-size: 26px; line-height: 32px; font-weight: 600; letter-spacing: -0.01em; }
.page-head p { margin: 0; font-size: 14px; line-height: 20px; color: var(--ink-2); }
.au a.back { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; color: var(--ink-2); min-height: 32px; }

/* Sites list: site row, then one line per account */
.site { display: flex; flex-direction: column; padding: 12px 0; border-bottom: 1px solid var(--border); gap: 6px; }
.site:last-child { border-bottom: 0; padding-bottom: 0; }
.site__head { display: flex; align-items: center; gap: 12px; }
.au a.site__link { color: var(--ink); font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.site__accounts { display: flex; flex-direction: column; gap: 2px; padding-left: 48px; }
.acct { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 36px; }
.au a.acct__name { font-family: var(--font-mono); font-size: 14px; font-weight: 600; color: var(--gold-text); display: inline-flex; align-items: center; gap: 6px; min-height: 36px; }
.acct__rate { display: flex; flex-direction: column; align-items: flex-end; line-height: 16px; }
.acct__rate .au-amt { font-size: 13px; line-height: 16px; font-weight: 600; }
.acct__rate .au-small { font-size: 11px; line-height: 14px; }

/* New deposit */
.dep { display: flex; flex-direction: column; gap: 16px; }
.dep__step .section__head { margin-bottom: 10px; }
.dep__site { font-weight: 700; padding: 10px 0 2px; color: var(--ink-2); font-size: 13px; letter-spacing: .04em; text-transform: uppercase; }
.dep__acc { display: grid; grid-template-columns: 24px 1fr auto; grid-template-areas: "cb name rate" "cb amt amt" "cb usdt usdt"; column-gap: 10px; row-gap: 4px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); cursor: pointer; }
.dep__acc:last-of-type { border-bottom: 0; }
.dep__acc input[type="checkbox"] { grid-area: cb; width: 20px; height: 20px; accent-color: var(--gold); margin: 0; }
.dep__acc-name { grid-area: name; font-family: var(--font-mono); font-weight: 600; }
.dep__acc-rate { grid-area: rate; font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.dep__amt { grid-area: amt; display: none; }
.dep__acc.is-on .dep__amt { display: flex; }
.dep__acc-usdt { grid-area: usdt; color: var(--gold-text); font-weight: 700; min-height: 0; }
.dep__total { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: var(--gold-soft); color: var(--gold-text); font-size: 13px; }
.dep__total strong { font-family: var(--font-mono); font-size: 15px; text-align: right; }
.dep__nets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.dep__net { display: flex; flex-direction: column; gap: 2px; padding: 12px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface); cursor: pointer; min-height: 60px; }
.dep__net input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.dep__net.is-on { background: var(--gold-soft); border-color: var(--gold-strong); color: var(--gold-text); }
.dep__net-name { font-family: var(--font-mono); font-weight: 700; }
.dep__net .au-small { color: inherit; opacity: .8; }
.dep__addr { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; padding: 12px 14px; border-radius: 12px; border: 1px dashed var(--border-strong); background: var(--surface-2); }
.dep__addr-text { display: block; font-family: var(--font-mono); font-size: 13px; line-height: 20px; overflow-wrap: anywhere; color: var(--ink); }
.dep__ccy { width: auto; min-width: 92px; border-radius: 0 var(--radius-md) var(--radius-md) 0; border-left: 0; }
.dep__error { padding: 12px 14px; border-radius: 10px; background: var(--danger-soft); color: var(--danger); font-size: 14px; font-weight: 600; }
.au-btn.is-copied { background: var(--success-soft); color: var(--success); border-color: transparent; }

/* Proof page */
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: 14px; }
.kv dt { color: var(--ink-2); }
.kv dd { margin: 0; text-align: right; font-family: var(--font-mono); overflow-wrap: anywhere; }
.file { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px dashed var(--border-strong); border-radius: var(--radius-md); background: var(--surface-2); cursor: pointer; }
.file input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.file__name { font-size: 13px; color: var(--ink-2); overflow-wrap: anywhere; }

/* Deposit: websites clearly apart from the usernames */
.dep__siteblock { border: 1px solid var(--border); border-radius: 14px; padding: 10px 12px 6px; margin-bottom: 10px; background: var(--surface-2); }
.dep__sitehead { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dep__sitename { font-weight: 800; font-size: 15px; }
.au a.dep__sitelink { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; color: var(--gold-text); min-height: 32px; }
.dep__accounts { margin-top: 8px; background: var(--surface); border-radius: 10px; padding: 0 10px; }
.dep__accounts .dep__acc:last-of-type { border-bottom: 0; }
.dep__total { grid-template-columns: 1fr auto; }

/* Deposit: how you pay */
.dep__pays { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dep__pay { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface); cursor: pointer; text-align: center; min-height: 84px; }
.dep__pay input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.dep__pay.is-on { background: var(--gold-soft); border-color: var(--gold-strong); color: var(--gold-text); }
.dep__pay-name { font-weight: 800; }
.dep__pay .au-small { color: inherit; opacity: .8; }

/* Deposit: network cards with chain logos — all the same size, one line each */
.dep__net { position: relative; flex-direction: row; align-items: center; gap: 8px; min-height: 64px; padding: 10px; }
.dep__net-text { display: flex; flex-direction: column; min-width: 0; }
.dep__net-text > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dep__net-name { font-size: 14px; line-height: 18px; font-weight: 700; }
.dep__net-text .au-small { font-size: 11px; line-height: 16px; letter-spacing: 0.01em; }

/* Amounts: USDT sent green, TND cash sent in the text colour, balances (from the rates) grey */
.amt--usdt { color: var(--success); }
.amt--tnd { color: var(--ink); }
.amt--muted { color: var(--ink-3); }

/* Reports: the account filter, the account rows, the chosen account's line in a receipt */
.filter { display: flex; align-items: center; gap: 8px; }
.filter .au-input { flex: 1; min-width: 0; }
.au a.rowlink.is-current { background: var(--gold-soft); margin: 0 -8px; padding-left: 8px; padding-right: 8px; border-radius: 10px; }
.rep__item.is-hit, .rep__item.is-hit .au-amt { color: var(--ink-2); font-weight: 700; }

/* Site badge with a 3-letter code (B24) */
.row__icon--3 { font-size: 11px; letter-spacing: -0.01em; }

/* Long lists: [data-more] hides the rest behind one "Show all" button (agent.js) */
.more-btn { margin-top: 10px; }

/* Support: the thread scrolls, the message box stays just above the tab bar */
.app-main--chat { padding-bottom: 8px; }
/* The thread scrolls inside its card, so a long chat never lengthens the page: the title and the back link stay in view */
.chatcard { flex: 1; min-height: 220px; max-height: calc(100vh - 400px); max-height: calc(100dvh - 400px); overflow-y: auto; overscroll-behavior: contain; }
.composer--stuck { position: sticky; bottom: calc(60px + max(8px, env(safe-area-inset-bottom)) + 8px); margin-top: auto; padding-top: 8px; background: var(--bg); z-index: 1; }
.composer .au-textarea { max-height: 120px; resize: none; }
.composer .au-btn--icon { flex: none; }

/* Deposit: the sender's own cash rate */
.dep__rate { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }

/* Account: the contact form, and a collector's clients as chips with a remove cross */
.contact { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: end; }
@media (max-width: 399px) { .contact { grid-template-columns: 1fr 1fr; } .contact__save { grid-column: 1 / -1; } }
/* Contact boxes: the app's logo, one field (username or phone), its own Save */
.cf { display: flex; align-items: flex-end; gap: 8px; }
.cf + .cf { margin-top: 10px; }
.cf__icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.cf__icon .au-icon { width: 22px; height: 22px; }
.cf__icon--tg { background: #2aabee22; color: #2aabee; }
.cf__icon--wa { background: #25d36622; color: #25d366; }
.cf__field { flex: 1; min-width: 0; }
.cf .au-btn { flex: none; min-height: 44px; }
.chip--form { gap: 6px; padding-right: 2px; margin: 0; }
.chip__rm { border: 0; background: transparent; color: var(--ink-3); font-size: 16px; line-height: 1; padding: 2px 7px; border-radius: 999px; cursor: pointer; }
.chip__rm:hover { color: var(--danger); background: var(--danger-soft); }
.addrow { display: flex; gap: 8px; margin-top: 10px; }
.addrow .au-input { flex: 1; min-width: 0; }

/* Site name as the one clickable thing in a site header (deposit page) */
.au a.dep__sitename { color: var(--ink); display: inline-flex; align-items: center; gap: 6px; }

/* Site request: the agent's usernames on a site, one chip each */
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.chip { display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); font-size: 12px; font-weight: 600; color: var(--ink); }
.au-stat__value--success { color: var(--success); }

/* Reports: the month summary as lines — verified / balance received / deposits, crypto vs cash, pending / rejected */
.kv--sum { font-size: 14px; gap: 8px 14px; align-items: center; }
.kv--sum dd .au-amt--lg { font-size: 20px; line-height: 26px; }
.kv--sep { border-top: 1px solid var(--border); padding-top: 10px; margin-top: 10px; }
.amt--pending { color: var(--warning); }
.pay { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 6px; font-family: var(--font-sans); font-size: 11px; font-weight: 800; letter-spacing: .02em; white-space: nowrap; }
.pay--crypto { background: var(--info-soft); color: var(--info); }
.pay--cash { background: var(--gold-soft); color: var(--gold-text); }
.pay--later { background: var(--warning-soft); color: var(--warning); }
.tick { font-size: 11px; }
.dep__pays--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dep__pays--3 .dep__pay { padding: 10px 6px; }
.rep__tags { display: flex; align-items: center; gap: 6px; flex: none; }

/* Reports: one deposit as a small receipt — header, one line per account, then what was sent */
.au a.rep { display: flex; flex-direction: column; gap: 4px; padding: 12px 0; border-bottom: 1px solid var(--border); color: inherit; text-decoration: none; }
.au a.rep:last-of-type { border-bottom: 0; }
.rep__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rep__title { font-weight: 700; font-size: 14px; line-height: 20px; min-width: 0; }
.rep__item { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; line-height: 18px; color: var(--ink-2); }
.rep__item > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.rep__item .au-amt { font-size: 12px; }
.rep__foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 2px; font-size: 12px; line-height: 18px; color: var(--ink-3); }
.rep__foot .au-amt { font-size: 13px; font-weight: 600; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; }
.pager .au-small { flex: 1; text-align: center; }
.chain { display: inline-grid; place-items: center; flex: none; }
.chain svg { width: 100%; height: 100%; display: block; }
[hidden] { display: none !important; }
.copy-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.copy-row .au-btn:only-child { grid-column: 1 / -1; }

/* Bell with unread count */
.au a.bell { position: relative; color: var(--ink-2); }
.app-header .bell { position: relative; }
/* Unread support replies: a count on the Support tab instead of a notification per message */
.app-tab { position: relative; }
.app-tab__dot { position: absolute; top: 8px; left: calc(50% + 6px); min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--danger); color: var(--on-danger); font-size: 10px; line-height: 16px; font-weight: 800; text-align: center; }
.bell__count { position: absolute; top: 3px; right: 3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--danger); color: var(--on-danger); font-size: 11px; line-height: 18px; font-weight: 800; text-align: center; }

/* Reports */
.month-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.month-nav__label { font-family: var(--font-display); font-size: 20px; line-height: 24px; font-weight: 600; }
.au a.month-nav__btn, .month-nav__btn--off { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border-strong); color: var(--ink); background: var(--surface); }
.month-nav__btn--off { opacity: .35; }
.stats--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stats--3 .au-stat__value { font-size: 17px; line-height: 22px; }
.au a.rowlink { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); color: inherit; text-decoration: none; }
.au a.rowlink:last-child { border-bottom: 0; padding-bottom: 0; }
.au a.rowlink:hover { text-decoration: none; }

/* Wallets on the rates page */
.wallet { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.wallet:last-child { border-bottom: 0; }
.wallet__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.wallet__addr { font-family: var(--font-mono); font-size: 12px; line-height: 16px; overflow-wrap: anywhere; color: var(--ink-2); }

/* Site request */
.sitecard { padding: 12px 0; border-bottom: 1px solid var(--border); }
.sitecard:last-child { border-bottom: 0; }
.sitecard__head { display: flex; align-items: center; gap: 10px; }
.sitecard details { margin-top: 8px; }
.sitecard summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--border-strong); font-size: 13px; font-weight: 700; color: var(--gold-text); background: var(--surface); }
.sitecard summary::-webkit-details-marker { display: none; }
.sitecard details[open] summary { background: var(--gold-soft); border-color: var(--gold-strong); }
.sitecard__form { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; padding: 12px; border-radius: 12px; background: var(--surface-2); }

/* Support chat */
.chat { display: flex; flex-direction: column; gap: 8px; }
.msg { max-width: 86%; padding: 10px 12px; border-radius: 14px; font-size: 14px; line-height: 20px; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg--agent { align-self: flex-end; background: var(--gold-soft); color: var(--ink); border-bottom-right-radius: 4px; }
.msg--staff { align-self: flex-start; background: var(--surface-2); border-bottom-left-radius: 4px; }
.msg__meta { display: block; margin-top: 4px; font-size: 11px; line-height: 14px; color: var(--ink-3); }
.composer { display: flex; gap: 8px; align-items: flex-end; }
.composer .au-textarea { min-height: 44px; flex: 1; }

/* Ask Claude: the assistant's page, and its card at the top of the Support tab */
.ask-card { display: flex; flex-direction: row; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.ask-card__icon { width: 40px; height: 40px; border-radius: 12px; background: var(--gold-soft); color: var(--gold-text); display: grid; place-items: center; flex: none; }
.ask-card__text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.ask-card__text strong { font-size: 15px; line-height: 20px; }
.msg--ai { border: 1px solid var(--border); }
.msg__text { display: block; }
.msg__text strong { font-weight: 800; }
.msg--wait { color: var(--ink-3); animation: ask-pulse 1.2s ease-in-out infinite; }
.msg--error { background: color-mix(in srgb, var(--danger) 16%, var(--surface-2)); }
@keyframes ask-pulse { 50% { opacity: .55; } }
.ask-hints { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ask-hints .au-btn { white-space: normal; text-align: left; height: auto; min-height: 36px; }
.ask-foot { margin: 12px 0 0; color: var(--ink-3); }

/* Rates: three boxes side by side — black market, cash, bank — the number big, one word under it */
.rates3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.rate3 { display: flex; flex-direction: column; gap: 2px; padding: 12px 10px; align-items: flex-start; min-width: 0; }
.rate3--gold { border-color: var(--gold); background: var(--gold-soft); }
.rate3__label { font-size: 11px; line-height: 16px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.rate3__value { font-family: var(--font-mono); font-size: 22px; line-height: 28px; font-weight: 600; color: var(--ink); }
.rate3--gold .rate3__value { color: var(--gold-text); }
.rate3__sub { font-size: 11px; line-height: 14px; color: var(--ink-3); overflow-wrap: anywhere; }

/* Reports: one deposit or declaration as a table-like card that always fits the column */
.au-list--tx { display: flex; flex-direction: column; gap: 10px; }
.tx { display: block; border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; background: var(--surface); color: var(--ink); text-decoration: none; transition: box-shadow .15s ease, transform .15s ease; }
.au a.tx:hover, .au a.tx:focus-visible { text-decoration: none; } /* the card lifts a little instead of underlining every word */
.tx:hover { box-shadow: var(--shadow-pop); transform: translateY(-1px); }
.tx:active { transform: none; box-shadow: var(--shadow-card); }
.tx:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.tx--rejected { border-color: color-mix(in srgb, var(--danger) 45%, var(--border)); }
.tx--verified { border-color: color-mix(in srgb, var(--success) 45%, var(--border)); }
.tx__head { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px; font-size: 12px; }
.tx__ref { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx__id { font-family: var(--font-mono); font-size: 13px; font-weight: 700; color: var(--ink); }
.tx__when { color: var(--ink-3); }
.tx__status { font-size: 13px; font-weight: 700; white-space: nowrap; justify-self: end; }
.tx__amt { flex: none; font-family: var(--font-mono); font-size: 12px; white-space: nowrap; }
@media (max-width: 399px) { /* narrow phones: the header's three parts stay on one line */
  .tx__head { font-size: 11px; gap: 6px; }
  .tx__id, .tx__status { font-size: 12px; }
  .tx__type { font-size: 11px; padding: 2px 6px; }
  .tx__line { font-size: 12px; }
  .tx__amt { font-size: 11px; }
  .tx__sep { font-size: 0; }
  .tx__type .tx__sep { margin: 0 2px; }
  .tx__time { margin-inline-start: 4px; }
}
.tx--verified .tx__status { color: var(--success); }
.tx--rejected .tx__status { color: var(--danger); }
.tx--pending .tx__status { color: var(--warning); }
/* one account per line, never wrapped: the domain (text colour) may shrink to "…", the username (gold), the tick and the amount stay whole */
.tx__line { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; font-size: 13px; line-height: 20px; }
.tx__site { display: flex; align-items: center; gap: 5px; flex: 1 1 auto; min-width: 0; white-space: nowrap; color: var(--ink-2); }
.tx__dom { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.tx__dot { flex: none; color: var(--ink-3); }
.tx__user { flex: none; font-family: var(--font-mono); font-weight: 700; color: var(--gold-text); }
.tx__site .tick { flex: none; font-size: 12px; }
.tx__line.is-hit { background: var(--gold-soft); border-radius: 6px; padding: 1px 6px; margin-inline: -6px; }
.tx__type { justify-self: center; white-space: nowrap; font-family: var(--font-mono); font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); }
.tx__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--border); }
.tx__grid--3 { grid-template-columns: 1fr 1fr auto; }
.tx__k { display: block; font-size: 11px; line-height: 14px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.tx__v { display: block; font-family: var(--font-mono); font-size: 14px; line-height: 20px; overflow-wrap: anywhere; }
.tx__note { margin-top: 8px; padding: 6px 8px; border-radius: 8px; background: var(--surface-2); font-size: 13px; line-height: 18px; color: var(--ink-2); overflow-wrap: anywhere; }
.tx__note--danger { color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, var(--surface-2)); }
.tx__note--action { color: var(--gold-text); background: var(--gold-soft); font-weight: 700; }
.tx__note--good { color: var(--success); background: color-mix(in srgb, var(--success) 12%, var(--surface-2)); }
.tbl__end--good { color: var(--success); font-weight: 700; }
.tbl__end--bad { color: var(--danger); font-weight: 700; }
.dep__rate-fixed { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: var(--radius-md); background: var(--surface-2); border: 1px solid var(--border); }
.dl { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; }
.ico-flip { transform: scaleY(-1); }
[dir="rtl"] .ico-flip { transform: scaleY(-1); }

/* Table-like lists: one row per line, hairline separators, what matters on the left, the figure on the right */
.tbl { display: flex; flex-direction: column; margin: 0; }
.tbl__row, .au a.tbl__row { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 5px 0; border-bottom: 1px solid var(--border); font-size: 13px; line-height: 18px; color: var(--ink); text-decoration: none; }
.tbl__row:last-child, .au a.tbl__row:last-child { border-bottom: 0; }
.au a.tbl__row:hover { text-decoration: none; }
.au a.tbl__row:hover .tbl__dom { color: var(--ink); }
.tbl__main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.tbl__dom { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); }
.tbl__user { flex: none; font-family: var(--font-mono); font-weight: 700; color: var(--gold-text); }
.tbl__net { flex: none; font-weight: 700; min-width: 48px; }
.tbl__k { flex: 1; min-width: 0; color: var(--ink-2); font-weight: 600; }
.tbl__end { flex: none; text-align: end; font-family: var(--font-mono); font-size: 13px; white-space: nowrap; }
.tbl__end b { font-weight: 700; }
.tbl__end--text { font-family: var(--font-sans); }
.tbl__chev { flex: none; color: var(--ink-3); }
.tbl__mark { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex: none; font-weight: 700; font-size: 11px; background: var(--surface-2); color: var(--ink-2); }
.tbl__mark.row__icon--3 { font-size: 9px; letter-spacing: -.02em; }
.tbl--kv .tbl__row { min-height: 34px; padding: 3px 0; }
.tbl .chain { flex: none; }
.tbl .au-btn--sm { flex: none; }
.tbl__end--wrap { white-space: normal; text-align: end; max-width: 65%; overflow-wrap: anywhere; }
.au a.tbl__link { color: var(--gold-text); font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }

/* Coming soon (P2P) */
.soon { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 28px 20px; }
.soon__icon { width: 56px; height: 56px; border-radius: 16px; background: var(--gold-soft); color: var(--gold-text); display: grid; place-items: center; }
.soon__icon .au-icon { width: 28px; height: 28px; }
.soon p { margin: 0; font-size: 15px; line-height: 22px; color: var(--ink-2); }
.quick__text .au-badge { margin-inline-start: 4px; vertical-align: middle; }

/* Become an agent: pick lists (website, role), the status band of an application */
.pick { display: flex; flex-direction: column; gap: 8px; position: relative; }
.pick__item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); cursor: pointer; }
.pick__item.is-on { border-color: var(--gold); background: var(--gold-soft); }
.pick__item input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pick__main { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; cursor: pointer; }
.pick__link { flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: var(--gold-text); background: var(--surface); border: 1px solid var(--border); }
.pick__text { display: flex; flex-direction: column; min-width: 0; }
.pick__name { font-weight: 700; }
.pick__tag { display: none; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--gold); color: var(--on-gold); vertical-align: middle; margin-inline-start: 4px; }
.pick__item.is-suggested .pick__tag { display: inline-block; }
.pick--grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.pick__item--sm { padding: 9px 10px; font-size: 14px; }
.pick__item[hidden] { display: none; }
.search { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; padding-inline-start: 12px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-2); color: var(--ink-3); }
.search .au-input { border: 0; background: transparent; padding-inline-start: 0; flex: 1; min-width: 0; }
.search .au-input:focus { box-shadow: none; }
.search:focus-within { border-color: var(--gold); }
/* the stepper: one step at a time, a progress line, Back / Next / Send */
.wiz__bar { display: flex; flex-direction: column; gap: 6px; }
.wiz__track { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.wiz__fill { height: 100%; width: 20%; background: var(--gold); transition: width .2s ease; }
.wiz__nav { display: flex; gap: 8px; }
.wiz__nav .au-btn { flex: 1; }
.wiz__nav [data-wiz-send] { flex: 2; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.hp { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); opacity: 0; pointer-events: none; } /* hidden in place — an off-screen offset makes a right-to-left page scrollable into the void and shows up blank on a phone */
.appstatus { padding: 10px 12px; border-radius: 10px; font-size: 14px; line-height: 20px; margin-bottom: 10px; background: var(--surface-2); border: 1px solid var(--border); }
.appstatus--pending { background: var(--gold-soft); border-color: var(--gold); }
.appstatus--active { color: var(--success); background: var(--success-soft); border-color: var(--success); }
.appstatus--declined { color: var(--danger); background: var(--danger-soft); border-color: var(--danger); }

/* Profile picture: the greeting circle itself is the upload — tap it to choose a picture, it appears in place */
.avatar-edit { flex: none; margin: 0; }
.avatar-edit__label { position: relative; display: block; cursor: pointer; }
.avatar-edit__label:hover .au-avatar, .avatar-edit__label:focus-within .au-avatar { box-shadow: 0 0 0 2px var(--gold); }
.avatar-edit__badge { position: absolute; right: -3px; bottom: -3px; width: 18px; height: 18px; border-radius: 50%; background: var(--gold); color: var(--on-gold); display: grid; place-items: center; border: 2px solid var(--surface); }
.avatar-edit__badge .au-icon { width: 10px; height: 10px; }
.avatar-edit input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.link-small { background: none; border: 0; padding: 0; margin: 0; color: var(--ink-3); font: inherit; font-size: 12px; text-decoration: underline; cursor: pointer; }
.link-small:hover { color: var(--danger); }
.au-avatar--img { object-fit: cover; padding: 0; }
.au-avatar--xl { width: 72px; height: 72px; font-size: 24px; }
.pic { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pic__file { flex: 1 1 150px; min-width: 0; padding: 8px 10px; }
.pic__btns { display: flex; gap: 6px; flex: none; }

/* Language menu in the header (and on the sign-in page), next to the theme toggle; ?lang=xx is handled by every portal page */
.lang-form { display: inline-flex; align-items: center; gap: 4px; }
.lang-select { appearance: none; -webkit-appearance: none; height: 36px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--ink-2); font: inherit; font-size: 13px; font-weight: 700; line-height: 34px; cursor: pointer; }
.lang-select:hover { border-color: var(--border-strong); color: var(--ink); }
.lang-select:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.splash__tools { display: inline-flex; align-items: center; gap: 4px; }
/* A chat bubble takes the direction of its own text: an English answer stays left-to-right on an Arabic page */
.msg, .msg__text, .au-ai__msg p { unicode-bidi: plaintext; }

/* Right-to-left (Arabic, Tunisian): flex layouts flip by themselves; the few directional rules are mirrored here.
   Tajawal carries the Arabic glyphs; Latin codes, addresses and amounts stay left-to-right inside the sentence. */
[dir="rtl"] .au { font-family: 'Tajawal', 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif; }
[dir="rtl"] .au-select { padding-right: 14px; padding-left: 40px; background-position: left 12px center; }
[dir="rtl"] .au-inputgroup__suffix { border-left: 1px solid var(--border); border-right: 0; border-radius: var(--radius-md) 0 0 var(--radius-md); }
[dir="rtl"] .au-kv dd, [dir="rtl"] .kv dd, [dir="rtl"] .dep__total strong { text-align: left; }
[dir="rtl"] .site__accounts { padding-left: 0; padding-right: 48px; }
[dir="rtl"] .dep__ccy { border-radius: var(--radius-md) 0 0 var(--radius-md); border-left: 1px solid var(--border); border-right: 0; }
[dir="rtl"] .au a.dep__sitelink { margin-left: 0; margin-right: auto; }
[dir="rtl"] .chip--form { padding-right: 0; padding-left: 2px; }
[dir="rtl"] .app-tab__dot { left: auto; right: calc(50% + 6px); }
[dir="rtl"] .bell__count { right: auto; left: 3px; }
[dir="rtl"] .msg--agent { border-bottom-right-radius: 14px; border-bottom-left-radius: 4px; }
[dir="rtl"] .msg--staff { border-bottom-left-radius: 14px; border-bottom-right-radius: 4px; }
[dir="rtl"] .ask-hints .au-btn { text-align: right; }
[dir="rtl"] .ico-arrow-right, [dir="rtl"] .ico-chevron-right, [dir="rtl"] .ico-chevron-left, [dir="rtl"] .ico-logout, [dir="rtl"] .ico-external { transform: scaleX(-1); }
[dir="rtl"] .au-mono, [dir="rtl"] .au-amt, [dir="rtl"] .amt, [dir="rtl"] [data-address-text] { direction: ltr; unicode-bidi: isolate; }
/* an Arabic word inside a monospaced figure ("1 في الانتظار") takes its glyphs from Tajawal, not from the spaced monospace fallback */
[dir="rtl"] .au-mono, [dir="rtl"] .au-amt, [dir="rtl"] .amt, [dir="rtl"] .kv dd, [dir="rtl"] .au-kv dd { font-family: 'JetBrains Mono', 'Tajawal', ui-monospace, monospace; }

/* Notifications */
.notif { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.notif:last-child { border-bottom: 0; }
.notif__icon { width: 36px; height: 36px; border-radius: 10px; background: var(--surface-2); color: var(--ink-2); display: grid; place-items: center; flex: none; }
.notif.is-unread .notif__icon { background: var(--gold-soft); color: var(--gold-text); }
.notif__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.notif__title { font-weight: 700; }
.notif.is-unread .notif__title { color: var(--gold-text); }
.notif__body { font-size: 13px; line-height: 18px; color: var(--ink-2); }

/* Account quick links */
.au a.quick { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); color: inherit; font-weight: 700; font-size: 14px; line-height: 18px; }
.au a.quick:last-child { border-bottom: 0; padding-bottom: 0; }
.au a.quick:hover { text-decoration: none; }
.quick__icon { width: 30px; height: 30px; border-radius: 8px; background: var(--gold-soft); color: var(--gold-text); display: grid; place-items: center; flex: none; }
.quick__icon .au-icon { width: 16px; height: 16px; }
.quick__text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.quick__text .au-small { font-weight: 500; font-size: 12px; line-height: 16px; }

/* Bonus & level: the level badge (same classes in Admin), the month bar with a mark per tier, the ladder */
.level { display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 0 10px; border-radius: var(--radius-pill); font-size: 13px; line-height: 18px; font-weight: 800; letter-spacing: .02em; white-space: nowrap; }
.level--none { background: var(--surface-2); color: var(--ink-2); }
.level--bronze { background: #ead0b3; color: #6a3d12; }
.level--silver { background: #e2e5ea; color: #39434f; }
.level--gold { background: var(--gold-soft); color: var(--gold-text); box-shadow: inset 0 0 0 1px var(--gold); }
.level--platinum { background: #d5edf6; color: #0e5a76; }
.level--legend { background: linear-gradient(135deg, #2a1545, #5b2a86); color: #ffd978; }
.bonus__level { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.bonus__hint { flex: 1 1 100%; }
.bonus__bar { position: relative; height: 12px; border-radius: var(--radius-pill); background: var(--surface-3); overflow: hidden; }
.bonus__bar--thin { height: 6px; flex: 1 1 100%; }
.bonus__fill { height: 100%; border-radius: var(--radius-pill); background: linear-gradient(90deg, var(--gold-strong), var(--gold)); transition: width .4s ease-out; }
.bonus__fill--level { background: var(--ink-2); }
.bonus__tick { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--surface); }
.bonus__marks { position: relative; height: 18px; margin-top: 4px; }
.bonus__mark { position: absolute; top: 0; transform: translateX(-50%); font-size: 11px; line-height: 16px; font-weight: 700; color: var(--ink-3); white-space: nowrap; }
.bonus__mark--end { transform: translateX(-100%); }
[dir="rtl"] .bonus__mark { transform: translateX(50%); }
[dir="rtl"] .bonus__mark--end { transform: translateX(100%); }
.bonus__row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin: 14px 0 6px; }
.bonus__secured { display: flex; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; margin-top: 8px; font-size: 13px; line-height: 18px; color: var(--ink-2); font-weight: 600; }
.bonus__open { margin-top: 10px; padding: 10px 12px; border-radius: var(--radius-md); background: var(--gold-soft); color: var(--gold-text); font-weight: 700; font-size: 14px; line-height: 20px; }
.ladder { display: flex; flex-direction: column; gap: 6px; }
.ladder__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: var(--radius-md); background: var(--surface-2); }
.ladder__row--now { box-shadow: inset 0 0 0 2px var(--gold); background: var(--gold-soft); }
.ladder__row--done { opacity: .7; }

/* Phone notifications: the Home banner */
.push-banner { align-items: center; }
.push-banner__link, .au a.push-banner__link { flex: 1; min-width: 0; color: inherit; font-weight: 700; text-decoration: none; }
.push-banner__x { background: none; border: 0; color: inherit; font: inherit; font-size: 22px; line-height: 1; cursor: pointer; padding: 0 4px; flex: none; }
