/* 1xpay — design system v2
   Ориентир: розничные банки (Т-Банк, Ozon Банк, PayPal, Revolut).
   Светлая основа, глубокий navy для «денежных» поверхностей, ультрамарин как бренд.
   Без рамок-обводок: глубина строится мягкими многослойными тенями. */

@import url('https://fonts.googleapis.com/css2?family=Onest:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #F2F3F7;
  --bg-2: #E9EBF1;
  --surface: #FFFFFF;
  --surface-2: #F5F6F9;
  --surface-3: #ECEEF3;
  --line: #E6E8EE;

  --ink: #0D1326;
  --ink-2: #5A6378;
  --ink-3: #9BA2B2;

  --brand: #2350F5;
  --brand-2: #4A72FF;
  --brand-press: #1A40D6;
  --brand-soft: #EAF0FF;
  --navy: #0A1033;
  --navy-2: #131B4A;

  --success: #13A35A;
  --success-soft: #E5F6EC;
  --warn: #E8920B;
  --warn-soft: #FFF3DE;
  --danger: #E5384B;
  --danger-soft: #FDEBED;

  --r-sm: 12px;
  --r: 16px;
  --r-lg: 22px;
  --r-xl: 28px;

  --sh-1: 0 1px 2px rgba(13,19,38,.04), 0 2px 8px rgba(13,19,38,.04);
  --sh-2: 0 1px 2px rgba(13,19,38,.04), 0 8px 24px -6px rgba(13,19,38,.10);
  --sh-3: 0 2px 6px rgba(13,19,38,.06), 0 24px 60px -16px rgba(13,19,38,.25);
  --sh-brand: 0 8px 24px -8px rgba(35,80,245,.55);

  --font: 'Onest', -apple-system, 'SF Pro Text', 'Segoe UI', Roboto, sans-serif;
  --ease: cubic-bezier(.22,.8,.24,1);
  --spring: cubic-bezier(.34,1.4,.5,1);

  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #07080C;
  --bg-2: #0D0F15;
  --surface: #14161D;
  --surface-2: #1B1E27;
  --surface-3: #242833;
  --line: #242833;
  --ink: #F3F5FA;
  --ink-2: #A1A8B8;
  --ink-3: #6A7183;
  --brand: #4A72FF;
  --brand-2: #6E8DFF;
  --brand-press: #3A62F0;
  --brand-soft: rgba(74,114,255,.14);
  --success-soft: rgba(19,163,90,.16);
  --warn-soft: rgba(232,146,11,.16);
  --danger-soft: rgba(229,56,75,.16);
  --sh-1: none;
  --sh-2: 0 0 0 1px rgba(255,255,255,.04);
  --sh-3: 0 24px 60px -16px rgba(0,0,0,.7);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 15px; line-height: 1.5;
  font-feature-settings: 'tnum' 0;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, h4 { margin: 0; line-height: 1.1; letter-spacing: -0.025em; font-weight: 700; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; }
input, select, textarea { font: inherit; color: inherit; }
.num { font-variant-numeric: tabular-nums; }
.ink2 { color: var(--ink-2); }
.ink3 { color: var(--ink-3); }
.ico { width: 22px; height: 22px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.ico-sm { width: 16px; height: 16px; stroke-width: 2.1; }
.ico-lg { width: 26px; height: 26px; }

/* ---------- Brand ---------- */
.mark { width: 36px; height: 36px; flex: none; display: block; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 21px; letter-spacing: -0.04em; }

/* ---------- Buttons ---------- */
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 52px; padding: 0 22px; border-radius: var(--r);
  font-weight: 600; font-size: 16px; white-space: nowrap; letter-spacing: -0.01em;
  transition: transform .18s var(--ease), background .2s, box-shadow .2s, opacity .2s;
  user-select: none; -webkit-user-select: none;
}
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .38; pointer-events: none; box-shadow: none; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--sh-brand); }
.btn-primary:hover { background: var(--brand-press); }
.btn-dark { background: var(--ink); color: var(--surface); }
:root[data-theme="dark"] .btn-dark { background: #fff; color: #0D1326; }
.btn-light { background: var(--surface); color: var(--ink); box-shadow: var(--sh-1); }
.btn-soft { background: var(--brand-soft); color: var(--brand); }
.btn-gray { background: var(--surface-3); color: var(--ink); }
.btn-danger-soft { background: var(--danger-soft); color: var(--danger); }
.btn-tg { background: #2AABEE; color: #fff; box-shadow: 0 8px 24px -8px rgba(42,171,238,.6); }
.btn-block { width: 100%; }
.btn-sm { height: 40px; padding: 0 16px; font-size: 14.5px; border-radius: 12px; }
.btn-lg { height: 58px; font-size: 17px; border-radius: 18px; }
.btn-pill { border-radius: 999px; }
.ripple { position: absolute; border-radius: 50%; background: currentColor; opacity: .18; transform: scale(0); animation: ripple .6s var(--ease) forwards; pointer-events: none; }
@keyframes ripple { to { transform: scale(2.6); opacity: 0; } }

/* ---------- Inputs ---------- */
.field { display: flex; flex-direction: column; gap: 8px; }
.label { font-size: 13.5px; color: var(--ink-2); font-weight: 500; }
.input {
  height: 56px; width: 100%; padding: 0 18px;
  background: var(--surface); border: 1.5px solid transparent; border-radius: var(--r);
  outline: none; transition: border-color .2s, box-shadow .2s; font-size: 16px;
  box-shadow: var(--sh-1);
}
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.input::placeholder { color: var(--ink-3); }
.hint { font-size: 12.5px; color: var(--ink-3); }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px; border-radius: 8px; font-size: 12px; font-weight: 600; background: var(--surface-3); color: var(--ink-2); white-space: nowrap; }
.badge-brand { background: var(--brand-soft); color: var(--brand); }
.badge-ok { background: var(--success-soft); color: var(--success); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }

.card { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--sh-2); }

.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ink-3); flex: none; }
.dot.online { background: #22C55E; }
.dot.away { background: var(--warn); }

.avatar { width: 44px; height: 44px; border-radius: 50%; flex: none; position: relative; display: grid; place-items: center; font-weight: 700; font-size: 17px; color: #fff; }
.avatar .dot { position: absolute; right: 0; bottom: 0; width: 12px; height: 12px; border: 2.5px solid var(--surface); box-sizing: content-box; transform: translate(2px, 2px); }

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