:root{
  --bg: #f6f7fb;
  --panel: #ffffff;
  --text: #0b1220;
  --muted: rgba(11,18,32,.64);
  --stroke: rgba(11,18,32,.10);
  --stroke2: rgba(11,18,32,.14);
  --shadow: 0 12px 30px rgba(11,18,32,.10);
  --shadow2: 0 18px 48px rgba(11,18,32,.12);
  --brand1: #6d5efc;
  --brand2: #3dd5f3;
  --ok: #16a34a;
  --bad: #ef4444;
  --warn: #f59e0b;
  --radius: 16px;
  --radius2: 22px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 520px at 15% 0%, rgba(109,94,252,.18), transparent 55%),
    radial-gradient(860px 520px at 90% 15%, rgba(61,213,243,.14), transparent 55%),
    var(--bg);
}

.container{
  width: min(1120px, calc(100% - 32px));
  margin:0 auto;
}

.header{
  position: sticky;
  top:0;
  z-index:10;
  background: rgba(246,247,251,.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--stroke);
}
.header__inner{
  height: 68px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}
.header__right{
  display:flex;
  align-items:center;
  gap:14px;
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
  text-decoration:none;
  color: inherit;
  font-weight: 900;
  letter-spacing: .2px;
}
.brand__mark{
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand1), var(--brand2));
  box-shadow: 0 10px 22px rgba(109,94,252,.22);
}
.brand__text{ font-size: 16px; }

.lang{
  display:flex;
  gap:6px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,.72);
  border: 1px solid var(--stroke);
}
.lang__item{
  font-weight: 800;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  text-decoration:none;
  color: rgba(11,18,32,.55);
}
.lang__item.active{
  background: rgba(11,18,32,.07);
  color: var(--text);
}

.main{ padding: 26px 0 34px; }

.footer{
  border-top: 1px solid var(--stroke);
  padding: 18px 0;
  background: rgba(246,247,251,.86);
}
.footer__inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
}

a.link{
  color: rgba(11,18,32,.86);
  font-weight: 800;
  text-decoration: none;
}
a.link:hover{ text-decoration: underline; }

.muted{ color: var(--muted); }
.small{ font-size: 13px; }

.flash-stack{ display:flex; flex-direction:column; gap:10px; margin: 0 0 14px; }
.flash{
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.88);
  box-shadow: var(--shadow);
}
.flash.success{ border-color: rgba(22,163,74,.25); }
.flash.error{ border-color: rgba(239,68,68,.25); }
.flash.info{ border-color: rgba(109,94,252,.20); }

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: linear-gradient(135deg, var(--brand1), var(--brand2));
  color: #07101c;
  font-weight: 900;
  text-decoration:none;
  box-shadow: 0 10px 24px rgba(109,94,252,.18);
  transition: transform .12s ease, filter .12s ease;
  cursor:pointer;
}
.btn:hover{ filter: brightness(1.03); transform: translateY(-1px); }
.btn:active{ transform: translateY(0); }
.btn:disabled{ opacity:.55; cursor:not-allowed; transform:none; }

.btn--ghost{
  background: rgba(255,255,255,.80);
  color: var(--text);
  box-shadow: none;
}
.btn--ghost:hover{ background: rgba(255,255,255,.98); }

.btn--danger{
  background: rgba(239,68,68,.12);
  border-color: rgba(239,68,68,.24);
  color: rgba(11,18,32,.92);
  box-shadow: none;
}

.btn--lg{ padding: 12px 16px; border-radius: 16px; }

.badge{
  display:inline-flex;
  align-items:center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.78);
  border: 1px solid var(--stroke);
  color: rgba(11,18,32,.72);
  font-weight: 800;
  font-size: 12px;
}

.pill{
  font-size: 12px;
  font-weight: 900;
  color: rgba(11,18,32,.72);
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(11,18,32,.06);
  border: 1px solid rgba(11,18,32,.10);
  white-space: nowrap;
}

.card{
  background: rgba(255,255,255,.90);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}
.card--tight{ padding: 14px; }
.card__title{
  font-weight: 900;
  letter-spacing: -0.01em;
}
.card__sub{ color: var(--muted); margin-top: 4px; font-size: 13px; }

.page-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.h1{
  font-size: 28px;
  margin: 0;
  letter-spacing: -0.02em;
  font-weight: 900;
}
.h2{
  font-size: 20px;
  margin: 0;
  letter-spacing: -0.01em;
  font-weight: 900;
}

.grid2{ display:grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3{ display:grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

.divider{ height:1px; background: var(--stroke); margin: 12px 0; }

.form{
  display:flex;
  flex-direction:column;
  gap: 12px;
}
.field label{
  display:block;
  font-weight: 900;
  font-size: 13px;
  margin-bottom: 6px;
}
.input, .textarea, .select{
  width:100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--stroke2);
  background: rgba(255,255,255,.96);
  outline: none;
  font-size: 14px;
}
.textarea{ min-height: 96px; resize: vertical; }
.help{ font-size: 13px; color: var(--muted); margin-top: 6px; }

.kpi{
  display:flex;
  flex-direction:column;
  gap: 6px;
}
.kpi__label{ color: var(--muted); font-weight: 800; font-size: 13px; }
.kpi__value{ font-weight: 900; font-size: 26px; letter-spacing: -0.01em; }
.kpi__actions{ display:flex; gap: 10px; flex-wrap: wrap; }

.alert{
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--stroke2);
  background: rgba(255,255,255,.88);
}
.alert--ok{ border-color: rgba(22,163,74,.25); }
.alert--bad{ border-color: rgba(239,68,68,.25); }
.alert--warn{ border-color: rgba(245,158,11,.25); }
.alert__title{ font-weight: 900; margin-bottom: 4px; }

.avatar{
  width: 72px;
  height: 72px;
  border-radius: 22px;
  overflow:hidden;
  background: rgba(11,18,32,.06);
  border: 1px solid rgba(11,18,32,.10);
  flex: 0 0 auto;
}
.avatar--circle{ border-radius: 999px; }
.avatar img, .avatar video{
  width:100%;
  height:100%;
  object-fit: cover;
  display:block;
}

.tip-card{ max-width: 760px; margin: 0 auto; }
.tip-head{
  display:flex;
  align-items:center;
  gap: 14px;
}
.tip-name{
  font-weight: 900;
  font-size: 24px;
  letter-spacing: -0.02em;
}
.tip-goal{ margin-top: 4px; color: var(--muted); }
.tip-amounts{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.chip{
  border-radius: 999px;
  border: 1px solid var(--stroke2);
  background: rgba(255,255,255,.92);
  padding: 10px 14px;
  font-weight: 900;
  cursor:pointer;
}
.chip.active{
  border-color: rgba(109,94,252,.40);
  box-shadow: 0 10px 24px rgba(109,94,252,.12);
}

.table-wrap{ overflow:auto; border-radius: 14px; border: 1px solid var(--stroke); background: rgba(255,255,255,.92); }
.table{
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}
.table th, .table td{
  text-align:left;
  padding: 12px 12px;
  border-bottom: 1px solid rgba(11,18,32,.08);
  font-size: 13px;
}
.table th{ font-weight: 900; color: rgba(11,18,32,.75); }
.table tr:last-child td{ border-bottom:0; }

.amount{ font-weight: 900; }
.amount.pos{ color: rgba(22,163,74,.92); }
.amount.neg{ color: rgba(239,68,68,.92); }

.qr-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: start;
}
.qr-preview{
  border-radius: 16px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.92);
  padding: 12px;
  display:flex;
  justify-content:center;
}
.qr-preview img{
  max-width: 100%;
  height: auto;
  border-radius: 14px;
}
.qr-actions{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
}

@media (max-width: 960px){
  .grid2{ grid-template-columns: 1fr; }
  .grid3{ grid-template-columns: 1fr; }
  .qr-grid{ grid-template-columns: 1fr; }
  .table{ min-width: 640px; }
}

.brand{display:flex;align-items:center;gap:10px;text-decoration:none}
.brand-logo{width:32px;height:32px;border-radius:10px}
.brand-text{font-weight:700;color:#111}

/* Landing phone preview */
.phone-preview{
  position: relative;
  width: min(360px, 100%);
  margin: 0 auto;
}

@media (min-width: 1100px){
  .phone-preview{ width: 340px; } /* на десктопе фиксируем */
}

.phone-preview__img{
  width: 100%;
  height: auto;
  display: block;
}

/* Видео кладём в круглую аватарку на картинке телефона.
   Эти координаты можно чуть подвинуть под твой PNG. */
.phone-preview__video{
  position: absolute;
  left: 14%;
  top: 21%;
  width: 25%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255,255,255,.95);
  box-shadow: 0 10px 22px rgba(0,0,0,.18);
}

