/*
 * The app's whole visual language, from the «ماکت تعاملی» mockup
 * (direction 1b): dark, RTL, phone-first, one accent colour.
 *
 * Every colour, radius and size below is a token. Pages never hard-code a
 * hex value: even the equity curve's stroke comes from here, through
 * `currentColor` on a class the renderer sets from the curve's direction.
 */

:root {
  /* surfaces, darkest to lightest */
  --bg: #101217;
  --card: #141821;
  --surface: #191d25;
  --seg: #171b22;
  --seg-active: #2b313d;
  --sheet: #171b22;

  /* lines */
  --border: #262c37;
  --border-soft: #20252f;
  --border-input: #2f3745;
  --border-strong: #3a4150;
  --tabbar-border: #232936;

  /* type */
  --text: #e9ebf0;
  --text-2: #c2c8d3;
  --muted: #98a0b0;
  --dim: #8d95a4;

  /* meaning */
  --amber: #f0a830;
  --amber-ink: #1a1200;
  --amber-soft: rgba(240, 168, 48, 0.14);
  --green: #3ddc84;
  --red: #ff6b62;
  --gray: #8b93a3;

  --r-lg: 16px;
  --r-md: 14px;
  --r-sm: 12px;
  --r-seg: 11px;
  --r-input: 10px;

  --pad: 20px;
  --tabbar-h: 64px;

  color-scheme: dark;
}

/* ------------------------------------------------------------------ base */

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'IBM Plex Sans Arabic', Vazirmatn, 'Noto Sans Arabic', Tahoma,
    system-ui, sans-serif;
  font-size: 13.5px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--amber);
  text-decoration: none;
}
a:hover {
  color: #ffc061;
}

button,
input {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* Numbers line up in columns; Persian digits are variable-width otherwise. */
.tnum,
.hero-figure,
.coin-price,
.row-value,
.stat-value {
  font-variant-numeric: tabular-nums;
}

/* Hidden scrollbars — the mockup's lists have no visible track. */
.scr::-webkit-scrollbar {
  width: 0;
  height: 0;
}
.scr {
  scrollbar-width: none;
}

/* ---------------------------------------------------------------- layout */

/*
 * The mockup is a 390px phone. On a wider screen the content stays that
 * shape and centres rather than stretching a list of two-column rows across
 * a desktop — the design was drawn for one hand.
 */
main {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 var(--pad) calc(var(--tabbar-h) + 28px + env(safe-area-inset-bottom));
}

.app-header {
  max-width: 480px;
  margin: 0 auto;
  padding: calc(10px + env(safe-area-inset-top)) var(--pad) 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.app-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  line-height: 1.4;
}

.header-side {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

/*
 * The live pill is also the refresh control. The mockup has no refresh
 * button, and these are the same question anyway — "is this current?" and
 * "make it current". It says which of the three states it is in, because a
 * pill that is always green is decoration, not a status.
 */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 11.5px;
  color: var(--muted);
  cursor: pointer;
}
.status-pill:disabled {
  cursor: default;
  opacity: 0.75;
}
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gray);
  flex: none;
}
.status-pill.live .status-dot {
  background: var(--green);
}
.status-pill.busy .status-dot {
  background: var(--amber);
}
.status-pill.down .status-dot {
  background: var(--red);
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  flex: none;
}
.avatar.lg {
  width: 46px;
  height: 46px;
  background: #242a35;
  border: 0;
  font-size: 17px;
  color: var(--text);
}
.avatar.sm {
  width: 34px;
  height: 34px;
  background: #242a35;
  border: 0;
  font-size: 13px;
  color: var(--text);
}

/* ---------------------------------------------------------------- tabbar */

.tabbar {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 40;
  background: var(--tabbar);
  background: var(--card);
  border-top: 1px solid var(--tabbar-border);
  padding: 10px 16px calc(14px + env(safe-area-inset-bottom));
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
}

.tabbar-inner {
  max-width: 480px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
}

.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--r-seg);
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}
.tab.current {
  background: var(--amber-soft);
  color: var(--amber);
}

/* Icons are drawn from divs, exactly as the mockup draws them: no icon
   font to load and nothing to go missing on a slow network. */
.tab-icon {
  width: 22px;
  height: 22px;
  display: block;
}

/* The bar's active entry thickens its stroke rather than changing colour
   alone: on a small screen a colour shift between two greys is not a
   difference a thumb can aim by. */
.tab.current .tab-icon {
  stroke-width: 2.1;
}

/* A build the worker has already cached, offered rather than applied. Sits
   above the tab bar so it never covers the destination the reader is
   reaching for. */
.update-bar {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(var(--tabbar-h) + 12px + env(safe-area-inset-bottom));
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--text);
  color: var(--bg);
  font-size: 13px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}
.update-bar button {
  border: 0;
  border-radius: 8px;
  padding: 6px 12px;
  font: inherit;
  font-weight: 600;
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
}

/* ------------------------------------------------------------- selectors */

/* Segmented control: a small closed set of views over the same page. */
.seg {
  display: flex;
  background: var(--seg);
  border: 1px solid var(--border);
  border-radius: var(--r-seg);
  padding: 3px;
  margin: 0 0 14px;
}
.seg-item {
  flex: 1;
  text-align: center;
  padding: 7px 0;
  font-size: 12.5px;
  border-radius: 8px;
  background: transparent;
  border: 0;
  color: var(--muted);
  font-weight: 400;
  cursor: pointer;
}
.seg-item.active {
  background: var(--seg-active);
  color: var(--text);
  font-weight: 600;
}

/* Pills: an open-ended filter over a list. */
.pills {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin: 0 0 14px;
}
.pill {
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--border-input);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.pill.active {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--amber-ink);
}

/* --------------------------------------------------------------- surface */

.hero {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px;
  background: var(--surface);
  margin-bottom: 16px;
}
.hero.tight {
  padding: 14px;
}

.card {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--card);
  overflow: hidden;
  margin-bottom: 12px;
}
.card.pad {
  padding: 14px;
}

.hero-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}
.hero-top .aside {
  font-size: 11px;
}

.hero-figure {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-top: 6px;
}
.hero-figure b {
  font-size: 40px;
  font-weight: 700;
  line-height: 1;
  color: var(--amber);
}
.hero-figure span {
  font-size: 13px;
  color: var(--muted);
  padding-bottom: 5px;
  font-weight: 400;
}

/* The balance headline on the trade tab: one big number, one small unit. */
.hero-balance {
  font-size: 32px;
  font-weight: 700;
  margin-top: 10px;
  line-height: 1.3;
}
.hero-balance small {
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
}
.hero-sub {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--muted);
}

/* A proportion bar — parts of a whole, not a progress indicator. */
.split {
  display: flex;
  gap: 4px;
  margin-top: 14px;
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
}
.split i {
  display: block;
}
.split .s-buy {
  background: var(--green);
}
.split .s-watch {
  background: var(--amber);
}
.split .s-avoid {
  background: #39414f;
}

.split-legend {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 9px;
  font-size: 11.5px;
  color: var(--muted);
}

.link-btn {
  background: none;
  border: 0;
  padding: 0;
  color: var(--amber);
  font-weight: 600;
  font-size: inherit;
  cursor: pointer;
}

.reveal {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
  line-height: 2;
  color: var(--text-2);
}

/* Small state chips used above a headline figure. */
.chips {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  font-size: 11.5px;
  color: var(--muted);
}
.chip {
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 2px 8px;
}

/* ------------------------------------------------------------------ rows */

/* label (+ sub) on one side, value on the other. The page's workhorse. */
.rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
/* The side of a row that gives way when the value needs room. */
.grow {
  flex: 1;
  min-width: 0;
}
/* Block, because half the callers build these from spans inside a span —
   inline they run the label and its sub-line together into one sentence. */
.row-label {
  display: block;
  min-width: 0;
  font-size: 13px;
  font-weight: 500;
}
.row-sub {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
  line-height: 1.7;
}
.row-value {
  font-size: 13px;
  font-weight: 600;
  text-align: start;
  flex: none;
  max-width: 55%;
}
/* A figure plus the action that applies to it, kept on one line. */
.row-end {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

/* A list of rows separated by hairlines, inside a .card. */
.list > * {
  border-bottom: 1px solid var(--border-soft);
}
.list > *:last-child {
  border-bottom: 0;
}
.list-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 13px;
}

.pos {
  color: var(--green);
}
.neg {
  color: var(--red);
}
.dim {
  color: var(--muted);
}

/* ------------------------------------------------------------- accordion */

.acc {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--card);
  overflow: hidden;
  margin-bottom: 10px;
}
.acc-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px;
  background: none;
  border: 0;
  cursor: pointer;
  text-align: start;
}
.acc-title {
  font-size: 13.5px;
  font-weight: 600;
}
.acc-aside {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: none;
}
.acc-summary {
  font-size: 12px;
  color: var(--muted);
}
.acc-caret {
  font-size: 11px;
  color: var(--muted);
}
.acc-body {
  padding: 0 14px 14px;
}
.acc-body > .inner {
  border-top: 1px solid var(--border-soft);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.acc-note {
  font-size: 12px;
  line-height: 1.9;
  color: var(--muted);
  border-top: 1px solid var(--border-soft);
  padding-top: 10px;
}

/* ------------------------------------------------------------- coin list */

.coin-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 14px;
  width: 100%;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--border-soft);
  cursor: pointer;
  text-align: start;
}
.coin-row:last-child {
  border-bottom: 0;
}
.stripe {
  display: block;
  width: 3px;
  height: 36px;
  border-radius: 999px;
  flex: none;
}
.stripe.buy {
  background: var(--green);
}
.stripe.watch {
  background: var(--amber);
}
.stripe.avoid {
  background: var(--gray);
}
.coin-main {
  display: block;
  flex: 1;
  min-width: 0;
}
.coin-name {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.coin-name b {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.coin-name span {
  font-size: 10.5px;
  color: var(--muted);
}
/* Two lines at most: the scanner's refusal sentences run long, and a row
   that grows to four lines stops being a scannable list. */
.coin-line {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 11px;
  margin-top: 3px;
  line-height: 1.7;
}
.coin-line.buy {
  color: var(--green);
}
.coin-line.watch {
  color: var(--amber);
}
.coin-line.avoid {
  color: var(--gray);
}
.coin-side {
  display: block;
  text-align: start;
  flex: none;
}
.coin-price {
  display: block;
  font-size: 14px;
  font-weight: 600;
}
.coin-price small {
  font-size: 11px;
  font-weight: 500;
}
.coin-chg {
  display: block;
  font-size: 11.5px;
  margin-top: 3px;
}

/* ----------------------------------------------------------------- sheet */

.sheet {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(6, 8, 12, 0.62);
  display: flex;
  align-items: flex-end;
}
.sheet[hidden] {
  display: none;
}
.sheet-scrim {
  position: absolute;
  inset: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.sheet-panel {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  max-height: 82vh;
  overflow-y: auto;
  background: var(--sheet);
  border-top: 1px solid var(--border-input);
  border-radius: 24px 24px 0 0;
  padding: 14px var(--pad) calc(30px + env(safe-area-inset-bottom));
}
.sheet-grab {
  width: 40px;
  height: 4px;
  border-radius: 999px;
  background: #39414f;
  margin: 0 auto 14px;
}
.sheet-head {
  display: flex;
  align-items: flex-start;
  gap: 11px;
}
.sheet-head .stripe {
  height: 40px;
}
.sheet-title {
  display: flex;
  align-items: baseline;
  gap: 7px;
}
.sheet-title b {
  font-size: 18px;
  font-weight: 600;
}
.sheet-title span {
  font-size: 11.5px;
  color: var(--muted);
}
.sheet-verdict {
  font-size: 12.5px;
  font-weight: 600;
  margin-top: 4px;
}

.subhead {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  margin: 18px 0 9px;
}
.subhead:first-child {
  margin-top: 0;
}

.reasons {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.reason {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 11px 12px;
  font-size: 12.5px;
  line-height: 1.85;
  color: var(--text-2);
}
.reason i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-top: 7px;
  flex: none;
  background: var(--gray);
}
.reason.good i {
  background: var(--green);
}

.boxrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 12px;
  font-size: 12.5px;
  color: var(--muted);
}
.boxrow b {
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------- alerts */

.alert-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-inline-start: 3px solid var(--gray);
  border-radius: var(--r-md);
  padding: 13px 14px;
  margin-bottom: 10px;
}
.alert-card.bullish {
  border-inline-start-color: var(--green);
}
.alert-card.bearish {
  border-inline-start-color: var(--red);
}
.alert-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.alert-asset {
  font-size: 12px;
  font-weight: 700;
  color: var(--gray);
}
.alert-card.bullish .alert-asset {
  color: var(--green);
}
.alert-card.bearish .alert-asset {
  color: var(--red);
}
.alert-tone,
.alert-time {
  font-size: 11px;
  color: var(--muted);
}
.alert-time {
  margin-inline-start: auto;
}
.alert-body {
  font-size: 13.5px;
  line-height: 1.85;
  margin-top: 7px;
}
.alert-rec {
  margin-top: 10px;
  padding: 9px 11px;
  border-radius: var(--r-input);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.7;
  background: var(--surface);
  border: 1px solid var(--border);
}
.levels {
  display: flex;
  gap: 6px;
  margin-top: 9px;
  flex-wrap: wrap;
  font-size: 11.5px;
  font-weight: 600;
}
.levels span {
  padding: 4px 9px;
  border-radius: 7px;
  border: 1px solid var(--border-input);
}
.levels .lvl-stop {
  color: var(--red);
}
.levels .lvl-target {
  color: var(--green);
}
.disclose {
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.disclose-body {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  line-height: 1.9;
  color: var(--muted);
}
.disclose-body a {
  display: inline-block;
  margin-top: 4px;
}

/* Outcome mark: ✓ / ✕ on a filled circle. */
.mark {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--bg);
  background: var(--gray);
  flex: none;
}
.mark.ok {
  background: var(--green);
}
.mark.bad {
  background: var(--red);
}

/* ------------------------------------------------------------ stat grid */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
  margin-bottom: 14px;
}
.stat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px 12px;
  text-align: center;
}
.stat-value {
  font-size: 23px;
  font-weight: 700;
  line-height: 1.3;
}
.stat-label {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.6;
}

/* A strategy/symbol row with its share drawn as a bar. */
.bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 13px;
}
.bar {
  width: 74px;
  height: 5px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
  flex: none;
}
.bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--gray);
}
.bar-value {
  font-size: 12.5px;
  font-weight: 600;
  width: 58px;
  text-align: start;
  flex: none;
}

/* ----------------------------------------------------------------- chart */

.chart {
  width: 100%;
  height: 110px;
  margin-top: 12px;
  display: block;
  color: var(--green);
}
.chart.down {
  color: var(--red);
}
.chart .area {
  fill: currentColor;
  opacity: 0.12;
}
.chart .line {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.chart-axis {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
  color: var(--muted);
}
.chart-note {
  font-size: 10.5px;
  color: var(--muted);
  text-align: center;
  margin-top: 2px;
}

/* --------------------------------------------------------------- buttons */

.btn {
  display: block;
  width: 100%;
  border: 0;
  border-radius: var(--r-seg);
  padding: 12px;
  font-size: 13.5px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  background: var(--amber);
  color: var(--amber-ink);
}
.btn:disabled {
  opacity: 0.6;
  cursor: default;
}
.btn.ghost {
  background: transparent;
  border: 1px solid var(--border-input);
  color: var(--text-2);
}
.btn.danger {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--red);
  font-weight: 500;
}
.btn.sm {
  padding: 9px 12px;
  font-size: 12.5px;
  width: auto;
}
.btn-row {
  display: flex;
  gap: 9px;
  margin-top: 16px;
}
/* `.btn` is width:100% for the stacked case; inside a row the flex basis
   has to win instead, or the secondary button claims the whole line and
   squeezes the primary one into a four-line column. */
.btn-row .btn {
  flex: 1;
  width: auto;
}
.btn-row .btn.ghost {
  flex: none;
  width: auto;
  padding-inline: 18px;
}

/* A small bordered action inside a list row. */
.mini-btn {
  font-size: 11.5px;
  color: var(--muted);
  background: none;
  border: 1px solid var(--border-input);
  border-radius: 8px;
  padding: 5px 10px;
  cursor: pointer;
  flex: none;
}
.mini-btn:disabled {
  opacity: 0.55;
  cursor: default;
}

.back-link {
  background: none;
  border: 0;
  padding: 0;
  font-size: 12.5px;
  color: var(--amber);
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 12px;
}

/* ---------------------------------------------------------------- inputs */

.field {
  display: block;
  margin-bottom: 12px;
}
.field > span {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
  margin-bottom: 6px;
}
.input {
  display: block;
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border-input);
  border-radius: var(--r-input);
  padding: 11px 12px;
  font-size: 13px;
  color: var(--text);
}
.input::placeholder {
  color: var(--dim);
}
.input:focus {
  outline: none;
  border-color: var(--amber);
}
.field-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.field-row .input {
  flex: 1;
}
.field-row .mini-btn {
  white-space: nowrap;
  padding-inline: 12px;
}

.checkline {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 14px 0;
  font-size: 13px;
  cursor: pointer;
}
.checkline input {
  width: 19px;
  height: 19px;
  accent-color: var(--amber);
  margin: 0;
}

/* iOS-style switch. `justify-content` does the travel so there is nothing
   to keep in sync when the track size changes. */
.switch {
  width: 46px;
  height: 27px;
  border-radius: 999px;
  padding: 3px;
  border: 0;
  cursor: pointer;
  display: flex;
  justify-content: flex-end;
  background: #39414f;
  flex: none;
}
.switch i {
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: #fff;
  display: block;
}
.switch[aria-checked='true'] {
  background: var(--amber);
  justify-content: flex-start;
}
.switch:disabled {
  opacity: 0.5;
  cursor: default;
}

/* ------------------------------------------------------------------ misc */

.note {
  font-size: 12.5px;
  line-height: 2;
  color: var(--muted);
  margin: 0 0 14px;
}
.note.center {
  text-align: center;
}
.note code {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 11.5px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 5px;
  direction: ltr;
  display: inline-block;
}
.note strong {
  color: var(--text-2);
}

.empty {
  font-size: 12.5px;
  line-height: 1.9;
  color: var(--muted);
  text-align: center;
  padding: 18px 14px;
}

.section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin: 18px 0 10px;
}

.error-box {
  background: rgba(255, 107, 98, 0.08);
  border: 1px solid rgba(255, 107, 98, 0.35);
  color: var(--red);
  border-radius: var(--r-input);
  padding: 10px 12px;
  font-size: 12.5px;
  line-height: 1.8;
  margin-bottom: 12px;
}

.password-note {
  margin-top: 10px;
  background: var(--surface);
  border: 1px solid var(--amber);
  border-radius: var(--r-input);
  padding: 10px 12px;
  font-size: 12.5px;
  line-height: 1.9;
  color: var(--amber);
  word-break: break-all;
}

/* The empty-state card on the Wallex tab: one circle, one sentence. */
.stateful {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px;
  text-align: center;
  margin-bottom: 12px;
}
.stateful-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--amber);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.stateful-icon i {
  width: 3px;
  height: 16px;
  background: var(--amber);
  border-radius: 2px;
}
.stateful-icon.off {
  border-color: var(--gray);
}
.stateful-icon.off i {
  background: var(--gray);
}
.stateful h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 12px 0 0;
}
.stateful p {
  font-size: 12.5px;
  line-height: 2;
  color: var(--muted);
  margin: 8px 0 0;
}

/* The risk brake, when it is on. Loud on purpose — nothing new opens. */
.brake {
  background: rgba(255, 107, 98, 0.09);
  border: 1px solid rgba(255, 107, 98, 0.4);
  border-radius: var(--r-md);
  padding: 13px 14px;
  margin-bottom: 12px;
}
.brake b {
  display: block;
  font-size: 13.5px;
  color: var(--red);
}
.brake span {
  display: block;
  font-size: 12px;
  line-height: 1.9;
  color: var(--text-2);
  margin-top: 4px;
}

/* ----------------------------------------------------------------- login */

.login-wrap {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
  max-width: 480px;
  margin: 0 auto;
}
.login-card {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px 20px;
}
.login-mark {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--amber-soft);
  border: 1px solid var(--amber);
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-mark i {
  width: 4px;
  height: 20px;
  background: var(--amber);
  border-radius: 2px;
}
.login-title {
  font-size: 19px;
  font-weight: 700;
  text-align: center;
  margin: 0 0 6px;
}
