/* ============================================================ tokens */
:root {
  --bg: #f2f3f8;
  --card: #ffffff;
  --card-2: #f6f7fb;
  --field: #f1f2f7;
  --text: #0f1222;
  --muted: #6b7185;
  --faint: #a3a8b8;
  --border: rgba(15, 18, 34, 0.07);
  --shadow: 0 1px 2px rgba(15, 18, 34, 0.04), 0 8px 24px rgba(15, 18, 34, 0.06);
  --shadow-lg: 0 20px 60px rgba(15, 18, 34, 0.18);

  --accent: #5b5bf6;
  --accent-2: #8b5cf6;
  --accent-soft: rgba(91, 91, 246, 0.1);
  --grad: linear-gradient(135deg, #5b5bf6 0%, #8b5cf6 100%);
  --green: #16a34a;
  --green-soft: rgba(22, 163, 74, 0.11);
  --red: #e5484d;
  --red-soft: rgba(229, 72, 77, 0.1);
  --amber: #d97706;
  --amber-soft: rgba(245, 158, 11, 0.13);
  --gray-soft: rgba(107, 113, 133, 0.12);

  --radius: 20px;
  --radius-sm: 14px;
  --tabbar-h: 68px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0b0c12;
  --card: #15171f;
  --card-2: #1b1e28;
  --field: #1e212c;
  --text: #f2f3f7;
  --muted: #8e94a8;
  --faint: #5d6377;
  --border: rgba(255, 255, 255, 0.06);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.6);
  --accent: #7b7bff;
  --accent-soft: rgba(123, 123, 255, 0.14);
  --green: #3ddc84;
  --green-soft: rgba(61, 220, 132, 0.12);
  --red: #ff6b6f;
  --red-soft: rgba(255, 107, 111, 0.12);
  --amber: #fbbf24;
  --amber-soft: rgba(251, 191, 36, 0.12);
  --gray-soft: rgba(142, 148, 168, 0.14);
  color-scheme: dark;
}

/* ============================================================ base */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
  min-height: 100vh;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: var(--accent); text-decoration: none; }
svg { display: block; flex-shrink: 0; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.mono { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.num { font-variant-numeric: tabular-nums; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stack > * + * { margin-top: 12px; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }

#app { max-width: 640px; margin: 0 auto; min-height: 100vh; }
.view {
  padding: 8px 16px calc(var(--tabbar-h) + var(--safe-b) + 28px);
  animation: viewIn 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.view.no-tabbar { padding-bottom: calc(var(--safe-b) + 28px); }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ============================================================ header */
.page-head { display: flex; align-items: center; gap: 12px; padding: 14px 2px 16px; }
.page-head h1 { font-size: 28px; line-height: 1.15; font-weight: 750; letter-spacing: -0.02em; margin: 0; }
.page-head .sub { color: var(--muted); font-size: 14px; margin-top: 3px; }
.head-btn {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--card); box-shadow: var(--shadow); color: var(--text);
  transition: transform 0.15s;
}
.head-btn:active { transform: scale(0.92); }
.head-btn.accent { background: var(--grad); color: #fff; }
.avatar {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; flex-shrink: 0;
  background: var(--grad); color: #fff; font-weight: 700; font-size: 15px;
  letter-spacing: 0.02em;
}
.avatar.sm { width: 36px; height: 36px; font-size: 13px; }
.avatar.lg { width: 64px; height: 64px; font-size: 22px; }
.avatar.soft { background: var(--accent-soft); color: var(--accent); }

.section-title {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--muted); margin: 26px 4px 10px;
}
.section-title a, .section-title button { text-transform: none; letter-spacing: 0; font-size: 14px; font-weight: 600; color: var(--accent); }

/* ============================================================ cards */
.card {
  background: var(--card); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow);
}
.card + .card { margin-top: 12px; }
.card.flat { box-shadow: none; background: var(--card-2); }
.card.tap { transition: transform 0.15s; }
.card.tap:active { transform: scale(0.985); }
.card-title { font-size: 15px; font-weight: 650; margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }

.hero {
  position: relative; overflow: hidden;
  background: var(--grad); color: #fff;
  border-radius: 24px; padding: 20px;
  box-shadow: 0 14px 36px rgba(91, 91, 246, 0.35);
}
.hero::after {
  content: ""; position: absolute; right: -40px; top: -40px;
  width: 180px; height: 180px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.25), transparent 70%);
}
.hero .hero-label { opacity: 0.85; font-size: 14px; font-weight: 500; }
.hero .hero-value { font-size: 40px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; margin: 6px 0 2px; }
.hero .hero-btn {
  margin-top: 16px; background: rgba(255,255,255,0.2); color: #fff;
  border-radius: 14px; padding: 12px 16px; font-weight: 650;
  display: inline-flex; align-items: center; gap: 8px;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.hero-cta { display: flex; align-items: center; gap: 16px; cursor: pointer; }
.hero-cta .hero-icon {
  width: 56px; height: 56px; border-radius: 18px;
  background: rgba(255,255,255,0.2); display: grid; place-items: center;
}
.hero-cta h3 { margin: 0; font-size: 19px; font-weight: 750; }
.hero-cta p { margin: 3px 0 0; opacity: 0.85; font-size: 14px; }

/* KPI */
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.kpis.three { grid-template-columns: repeat(3, 1fr); }
.kpi { background: var(--card); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); min-width: 0; }
.kpi .kpi-label { color: var(--muted); font-size: 13px; font-weight: 550; display: flex; align-items: center; gap: 6px; }
.kpi .kpi-value { font-size: 26px; font-weight: 780; letter-spacing: -0.02em; margin-top: 6px; line-height: 1.1; }
.kpi .kpi-sub { font-size: 13px; color: var(--muted); margin-top: 3px; font-weight: 550; }
.kpi.wide { grid-column: 1 / -1; }
.kpi .dot { width: 8px; height: 8px; border-radius: 50%; }
.kpi.green .kpi-value { color: var(--green); }
.kpi.red .kpi-value { color: var(--red); }
.kpi.amber .kpi-value { color: var(--amber); }
.pct {
  display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 7px; border-radius: 99px; margin-left: 6px;
  vertical-align: middle; letter-spacing: 0;
}
.pct.green { background: var(--green-soft); color: var(--green); }
.pct.red { background: var(--red-soft); color: var(--red); }

.money-rows .money-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.money-rows .money-row + .money-row { border-top: 1px solid var(--border); }
.cur-badge {
  width: 44px; height: 32px; border-radius: 10px; display: grid; place-items: center;
  font-size: 12px; font-weight: 800; letter-spacing: 0.04em; flex-shrink: 0;
}
.cur-USD { background: rgba(22, 163, 74, 0.12); color: var(--green); }
.cur-KZT { background: rgba(14, 165, 233, 0.13); color: #0ea5e9; }
.cur-KGS { background: rgba(245, 158, 11, 0.14); color: var(--amber); }
.money-row .amount { font-size: 18px; font-weight: 720; margin-left: auto; }

.big-number { font-size: 34px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.big-number small { font-size: 18px; font-weight: 700; color: var(--muted); margin-left: 4px; }

/* ============================================================ lists */
.list { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; position: relative; width: 100%; text-align: left;
  transition: background 0.15s;
}
.item + .item::before {
  content: ""; position: absolute; top: 0; right: 0; left: 64px; border-top: 1px solid var(--border);
}
.item.tap:active { background: var(--card-2); }
.item .title { font-weight: 620; font-size: 15px; }
.item .subtitle { color: var(--muted); font-size: 13px; margin-top: 2px; }
.item .meta { text-align: right; flex-shrink: 0; }
.item .meta .amount { font-weight: 700; font-size: 15px; }
.item .meta .time { color: var(--faint); font-size: 12px; margin-top: 3px; }
.item .chev { color: var(--faint); }
.thumb {
  width: 48px; height: 48px; border-radius: 12px; flex-shrink: 0;
  background: var(--field) center/cover no-repeat; position: relative; overflow: hidden;
}
.thumb .count {
  position: absolute; right: 3px; bottom: 3px; background: rgba(0,0,0,0.6); color: #fff;
  font-size: 10px; font-weight: 700; border-radius: 6px; padding: 1px 5px;
}
.icon-tile {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0;
  background: var(--accent-soft); color: var(--accent);
}
.icon-tile.green { background: var(--green-soft); color: var(--green); }
.icon-tile.red { background: var(--red-soft); color: var(--red); }
.icon-tile.amber { background: var(--amber-soft); color: var(--amber); }
.icon-tile.gray { background: var(--gray-soft); color: var(--muted); }

.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tiles.two { grid-template-columns: 1fr 1fr; }
.tile {
  background: var(--card); border-radius: 18px; padding: 14px 12px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  font-weight: 620; font-size: 14px; text-align: left; position: relative;
  transition: transform 0.15s;
}
.tile:active { transform: scale(0.96); }
.tile .badge-count { position: absolute; top: 10px; right: 10px; }

/* ============================================================ badges */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 99px; white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.pending { background: var(--amber-soft); color: var(--amber); }
.badge.approved, .badge.active { background: var(--green-soft); color: var(--green); }
.badge.rejected, .badge.blocked { background: var(--red-soft); color: var(--red); }
.badge.cancelled { background: var(--gray-soft); color: var(--muted); }
.badge.plain::before { display: none; }
.badge-count {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
  background: var(--red); color: #fff; font-size: 12px; font-weight: 750;
  display: inline-grid; place-items: center;
}

/* ============================================================ chips / segmented */
.chips {
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  margin: 0 -16px; padding: 2px 16px 4px;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0; padding: 8px 14px; border-radius: 99px;
  background: var(--card); box-shadow: var(--shadow); font-size: 14px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px; color: var(--text);
  transition: background 0.2s, color 0.2s, transform 0.15s;
}
.chip:active { transform: scale(0.95); }
.chip .n { font-size: 12px; color: var(--muted); font-weight: 700; }
.chip.active { background: var(--text); color: var(--bg); }
.chip.active .n { color: inherit; opacity: 0.7; }

.seg { display: flex; background: var(--field); border-radius: 12px; padding: 3px; gap: 2px; }
.seg button {
  flex: 1; padding: 8px 10px; border-radius: 10px; font-size: 14px; font-weight: 650; color: var(--muted);
  transition: background 0.2s, color 0.2s;
}
.seg button.active { background: var(--card); color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,0.08); }
.seg.lg button { padding: 12px 10px; font-size: 16px; }

/* ============================================================ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 52px; padding: 0 20px; border-radius: 16px; width: 100%;
  font-weight: 680; font-size: 16px; transition: transform 0.15s, opacity 0.2s;
  background: var(--grad); color: #fff; box-shadow: 0 8px 20px rgba(91, 91, 246, 0.28);
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; pointer-events: none; }
.btn.secondary { background: var(--accent-soft); color: var(--accent); box-shadow: none; }
.btn.ghost { background: var(--field); color: var(--text); box-shadow: none; }
.btn.success { background: var(--green); color: #fff; box-shadow: 0 8px 20px rgba(22, 163, 74, 0.25); }
.btn.danger { background: var(--red); color: #fff; box-shadow: 0 8px 20px rgba(229, 72, 77, 0.25); }
.btn.danger-soft { background: var(--red-soft); color: var(--red); box-shadow: none; }
.btn.success-soft { background: var(--green-soft); color: var(--green); box-shadow: none; }
.btn.sm { height: 40px; font-size: 14px; border-radius: 12px; padding: 0 14px; width: auto; }
.btn-row { display: flex; gap: 10px; }
.btn-row > * { flex: 1; }
.btn .spinner { width: 20px; height: 20px; border-width: 2.5px; border-color: rgba(255,255,255,0.35); border-top-color: #fff; }
.link-btn { color: var(--accent); font-weight: 620; font-size: 14px; }

/* ============================================================ forms */
.field { display: block; }
.field + .field { margin-top: 14px; }
.field > span { display: block; font-size: 13px; font-weight: 620; color: var(--muted); margin: 0 4px 6px; }
.input, .textarea, .select {
  width: 100%; border: 1.5px solid transparent; outline: none;
  background: var(--field); border-radius: 14px; padding: 14px 16px; font-size: 16px;
  transition: border-color 0.2s, background 0.2s;
}
.input:focus, .textarea:focus { border-color: var(--accent); background: var(--card); }
.textarea { min-height: 96px; resize: vertical; }
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 52px; }
.input-wrap .suffix {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  height: 40px; min-width: 40px; padding: 0 10px; border-radius: 10px;
  display: grid; place-items: center; color: var(--muted); font-weight: 650; font-size: 14px;
}
.amount-input {
  font-size: 34px; font-weight: 800; letter-spacing: -0.02em; text-align: center; padding: 16px;
}
.search { position: relative; margin-bottom: 12px; }
.search .input { padding-left: 44px; background: var(--card); box-shadow: var(--shadow); }
.search svg { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.form-error { color: var(--red); font-size: 14px; font-weight: 550; margin-top: 12px; text-align: center; min-height: 20px; }
.hint { color: var(--muted); font-size: 13px; margin: 8px 4px 0; }

.toggle-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.toggle-row + .toggle-row { border-top: 1px solid var(--border); }
.switch { position: relative; width: 50px; height: 30px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span {
  position: absolute; inset: 0; border-radius: 99px; background: var(--field); transition: background 0.2s;
  box-shadow: inset 0 0 0 1px var(--border);
}
.switch span::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,0.2); transition: transform 0.22s cubic-bezier(0.3, 1.3, 0.5, 1);
}
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::after { transform: translateX(20px); }

/* ============================================================ tabbar */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  padding: 6px 8px calc(6px + var(--safe-b));
  background: color-mix(in srgb, var(--card) 82%, transparent);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--border);
}
.tabbar-inner { max-width: 640px; margin: 0 auto; display: flex; align-items: flex-end; }
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 0 4px; color: var(--faint); font-size: 11px; font-weight: 620; position: relative;
  transition: color 0.2s;
}
.tab.active { color: var(--accent); }
.tab .tab-dot { position: absolute; top: 2px; left: calc(50% + 8px); }
.tab.fab { color: var(--muted); }
.tab.fab .fab-btn {
  width: 52px; height: 52px; border-radius: 18px; margin-top: -22px;
  background: var(--grad); color: #fff; display: grid; place-items: center;
  box-shadow: 0 10px 24px rgba(91, 91, 246, 0.45); transition: transform 0.15s;
}
.tab.fab:active .fab-btn { transform: scale(0.92); }
.tab.fab.active { color: var(--accent); }

/* ============================================================ sheet */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 100; background: rgba(8, 10, 20, 0.45);
  opacity: 0; transition: opacity 0.25s;
}
.sheet-backdrop.open { opacity: 1; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 101;
  max-width: 640px; margin: 0 auto; max-height: 92vh; display: flex; flex-direction: column;
  background: var(--bg); border-radius: 26px 26px 0 0; box-shadow: var(--shadow-lg);
  transform: translateY(100%); transition: transform 0.34s cubic-bezier(0.2, 0.9, 0.25, 1);
}
.sheet.open { transform: none; }
.sheet .grab { width: 38px; height: 5px; border-radius: 3px; background: var(--faint); opacity: 0.5; margin: 8px auto 0; flex-shrink: 0; }
.sheet .sheet-head { display: flex; align-items: center; gap: 12px; padding: 10px 18px 8px; flex-shrink: 0; }
.sheet .sheet-head h2 { margin: 0; font-size: 21px; font-weight: 760; letter-spacing: -0.02em; flex: 1; min-width: 0; }
.sheet .close {
  width: 32px; height: 32px; border-radius: 50%; background: var(--field); color: var(--muted);
  display: grid; place-items: center;
}
.sheet .sheet-body { overflow-y: auto; padding: 6px 16px calc(20px + var(--safe-b)); -webkit-overflow-scrolling: touch; }

/* ============================================================ check detail */
.gallery {
  display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  margin: 0 -16px; padding: 0 16px 4px;
}
.gallery::-webkit-scrollbar { display: none; }
.gallery img {
  height: 260px; max-width: 86%; border-radius: 18px; object-fit: cover; scroll-snap-align: center;
  background: var(--field); flex-shrink: 0; cursor: zoom-in;
}
.gallery.single img { max-width: 100%; width: 100%; object-fit: contain; background: var(--card); }
.info-list .info { display: flex; gap: 12px; padding: 11px 0; align-items: flex-start; }
.info-list .info + .info { border-top: 1px solid var(--border); }
.info-list .info .k { color: var(--muted); font-size: 14px; width: 42%; flex-shrink: 0; }
.info-list .info .v { font-weight: 600; font-size: 15px; flex: 1; min-width: 0; word-wrap: break-word; }
.result-box { border-radius: 18px; padding: 16px; text-align: center; }
.result-box.approved { background: var(--green-soft); color: var(--green); }
.result-box.rejected { background: var(--red-soft); color: var(--red); }
.result-box.cancelled { background: var(--gray-soft); color: var(--muted); }
.result-box.pending { background: var(--amber-soft); color: var(--amber); }
.result-box .label { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.result-box .value { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; margin-top: 4px; }
.result-box .reason { color: var(--text); margin-top: 6px; font-weight: 550; }

.timeline { position: relative; padding-left: 18px; }
.timeline::before { content: ""; position: absolute; left: 4px; top: 8px; bottom: 8px; width: 2px; background: var(--border); }
.timeline .ev { position: relative; padding: 6px 0; font-size: 14px; }
.timeline .ev::before {
  content: ""; position: absolute; left: -18px; top: 11px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--card); border: 2px solid var(--accent);
}
.timeline .ev.approved::before { border-color: var(--green); }
.timeline .ev.rejected::before { border-color: var(--red); }
.timeline .ev.cancelled::before { border-color: var(--faint); }
.timeline .ev .when { color: var(--faint); font-size: 12px; }

.reason-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.reason-chips button { padding: 7px 12px; border-radius: 99px; background: var(--field); font-size: 13px; font-weight: 600; }

/* lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 200; background: #000;
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  animation: fadeIn 0.2s;
}
.lightbox::-webkit-scrollbar { display: none; }
.lightbox .slide { flex: 0 0 100%; height: 100%; scroll-snap-align: center; display: grid; place-items: center; overflow: auto; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; touch-action: pinch-zoom; }
.lightbox .lb-close {
  position: fixed; top: calc(12px + env(safe-area-inset-top, 0px)); right: 12px; z-index: 2;
  width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,0.18); color: #fff;
  display: grid; place-items: center; backdrop-filter: blur(10px);
}
.lightbox .lb-count {
  position: fixed; bottom: calc(20px + var(--safe-b)); left: 50%; transform: translateX(-50%);
  color: #fff; background: rgba(255,255,255,0.18); padding: 5px 12px; border-radius: 99px; font-size: 13px; font-weight: 650;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ============================================================ send */
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.photo-grid .ph {
  aspect-ratio: 1; border-radius: 16px; background: var(--field) center/cover no-repeat; position: relative;
  animation: pop 0.25s cubic-bezier(0.3, 1.4, 0.5, 1);
}
.photo-grid .ph .rm {
  position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%;
  background: rgba(0,0,0,0.55); color: #fff; display: grid; place-items: center;
}
.photo-grid .add {
  aspect-ratio: 1; border-radius: 16px; border: 2px dashed color-mix(in srgb, var(--accent) 45%, transparent);
  background: var(--accent-soft); color: var(--accent);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  font-size: 13px; font-weight: 650;
}
.dropzone {
  border-radius: 24px; border: 2px dashed color-mix(in srgb, var(--accent) 40%, transparent);
  background: var(--card); padding: 34px 20px; text-align: center; cursor: pointer;
  transition: transform 0.15s;
}
.dropzone:active { transform: scale(0.98); }
.dropzone .dz-icon {
  width: 72px; height: 72px; margin: 0 auto 14px; border-radius: 22px; background: var(--grad); color: #fff;
  display: grid; place-items: center; box-shadow: 0 12px 28px rgba(91, 91, 246, 0.35);
}
.dropzone h3 { margin: 0; font-size: 18px; font-weight: 720; }
.dropzone p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
@keyframes pop { from { transform: scale(0.6); opacity: 0; } to { transform: none; opacity: 1; } }
.progress { height: 6px; border-radius: 3px; background: var(--field); overflow: hidden; margin-top: 12px; }
.progress > div { height: 100%; background: var(--grad); width: 0; transition: width 0.2s; }

.success-screen { text-align: center; padding: 40px 12px 10px; }
.success-screen .ok-circle {
  width: 96px; height: 96px; border-radius: 50%; margin: 0 auto 20px; background: var(--green); color: #fff;
  display: grid; place-items: center; box-shadow: 0 16px 40px rgba(22, 163, 74, 0.35);
  animation: pop 0.45s cubic-bezier(0.3, 1.5, 0.5, 1);
}
.success-screen h2 { margin: 0; font-size: 24px; font-weight: 780; }
.success-screen p { color: var(--muted); margin: 8px 0 0; }

/* ============================================================ requisites */
.req-card {
  position: relative; overflow: hidden; border-radius: 22px; padding: 18px; color: #fff;
  background: linear-gradient(135deg, #1e1b4b 0%, #4338ca 55%, #7c3aed 100%);
  box-shadow: 0 14px 34px rgba(67, 56, 202, 0.3);
}
.req-card + .req-card { margin-top: 14px; }
.req-card.v1 { background: linear-gradient(135deg, #064e3b 0%, #059669 60%, #34d399 100%); box-shadow: 0 14px 34px rgba(5, 150, 105, 0.3); }
.req-card.v2 { background: linear-gradient(135deg, #0c4a6e 0%, #0284c7 60%, #38bdf8 100%); box-shadow: 0 14px 34px rgba(2, 132, 199, 0.3); }
.req-card.v3 { background: linear-gradient(135deg, #7c2d12 0%, #ea580c 60%, #fb923c 100%); box-shadow: 0 14px 34px rgba(234, 88, 12, 0.3); }
.req-card::before {
  content: ""; position: absolute; right: -60px; bottom: -80px; width: 220px; height: 220px; border-radius: 50%;
  background: rgba(255,255,255,0.08);
}
.req-card .bank { font-size: 17px; font-weight: 750; display: flex; align-items: center; gap: 8px; }
.req-card .cur { margin-left: auto; font-size: 12px; font-weight: 800; background: rgba(255,255,255,0.2); padding: 4px 9px; border-radius: 8px; }
.req-card .number {
  font-family: "SF Mono", ui-monospace, Menlo, monospace; font-size: 21px; font-weight: 650; letter-spacing: 0.06em;
  margin: 22px 0 14px; word-break: break-all; display: flex; align-items: center; gap: 10px;
}
.req-card .copy {
  width: 38px; height: 38px; border-radius: 12px; background: rgba(255,255,255,0.2); color: #fff;
  display: grid; place-items: center; flex-shrink: 0; margin-left: auto;
}
.req-card .holder { font-size: 14px; opacity: 0.9; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }
.req-card .note { font-size: 13px; opacity: 0.85; margin-top: 8px; }
.req-card .edit { position: absolute; top: 12px; right: 12px; z-index: 1; }

/* ============================================================ misc */
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty .empty-icon {
  width: 64px; height: 64px; border-radius: 20px; margin: 0 auto 14px; background: var(--card); box-shadow: var(--shadow);
  display: grid; place-items: center; color: var(--faint);
}
.empty h3 { color: var(--text); margin: 0 0 4px; font-size: 17px; font-weight: 700; }
.empty p { margin: 0; font-size: 14px; }

.spinner {
  width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--field); border-top-color: var(--accent);
  animation: spin 0.7s linear infinite;
}
.loader { display: grid; place-items: center; padding: 48px 0; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton {
  background: linear-gradient(90deg, var(--field) 25%, var(--card-2) 50%, var(--field) 75%);
  background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 12px;
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.sk-card { height: 84px; border-radius: var(--radius); }
.sk-card + .sk-card { margin-top: 12px; }

.toast-wrap { position: fixed; top: calc(10px + env(safe-area-inset-top, 0px)); left: 0; right: 0; z-index: 300; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast {
  background: var(--text); color: var(--bg); padding: 11px 16px; border-radius: 14px; font-weight: 620; font-size: 14px;
  box-shadow: var(--shadow-lg); max-width: calc(100% - 32px); display: flex; align-items: center; gap: 8px;
  animation: toastIn 0.3s cubic-bezier(0.3, 1.3, 0.5, 1);
}
.toast.error { background: var(--red); color: #fff; }
.toast.success { background: var(--green); color: #fff; }
.toast.out { opacity: 0; transform: translateY(-10px); transition: all 0.25s; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-16px) scale(0.95); } to { opacity: 1; transform: none; } }

.chart-box { position: relative; height: 230px; margin-top: 8px; }
.legend { display: flex; gap: 16px; font-size: 13px; color: var(--muted); font-weight: 600; margin-top: 10px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 16px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 6px; }
.legend i.dash { background: repeating-linear-gradient(90deg, var(--faint) 0 4px, transparent 4px 7px); }
.trend { font-size: 13px; font-weight: 700; padding: 3px 8px; border-radius: 99px; }
.trend.up { background: var(--green-soft); color: var(--green); }
.trend.down { background: var(--red-soft); color: var(--red); }
.trend.flat { background: var(--gray-soft); color: var(--muted); }

.stat-line { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); font-weight: 600; margin-top: 8px; }
.stat-line b { color: var(--text); font-weight: 720; }
.stat-line .g b { color: var(--green); }
.stat-line .r b { color: var(--red); }
.pills { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.pill { font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 8px; background: var(--field); color: var(--muted); }
.pill b { color: var(--text); }

.cred-box { background: var(--card-2); border-radius: 16px; padding: 14px 16px; font-family: "SF Mono", ui-monospace, Menlo, monospace; font-size: 15px; line-height: 1.7; }
.cred-box b { font-family: var(--font); color: var(--muted); font-weight: 600; font-size: 13px; }

/* login */
.login-wrap { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 24px 20px calc(24px + var(--safe-b)); max-width: 440px; margin: 0 auto; }
.logo {
  width: 76px; height: 76px; border-radius: 24px; margin: 0 auto 18px; background: var(--grad); color: #fff;
  display: grid; place-items: center; font-size: 34px; font-weight: 850; letter-spacing: -0.04em;
  box-shadow: 0 16px 40px rgba(91, 91, 246, 0.4);
}
.login-wrap h1 { text-align: center; font-size: 28px; font-weight: 800; margin: 0; letter-spacing: -0.02em; }
.login-wrap .lead { text-align: center; color: var(--muted); margin: 8px 0 28px; }
.lang-switch { position: absolute; top: 14px; right: 16px; }
.lang-switch .seg button { padding: 6px 12px; font-size: 13px; }
