﻿/* VAULT LOGS — smoked-glass archive. Tokens first, components after. */

@font-face {
  font-family: 'Minecraftia';
  src: url('/fonts/minecraftia.ttf') format('truetype');
  font-display: swap;
}

:root {
  --ink: #0f141b;
  --ink-2: #141c27;
  --panel: rgba(232, 237, 245, 0.055);
  --panel-2: rgba(232, 237, 245, 0.09);
  --stroke: rgba(232, 237, 245, 0.12);
  --stroke-2: rgba(232, 237, 245, 0.22);
  --text: #e8edf5;
  --muted: #8b98ab;
  --verdigris: #6fa79b;
  --verdigris-soft: rgba(111, 167, 155, 0.16);
  --amber: #c9975b;
  --brick: #b25a62;
  --brick-soft: rgba(178, 90, 98, 0.16);
  --baby-blue: #89cff0;
  --display: "Archivo", system-ui, sans-serif;
  --ui: "Public Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --num: "Minecraftia", "IBM Plex Mono", ui-monospace, monospace;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.42);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

[hidden] { display: none !important; }

html { background: var(--ink); -webkit-text-size-adjust: 100%; overflow-x: hidden; }

body {
  font-family: var(--ui);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background-color: var(--ink);
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(120% 60% at 50% -10%, rgba(111, 167, 155, 0.10), transparent 60%),
    radial-gradient(90% 50% at 100% 110%, rgba(201, 151, 91, 0.07), transparent 55%),
    linear-gradient(180deg, var(--ink-2), var(--ink) 30%);
  background-size: cover;
  background-position: center;
}

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; touch-action: manipulation; }
button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 2px solid var(--verdigris);
  outline-offset: 2px;
  border-radius: 8px;
}
a { color: var(--verdigris); text-decoration: none; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ---------- shell ---------- */
.app {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 0 clamp(14px, 4vw, 22px) calc(118px + env(safe-area-inset-bottom));
  min-height: 100dvh;
}

.vault-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(18px + env(safe-area-inset-top)) 2px 18px;
  position: sticky;
  top: 0;
  z-index: 20;
  background: linear-gradient(180deg, rgba(15, 20, 27, 0.92) 60%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.wordmark {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(15px, 4.2vw, 17px);
  letter-spacing: 0.14em;
  white-space: nowrap;
}
.wordmark-main { color: var(--baby-blue); }
.wordmark-thin { font-weight: 600; color: var(--muted); }

.balance-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 52vw;
  padding: 9px 14px;
  border-radius: 999px;
  background: var(--panel-2);
  border: 1px solid var(--stroke);
  font-size: 13px;
  transition: transform 0.15s var(--ease), border-color 0.15s;
}
.balance-chip .mono { color: var(--amber); font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.num {
  font-family: var(--num);
  white-space: nowrap;
  line-height: 1;
  position: relative;
  top: 0.715em;
}
.price-run {
  display: inline-flex;
  align-items: baseline;
  gap: 0.3em;
  line-height: 1;
}
.price-cur { line-height: 1; }
#header-balance { white-space: nowrap; }
.balance-chip:hover { border-color: var(--stroke-2); }

/* ---------- rail (desktop) ---------- */
.rail { display: none; }

.rail-brand {
  font-family: var(--display);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: 0.14em;
  padding: 6px 12px 26px;
}
.rail-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
  transition: color 0.18s, background 0.18s;
}
.rail-item.is-active { color: var(--text); background: var(--verdigris-soft); }
.rail-item.is-active .ico { color: var(--verdigris); }
.rail-foot {
  margin-top: auto;
  padding: 16px 12px 6px;
  border-top: 1px solid var(--stroke);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.rail-foot .mono { color: var(--amber); font-size: 18px; font-weight: 500; }

/* ---------- dock ---------- */
.dock {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(14px + env(safe-area-inset-bottom));
  display: flex;
  gap: 4px;
  width: min(420px, calc(100vw - 24px));
  padding: 6px;
  border-radius: 22px;
  background: rgba(20, 28, 39, 0.72);
  border: 1px solid var(--stroke);
  backdrop-filter: blur(26px) saturate(1.4);
  -webkit-backdrop-filter: blur(26px) saturate(1.4);
  box-shadow: var(--shadow);
  z-index: 30;
}

.dock-item {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 9px 6px 8px;
  border-radius: 16px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  transition: color 0.18s, background 0.18s;
}
.dock-item.is-active {
  color: var(--text);
  background: var(--verdigris-soft);
}
.dock-item.is-active .ico { color: var(--verdigris); }

.ico {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ico-sm { width: 16px; height: 16px; }

/* ---------- pages ---------- */
.page { padding: 6px 0 8px; }
.page[hidden] { display: none; }
.page.is-entering { animation: page-in 0.22s var(--ease) both; }

@keyframes page-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.eyebrow {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 26px 2px 12px;
}
.eyebrow::after { content: ""; flex: 1; height: 1px; background: var(--stroke); }

.section-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 26px 2px 12px;
}
.section-head .eyebrow { flex: 1; margin: 0; }

.eyebrow-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-family: var(--ui);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
  padding: 4px 2px;
  transition: color 0.16s;
}
.eyebrow-toggle:hover { color: var(--text); }
.eyebrow-toggle .ico { transition: transform 0.22s var(--ease); }

.senders-wrap.is-collapsed .chip-cloud { display: none; }
.senders-wrap.is-collapsed .eyebrow-toggle .ico { transform: rotate(-90deg); }

.page-title {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(23px, 6.5vw, 27px);
  letter-spacing: -0.02em;
  margin: 4px 2px 2px;
}
.page-sub { color: var(--muted); margin: 0 2px 8px; font-size: 13.5px; }

/* ---------- cards & stats ---------- */
.card {
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 16px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.dash-grid, .logs-grid, .wallet-grid { display: grid; gap: 0; }
.dash-col, .logs-col { min-width: 0; }
.wallet-hero-wrap, .wallet-moves, .wallet-referral { min-width: 0; }

.stat-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stat {
  min-width: 0;
  padding: 13px 10px;
  border-radius: var(--radius-sm);
  background: var(--panel);
  border: 1px solid var(--stroke);
}
.stat-value {
  font-family: var(--mono);
  font-size: clamp(14px, 4.4vw, 21px);
  font-weight: 500;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}
.stat-label {
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.stat.is-accent .stat-value { color: var(--amber); }

/* ---------- sender chips (hero) ---------- */
.chip-cloud { display: flex; flex-wrap: wrap; gap: 8px; }

.chip {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 9px 13px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: var(--panel);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text);
  transition: border-color 0.16s, background 0.16s, transform 0.12s;
}
.chip:hover { border-color: var(--verdigris); background: var(--verdigris-soft); }
.chip:active { transform: scale(0.97); }
.chip.is-selected { border-color: var(--verdigris); background: var(--verdigris-soft); }
.chip-count { color: var(--amber); font-weight: 500; font-family: var(--num); }
.chip-cloud .chip { animation: chip-in 0.24s var(--ease) both; }

@keyframes chip-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* ---------- search strip ---------- */
.search-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 15px;
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  border: 1px solid var(--stroke);
}
.search-strip .ico { color: var(--muted); flex-shrink: 0; }
.search-input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 14px;
}
.search-input::placeholder { color: var(--muted); }
.search-input:focus { outline: none; }
.search-go {
  flex-shrink: 0;
  padding: 7px 13px;
  border-radius: 999px;
  background: var(--verdigris-soft);
  color: var(--verdigris);
  font-size: 12.5px;
  font-weight: 600;
}

.search-clear {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  color: var(--muted);
  transition: color 0.16s, background 0.16s;
}
.search-clear:hover { color: var(--text); background: var(--panel-2); }

/* ---------- account cards + redaction ---------- */
.account-list { display: flex; flex-direction: column; gap: 10px; }

.account {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 15px 16px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--stroke);
  text-align: left;
  width: 100%;
  transition: border-color 0.16s, transform 0.12s;
}
.account:hover { border-color: var(--stroke-2); }
.account.is-selected { border-color: var(--verdigris); background: var(--verdigris-soft); }

.account-main {
  display: flex;
  align-items: center;
  gap: 13px;
  flex: 1;
  min-width: 0;
  text-align: left;
  transition: transform 0.12s var(--ease);
}
.account-main:active { transform: scale(0.99); }

.select-dot {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1.5px solid var(--stroke-2);
  color: transparent;
  transition: background 0.16s, border-color 0.16s, color 0.16s;
}
.select-dot.is-on {
  background: var(--verdigris);
  border-color: var(--verdigris);
  color: #0c1512;
}

.batch-bar {
  position: fixed;
  left: 12px;
  right: 12px;
  margin: 0 auto;
  max-width: 520px;
  bottom: calc(108px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 9px 10px 9px 14px;
  border-radius: 16px;
  background: rgba(23, 34, 49, 0.94);
  border: 1px solid var(--stroke-2);
  backdrop-filter: blur(26px) saturate(1.4);
  -webkit-backdrop-filter: blur(26px) saturate(1.4);
  box-shadow: var(--shadow);
  z-index: 28;
  animation: batch-in 0.25s var(--ease) both;
}
@keyframes batch-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.batch-summary {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  flex: 1;
}
.batch-count {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.batch-total {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--amber);
  white-space: nowrap;
}
.batch-dismiss {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  color: var(--muted);
  transition: color 0.16s, background 0.16s;
}
.batch-dismiss:hover { color: var(--text); background: var(--panel-2); }

.batch-buy {
  flex-shrink: 0;
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 600;
  background: var(--verdigris);
  color: #0c1512;
  white-space: nowrap;
  transition: transform 0.12s var(--ease), background 0.16s;
}
.batch-buy:hover { background: #7fb4a8; }
.batch-buy:active { transform: scale(0.98); }

.account-list.has-batch { padding-bottom: 60px; }

.account-identity { flex: 1; min-width: 0; }
.account-mail {
  font-family: var(--mono);
  font-size: 13.5px;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.account-meta { margin-top: 3px; font-size: 11.5px; color: var(--muted); }

.redact-bar {
  display: inline-block;
  vertical-align: middle;
  height: 11px;
  border-radius: 3px;
  background: repeating-linear-gradient(
    -45deg,
    var(--stroke-2) 0 3px,
    var(--stroke) 3px 6px
  );
  margin: 0 2px;
  position: relative;
  top: -1px;
}
.redact-bar.is-wide { width: 72px; }
.redact-bar.is-mid { width: 46px; }

.reveal-line {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  vertical-align: bottom;
}
.reveal-line.is-hidden { max-width: 0; }
.reveal-line.is-open { max-width: 280px; transition: max-width 0.55s var(--ease); }

.price-tag {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--amber);
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 18px;
  border-radius: 14px;
  font-weight: 600;
  font-size: 14px;
  transition: transform 0.12s var(--ease), background 0.16s, border-color 0.16s, opacity 0.16s;
  border: 1px solid transparent;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--verdigris); color: #0c1512; }
.btn-primary:hover { background: #7fb4a8; }
.btn-ghost { background: var(--panel-2); border-color: var(--stroke); color: var(--text); }
.btn-ghost:hover { border-color: var(--stroke-2); }
.btn-danger { background: var(--brick-soft); border-color: rgba(178, 90, 98, 0.4); color: #e5a4aa; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.5; pointer-events: none; }

/* ---------- ledger rows ---------- */
.ledger { display: flex; flex-direction: column; }
.ledger-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 2px;
  border-bottom: 1px solid var(--stroke);
  width: 100%;
  text-align: left;
  min-width: 0;
}
.ledger-row:last-child { border-bottom: 0; }
.ledger-row > * { min-width: 0; }
.ledger-main { flex: 1; min-width: 0; }
.ledger-title { font-size: 13.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ledger-sub { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ledger-amount { font-family: var(--mono); font-size: 13px; font-weight: 500; flex-shrink: 0; }
.ledger-amount.is-negative { color: var(--text); }
.ledger-amount.is-positive { color: var(--verdigris); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  flex-shrink: 0;
}
.pill-short { display: none; }

.sheet-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}
.pill-wait { background: var(--panel-2); color: var(--muted); }
.pill-done { background: var(--verdigris-soft); color: var(--verdigris); }
.pill-fail { background: var(--brick-soft); color: #e5a4aa; }

/* ---------- wallet hero ---------- */
.balance-hero { padding: clamp(18px, 5vw, 22px) clamp(16px, 4vw, 20px); }
.balance-label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.balance-value {
  font-family: var(--mono);
  font-size: clamp(30px, 9.5vw, 42px);
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--amber);
  margin: 6px 0 18px;
  overflow-wrap: anywhere;
}

/* ---------- sheet ---------- */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 11, 15, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 50;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet-backdrop[hidden] { display: none; }
.sheet {
  width: min(680px, 100%);
  max-height: 88dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #172231;
  border: 1px solid var(--stroke-2);
  border-bottom: 0;
  border-radius: 26px 26px 0 0;
  padding: 12px clamp(16px, 5vw, 20px) calc(28px + env(safe-area-inset-bottom));
  animation: sheet-in 0.3s var(--ease) both;
}
@keyframes sheet-in {
  from { transform: translateY(40px); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.sheet-handle {
  width: 38px;
  height: 4px;
  border-radius: 2px;
  background: var(--stroke-2);
  margin: 2px auto 18px;
}
.sheet-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(17px, 5vw, 19px);
  letter-spacing: -0.01em;
  margin-bottom: 4px;
  overflow-wrap: anywhere;
}
.sheet-text { color: var(--muted); font-size: 13px; margin-bottom: 16px; overflow-wrap: anywhere; }
.sheet-list { max-height: 52vh; overflow-y: auto; margin: 12px 0; display: flex; flex-direction: column; gap: 8px; }
.sheet-list .toggle-row { padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.sheet-actions { display: flex; flex-direction: column; gap: 9px; margin-top: 18px; }

.credential {
  border: 1px solid var(--stroke);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin: 12px 0;
}
.credential-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--stroke);
  font-family: var(--mono);
  font-size: 12.5px;
  overflow-wrap: anywhere;
}
.credential-line:last-child { border-bottom: 0; }
.credential-key { color: var(--muted); }

.pix-code {
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.6;
  word-break: break-all;
  padding: 13px 14px;
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  border: 1px solid var(--stroke);
  margin: 12px 0;
}

/* ---------- qr + scan ---------- */
.qr-frame {
  display: flex;
  justify-content: center;
  padding: 18px;
  margin: 14px 0 4px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--stroke);
  animation: qr-in 0.4s var(--ease) both;
}
.qr-img {
  width: min(224px, 62vw);
  height: auto;
  border-radius: 12px;
  display: block;
}
@keyframes qr-in {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: none; }
}

.scan-visual {
  width: 156px;
  height: 156px;
  margin: 22px auto 10px;
  padding: 15px;
  border-radius: 20px;
  background: var(--panel-2);
  border: 1px solid var(--stroke);
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 7px;
  position: relative;
  overflow: hidden;
}
.scan-cell {
  border-radius: 4px;
  background: var(--stroke);
  animation: cell-pulse 1.7s ease-in-out infinite;
}
.scan-cell:nth-child(3n) { animation-delay: 0.25s; }
.scan-cell:nth-child(3n + 1) { animation-delay: 0.55s; }
.scan-cell:nth-child(5n) { animation-delay: 0.9s; }
@keyframes cell-pulse {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 0.95; }
}
.scan-visual::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 42px;
  background: linear-gradient(180deg, transparent, rgba(111, 167, 155, 0.32), transparent);
  animation: scan-soft 1.9s ease-in-out infinite;
}
@keyframes scan-soft {
  0% { top: -42px; }
  100% { top: 100%; }
}

/* ---------- toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(96px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  padding: 11px 18px;
  border-radius: 999px;
  background: rgba(23, 34, 49, 0.95);
  border: 1px solid var(--stroke-2);
  font-size: 13px;
  z-index: 60;
  animation: toast-in 0.22s var(--ease) both;
}
.toast[hidden] { display: none; }
@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* ---------- states ---------- */
.empty {
  text-align: center;
  padding: 34px 18px;
  border: 1px dashed var(--stroke);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 13px;
}
.empty strong { display: block; color: var(--text); font-size: 14px; margin-bottom: 4px; font-weight: 600; }

.error-note {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--brick-soft);
  border: 1px solid rgba(178, 90, 98, 0.35);
  color: #e5a4aa;
  font-size: 13px;
  margin: 10px 0;
}

.skeleton {
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, var(--panel) 25%, var(--panel-2) 50%, var(--panel) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  height: 64px;
}
@keyframes shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
}
.pager-info {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
}
.pager [disabled] { opacity: 0.45; pointer-events: none; }

/* ---------- admin ---------- */
.admin-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 20px;
}

.field-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}
.field-label {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.field {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  border: 1px solid var(--stroke);
  color: var(--text);
  font: inherit;
  font-size: 14px;
}
.field:focus { outline: 2px solid var(--verdigris); outline-offset: 1px; }
.field-area { min-height: 104px; resize: vertical; line-height: 1.5; }

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 2px;
  border-bottom: 1px solid var(--stroke);
}
.toggle-row:last-child { border-bottom: 0; }
.toggle-label { min-width: 0; }
.toggle-title { font-size: 13.5px; font-weight: 500; }
.toggle-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

.toggle-btn {
  flex-shrink: 0;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--panel-2);
  border: 1px solid var(--stroke);
  color: var(--muted);
  transition: background 0.16s, color 0.16s;
}
.toggle-btn.is-on {
  background: var(--verdigris-soft);
  border-color: transparent;
  color: var(--verdigris);
}

.file-pick {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 14px;
  background: var(--panel-2);
  border: 1px solid var(--stroke);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}
.file-pick input { display: none; }

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.btn-mini {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  background: var(--panel-2);
  border: 1px solid var(--stroke);
}
.btn-mini.is-primary { background: var(--verdigris); border-color: transparent; color: #0c1512; }
.btn-mini.is-danger { background: var(--brick-soft); border-color: rgba(178, 90, 98, 0.4); color: #e5a4aa; }

/* ---------- responsive / a11y ---------- */
@media (min-width: 900px) {
  .batch-bar {
    left: calc(248px + 12px);
    right: 12px;
    bottom: 28px;
  }
}

@media (min-width: 900px) {
  .rail {
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 248px;
    padding: 30px 18px 22px;
    border-right: 1px solid var(--stroke);
    background: rgba(20, 28, 39, 0.5);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    z-index: 40;
  }
  .vault-header { display: none; }
  .dock { display: none; }
  body { padding-left: 248px; }

  .app {
    max-width: 1060px;
    padding: 34px clamp(22px, 4vw, 40px) 72px;
  }

  .dash-grid,
  .logs-grid {
    grid-template-columns: minmax(300px, 360px) 1fr;
    column-gap: 26px;
    align-items: start;
  }
  .dash-side,
  .logs-col-side {
    position: sticky;
    top: 34px;
  }
  .wallet-grid {
    grid-template-columns: minmax(340px, 420px) 1fr;
    column-gap: 26px;
    align-items: start;
  }
  .wallet-hero-wrap { grid-column: 1; grid-row: 1; }
  .wallet-moves { grid-column: 2; grid-row: 1 / span 2; }
  .wallet-referral { grid-column: 1; grid-row: 2; margin-top: 22px; }

  .sheet-backdrop { align-items: center; padding: 24px; }
  .sheet {
    max-width: 520px;
    border-radius: 26px;
    border-bottom: 1px solid var(--stroke-2);
  }
  .sheet-handle { display: none; }

  .page-title { font-size: 34px; }
  .stat-value { font-size: 22px; }
  .balance-value { font-size: 42px; }
}

@media (max-width: 400px) {
  .stat-row { gap: 6px; }
  .stat { padding: 11px 8px; }
  .balance-chip { padding: 8px 11px; font-size: 12px; }
  .account { padding: 13px 12px; gap: 10px; }
  .chip { padding: 8px 11px; font-size: 11.5px; }
  .pill { padding: 3px 8px; letter-spacing: 0.03em; font-size: 10px; }
  .ledger-sub { white-space: normal; }
  .pix-code { font-size: 10px; padding: 11px 12px; }
  .credential-line { flex-wrap: wrap; row-gap: 3px; }
  .sheet { padding-inline: 14px; }
  .batch-bar { padding: 8px 8px 8px 12px; gap: 8px; }
  .batch-buy { padding: 9px 12px; font-size: 12.5px; }
  .batch-total { font-size: 14px; }
  .batch-count { font-size: 10px; }
}

@media (max-width: 430px) {
  .pill-full { display: none; }
  .pill-short { display: inline; }
}

@media (max-width: 380px) {
  .ledger-row {
    flex-wrap: wrap;
    row-gap: 8px;
    column-gap: 10px;
  }
  .ledger-main { flex: 1 1 100%; }
  .ledger-amount { margin-left: auto; }
  .ledger-row > .ico { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
