/* Brocard app — shared design system.
   Tokens, type scale, and components are lifted verbatim from card.html
   (Gilroy family, brand palette, pill buttons, radii) so every screen reads as
   the same product. */
@import url("fonts.css");

:root {
  --font: "Gilroy", Arial, sans-serif;

  /* palette — exact values pulled from card.html */
  --ink: #252f3e;
  --ink-60: #5b6474;
  --ink-40: #8a93a5;
  --brand: #5073ee;
  --brand-dark: #2c3dd0;
  --brand-100: #e6ebfb;
  --brand-200: #c3d1ff;
  --brand-300: #ccd5ef;
  --green: #21c66e;
  --green-100: #dff6ea;
  --orange: #ff8562;
  --bg: #f7f8fd;
  --white: #ffffff;
  --border: #e3e5e8;
  --border-soft: #eef0f4;

  --shadow-sm: 0 2px 8px rgba(37, 47, 62, .06);
  --shadow-md: 0 12px 32px rgba(37, 47, 62, .10);
  --shadow-card: 0 18px 40px rgba(44, 61, 208, .28);

  --radius-pill: 30px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;

  --header-h: 74px;
  --container: 1120px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

/* ---------- type scale ---------- */
h1, h2, h3, h4 { margin: 0; color: var(--ink); font-weight: 600; line-height: 1.1; }
h1 { font-size: 40px; letter-spacing: -.01em; }
h2 { font-size: 32px; letter-spacing: -.01em; }
h3 { font-size: 24px; }
h4 { font-size: 20px; }
.display { font-size: 64px; line-height: 1; font-weight: 600; letter-spacing: -.02em; }
.lead { font-size: 20px; color: var(--ink-60); line-height: 1.5; }
.muted { color: var(--ink-40); }
.small { font-size: 14px; }
.tiny { font-size: 12px; }

/* ---------- layout ---------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* ---------- buttons ---------- */
.btn {
  --btn-h: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: var(--btn-h);
  padding: 0 28px;
  border: 0;
  border-radius: var(--radius-pill);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.55;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .2s ease-in-out, color .2s ease-in-out,
              box-shadow .2s ease-in-out, transform .05s ease-in-out;
  -webkit-appearance: none;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.btn-primary { background: var(--brand-dark); color: #fff; }
.btn-primary:hover { background: var(--brand); }

.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--border); }
.btn-ghost:hover { background: var(--brand); color: #fff; box-shadow: none; }

.btn-soft { background: var(--brand-100); color: var(--brand-dark); }
.btn-soft:hover { background: var(--brand-200); }

.btn-sm { --btn-h: 40px; padding: 0 20px; font-size: 15px; }
.btn-lg { --btn-h: 56px; padding: 0 34px; }
.btn-block { display: flex; width: 100%; }

/* ---------- header ---------- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 900;
  height: var(--header-h);
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border-soft);
}
.app-header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 28px;
}
.app-header__logo img { width: 116px; height: 48px; object-fit: contain; }
.app-nav { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.app-nav a {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  transition: color .15s, background-color .15s;
}
.app-nav a:hover { color: var(--ink); background: var(--brand-100); }
.app-nav a.is-active { color: var(--brand-dark); background: var(--brand-100); }
.app-header .header-card-picker {
  box-sizing: border-box; display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; gap: 8px;
  height: 42px; min-width: 58px; padding: 4px 13px 4px 4px; border: 1px solid var(--border-soft);
  border-radius: 999px; background: #fff; color: var(--ink); text-decoration: none; white-space: nowrap;
  box-shadow: var(--shadow-sm); font-size: 16px; font-weight: 500; font-variant-numeric: tabular-nums;
  line-height: 1; transition: border-color .15s, transform .15s;
}
.app-header .header-card-picker:hover { border-color: var(--border); color: var(--ink); transform: translateY(-1px); }
.header-card-picker__icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: #ff9f0a; color: #fff; }
.header-card-picker__icon svg { width: 17px; height: 17px; }
.header-card-picker__chevron { width: 15px; height: 15px; flex: none; color: var(--ink-40); }
.app-header__spacer { flex: 1; }
.app-header__user { display: flex; align-items: center; gap: 14px; }
.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 6px 6px 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.user-chip__avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--brand); color: #fff;
  font-size: 14px; font-weight: 600;
}
.user-chip__email { color: var(--ink-60); font-weight: 500; }

/* ---------- page shell ---------- */
.page { padding: 40px 0 80px; }
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}
.page-head p { margin: 6px 0 0; color: var(--ink-60); }

/* ---------- panels / cards ---------- */
.panel {
  background: var(--white);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

/* ---------- forms ---------- */
.field { margin-bottom: 18px; }
.field > label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.input, .select {
  width: 100%;
  height: 52px;
  padding: 0 18px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--white);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none;
  appearance: none;
}
.input::placeholder { color: var(--ink-40); font-weight: 500; }
.input:focus, .select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(80, 115, 238, .14);
}
.select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235b6474' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 44px;
  cursor: pointer;
}
.field-row { display: flex; gap: 16px; }
.field-row > .field { flex: 1; }
.field-hint { margin-top: 7px; font-size: 13px; color: var(--ink-40); }
.field-error { display: none; margin-top: 7px; font-size: 13px; color: #e5484d; font-weight: 500; }
.field.has-error .input { border-color: #e5484d; }
.field.has-error .field-error { display: block; }

.input-group { position: relative; }
.input-group .input { padding-right: 52px; }
.input-affix {
  position: absolute;
  top: 50%; right: 8px;
  transform: translateY(-50%);
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: 0; background: transparent;
  color: var(--ink-40); cursor: pointer;
  border-radius: 10px;
}
.input-affix:hover { color: var(--ink); background: var(--brand-100); }

/* ---------- auth screens ---------- */
.auth {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.auth__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px 32px;
}
.auth__top .logo img { width: 116px; height: 48px; object-fit: contain; }
.auth__switch { font-size: 15px; color: var(--ink-60); font-weight: 500; }
.auth__switch a { color: var(--brand); font-weight: 600; }
.auth__body {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr;
}
.auth__form-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 32px 64px;
}
.auth-card { width: 100%; max-width: 420px; }
.auth-card__title { font-size: 34px; letter-spacing: -.01em; }
.auth-card__sub { margin: 10px 0 30px; color: var(--ink-60); font-size: 16px; }
.auth__aside {
  position: relative;
  overflow: hidden;
  background: linear-gradient(150deg, #5073ee 0%, #2c3dd0 100%);
  color: #fff;
  display: flex;
  align-items: center;
  padding: 56px;
}
.auth__aside-inner { position: relative; z-index: 2; max-width: 440px; }
.auth__aside h2 { color: #fff; font-size: 34px; line-height: 1.18; }
.auth__aside p { margin: 16px 0 0; color: rgba(255, 255, 255, .82); font-size: 17px; line-height: 1.5; }
.auth__aside-list { margin: 30px 0 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.auth__aside-list li { display: flex; align-items: center; gap: 12px; font-size: 16px; font-weight: 500; }
.auth__aside-list .tick {
  flex: none; width: 26px; height: 26px; border-radius: 50%;
  background: rgba(255, 255, 255, .18);
  display: grid; place-items: center;
}
.auth__aside .blob {
  position: absolute; border-radius: 50%;
  background: rgba(255, 255, 255, .10); filter: blur(2px);
}
.auth__aside .blob-1 { width: 320px; height: 320px; right: -90px; top: -80px; }
.auth__aside .blob-2 { width: 220px; height: 220px; right: 120px; bottom: -110px; background: rgba(255,255,255,.07); }
.auth__aside .aside-card {
  position: absolute; z-index: 1; right: 40px; bottom: 48px;
  width: 300px;
}

/* form helpers */
.form-actions { margin-top: 26px; }
.divider { display: flex; align-items: center; gap: 14px; margin: 26px 0; color: var(--ink-40); font-size: 13px; }
.divider::before, .divider::after { content: ""; height: 1px; flex: 1; background: var(--border); }
.check {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 14px; color: var(--ink-60); cursor: pointer;
}
.check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--brand); flex: none; }

/* ---------- virtual card visual ---------- */
.vcard {
  position: relative;
  aspect-ratio: 1.586;
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  color: #fff;
  background: linear-gradient(135deg, #5073ee 0%, #2c3dd0 100%);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  isolation: isolate;
}
.vcard::after {
  content: ""; position: absolute; z-index: -1; inset: 0;
  background:
    radial-gradient(120% 120% at 85% -10%, rgba(255,255,255,.22), transparent 45%),
    radial-gradient(90% 90% at -10% 110%, rgba(255,255,255,.12), transparent 50%);
}
.vcard--emerald { background: linear-gradient(135deg, #21c66e 0%, #12855c 100%); box-shadow: 0 18px 40px rgba(18, 133, 92, .28); }
.vcard--ink { background: linear-gradient(135deg, #3a4759 0%, #252f3e 100%); box-shadow: 0 18px 40px rgba(37, 47, 62, .30); }
.vcard--sunset { background: linear-gradient(135deg, #ff8562 0%, #e0523d 100%); box-shadow: 0 18px 40px rgba(224, 82, 61, .28); }
.vcard__top { display: flex; align-items: flex-start; justify-content: space-between; }
.vcard__brand { font-size: 18px; font-weight: 600; letter-spacing: .02em; }
.vcard__net { font-size: 15px; font-weight: 600; font-style: italic; letter-spacing: .04em; opacity: .95; }
.vcard__chip {
  width: 42px; height: 32px; margin: 18px 0 auto;
  border-radius: 7px;
  background: linear-gradient(135deg, #f7d488, #d9a94e);
  position: relative;
}
.vcard__chip::before {
  content: ""; position: absolute; inset: 6px 8px;
  border: 1px solid rgba(140, 96, 20, .5); border-radius: 3px;
}
.vcard__number {
  font-size: 20px; font-weight: 600; letter-spacing: .12em;
  margin: 16px 0 14px;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 1px rgba(0,0,0,.12);
}
.vcard__foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.vcard__label-cap { font-size: 8.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; opacity: .7; }
.vcard__holder { font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; margin-top: 3px; }
.vcard__exp { font-size: 14px; font-weight: 600; margin-top: 3px; font-variant-numeric: tabular-nums; }

/* card list */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}
.card-tile { display: flex; flex-direction: column; }
.card-tile .vcard { cursor: pointer; transition: transform .18s ease, box-shadow .18s ease; }
.card-tile .vcard:hover { transform: translateY(-4px); }
.card-meta {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 4px 4px;
}
.card-meta__label { font-size: 15px; font-weight: 600; color: var(--ink); }
.card-meta__status {
  font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 20px;
  background: var(--green-100); color: #12855c;
}
.card-meta__status.is-frozen { background: #e9edf6; color: var(--ink-60); }
.card-balance { padding: 2px 4px 0; }
.card-balance b { font-size: 22px; font-weight: 600; color: var(--ink); }
.card-balance span { font-size: 13px; color: var(--ink-40); }

/* stat row */
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 32px; }
.stat { padding: 22px 24px; }
.stat__k { font-size: 13px; font-weight: 600; color: var(--ink-40); text-transform: uppercase; letter-spacing: .04em; }
.stat__v { font-size: 30px; font-weight: 600; color: var(--ink); margin-top: 8px; letter-spacing: -.01em; }
.stat__v small { font-size: 16px; color: var(--ink-40); font-weight: 600; }

/* empty state */
.empty {
  text-align: center;
  padding: 72px 24px;
}
.empty__ico {
  width: 88px; height: 88px; margin: 0 auto 22px;
  border-radius: 26px;
  background: var(--brand-100);
  display: grid; place-items: center;
  color: var(--brand);
}
.empty h3 { font-size: 22px; }
.empty p { margin: 10px auto 26px; max-width: 380px; color: var(--ink-60); }

/* ---------- create-card layout ---------- */
.create-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 40px;
  align-items: start;
}
.create-form { padding: 32px; }
.create-preview { position: sticky; top: calc(var(--header-h) + 32px); }
.preview-card-wrap { max-width: 400px; }
.preview-hint { margin-top: 18px; font-size: 14px; color: var(--ink-40); text-align: center; }

/* color swatches */
.swatches { display: flex; gap: 12px; }
.swatch {
  width: 44px; height: 44px; border-radius: 12px; cursor: pointer;
  border: 2px solid transparent; padding: 0; background-clip: padding-box;
  position: relative;
}
.swatch[data-scheme="brand"] { background: linear-gradient(135deg, #5073ee, #2c3dd0); }
.swatch[data-scheme="emerald"] { background: linear-gradient(135deg, #21c66e, #12855c); }
.swatch[data-scheme="ink"] { background: linear-gradient(135deg, #3a4759, #252f3e); }
.swatch[data-scheme="sunset"] { background: linear-gradient(135deg, #ff8562, #e0523d); }
.swatch.is-active { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--brand); }

/* toast / flash */
.flash {
  position: fixed; z-index: 1200; left: 50%; bottom: 28px;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff;
  padding: 13px 22px; border-radius: 14px;
  font-size: 15px; font-weight: 600;
  box-shadow: var(--shadow-md);
  opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .25s;
  display: flex; align-items: center; gap: 10px;
}
.flash.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.flash .tick { color: var(--green); display: inline-flex; }

/* ---------- plans / pricing ---------- */
.plans-head { margin-bottom: 18px; }
.plans-head h2 { font-size: 24px; }
.plans-head p { margin: 6px 0 0; color: var(--ink-60); }
.plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 34px;
}
.plan {
  position: relative;
  display: block;
  text-align: left;
  padding: 26px 24px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.plan:hover { border-color: var(--brand-200); }
.plan.is-selected { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(80, 115, 238, .14), var(--shadow-sm); }
.plan--popular { border-color: var(--brand-200); }
.plan__radio {
  position: absolute; top: 22px; right: 22px;
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--border); background: #fff;
  display: grid; place-items: center; transition: border-color .15s;
}
.plan.is-selected .plan__radio { border-color: var(--brand); }
.plan.is-selected .plan__radio::after {
  content: ""; width: 11px; height: 11px; border-radius: 50%; background: var(--brand);
}
.plan__badge {
  position: absolute; top: -12px; left: 24px;
  background: var(--brand); color: #fff;
  font-size: 12px; font-weight: 600; letter-spacing: .02em;
  padding: 5px 12px; border-radius: 20px;
  box-shadow: var(--shadow-sm);
}
.plan__name { font-size: 18px; font-weight: 600; color: var(--ink); }
.plan__tag { margin: 2px 0 16px; font-size: 13px; color: var(--ink-40); }
.plan__price { display: flex; align-items: baseline; gap: 6px; }
.plan__price b { font-size: 38px; font-weight: 600; color: var(--ink); letter-spacing: -.01em; }
.plan__per { font-size: 14px; color: var(--ink-40); font-weight: 600; }
.plan__features { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 11px; }
.plan__features li { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--ink-60); font-weight: 500; }
.plan__features .tick {
  flex: none; width: 20px; height: 20px; border-radius: 50%;
  background: var(--brand-100); color: var(--brand);
  display: grid; place-items: center; margin-top: 1px;
}
.plan.is-selected .plan__features .tick { background: var(--brand); color: #fff; }

/* order summary + checkout */
.order-summary {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 16px 20px; margin-bottom: 18px;
  background: var(--brand-100); border-radius: var(--radius-md);
}
.order-summary__l { font-size: 14px; color: var(--ink-60); font-weight: 500; }
.order-summary__l b { color: var(--ink); font-weight: 600; }
.order-summary__price { font-size: 22px; font-weight: 600; color: var(--brand-dark); font-variant-numeric: tabular-nums; }
.pay-note { margin: 14px 0 0; font-size: 13px; color: var(--ink-40); text-align: center; }

/* card plan chip */
.card-meta__plan {
  font-size: 11px; font-weight: 600; letter-spacing: .02em;
  padding: 3px 9px; border-radius: 20px;
  background: var(--brand-100); color: var(--brand-dark);
  text-transform: uppercase;
}

/* ---------- app shell (sidebar + bottom tabs) ---------- */
.shell { display: grid; grid-template-columns: 258px 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; align-self: start; height: 100vh;
  display: flex; flex-direction: column; gap: 6px;
  padding: 20px 16px; background: var(--white);
  border-right: 1px solid var(--border-soft);
}
.sidebar__logo { padding: 6px 10px 16px; }
.sidebar__logo img { width: 112px; height: 50px; object-fit: contain; }
.sidebar__nav { display: flex; flex-direction: column; gap: 3px; }
.side-link {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: 14px;
  color: var(--ink-60); font-weight: 600; font-size: 15px;
  transition: background-color .15s, color .15s;
}
.side-link__ico { width: 22px; height: 22px; display: grid; place-items: center; flex: none; }
.side-link__ico svg { width: 22px; height: 22px; }
.side-link:hover { background: var(--brand-100); color: var(--ink); }
.side-link.is-active { background: var(--brand-100); color: var(--brand-dark); }
.side-link.is-soon { color: var(--ink-40); }
.side-link__soon {
  margin-left: auto; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em;
  background: var(--border-soft); color: var(--ink-40); padding: 2px 7px; border-radius: 20px;
}
.sidebar__foot { margin-top: auto; display: flex; flex-direction: column; gap: 12px; padding-top: 14px; border-top: 1px solid var(--border-soft); }
.sidebar__foot .user-chip { padding: 4px 6px; }
.user-chip__meta { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.user-chip__meta b { font-size: 14px; color: var(--ink); font-weight: 600; }
.user-chip__meta span { font-size: 12px; color: var(--ink-40); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.shell-main { min-width: 0; padding: 34px 40px 96px; }
.shell-main .wrap { max-width: 960px; margin: 0 auto; }
.tabbar { display: none; }

/* ---------- page head (in-shell) ---------- */
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.head h1 { font-size: 30px; }
.head p { margin: 5px 0 0; color: var(--ink-60); }
.section-head { display: flex; align-items: center; justify-content: space-between; margin: 30px 0 14px; }
.section-head h3 { font-size: 18px; }
.section-head a { font-size: 14px; font-weight: 600; color: var(--brand); }

/* ---------- balance hero ---------- */
.balance-card {
  position: relative; overflow: hidden;
  border-radius: var(--radius-lg); padding: 28px 30px; color: #fff;
  background: linear-gradient(135deg, #5073ee 0%, #2c3dd0 100%);
  box-shadow: var(--shadow-card);
  isolation: isolate;
}
.balance-card::after {
  content: ""; position: absolute; z-index: -1; inset: 0;
  background: radial-gradient(120% 120% at 88% -10%, rgba(255,255,255,.22), transparent 45%),
              radial-gradient(90% 90% at -10% 120%, rgba(255,255,255,.12), transparent 50%);
}
.balance-card__k { font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; opacity: .82; }
.balance-card__v { font-size: 46px; font-weight: 600; letter-spacing: -.02em; margin: 8px 0 2px; font-variant-numeric: tabular-nums; }
.balance-card__iban { font-size: 13px; opacity: .85; font-variant-numeric: tabular-nums; letter-spacing: .06em; display: flex; align-items: center; gap: 8px; }
.balance-card__iban button { border: 0; background: rgba(255,255,255,.16); color: #fff; width: 26px; height: 26px; border-radius: 8px; cursor: pointer; display: grid; place-items: center; }
.balance-card__iban button:hover { background: rgba(255,255,255,.28); }
.verify-pill { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 12px; font-weight: 600; background: rgba(255,255,255,.18); padding: 4px 11px; border-radius: 20px; }

/* ---------- quick actions ---------- */
.qa-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 22px; }
.qa { display: flex; flex-direction: column; align-items: center; gap: 9px; background: none; border: 0; cursor: pointer; color: var(--ink); font-family: var(--font); }
.qa__ico { width: 54px; height: 54px; border-radius: 50%; background: var(--brand-100); color: var(--brand-dark); display: grid; place-items: center; transition: background-color .15s, transform .05s; }
.qa__ico svg { width: 22px; height: 22px; }
.qa:hover .qa__ico { background: var(--brand-200); }
.qa:active .qa__ico { transform: translateY(1px); }
.qa__lbl { font-size: 13px; font-weight: 600; color: var(--ink-60); }

/* ---------- transactions list ---------- */
.tx-list { display: flex; flex-direction: column; }
.tx-day { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-40); margin: 18px 4px 6px; }
.tx-row { display: flex; align-items: center; gap: 14px; padding: 12px 6px; border-bottom: 1px solid var(--border-soft); }
.tx-row:last-child { border-bottom: 0; }
.tx-ico { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 20px; line-height: 1; }
.tx-main { flex: 1; min-width: 0; }
.tx-merchant { font-size: 15px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-sub { font-size: 13px; color: var(--ink-40); margin-top: 2px; }
.tx-sub .pending { color: var(--orange); font-weight: 600; }
.tx-amt { font-size: 15px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tx-amt.in { color: #12855c; }
.tx-empty { text-align: center; padding: 40px 20px; color: var(--ink-40); }

/* ---------- mini cards strip ---------- */
.mini-cards { display: flex; gap: 16px; overflow-x: auto; padding: 4px 2px 8px; scroll-snap-type: x mandatory; }
.mini-cards::-webkit-scrollbar { height: 0; }
.mini-card { flex: none; width: 260px; scroll-snap-align: start; cursor: pointer; transition: transform .18s; }
.mini-card:hover { transform: translateY(-4px); }
.mini-card .vcard { width: 260px; }
.mini-card__meta { display: flex; align-items: center; justify-content: space-between; padding: 10px 4px 0; }
.mini-card__label { font-size: 14px; font-weight: 600; color: var(--ink); }
.mini-card__bal { font-size: 14px; font-weight: 600; color: var(--ink); }
.mini-add {
  flex: none; width: 260px; scroll-snap-align: start;
  border: 1.5px dashed var(--border); border-radius: var(--radius-lg);
  display: grid; place-items: center; gap: 8px; color: var(--ink-40); cursor: pointer;
  aspect-ratio: 1.586; font-weight: 600; font-size: 14px; background: none;
  transition: border-color .15s, color .15s;
}
.mini-add:hover { border-color: var(--brand); color: var(--brand); }

/* ---------- filter chips ---------- */
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.chip {
  border: 1.5px solid var(--border); background: #fff; color: var(--ink-60);
  padding: 7px 14px; border-radius: var(--radius-pill); font-size: 14px; font-weight: 600;
  cursor: pointer; font-family: var(--font); transition: border-color .15s, background-color .15s, color .15s;
}
.chip:hover { border-color: var(--brand-200); }
.chip.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ---------- wallet (mobile) frame — Trust-Wallet layout ---------- */
.tw { max-width: 480px; margin: 0 auto; min-height: 100vh; background: #fff; padding: 16px 18px 104px; position: relative; }
.tw-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.tw-wallet { display: inline-flex; align-items: center; gap: 9px; background: #fff; border: 1px solid var(--border-soft); box-shadow: var(--shadow-sm); border-radius: 24px; padding: 5px 15px 5px 5px; font-weight: 600; font-size: 15px; color: var(--ink); }
.tw-wallet__ico { width: 32px; height: 32px; border-radius: 10px; background: #f5a623; color: #fff; display: grid; place-items: center; }
.tw-wallet__ico svg { width: 18px; height: 18px; }
.tw-top__actions { display: flex; gap: 10px; }
.tw-cbtn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border-soft); background: #fff; box-shadow: var(--shadow-sm); display: grid; place-items: center; color: var(--ink); cursor: pointer; }
.tw-cbtn:hover { background: var(--bg); }
.tw-cbtn svg { width: 20px; height: 20px; }

.tw-promo { display: flex; align-items: center; gap: 12px; border: 1px solid var(--border-soft); border-radius: 16px; padding: 12px 14px; margin-bottom: 24px; box-shadow: var(--shadow-sm); }
.tw-promo__ico { width: 42px; height: 42px; border-radius: 11px; background: var(--brand-100); display: grid; place-items: center; flex: none; font-size: 22px; }
.tw-promo__t { min-width: 0; }
.tw-promo__t b { display: block; font-size: 15px; font-weight: 600; color: var(--ink); }
.tw-promo__t span { font-size: 13px; color: var(--ink-40); }

.tw-balance { font-size: 46px; font-weight: 600; letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1.05; }
.tw-change { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 600; margin: 6px 0 24px; font-variant-numeric: tabular-nums; }
.tw-change.down { color: #e5484d; }
.tw-change.up { color: #12855c; }
.tw-change.zero { color: var(--ink-40); }
.tw-change svg { width: 14px; height: 14px; }

.tw-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 28px; }
.tw-act { display: flex; flex-direction: column; align-items: center; gap: 9px; background: none; border: 0; cursor: pointer; font-family: var(--font); padding: 0; }
.tw-act__sq { width: 100%; height: 66px; border-radius: 18px; background: #f1f2f6; display: grid; place-items: center; color: var(--ink); transition: filter .15s; }
.tw-act__sq svg { width: 24px; height: 24px; }
.tw-act.accent .tw-act__sq { background: var(--brand); color: #fff; }
.tw-act:hover .tw-act__sq { filter: brightness(.96); }
.tw-act__lbl { font-size: 13px; font-weight: 600; color: var(--ink); }

.tw-sec { display: inline-flex; align-items: center; gap: 6px; font-size: 20px; font-weight: 600; color: var(--ink); margin-bottom: 4px; cursor: pointer; }
.tw-sec svg { width: 17px; height: 17px; }

.tw-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; }
.tw-row__ico { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 600; font-size: 16px; text-transform: uppercase; }
.tw-row__main { flex: 1; min-width: 0; }
.tw-row__name { font-size: 16px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tw-row__sub { font-size: 13px; color: var(--ink-40); margin-top: 1px; }
.tw-row__right { text-align: right; flex: none; }
.tw-row__val { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tw-row__val.pos { color: #12855c; }
.tw-row__val.neg { color: var(--ink); }
.tw-row__delta { font-size: 13px; color: var(--ink-40); margin-top: 1px; }
.tw-row__delta.pend { color: var(--orange); font-weight: 600; }

/* mobile top bar for inner pages (title + back) */
.tw-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.tw-head h1 { font-size: 24px; font-weight: 600; }
.tw-head .tw-cbtn { width: 40px; height: 40px; }

/* bottom tab bar (floating pill) */
.tw-tabbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 16px; z-index: 950;
  display: flex; align-items: center; background: #fff; border: 1px solid var(--border-soft);
  box-shadow: 0 10px 30px rgba(37,47,62,.16); border-radius: 44px; padding: 8px 10px;
  width: calc(100% - 40px); max-width: 440px; }
.tw-tab { flex: 1; display: grid; place-items: center; height: 46px; border-radius: 40px; color: var(--ink-40); transition: color .15s, background-color .15s; }
.tw-tab:hover { color: var(--ink-60); }
.tw-tab.is-active { color: var(--ink); background: var(--bg); }
.tw-tab svg { width: 26px; height: 26px; }

/* ---------- home: card switcher + always-on card details ---------- */
.cardsw { display: flex; align-items: center; gap: 8px; }
.cardsw__view { flex: 1; min-width: 0; max-width: 360px; margin: 0 auto; }
.cardsw__nav { flex: none; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border); background: #fff; color: var(--ink); cursor: pointer; display: grid; place-items: center; }
.cardsw__nav svg { width: 20px; height: 20px; }
.cardsw__nav:hover { background: var(--brand-100); }
.cardsw__nav:disabled { opacity: .35; cursor: default; }
.cardsw__dots { display: flex; gap: 6px; justify-content: center; margin: 14px 0 0; }
.cardsw__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--border); transition: width .2s, background-color .2s; cursor: pointer; }
.cardsw__dot.on { background: var(--brand-dark); width: 20px; }

.cd-panel { padding: 4px 20px; margin-top: 16px; }
.cd-row { display: flex; align-items: center; justify-content: space-between; padding: 13px 0; border-bottom: 1px solid var(--border-soft); gap: 12px; }
.cd-row:last-child { border-bottom: 0; }
.cd-row .k { font-size: 14px; color: var(--ink-60); }
.cd-row .v { font-size: 15px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 10px; }
.copy-btn { border: 0; background: transparent; color: var(--brand-dark); cursor: pointer; padding: 2px; display: inline-flex; }
.copy-btn:hover { color: var(--brand); }
.copy-btn svg { width: 16px; height: 16px; }

/* deposit details block (top-up modal) */
.dep-box { background: var(--brand-100); border-radius: var(--radius-md); padding: 2px 16px; margin-bottom: 18px; }
.dep-box .cd-row { border-color: rgba(44, 61, 208, .12); }
.dep-box .cd-row .k { color: var(--brand-dark); }

/* ---------- home: balance panel (plain site card) ---------- */
.bal-panel { padding: 26px 28px; margin-bottom: 6px; }
.bal-k { font-size: 14px; font-weight: 600; color: var(--ink-40); }
.bal-v { font-size: 40px; font-weight: 600; color: var(--ink); letter-spacing: -.01em; margin: 6px 0 8px; font-variant-numeric: tabular-nums; }
.bal-iban { font-size: 13px; color: var(--ink-40); font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.link-btn { border: 0; background: none; color: var(--brand-dark); font-weight: 600; font-size: 13px; cursor: pointer; font-family: var(--font); padding: 0 0 0 4px; }
.link-btn:hover { text-decoration: underline; }
.bal-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.list-panel { padding: 4px 20px; }
.empty-mini { padding: 22px 24px; color: var(--ink-60); }
.empty-mini a { color: var(--brand-dark); font-weight: 600; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .auth__body { grid-template-columns: 1fr; }
  .auth__aside { display: none; }
  .create-grid { grid-template-columns: 1fr; }
  .create-preview { position: static; order: -1; margin: 0 auto; }
  .stat-row { grid-template-columns: 1fr; }
  .plans { grid-template-columns: 1fr; }

  .shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .shell-main { padding: 22px 18px 92px; }
  .tabbar {
    display: flex; position: fixed; z-index: 950; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,.96); backdrop-filter: saturate(1.4) blur(10px);
    border-top: 1px solid var(--border-soft); padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
  }
  .tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; color: var(--ink-40); font-size: 11px; font-weight: 600; border-radius: 12px; }
  .tab__ico svg { width: 23px; height: 23px; }
  .tab.is-active { color: var(--brand-dark); }
  .balance-card__v { font-size: 38px; }
  .qa__ico { width: 50px; height: 50px; }
}
@media (max-width: 719px) {
  .app-nav { display: none; }
  .app-header__inner { gap: 10px; }
  .app-header__logo img { width: 96px; height: 40px; }
  .header-card-picker { height: 38px; padding-right: 11px; }
  .header-card-picker__icon { width: 30px; height: 30px; }
  .app-header__user .btn-primary { display: none; }
  .user-chip__email { display: none; }
  h1 { font-size: 30px; }
  .page-head { flex-direction: column; align-items: stretch; }
  .page-head .btn { width: 100%; }
  .auth__top { padding: 20px; }
  .field-row { flex-direction: column; gap: 0; }
  .auth-card__title { font-size: 28px; }
}
/* Public landing page */
.landing-page{margin:0;background:#f8f9fc;color:#20283a;font-family:Inter,"Segoe UI",Arial,sans-serif}.landing-page *{box-sizing:border-box}.landing-container{width:min(1160px,calc(100% - 40px));margin:0 auto}.landing-header{position:sticky;top:0;z-index:50;background:rgba(248,249,252,.9);border-bottom:1px solid rgba(32,40,58,.08);backdrop-filter:blur(18px)}.landing-header__inner{height:76px;display:flex;align-items:center;gap:38px}.landing-brand{display:flex;align-items:center}.landing-brand img{display:block}.landing-nav{display:flex;gap:30px;margin-left:auto}.landing-nav a,.landing-footer a{color:#596174;text-decoration:none;font-size:14px;font-weight:600}.landing-nav a:hover,.landing-footer a:hover{color:#334fd6}.landing-actions{display:flex;align-items:center;gap:10px}.landing-user{max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#596174;font-size:14px}.landing-hero{padding:92px 0 104px;background:radial-gradient(circle at 80% 15%,rgba(80,115,238,.16),transparent 35%),linear-gradient(180deg,#fff 0,#f8f9fc 100%)}.landing-hero__grid{display:grid;grid-template-columns:1.05fr .95fr;align-items:center;gap:72px}.landing-kicker{display:inline-block;margin-bottom:16px;color:#4261dc;font-size:13px;font-weight:800;letter-spacing:.11em;text-transform:uppercase}.landing-hero h1{max-width:680px;margin:0;font-size:clamp(46px,6vw,76px);line-height:1.02;letter-spacing:-.055em}.landing-hero__copy>p{max-width:650px;margin:26px 0 0;color:#626b7d;font-size:19px;line-height:1.65}.landing-hero__actions{display:flex;gap:12px;margin-top:34px}.landing-trust{display:flex;flex-wrap:wrap;gap:22px;margin-top:30px;color:#6c7485;font-size:13px;font-weight:650}.landing-trust span:before{content:"✓";margin-right:7px;color:#2eaf72}.landing-card-stage{position:relative;min-height:390px;display:grid;place-items:center;perspective:1000px}.landing-card{position:relative;z-index:2;width:min(100%,430px);aspect-ratio:1.586;border-radius:24px;padding:30px;color:#fff;background:radial-gradient(circle at 20% 20%,#758cf5 0,#4562df 36%,#202a91 100%);box-shadow:0 32px 70px rgba(35,52,140,.28);transform:rotateY(-8deg) rotateX(4deg)}.landing-card--back{position:absolute;z-index:1;transform:translate(30px,-28px) rotateY(-8deg) rotateX(4deg);opacity:.2}.landing-card__top,.landing-card__foot{display:flex;justify-content:space-between;align-items:center;font-size:13px;font-weight:800;letter-spacing:.08em}.landing-card__top span:first-child{font-size:21px;letter-spacing:-.04em}.landing-card__chip{width:52px;height:39px;margin-top:55px;border-radius:9px;background:linear-gradient(135deg,#f7e09e,#caa85b)}.landing-card__number{margin-top:27px;font-size:22px;letter-spacing:.08em}.landing-card__foot{position:absolute;left:30px;right:30px;bottom:28px;color:rgba(255,255,255,.84)}.landing-section{padding:100px 0;background:#fff}.landing-section--soft{background:#eef1f8}.landing-section__head{max-width:680px;margin-bottom:48px}.landing-section h2,.landing-cta h2{margin:0;font-size:clamp(34px,4vw,50px);line-height:1.08;letter-spacing:-.04em}.landing-section__head p,.landing-security p,.landing-cta p{color:#687185;font-size:17px;line-height:1.65}.landing-feature-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}.landing-feature{padding:32px;border:1px solid #e5e8f0;border-radius:22px;background:#fbfcfe}.landing-feature__icon{display:grid;width:42px;height:42px;place-items:center;border-radius:12px;background:#e8edff;color:#3d5bd8;font-size:13px;font-weight:800}.landing-feature h3{margin:28px 0 10px;font-size:21px}.landing-feature p{margin:0;color:#687185;line-height:1.65}.landing-split{display:grid;grid-template-columns:.8fr 1.2fr;gap:80px}.landing-steps{margin:0;padding:0;list-style:none;counter-reset:step}.landing-steps li{position:relative;display:grid;grid-template-columns:180px 1fr;gap:26px;padding:25px 0;border-top:1px solid #d9deea}.landing-steps li:last-child{border-bottom:1px solid #d9deea}.landing-steps b{font-size:16px}.landing-steps span{color:#667083;line-height:1.55}.landing-security{display:grid;grid-template-columns:120px 1fr;gap:42px;align-items:center;max-width:900px}.landing-security__badge{display:grid;width:112px;height:112px;place-items:center;border-radius:32px;background:#e9f8f0;color:#1ba266;font-size:48px;font-weight:800}.landing-security p{max-width:700px;margin-bottom:0}.landing-cta{padding:70px 0;background:#202a67;color:#fff}.landing-cta__inner{display:flex;align-items:center;justify-content:space-between;gap:40px}.landing-cta p{margin-bottom:0;color:#ccd3ef}.landing-footer{padding:26px 0;background:#171d49;color:#aeb7db}.landing-footer .landing-container{display:flex;justify-content:space-between;align-items:center}.landing-footer a{color:#dce1f6}
@media(max-width:800px){.landing-container{width:min(100% - 28px,1160px)}.landing-header__inner{height:66px}.landing-nav{display:none}.landing-actions{margin-left:auto}.landing-actions .btn-ghost,.landing-user{display:none}.landing-hero{padding:62px 0 72px}.landing-hero__grid{grid-template-columns:1fr;gap:46px}.landing-hero h1{font-size:48px}.landing-card-stage{min-height:300px}.landing-card{padding:22px}.landing-card__chip{margin-top:36px}.landing-card__foot{left:22px;right:22px;bottom:22px}.landing-feature-grid,.landing-split{grid-template-columns:1fr}.landing-split{gap:38px}.landing-section{padding:72px 0}.landing-steps li{grid-template-columns:1fr;gap:8px}.landing-security{grid-template-columns:1fr}.landing-security__badge{width:78px;height:78px;border-radius:22px;font-size:34px}.landing-cta__inner{align-items:flex-start;flex-direction:column}.landing-hero__actions{flex-direction:column}.landing-hero__actions .btn{text-align:center}.landing-trust{gap:12px 18px}}
@media(max-width:430px){.landing-hero h1{font-size:40px}.landing-header .btn-sm{padding-left:13px;padding-right:13px}.landing-card__number{font-size:17px}.landing-card-stage{min-height:250px}.landing-card__chip{margin-top:27px;width:43px;height:32px}.landing-card__foot{font-size:11px}}
