/* ============================================================
   PayHO — global design system  (modern refresh)
   Every class name from the original is preserved.
   ============================================================ */

:root {
  /* brand */
  --yellow: #f8c93a;
  --yellow-dark: #e0ac1e;
  --yellow-soft: #fff5d6;
  --yellow-glow: rgba(248, 201, 58, .35);

  /* ink / neutrals */
  --ink: #17171b;
  --ink-soft: #6b6b73;
  --ink-faint: #9a9aa2;

  /* accents */
  --green: #12925a;
  --green-soft: #e0f6ea;
  --red: #d63a3a;
  --red-soft: #fde7e7;
  --blue: #2f6fd0;
  --blue-soft: #e6effb;

  /* surfaces */
  --bg: #f4f5f7;
  --bg-tint: #eef0f3;
  --card: #ffffff;
  --border: #e9e9ee;
  --border-strong: #dcdce3;

  /* shape */
  --radius: 16px;
  --radius-sm: 11px;
  --radius-lg: 22px;

  /* elevation — layered, soft */
  --shadow-xs: 0 1px 2px rgba(17, 17, 27, .05);
  --shadow: 0 1px 3px rgba(17, 17, 27, .05), 0 6px 20px -6px rgba(17, 17, 27, .10);
  --shadow-md: 0 2px 6px rgba(17, 17, 27, .06), 0 14px 34px -10px rgba(17, 17, 27, .16);
  --shadow-lg: 0 30px 70px -22px rgba(17, 17, 27, .34);

  --ring: 0 0 0 4px var(--yellow-glow);

  font-size: 16px;
  color-scheme: light;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: "Inter", "Helvetica Neue", Arial, "Noto Sans Georgian", sans-serif;
  background: var(--bg);
  background-image:
    radial-gradient(1100px 520px at 85% -8%, rgba(248, 201, 58, .10), transparent 60%),
    radial-gradient(900px 480px at -5% 0%, rgba(47, 111, 208, .05), transparent 55%);
  background-attachment: fixed;
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.5;
  letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -.02em; }

::selection { background: var(--yellow); color: var(--ink); }

.container { max-width: 980px; margin: 0 auto; padding: 0 20px; }
.container-sm { max-width: 480px; margin: 0 auto; padding: 0 20px; }

/* ---------- header ---------- */
.topbar {
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.topbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; gap: 12px;
}
.logo {
  display: flex; align-items: center; gap: 7px;
  font-weight: 800; font-size: 1.28rem; letter-spacing: -.03em;
}
.logo .pay {
  background: var(--ink); color: var(--yellow);
  padding: 3px 8px; border-radius: 9px;
}
.logo .ho {
  background: var(--yellow); color: var(--ink);
  padding: 3px 8px; border-radius: 9px;
  box-shadow: inset 0 0 0 2px var(--ink);
}
.logo-sub { font-size: .72rem; color: var(--ink-soft); font-weight: 500; }
.topbar-right { display: flex; align-items: center; gap: 10px; }

/* ---------- buttons ---------- */
.btn {
  --btn-bg: var(--yellow);
  --btn-fg: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--btn-bg); color: var(--btn-fg);
  border: none; border-radius: var(--radius-sm);
  padding: 13px 22px; font-size: .97rem; font-weight: 700;
  font-family: inherit; letter-spacing: -.01em;
  cursor: pointer; width: auto; white-space: nowrap;
  box-shadow: 0 1px 2px rgba(17, 17, 27, .10), 0 8px 18px -10px var(--yellow-glow);
  transition: transform .14s ease, box-shadow .18s ease, background .15s ease, filter .15s ease;
}
.btn:hover { background: var(--yellow-dark); transform: translateY(-1px); box-shadow: 0 2px 4px rgba(17,17,27,.12), 0 14px 26px -12px var(--yellow-glow); }
.btn:active { transform: translateY(0); box-shadow: var(--shadow-xs); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 15px; font-size: .84rem; border-radius: 9px; box-shadow: none; }
.btn-sm:hover { box-shadow: var(--shadow-xs); }
.btn-outline { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--border-strong); }
.btn-outline:hover { background: var(--bg-tint); box-shadow: inset 0 0 0 1.5px var(--border-strong); }
.btn-green { background: var(--green); color: #fff; box-shadow: 0 1px 2px rgba(17,17,27,.10), 0 8px 18px -10px rgba(18,146,90,.5); }
.btn-green:hover { background: #0d7a49; }
.btn-red { background: var(--red-soft); color: var(--red); box-shadow: none; }
.btn-red:hover { background: #fad4d4; }
.btn-ghost { background: transparent; color: var(--ink-soft); box-shadow: none; }
.btn-ghost:hover { background: var(--bg-tint); color: var(--ink); }

/* ---------- forms ---------- */
label { display: block; font-size: .82rem; font-weight: 600; color: var(--ink-soft); margin: 15px 0 6px; }
input[type=text], input[type=tel], input[type=number], input[type=email],
input[type=password], input[type=url], input[type=date], input[type=search],
input[type=file], select, textarea {
  width: 100%; padding: 12px 14px; font-size: 1rem;
  border: 1.5px solid var(--border-strong); border-radius: var(--radius-sm);
  background: #fff; color: var(--ink);
  outline: none; font-family: inherit;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
input::placeholder, textarea::placeholder { color: var(--ink-faint); }
input:hover, select:hover, textarea:hover { border-color: #cfcfd7; }
input:focus, select:focus, textarea:focus {
  border-color: var(--yellow-dark);
  box-shadow: var(--ring);
  background: #fffdf7;
}
select { appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' stroke='%236b6b73' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px; }

/* ---------- cards ---------- */
.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px; margin: 16px 0;
  border: 1px solid rgba(233, 233, 238, .7);
  transition: box-shadow .2s ease, transform .2s ease;
}
.card-green { background: linear-gradient(160deg, #e7f8ee, #d6f1e2); border-color: #c7ecd6; }
.card-dark { background: linear-gradient(160deg, #26262d, var(--ink)); color: #fff; border-color: transparent; }
.card-dark .muted { color: rgba(255, 255, 255, .6); }
.muted { color: var(--ink-soft); font-size: .86rem; }
.balance-card { display: flex; justify-content: space-between; align-items: center; }
.balance-value { font-size: 2.5rem; font-weight: 800; letter-spacing: -.04em; }
.balance-value small { font-size: 1.2rem; font-weight: 600; color: var(--ink-soft); }
.card-dark .balance-value small { color: rgba(255,255,255,.6); }
.park-name { font-weight: 700; display: flex; gap: 6px; align-items: center; }
.rating { color: #b8890a; font-weight: 700; font-size: .9rem; }

/* ---------- alerts ---------- */
.alert { padding: 13px 16px; border-radius: var(--radius-sm); margin: 12px 0; font-size: .92rem; font-weight: 500;
  display: flex; gap: 9px; align-items: flex-start; border: 1px solid transparent; }
.alert-ok { background: var(--green-soft); color: #0c6b41; border-color: #bfe9d1; }
.alert-error { background: var(--red-soft); color: #b32626; border-color: #f4c9c9; }
.alert-info { background: var(--blue-soft); color: #235bb0; border-color: #cbdefa; }

/* ---------- badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 11px; border-radius: 999px;
  font-size: .74rem; font-weight: 700; letter-spacing: .01em;
  line-height: 1.4; border: 1px solid transparent;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.badge-pending { background: var(--yellow-soft); color: #8a6400; border-color: #f4e2ab; }
.badge-approved { background: var(--blue-soft); color: #235bb0; border-color: #cbdefa; }
.badge-processing { background: var(--blue-soft); color: #235bb0; border-color: #cbdefa; }
.badge-paid { background: var(--green-soft); color: #0c6b41; border-color: #bfe9d1; }
.badge-rejected { background: #eeeef1; color: var(--ink-soft); border-color: #e2e2e8; }
.badge-failed { background: var(--red-soft); color: #b32626; border-color: #f4c9c9; }
.badge-active { background: var(--green-soft); color: #0c6b41; border-color: #bfe9d1; }
.badge-blocked { background: var(--red-soft); color: #b32626; border-color: #f4c9c9; }
.badge-disabled { background: #eeeef1; color: var(--ink-soft); border-color: #e2e2e8; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); }
table.data { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.data th {
  text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--ink-soft); font-weight: 700; padding: 11px 12px;
  border-bottom: 1px solid var(--border-strong); white-space: nowrap; background: #fafafb;
}
table.data td { padding: 13px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.data tbody tr { transition: background .12s ease; }
table.data tr:hover td { background: #fdfbf3; }
table.data tr:last-child td { border-bottom: none; }
.amount-pos { color: var(--green); font-weight: 700; }
.amount-neg { color: var(--red); font-weight: 700; }

/* ---------- driver auth ---------- */
.auth-page { display: flex; flex-direction: column; align-items: center; padding: 52px 16px; }
.auth-title { font-size: 1.6rem; font-weight: 800; margin: 18px 0 4px; text-align: center; letter-spacing: -.03em; }
.auth-sub { color: var(--ink-soft); text-align: center; margin-bottom: 10px; }
.auth-card { width: 100%; max-width: 420px; box-shadow: var(--shadow-md); }
.taxi-hero { font-size: 66px; line-height: 1; margin-top: 12px; filter: drop-shadow(0 8px 16px rgba(248,201,58,.4)); }
.code-input { text-align: center; font-size: 1.7rem; letter-spacing: 10px; font-weight: 700; padding-left: 10px; }

/* ---------- history rows ---------- */
.history-row { display: flex; justify-content: space-between; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--border); gap: 10px; }
.history-row:last-child { border-bottom: none; }
.history-meta { font-size: .8rem; color: var(--ink-soft); }

/* ---------- admin layout ---------- */
.admin-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 236px; flex-shrink: 0;
  background: linear-gradient(185deg, #202027, #141419);
  color: #d7d7dd;
  display: flex; flex-direction: column; padding: 20px 14px;
  border-right: 1px solid rgba(255, 255, 255, .05);
}
.sidebar .logo { margin: 4px 8px 24px; }
.sidebar a.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; border-radius: var(--radius-sm); margin: 2px 0;
  color: #b9b9c2; font-size: .93rem; font-weight: 500;
  transition: background .15s ease, color .15s ease, transform .1s ease;
}
.sidebar a.nav-item:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.sidebar a.nav-item.active {
  background: linear-gradient(135deg, var(--yellow), var(--yellow-dark));
  color: var(--ink); font-weight: 700;
  box-shadow: 0 8px 20px -8px var(--yellow-glow);
}
.sidebar .spacer { flex: 1; }
.admin-main { flex: 1; padding: 28px 32px; min-width: 0; }
.page-title { font-size: 1.5rem; font-weight: 800; margin-bottom: 18px; letter-spacing: -.03em; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 8px; }
.stat {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px; border: 1px solid rgba(233, 233, 238, .7);
  transition: transform .18s ease, box-shadow .18s ease;
}
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat .num { font-size: 1.8rem; font-weight: 800; letter-spacing: -.03em; }
.stat .lbl { color: var(--ink-soft); font-size: .82rem; margin-top: 3px; font-weight: 500; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.filters a { padding: 7px 15px; border-radius: 999px; background: var(--card); border: 1px solid var(--border-strong); font-size: .85rem; font-weight: 600; color: var(--ink-soft); transition: all .14s ease; }
.filters a:hover { border-color: var(--ink-faint); color: var(--ink); }
.filters a.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.inline-form { display: inline; }
.actions-cell { display: flex; gap: 6px; flex-wrap: wrap; }

@media (max-width: 820px) {
  .admin-shell { flex-direction: column; }
  .sidebar {
    width: 100%; flex-direction: row; overflow-x: auto; align-items: center; padding: 10px 12px;
    border-right: none; border-bottom: 1px solid rgba(255,255,255,.06);
    position: sticky; top: 0; z-index: 40;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .sidebar::-webkit-scrollbar { display: none; }
  .sidebar .logo { margin: 0 12px 0 4px; }
  .sidebar a.nav-item { white-space: nowrap; }
  .sidebar .spacer { display: none; }
  .admin-main { padding: 18px 16px; }
}

/* ---------- landing ---------- */
.hero { text-align: center; padding: 84px 16px 44px; }
.hero h1 {
  font-size: 2.6rem; font-weight: 800; letter-spacing: -.04em;
  max-width: 720px; margin: 0 auto 16px;
  background: linear-gradient(180deg, var(--ink), #40404a);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero p { color: var(--ink-soft); max-width: 640px; margin: 0 auto 28px; font-size: 1.08rem; line-height: 1.6; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; padding: 20px 0 44px; }
.feature {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 26px; border: 1px solid rgba(233, 233, 238, .7);
  transition: transform .2s ease, box-shadow .2s ease;
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.feature .icon {
  font-size: 26px; margin-bottom: 14px;
  width: 52px; height: 52px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 14px; background: var(--yellow-soft);
}
.feature h3 { margin-bottom: 8px; font-size: 1.08rem; }
.feature p { color: var(--ink-soft); font-size: .93rem; line-height: 1.6; }
.site-footer { text-align: center; color: var(--ink-soft); font-size: .85rem; padding: 34px 0; border-top: 1px solid var(--border); margin-top: 36px; }
.lang-switch { display: inline-flex; gap: 2px; background: var(--bg-tint); padding: 3px; border-radius: 10px; }
.lang-switch a { padding: 5px 10px; border-radius: 7px; font-size: .8rem; font-weight: 700; color: var(--ink-soft); transition: all .14s ease; }
.lang-switch a:hover { color: var(--ink); }
.lang-switch a.active { background: var(--ink); color: var(--yellow); }

/* ---------- mobile: tables collapse into cards ---------- */
@media (max-width: 700px) {
  :root { font-size: 15px; }
  .container, .container-sm { padding: 0 16px; }
  .hero { padding: 52px 16px 28px; }
  .hero h1 { font-size: 1.8rem; letter-spacing: -.03em; }
  .page-title { font-size: 1.28rem; }
  .balance-value { font-size: 2.1rem; }
  .card { padding: 18px; }
  .btn { padding: 12px 18px; }
  .topbar-inner { height: 58px; }
  .topbar-right { gap: 6px; }
  .topbar-right .btn-sm { padding: 8px 11px; }

  table.data.stack { display: block; }
  table.data.stack thead, table.data.stack tr:first-child { display: none; }
  table.data.stack tr {
    display: block; background: #fff;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    margin: 12px 0; padding: 6px 14px; box-shadow: var(--shadow-xs);
  }
  table.data.stack tr:hover td { background: transparent; }
  table.data.stack td { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-bottom: 1px dashed var(--border); padding: 10px 0; text-align: right; }
  table.data.stack td:last-child { border-bottom: none; }
  table.data.stack td::before { content: attr(data-label); color: var(--ink-soft); font-size: .76rem; font-weight: 600; text-align: left; flex-shrink: 0; }
  table.data.stack td[data-label=""]::before { content: none; }
  table.data.stack .actions-cell { width: 100%; justify-content: flex-end; }
  table.data.stack .actions-cell .btn { flex: 1; }
}

/* ---------- misc ---------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .grid-2 { grid-template-columns: 1fr; } }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--border); font-size: .95rem; }
.kv:last-child { border-bottom: none; }
.kv .k { color: var(--ink-soft); }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.center { text-align: center; }
.error-page { text-align: center; padding: 90px 16px; }
.error-page .code { font-size: 4.4rem; font-weight: 800; letter-spacing: -.04em;
  background: linear-gradient(135deg, var(--yellow-dark), var(--yellow));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
code { font-family: "SFMono-Regular", ui-monospace, "Menlo", "Consolas", monospace; }

/* ---------- notices ---------- */
.notice { border-radius: var(--radius); padding: 15px 17px; margin-bottom: 14px; font-size: .92rem; line-height: 1.55; border: 1px solid transparent; }
.notice-warn { background: var(--yellow-soft); color: #7a5c00; border-color: #f2e0a8; }
.notice-ok { background: var(--green-soft); color: #0c6b41; border-color: #bfe9d1; }
.notice code { background: rgba(0, 0, 0, .06); padding: 1px 5px; border-radius: 5px; }

/* ---------- deposit requisites (copy rows) ---------- */
.req-row { display: flex; justify-content: space-between; align-items: center; gap: 12px;
           padding: 11px 0; border-bottom: 1px dashed var(--border); flex-wrap: wrap; }
.req-row:last-of-type { border-bottom: none; }
.req-label { color: var(--ink-soft); font-size: .85rem; }
.req-value { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.req-value code { font-size: .98rem; font-weight: 700; letter-spacing: .02em;
                  background: var(--bg-tint); padding: 6px 11px; border-radius: 9px; word-break: break-all; }
.req-highlight { background: var(--yellow-soft); border-radius: var(--radius-sm); padding: 13px 15px; border-bottom: none; margin-bottom: 6px; border: 1px solid #f2e0a8; }
.req-highlight code { background: #fff; font-size: 1.1rem; }

/* ---------- contracts ---------- */
.contract-list { display: flex; flex-direction: column; gap: 10px; }
.contract-item { display: flex; justify-content: space-between; align-items: center; gap: 14px;
                 border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 15px 16px; flex-wrap: wrap;
                 transition: border-color .15s ease, box-shadow .15s ease; }
.contract-item:hover { border-color: var(--ink-faint); box-shadow: var(--shadow-xs); }
.contract-title { font-weight: 700; }
.contract-meta { font-size: .84rem; margin-top: 3px; }
.contract-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.file-btn { cursor: pointer; margin: 0; display: inline-flex; align-items: center; }
.badge-signed { background: var(--green-soft); color: #0c6b41; border-color: #bfe9d1; }
.badge-sent { background: var(--blue-soft); color: #235bb0; border-color: #cbdefa; }
.badge-draft { background: #eeeef1; color: var(--ink-soft); border-color: #e2e2e8; }
.badge-declined, .badge-expired { background: var(--red-soft); color: #b32626; border-color: #f4c9c9; }
.badge-unmatched { background: var(--red-soft); color: #b32626; border-color: #f4c9c9; }
.badge-matched { background: var(--green-soft); color: #0c6b41; border-color: #bfe9d1; }

@media (max-width: 700px) {
  .contract-item { flex-direction: column; align-items: stretch; }
  .contract-actions { width: 100%; }
  .contract-actions .btn, .contract-actions .file-btn { flex: 1; justify-content: center; text-align: center; }
  .req-row { flex-direction: column; align-items: flex-start; gap: 6px; }
  .req-value { width: 100%; justify-content: space-between; }
  .req-value code { flex: 1; }
}

/* ---------- деньги платформы на дашборде супер-админа ---------- */
.money-row { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.money-row .stat { display: flex; flex-direction: column; justify-content: center; }
.stat-accent { background: linear-gradient(160deg, #26262d, var(--ink)); color: #fff; border-color: transparent; }
.stat-accent .num { color: var(--yellow); }
.stat-accent .lbl { color: rgba(255, 255, 255, .6); }
.stat-wide .num { font-size: 2.2rem; }
@media (max-width: 900px) { .money-row { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .money-row { grid-template-columns: 1fr; } }

/* ---------- фильтры отчётов ---------- */
.report-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; align-items: end; }
.report-filters label { margin-top: 0; }
.report-filters-actions { display: flex; align-items: flex-end; }
.report-filters-actions .btn { width: 100%; }
@media (max-width: 560px) { .report-filters { grid-template-columns: 1fr; } }

/* ---------- переключатель языка на страницах входа ---------- */
.bare-lang { display: flex; justify-content: flex-end; padding: 16px 20px 0; }
.bare-lang .lang-switch a { padding: 7px 12px; border-radius: 8px; font-size: .8rem; }

/* ---------- строка с чекбоксом ---------- */
.check-line { display: flex; align-items: center; gap: 10px; margin: 16px 0 4px; cursor: pointer; }
.check-line input[type=checkbox] { width: 19px; height: 19px; accent-color: var(--yellow-dark); margin: 0; flex-shrink: 0; }
.check-line span { color: var(--ink); font-size: .95rem; font-weight: 600; }

/* ---------- выбор банка получателя ---------- */
.bank-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
.bank-option { display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 15px 12px; border: 1.5px solid var(--border-strong); border-radius: var(--radius-sm);
  background: #fff; cursor: pointer; font-weight: 600; font-size: .93rem;
  text-align: center; transition: border-color .15s ease, background .15s ease, box-shadow .15s ease; margin: 0; }
.bank-option:hover { border-color: var(--ink-faint); }
.bank-option input { position: absolute; opacity: 0; pointer-events: none; }
.bank-option.selected { border-color: var(--yellow-dark); background: var(--yellow-soft); box-shadow: var(--ring); }
.field-error { color: var(--red); font-size: .85rem; margin: 8px 0 0; }
.input-error { border-color: var(--red) !important; }
@media (max-width: 420px) { .bank-choice { grid-template-columns: 1fr; } }

/* ---------- шапка админки парка: баланс и пополнение ---------- */
.admin-topbar { display: flex; justify-content: flex-end; margin-bottom: 16px; }
.balance-chip { display: inline-flex; align-items: center; gap: 10px; cursor: pointer;
  background: linear-gradient(135deg, #26262d, var(--ink)); color: #fff; border: none; border-radius: 999px;
  padding: 9px 9px 9px 18px; font-family: inherit; font-size: .95rem;
  box-shadow: var(--shadow); transition: transform .14s ease, box-shadow .18s ease; }
.balance-chip:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.balance-chip-label { color: rgba(255, 255, 255, .6); font-size: .8rem; }
.balance-chip-value { font-weight: 800; color: var(--yellow); }
.balance-chip-plus { display: inline-flex; align-items: center; justify-content: center;
  width: 27px; height: 27px; border-radius: 50%; background: var(--yellow);
  color: var(--ink); font-weight: 800; font-size: 1.1rem; line-height: 1; }

/* ---------- модальное окно ---------- */
body.modal-open { overflow: hidden; }
.modal { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 18px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(15, 15, 20, .5); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: modal-fade .2s ease; }
.modal-box { position: relative; background: var(--card); border-radius: var(--radius-lg); width: 100%; max-width: 520px;
  max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg); animation: modal-pop .22s cubic-bezier(.2, .8, .2, 1); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 22px 24px 6px; }
.modal-head h3 { margin: 0; font-size: 1.18rem; }
.modal-close { background: none; border: none; font-size: 1.9rem; line-height: 1; cursor: pointer;
  color: var(--ink-soft); padding: 0 4px; transition: color .14s ease; }
.modal-close:hover { color: var(--ink); }
.modal-body { padding: 6px 24px 4px; }
.modal-foot { display: flex; gap: 10px; padding: 16px 24px 22px; }
.modal-foot .btn { flex: 1; }
.modal-note { color: var(--red); font-size: .85rem; margin: 10px 0 4px; line-height: 1.45; }
@keyframes modal-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-pop { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
@media (max-width: 560px) {
  .modal { padding: 0; align-items: flex-end; }
  .modal-box { max-width: 100%; border-radius: var(--radius-lg) var(--radius-lg) 0 0; max-height: 94vh; animation: modal-slide .26s cubic-bezier(.2, .8, .2, 1); }
  .balance-chip { width: 100%; justify-content: space-between; border-radius: var(--radius-sm); }
}
@keyframes modal-slide { from { transform: translateY(100%); } to { transform: none; } }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ============================================================
   Driver cabinet — components (v2)
   ============================================================ */
.driver-main { padding-bottom: 48px; max-width: 680px; }
.driver-body .topbar-brand { display: inline-flex; }
.ic { flex-shrink: 0; vertical-align: -3px; }
.btn .ic { margin-left: 2px; }

/* --- round icon buttons in the header / page heads --- */
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 12px;
  color: var(--ink-soft); background: #fff;
  box-shadow: inset 0 0 0 1.5px var(--border-strong);
  transition: all .14s ease;
}
.icon-btn:hover { color: var(--ink); background: var(--bg-tint); transform: translateY(-1px); }
.icon-btn.active { background: var(--ink); color: var(--yellow); box-shadow: none; }
.page-head { display: flex; align-items: center; gap: 12px; margin: 18px 0 14px; }
.page-head .page-title { margin: 0; }

/* --- balance hero --- */
.hero-balance {
  position: relative; overflow: hidden; isolation: isolate;
  margin: 18px 0 16px; padding: 22px 22px 18px;
  border-radius: var(--radius-lg);
  background: linear-gradient(150deg, #2a2a32 0%, #17171b 60%, #111114 100%);
  color: #fff; box-shadow: var(--shadow-md);
}
.hero-balance-glow {
  position: absolute; z-index: -1; right: -70px; top: -90px;
  width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(248, 201, 58, .55), rgba(248, 201, 58, 0));
  filter: blur(6px);
}
.hero-balance-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.park-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 11px; border-radius: 999px; font-size: .82rem; font-weight: 700;
  background: rgba(255, 255, 255, .10); color: #fff; border: 1px solid rgba(255, 255, 255, .10);
}
.park-chip-light { background: var(--yellow-soft); color: var(--ink); border-color: #f2e0a8; padding: 4px 10px; }
.rating-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 10px; border-radius: 999px; font-size: .8rem; font-weight: 800;
  background: var(--yellow); color: var(--ink);
}
.rating-chip .ic { fill: currentColor; stroke: none; }
.rating-chip-dark { margin-top: 8px; }
.hero-balance-label { font-size: .82rem; font-weight: 600; color: rgba(255, 255, 255, .55); letter-spacing: .02em; text-transform: uppercase; }
.hero-balance-value { font-size: 3rem; font-weight: 800; letter-spacing: -.05em; line-height: 1.1; margin: 4px 0 14px; font-variant-numeric: tabular-nums; }
.hero-balance-value .cur { font-size: 1.6rem; font-weight: 700; color: var(--yellow); margin-left: 6px; letter-spacing: 0; }
.hero-balance-na { font-size: 1rem; font-weight: 600; color: rgba(255, 255, 255, .7); letter-spacing: 0; }
.hero-balance-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap;
  padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .10);
  font-size: .8rem; color: rgba(255, 255, 255, .6);
}
.hero-balance-foot span { display: inline-flex; align-items: center; gap: 6px; }
.hero-balance-fee b { color: #fff; font-weight: 700; }

/* --- sheet = a card with a header row --- */
.sheet { padding: 22px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.sheet-head h3 { font-size: 1.12rem; }
.pill {
  display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
  padding: 5px 11px; border-radius: 999px; font-size: .76rem; font-weight: 700;
  background: var(--bg-tint); color: var(--ink-soft);
}
.link-more { display: inline-flex; align-items: center; gap: 2px; font-size: .86rem; font-weight: 600; color: var(--ink-soft); white-space: nowrap; }
.link-more:hover { color: var(--ink); }
.field-hint { font-size: .8rem; color: var(--ink-faint); margin: 6px 2px 0; }

/* --- amount input with currency + "max" --- */
.amount-field { position: relative; display: flex; align-items: center; }
.amount-input {
  font-size: 1.7rem !important; font-weight: 800; letter-spacing: -.03em;
  padding: 12px 120px 12px 16px !important; font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
}
.amount-input::-webkit-outer-spin-button, .amount-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.amount-input::placeholder { color: #d5d5dc; font-weight: 700; }
.amount-cur { position: absolute; right: 16px; font-size: 1.2rem; font-weight: 700; color: var(--ink-faint); pointer-events: none; }
.amount-max {
  position: absolute; right: 48px; top: 50%; transform: translateY(-50%);
  padding: 7px 12px; border-radius: 9px; border: none; cursor: pointer;
  font-family: inherit; font-size: .78rem; font-weight: 800; letter-spacing: .02em;
  background: var(--yellow-soft); color: #8a6400; transition: all .14s ease;
}
.amount-max:hover { background: var(--yellow); color: var(--ink); }

/* --- bank monogram --- */
.bank-mark {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 40px; height: 40px; border-radius: 12px;
  font-size: .68rem; font-weight: 800; letter-spacing: .04em;
}
.bank-mark-sm { width: 28px; height: 28px; border-radius: 8px; font-size: .58rem; }
.bank-bg { background: #ffe9dc; color: #c84d0a; }
.bank-tb { background: #dff1fb; color: #0a6ea3; }
.bank-xx { background: var(--bg-tint); color: var(--ink-soft); }

/* bank selector — refined with monogram + check */
.bank-option { position: relative; justify-content: flex-start; gap: 10px; padding: 12px 14px; }
.bank-option span:not(.bank-mark):not(.bank-option-check) { flex: 1; text-align: left; line-height: 1.2; }
.bank-option-check {
  width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--yellow); color: var(--ink); opacity: 0; transform: scale(.6);
  transition: all .16s ease;
}
.bank-option.selected .bank-option-check { opacity: 1; transform: scale(1); }
.bank-option.selected { box-shadow: 0 0 0 3px var(--yellow-glow); }

/* --- saved accounts --- */
.acc-list { display: flex; flex-direction: column; gap: 8px; }
.acc-item {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 10px 12px; border-radius: var(--radius-sm); cursor: pointer;
  background: #fff; border: 1.5px solid var(--border-strong); font-family: inherit; color: var(--ink);
  transition: all .14s ease;
}
.acc-item:hover { border-color: var(--ink-faint); transform: translateY(-1px); box-shadow: var(--shadow-xs); }
.acc-item.is-active { border-color: var(--yellow-dark); background: #fffdf5; box-shadow: 0 0 0 3px var(--yellow-glow); }
.acc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.acc-main b { font-size: .95rem; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.acc-main small { font-size: .78rem; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acc-go { color: var(--ink-faint); display: inline-flex; }

/* --- summary block --- */
.summary { margin-top: 18px; padding: 6px 16px; border-radius: var(--radius-sm); background: var(--bg-tint); }
.summary .kv { border-bottom-color: rgba(0, 0, 0, .06); }
.summary .kv-total { font-size: 1.05rem; }
.summary .kv-total strong { font-size: 1.15rem; letter-spacing: -.02em; }
.btn-lg { padding: 16px 24px; font-size: 1.02rem; border-radius: 14px; }

/* --- transactions list --- */
.tx-list { display: flex; flex-direction: column; }
.tx {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 0; border-bottom: 1px solid var(--border); color: inherit;
  transition: background .12s ease;
}
.tx:last-child { border-bottom: none; }
a.tx:hover { background: #fafafb; margin: 0 -10px; padding-left: 10px; padding-right: 10px; border-radius: 10px; }
.tx-main { flex: 1; min-width: 0; }
.tx-title { font-weight: 700; font-size: .95rem; font-variant-numeric: tabular-nums; }
.tx-meta { font-size: .78rem; color: var(--ink-soft); margin-top: 2px; }
.tx-note { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; font-size: .78rem; color: #b32626; background: var(--red-soft); padding: 3px 8px; border-radius: 7px; }
.tx-side { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.tx-amount { font-weight: 800; font-size: 1rem; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

/* --- empty state --- */
.empty { text-align: center; padding: 26px 10px 18px; color: var(--ink-soft); font-size: .9rem; }
.empty-icon {
  width: 56px; height: 56px; border-radius: 18px; margin: 0 auto 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--yellow-soft); color: #8a6400;
}

/* --- open request notice --- */
.notice-open { display: flex; align-items: center; gap: 14px; background: linear-gradient(160deg, #fff8e1, #fff3c9); border-color: #f2e0a8; }
.notice-open-icon { width: 46px; height: 46px; border-radius: 14px; background: var(--yellow); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.notice-open-title { font-weight: 700; margin-bottom: 2px; }

/* --- profile --- */
.profile-card { display: flex; align-items: center; gap: 14px; }
.avatar {
  width: 56px; height: 56px; border-radius: 18px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--yellow), var(--yellow-dark)); color: var(--ink);
  font-weight: 800; font-size: 1.15rem; letter-spacing: -.02em;
}
.profile-name { font-weight: 800; font-size: 1.15rem; letter-spacing: -.02em; }
.profile-sub { display: inline-flex; align-items: center; gap: 5px; color: var(--ink-soft); font-size: .86rem; margin-top: 2px; }
.mono { font-family: "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace; letter-spacing: .04em; font-size: .98rem !important; }

/* --- login --- */
.auth-mark {
  width: 84px; height: 84px; border-radius: 26px;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(150deg, #2a2a32, #17171b); color: var(--yellow);
  box-shadow: var(--shadow-md), 0 0 0 6px rgba(248, 201, 58, .18);
  margin-top: 8px;
}
.auth-card-title { text-align: center; font-size: 1.05rem; color: var(--ink-soft); font-weight: 600; margin-bottom: 4px; }
.auth-card { margin-top: 22px; }
.auth-phone { font-size: 1.05rem; letter-spacing: .02em; }
.auth-foot { display: inline-flex; align-items: center; gap: 5px; margin-top: 22px; font-size: .78rem; color: var(--ink-faint); font-weight: 600; }
.phone-field { display: flex; align-items: stretch; }
.phone-prefix {
  display: inline-flex; align-items: center; padding: 0 14px;
  border: 1.5px solid var(--border-strong); border-right: none; border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  background: var(--bg-tint); color: var(--ink-soft); font-weight: 700; font-size: .95rem; white-space: nowrap;
}
.phone-field input { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-size: 1.15rem; font-weight: 600; letter-spacing: .04em; }
.code-input::placeholder { letter-spacing: 10px; color: #d5d5dc; }

@media (max-width: 700px), (hover: none) and (pointer: coarse) {
  .hero-balance { padding: 20px 18px 16px; margin-top: 14px; }
  .hero-balance-value { font-size: 2.6rem; }
  .sheet { padding: 18px; }
  .icon-btn { width: 36px; height: 36px; border-radius: 11px; }
  .topbar-right .lang-switch a { padding: 5px 8px; }
  .amount-input { font-size: 1.5rem !important; }
  .tx-side .tx-meta { display: none; }
}
@media (max-width: 380px) {
  .topbar-right { gap: 5px; }
  .topbar-right .lang-switch a { padding: 5px 6px; font-size: .74rem; }
}

/* ============================================================
   Driver cabinet — APP MODE on phones
   ============================================================ */
.withdraw-cta, .tabbar, .sheet-handle, .sheet-close, .logout-btn { display: none; }

/* desktop: the withdraw "modal" is just an inline block */
@media (min-width: 701px) and (hover: hover) {
  .withdraw-modal { position: static; display: block !important; padding: 0; z-index: auto; }
  .withdraw-modal .modal-backdrop { display: none; }
  .withdraw-modal .modal-box { max-width: none; max-height: none; overflow: visible; box-shadow: none; border-radius: 0; background: transparent; animation: none; }
  .logout-btn { display: none; }
}

@media (max-width: 700px), (hover: none) and (pointer: coarse) {
  :root { font-size: 17px; }
  html, body { overscroll-behavior-y: none; }
  .driver-body { background: var(--bg); }

  /* app bar: dark, merges with the balance hero below it */
  .driver-topbar {
    background: #17171b; border-bottom: none;
    backdrop-filter: none; -webkit-backdrop-filter: none;
    padding-top: env(safe-area-inset-top);
  }
  .driver-topbar .topbar-inner { height: 56px; padding: 0 16px; }
  .driver-topbar .logo { font-size: 1.15rem; }
  .driver-topbar .logo .pay { background: rgba(255, 255, 255, .12); color: var(--yellow); }
  .driver-topbar .logo .ho { box-shadow: none; }
  .driver-topbar .lang-switch { background: rgba(255, 255, 255, .10); }
  .driver-topbar .lang-switch a { color: rgba(255, 255, 255, .7); padding: 5px 8px; }
  .driver-topbar .lang-switch a.active { background: var(--yellow); color: var(--ink); }
  .driver-topbar .icon-btn { background: rgba(255, 255, 255, .10); color: #fff; box-shadow: none; width: 36px; height: 36px; }
  .driver-topbar .hide-m { display: none; }

  .driver-main { max-width: none; padding: 0 16px calc(84px + env(safe-area-inset-bottom)); }

  /* balance hero bleeds edge-to-edge and continues the dark app bar */
  .hero-balance {
    margin: 0 -16px 14px; padding: 8px 20px 20px;
    border-radius: 0 0 28px 28px; box-shadow: none;
    background: linear-gradient(180deg, #17171b 0%, #1e1e25 55%, #14141a 100%);
  }
  .hero-balance-top { margin-bottom: 14px; }
  .hero-balance-value { font-size: 2.9rem; margin: 2px 0 12px; }
  .hero-balance-value .cur { font-size: 1.4rem; }
  .hero-balance-foot { font-size: .78rem; }
  .driver-main > .alert:first-child { margin: 12px 0; }
  .driver-main > .alert + .hero-balance { border-radius: 24px; margin-top: 0; padding-top: 18px; }

  /* primary action */
  .withdraw-cta { display: flex; margin: 0 0 14px; padding: 17px 24px; font-size: 1.05rem; border-radius: 16px; }

  /* cards feel like app sections */
  .card.sheet { border: none; border-radius: 20px; padding: 18px; margin: 12px 0; box-shadow: 0 1px 2px rgba(17, 17, 27, .04); }
  .sheet-head h3 { font-size: 1.1rem; }
  label { font-size: .86rem; margin-top: 16px; }
  input[type=text], input[type=tel], input[type=number], input[type=email], input[type=password], select, textarea { font-size: 1.05rem; padding: 14px 15px; border-radius: 14px; }
  .mono { font-size: 1.02rem !important; }
  .acc-item { padding: 12px; border-radius: 14px; }
  .bank-option { padding: 13px 12px; border-radius: 14px; }
  .tx { padding: 14px 0; }
  .tx-title { font-size: .98rem; }
  .badge { font-size: .72rem; }
  .logout-btn { display: inline-flex; margin: 4px 0 8px; }

  /* withdraw form as a bottom sheet */
  .withdraw-modal { z-index: 90; }
  .withdraw-modal .modal-box {
    display: flex; flex-direction: column; max-height: 92vh; max-height: 92dvh;
    border-radius: 26px 26px 0 0; padding-bottom: env(safe-area-inset-bottom);
  }
  .withdraw-modal .card.sheet { margin: 0; border-radius: 0; box-shadow: none; padding: 4px 18px 20px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .sheet-handle { display: block; width: 40px; height: 5px; border-radius: 3px; background: #d5d5dc; margin: 10px auto 6px; flex-shrink: 0; }
  .sheet-close { display: inline-flex; width: 34px; height: 34px; border-radius: 10px; margin-left: 4px; }
  .withdraw-modal .sheet-head { position: sticky; top: 0; background: #fff; padding: 8px 0 10px; z-index: 1; }
  .withdraw-modal .pill { margin-left: auto; }

  /* bottom tab bar */
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px);
    border-top: 1px solid var(--border);
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  }
  .tab-item {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 4px 0; font-size: .68rem; font-weight: 600; color: var(--ink-faint);
    transition: color .15s ease;
  }
  .tab-ic { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 30px; border-radius: 999px; transition: background .18s ease, color .18s ease; }
  .tab-item.active { color: var(--ink); }
  .tab-item.active .tab-ic { background: var(--yellow); color: var(--ink); }
  .tab-item:active .tab-ic { transform: scale(.94); }
}

/* standalone (added to home screen): no browser chrome — give the app bar a bit more room */
@media (display-mode: standalone) and ((max-width: 700px) or ((hover: none) and (pointer: coarse))) {
  .driver-topbar .topbar-inner { height: 60px; }
}
@media (max-width: 700px), (hover: none) and (pointer: coarse) {
  .page-head .icon-btn { display: none; }
  .page-head { margin: 16px 0 12px; }
  .withdraw-modal form > .btn-lg[type=submit] {
    position: sticky; bottom: 0; margin-top: 14px;
    box-shadow: 0 0 0 14px #fff, 0 -22px 26px 14px #fff, 0 1px 2px rgba(17,17,27,.10);
  }
  .auth-page { padding-top: 36px; }
}

/* Phone with "Desktop site" enabled: Chrome ignores the viewport meta and lays the page
   out ~980px wide, then shrinks it. Compensate so the app still reads at phone scale.
   (coarse pointer + high DPR + wide layout = a phone pretending to be a desktop) */
@media (hover: none) and (pointer: coarse) and (min-width: 701px) and (min-resolution: 2.5dppx) {
  html { zoom: 2.2; }
}
/* app-mode bottom sheet must not depend on the 560px modal breakpoint */
@media (max-width: 700px), (hover: none) and (pointer: coarse) {
  .withdraw-modal { padding: 0; align-items: flex-end; }
  .withdraw-modal .modal-box { max-width: 100%; animation: modal-slide .26s cubic-bezier(.2, .8, .2, 1); }
}

/* ============================================================
   Withdraw flow v3 — amount hero, bank tiles, account picker
   ============================================================ */
.wz-step { margin-top: 20px; }
.wz-step:first-of-type { margin-top: 6px; }
.wz-label { display: flex; align-items: center; gap: 9px; font-size: .84rem; font-weight: 700; color: var(--ink-soft); margin-bottom: 10px; letter-spacing: .01em; }
.wz-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 7px; font-size: .72rem; font-weight: 800;
  background: var(--ink); color: var(--yellow);
}

/* amount hero */
.amount-hero {
  text-align: center; padding: 18px 12px 14px; border-radius: 18px;
  background: linear-gradient(180deg, #fffaf0, #fff5d6); border: 1px solid #f4e2ab;
}
.amount-hero-row { display: inline-flex; align-items: baseline; justify-content: center; gap: 6px; max-width: 100%; }
.amount-hero-input {
  width: 3ch; min-width: 1ch; max-width: 100%;
  border: none !important; background: transparent !important; box-shadow: none !important; outline: none;
  padding: 0 !important; margin: 0; text-align: center;
  font-size: 3rem !important; font-weight: 800; letter-spacing: -.05em; line-height: 1.1;
  color: var(--ink); font-variant-numeric: tabular-nums; -moz-appearance: textfield; caret-color: var(--yellow-dark);
}
.amount-hero-input::-webkit-outer-spin-button, .amount-hero-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.amount-hero-input::placeholder { color: #e0d3a6; }
.amount-hero-cur { font-size: 1.6rem; font-weight: 700; color: #b8890a; }
.amount-hero-hint { margin-top: 6px; font-size: .8rem; color: var(--ink-soft); }
.amount-hero-hint b { color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 12px; }
.chip {
  padding: 8px 14px; border-radius: 999px; border: 1.5px solid #f0dc9c; background: #fff;
  font-family: inherit; font-size: .84rem; font-weight: 700; color: var(--ink); cursor: pointer;
  transition: all .14s ease; min-height: 36px;
}
.chip:hover { border-color: var(--yellow-dark); }
.chip:active { transform: scale(.96); }
.chip.is-on { background: var(--ink); border-color: var(--ink); color: var(--yellow); }
.chip-accent { background: var(--yellow); border-color: var(--yellow); }
.chip-accent.is-on { background: var(--ink); border-color: var(--ink); }

/* bank tiles */
.bank-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bank-card {
  --brand: var(--ink); --brand-soft: var(--bg-tint);
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  padding: 14px 14px 12px; border-radius: 16px; cursor: pointer; margin: 0;
  background: #fff; border: 1.5px solid var(--border-strong);
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease, transform .12s ease;
  font-size: inherit; color: var(--ink);
}
.bank-card input { position: absolute; opacity: 0; pointer-events: none; }
.bank-card:active { transform: scale(.985); }
.bank-card-bg { --brand: #ff5a1f; --brand-soft: #fff0e8; }
.bank-card-tb { --brand: #0aa5e2; --brand-soft: #e6f6fd; }
.bank-card-logo {
  display: inline-flex; align-items: center; justify-content: center;
  height: 34px; padding: 0 12px; border-radius: 10px;
  background: var(--brand); color: #fff; font-size: .8rem; font-weight: 800; letter-spacing: .06em;
}
.bank-card-name { font-size: .9rem; font-weight: 700; line-height: 1.2; }
.bank-card-check {
  position: absolute; top: 10px; right: 10px;
  width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand); color: #fff; opacity: 0; transform: scale(.5); transition: all .18s cubic-bezier(.2,.8,.2,1);
}
.bank-card.selected { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
.bank-card.selected .bank-card-check { opacity: 1; transform: scale(1); }

/* account picker (cards of the chosen bank) */
.acc-picker { display: flex; flex-direction: column; gap: 8px; }
.acc-card {
  position: relative; display: flex; align-items: center; gap: 12px; margin: 0;
  padding: 11px 12px; border-radius: 14px; cursor: pointer; font-size: inherit; color: var(--ink);
  background: #fff; border: 1.5px solid var(--border-strong);
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease, transform .12s ease;
}
.acc-card[hidden] { display: none; }
.acc-card input { position: absolute; opacity: 0; pointer-events: none; }
.acc-card:active { transform: scale(.99); }
.acc-card .acc-main small { white-space: normal; }
.acc-card-check {
  width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--border-strong); color: transparent; transition: all .18s cubic-bezier(.2,.8,.2,1);
}
.acc-card.selected { border-color: var(--yellow-dark); background: #fffbef; box-shadow: 0 0 0 3px var(--yellow-glow); }
.acc-card.selected .acc-card-check { background: var(--ink); border-color: var(--ink); color: var(--yellow); }
.acc-card-new { border-style: dashed; }
.acc-new-mark { color: var(--ink-soft); }
.acc-card-new.selected .acc-new-mark { background: var(--yellow); color: var(--ink); }
.acc-fields { margin-top: 10px; padding: 4px 14px 14px; border-radius: 14px; background: var(--bg-tint); animation: fields-in .22s ease; }
.acc-fields label:first-child { margin-top: 10px; }
.acc-fields input { background: #fff; }
@keyframes fields-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* buttons — richer primary */
.btn-cta {
  background: linear-gradient(180deg, #ffd45c 0%, var(--yellow) 55%, #f0bb2a 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 1px 2px rgba(17,17,27,.12), 0 10px 22px -10px rgba(224,172,30,.75);
}
.btn-cta:hover { background: linear-gradient(180deg, #ffd45c 0%, #f2c232 55%, #e6b122 100%); }
.btn:active, .withdraw-cta:active { transform: scale(.985); }
.btn.is-busy { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-busy::after {
  content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%;
  border: 2.5px solid rgba(23,23,27,.25); border-top-color: var(--ink); animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.withdraw-cta {
  background: linear-gradient(180deg, #ffd45c 0%, var(--yellow) 55%, #f0bb2a 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 2px 4px rgba(17,17,27,.12), 0 14px 28px -12px rgba(224,172,30,.8);
}
.icon-btn:active, .tab-item:active, .acc-item:active { transform: scale(.96); }

@media (max-width: 700px), (hover: none) and (pointer: coarse) {
  .amount-hero-input { font-size: 2.7rem !important; }
  .bank-card { padding: 13px 12px 11px; }
  .wz-step { margin-top: 18px; }
  .withdraw-modal .card.sheet { padding-bottom: 12px; }
}
@media (max-width: 700px), (hover: none) and (pointer: coarse) {
  /* sheet: static header, the form itself scrolls */
  .withdraw-modal .card.sheet { display: flex; flex-direction: column; overflow: hidden; min-height: 0; padding-bottom: 0; }
  .withdraw-modal .sheet-head { position: static; flex-shrink: 0; padding: 6px 0 8px; }
  .withdraw-modal form { overflow-y: auto; -webkit-overflow-scrolling: touch; min-height: 0; margin: 0 -18px; padding: 0 18px 14px; overscroll-behavior: contain; }
}

/* ---------- bank logos from files (optional) ---------- */
.bank-card-logo-img { background: transparent; padding: 0; height: 42px; max-width: 100%; }
.bank-card-logo-img img { height: 100%; width: auto; max-width: 100%; object-fit: contain; object-position: left center; display: block; }
.bank-mark-img { background: #fff; border: 1px solid var(--border); padding: 5px; }
.bank-mark-img img { width: 100%; height: 100%; object-fit: contain; display: block; }

/* ---------- sheet header: room to breathe, fee pill on its own line ---------- */
@media (max-width: 700px), (hover: none) and (pointer: coarse) {
  .withdraw-modal .modal-box { max-height: calc(100% - 40px); }
  .withdraw-modal .sheet-head {
    display: grid; grid-template-columns: 1fr auto; grid-template-areas: "title close" "pill pill";
    align-items: center; row-gap: 8px; padding: 12px 0 14px; margin-bottom: 4px;
  }
  .withdraw-modal .sheet-head h3 { grid-area: title; font-size: 1.25rem; }
  .withdraw-modal .sheet-head .pill { grid-area: pill; justify-self: start; margin: 0; }
  .withdraw-modal .sheet-head .sheet-close { grid-area: close; }
  .sheet-handle { margin: 12px auto 4px; }
}
