/* Murabaha — visual system matched to wata.pro
   Font: TT Firs Neue · bg #100e12 · CTA #e1ff00 flat (no glow) */

@font-face {
  font-family: 'TTFirs';
  src: url('/fonts/ttfirs-regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'TTFirs';
  src: url('/fonts/ttfirs-medium.woff') format('woff');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'TTFirs';
  src: url('/fonts/ttfirs-demibold.woff') format('woff');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --font: 'TTFirs', Arial, sans-serif;

  /* Exact WATA palette */
  --bg: #100e12;
  --bg-elev: #1b191c;
  --bg-soft: #211f22;
  --bg-hover: #2a282c;

  --ink: #ffffff;
  --ink-inv: #000000;
  --t: #c9c7cc;
  --m: #878688;
  --s: #6a686c;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.12);
  --soft: rgba(255, 255, 255, 0.05);
  --soft-2: #161418;
  --paper: #100e12;
  --surface: #1b191c;

  /* CTA lime (wata main button) + accent yellow */
  --y: #e1ff00;
  --y-h: #cce700;
  --y-accent: #fff705;
  --y-soft: rgba(225, 255, 0, 0.1);
  --y-line: rgba(225, 255, 0, 0.28);

  --ok: #3dd68c;
  --ok-bg: rgba(61, 214, 140, 0.12);
  --red: #ff6b6b;
  --red-bg: rgba(255, 107, 107, 0.12);

  --r: 16px;
  --r-lg: 24px;
  --sh: none;
  --sh2: none;
  --sh-focus: 0 0 0 2px rgba(225, 255, 0, 0.35);

  /* 8px spacing system (4 base → 8 · 12 · 16 · 24 · 32 · 40 · 48) */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 40px;
  --sp-8: 48px;
  /* field stack: label→input */
  --gap-label: var(--sp-2);
  /* controls in a row/grid */
  --gap-field: var(--sp-4);
  /* blocks / sections */
  --gap-block: var(--sp-5);
  /* page vertical rhythm */
  --gap-section: var(--sp-6);

  --w: 1120px;
  --hh: 72px;
  --control-h: 48px;
  --control-h-lg: 52px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  font-weight: 400;
  color: var(--t);
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-synthesis: none;
}

a { color: var(--t); }
button, input, select, textarea { font: inherit; }
.hidden { display: none !important; }

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--y);
  color: var(--ink-inv);
  padding: 8px 12px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 500;
  font-size: 13px;
}
.skip:focus { top: 12px; }

.w {
  width: 100%;
  max-width: var(--w);
  margin: 0 auto;
  padding: 0 28px;
}

/* ─── Header ─── */

.h {
  height: var(--hh);
  border-bottom: 1px solid var(--line);
  background: rgba(16, 14, 18, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 40;
}

.h__in {
  height: var(--hh);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.h__logo {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-decoration: none;
}

.h__logo img {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
}

.h__logo:hover { opacity: 0.9; }

.h__nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.h__nav a {
  text-decoration: none;
  color: var(--t);
  font-size: 14px;
  font-weight: 500;
  padding: 9px 14px;
  border-radius: 999px;
  transition: background 0.15s, color 0.15s;
}

.h__nav a:hover {
  background: var(--soft);
  color: var(--ink);
}

.h__cta {
  background: var(--y) !important;
  color: var(--ink-inv) !important;
  font-weight: 400 !important;
  padding: 10px 18px !important;
  border-radius: 50px !important;
  margin-left: 6px;
  letter-spacing: 0;
}

.h__cta:hover {
  background: var(--y-h) !important;
  color: var(--ink-inv) !important;
}

/* ─── Hero ─── */

.top {
  padding: var(--sp-8) 0 var(--sp-8);
  background: var(--bg);
}

.top__grid {
  display: grid;
  grid-template-columns: 1.12fr minmax(340px, 400px);
  gap: var(--sp-6) var(--sp-8);
  align-items: start;
}

.top__text {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding-top: 8px;
}

.top h1 {
  font-size: clamp(36px, 5.2vw, 54px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.08;
  color: var(--ink);
  margin-bottom: var(--sp-4);
}

.top__p {
  font-size: 17px;
  line-height: 1.55;
  color: var(--t);
  max-width: 30em;
  margin-bottom: var(--sp-5);
}

.assurances {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-bottom: var(--sp-6);
  list-style: none;
}

.assurances li {
  font-size: 13px;
  font-weight: 400;
  color: var(--t);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 50px;
  padding: 8px 13px;
  letter-spacing: 0;
}

.assurances li strong {
  color: var(--ink);
  font-weight: 500;
}

.top__art {
  margin-top: 8px;
  width: 100%;
}

.top__art img {
  width: 100%;
  height: auto;
  max-height: 420px;
  display: block;
  border-radius: 24px;
  object-fit: cover;
  object-position: center;
  border: 1px solid var(--line);
  user-select: none;
}

/* ─── Form card ─── */

.box {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  position: sticky;
  top: calc(var(--hh) + var(--sp-4));
}

.box__head {
  margin-bottom: var(--sp-4);
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid var(--line);
}

.box__head h2 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.box__head p {
  font-size: 13px;
  color: var(--m);
  margin-top: 4px;
  line-height: 1.4;
}

#form {
  display: flex;
  flex-direction: column;
  gap: var(--gap-field);
}

.f {
  display: flex;
  flex-direction: column;
  gap: var(--gap-label);
  min-width: 0;
}

.f__l {
  font-size: 13px;
  font-weight: 400;
  color: var(--m);
  letter-spacing: 0;
  line-height: 1.25;
  min-height: 16px;
}

.f__l i {
  font-style: normal;
  color: var(--s);
  font-weight: 500;
}

.f__i {
  width: 100%;
  height: var(--control-h-lg);
  padding: 0 var(--sp-4);
  border: 1px solid var(--line-strong);
  border-radius: var(--sp-3);
  background: var(--bg);
  outline: none;
  font-size: 16px;
  font-weight: 400;
  color: var(--ink);
  transition: background 0.15s, border-color 0.15s;
}

.f__i:hover {
  background: var(--bg-soft);
  border-color: rgba(255, 255, 255, 0.2);
}

.f__i:focus {
  background: var(--bg);
  border-color: var(--y);
  box-shadow: var(--sh-focus);
}

.f__i::placeholder {
  color: var(--s);
  font-weight: 400;
}

.f__s {
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%23878688' stroke-width='2'%3E%3Cpath d='M3 5l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.f-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 10px;
}

.hp {
  position: absolute !important;
  left: -9999px !important;
  height: 0 !important;
  width: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.err {
  background: var(--red-bg);
  color: var(--red);
  border-radius: 12px;
  padding: 11px 13px;
  font-size: 13px;
  font-weight: 400;
  border: 1px solid rgba(255, 107, 107, 0.25);
}

.box__legal {
  font-size: 12px;
  color: var(--s);
  text-align: center;
  line-height: 1.45;
  margin-top: 2px;
}

.box__legal a {
  color: var(--m);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.box__legal--mt {
  margin-top: 12px;
}

.box__legal--soft {
  margin-top: 14px;
  font-size: 11px;
  line-height: 1.4;
  color: var(--s);
  opacity: 0.9;
  font-weight: 400;
  max-width: 28em;
  margin-left: auto;
  margin-right: auto;
}

.box__legal--soft a {
  color: var(--s);
  font-weight: 500;
}

.box__secure {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 4px;
  padding: 11px 12px;
  background: var(--ok-bg);
  border: 1px solid rgba(61, 214, 140, 0.22);
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--t);
}

.box__secure strong {
  color: var(--ok);
  font-weight: 500;
}

.box__secure-ico {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--bg);
  border: 1.5px solid rgba(61, 214, 140, 0.4);
  display: grid;
  place-items: center;
  font-size: 10px;
  color: var(--ok);
  font-weight: 500;
}

/* Switch */
.switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r);
}

.switch__text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.switch__text strong {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0;
}

.switch__text span {
  font-size: 12px;
  color: var(--m);
}

.switch__ctl {
  position: relative;
  display: inline-flex;
  cursor: pointer;
  flex-shrink: 0;
}

.switch__ctl input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.switch__track {
  width: 46px;
  height: 28px;
  border-radius: 999px;
  background: #3a383c;
  position: relative;
  transition: background 0.15s;
}

.switch__track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s;
}

.switch__ctl input:checked + .switch__track {
  background: var(--y);
}

.switch__ctl input:checked + .switch__track::after {
  transform: translateX(18px);
  background: var(--ink-inv);
}

.switch__ctl input:focus-visible + .switch__track {
  outline: 2px solid var(--y);
  outline-offset: 2px;
}

.hint {
  font-size: 13px;
  line-height: 1.45;
  color: var(--t);
  background: var(--y-soft);
  border: 1px solid var(--y-line);
  border-radius: 12px;
  padding: 12px 14px;
}

.f-group-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  margin-top: 4px;
  letter-spacing: 0;
}

/* ─── Buttons (flat like wata.pro — no glow/shadow) ─── */

.b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--control-h-lg);
  padding: 0 var(--sp-5);
  border: 0;
  border-radius: 50px;
  font-weight: 400;
  font-size: 16px;
  letter-spacing: 0;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out, opacity 0.15s;
  color: var(--ink);
  box-shadow: none;
  -webkit-tap-highlight-color: transparent;
  gap: var(--sp-2);
}

.b:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.b:active:not(:disabled) {
  opacity: 0.88;
}

.b--y {
  width: 100%;
  background: var(--y);
  color: var(--ink-inv);
  box-shadow: none;
}

.b--y:hover:not(:disabled) {
  background: var(--y-h);
}

.b--g {
  height: 42px;
  padding: 0 16px;
  font-size: 14px;
  background: transparent;
  color: var(--ink);
  font-weight: 400;
  border-radius: 50px;
  border: 1px solid var(--line-strong);
}

.b--g:hover:not(:disabled) {
  background: var(--soft);
}

.b--k {
  width: 100%;
  max-width: 168px;
  height: 48px;
  font-size: 15px;
  background: var(--y);
  color: var(--ink-inv);
  border-radius: 50px;
  box-shadow: none;
}

.b--k:hover:not(:disabled) {
  background: var(--y-h);
}

.b--ok {
  background: var(--ok) !important;
  color: var(--ink-inv) !important;
  box-shadow: none !important;
}

.b--inline {
  width: auto;
  display: inline-flex;
  align-self: flex-start;
}

/* ─── Results ─── */

.res {
  padding: 48px 0 64px;
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
}

.res__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.res__h {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.res__m {
  font-size: 14px;
  color: var(--m);
  margin-top: 5px;
}

.res__save {
  font-size: 13px;
  font-weight: 400;
  background: var(--y);
  color: var(--ink-inv);
  padding: 9px 14px;
  border-radius: 50px;
  letter-spacing: 0;
}

.res__note {
  font-size: 13px;
  color: var(--m);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 16px;
  margin-bottom: 12px;
  line-height: 1.45;
}

.res__empty {
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: 18px;
  padding: 36px 22px;
  text-align: center;
}

.res__empty strong {
  display: block;
  font-size: 17px;
  color: var(--ink);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.res__empty p {
  font-size: 14px;
  color: var(--m);
  line-height: 1.5;
  max-width: 28em;
  margin: 0 auto;
}

.list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  padding: 20px;
  transition: border-color 0.2s;
}

.card:hover {
  border-color: rgba(255, 255, 255, 0.18);
}

.card--best {
  border-color: var(--y);
  outline: none;
  background: var(--surface);
}

.card__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.card__main {
  min-width: 0;
  flex: 1;
}

.card__name {
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.card__tag {
  font-size: 12px;
  font-weight: 400;
  background: var(--y);
  color: var(--ink-inv);
  padding: 4px 10px;
  border-radius: 50px;
  letter-spacing: 0;
}

.card__d {
  font-size: 13px;
  color: var(--m);
  margin-top: 4px;
  line-height: 1.4;
}

.card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.card__meta span {
  font-size: 12px;
  font-weight: 600;
  color: var(--m);
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 4px 9px;
  border-radius: 999px;
}

.card__side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  flex-shrink: 0;
}

.card__price {
  text-align: right;
}

.card__price small {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--m);
  margin-bottom: 3px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.card__price strong {
  display: block;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
}

.card__price em {
  display: block;
  font-style: normal;
  font-size: 13px;
  font-weight: 500;
  color: var(--m);
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}

/* ─── Blocks ─── */

.block {
  padding: 64px 0;
}

.block--line {
  border-top: 1px solid var(--line);
}

.block--soft {
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
}

.block__h {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-bottom: 24px;
}

.block__lead {
  font-size: 16px;
  color: var(--m);
  max-width: 36em;
  margin: -12px 0 28px;
  line-height: 1.5;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.steps--page {
  margin: 8px 0 8px;
}

.step {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 100%;
}

.step:hover {
  border-color: var(--line-strong);
}

.step__n {
  width: 28px;
  height: 28px;
  border-radius: 50px;
  background: var(--y);
  color: var(--ink-inv);
  font-size: 13px;
  font-weight: 500;
  display: grid;
  place-items: center;
  letter-spacing: 0;
}

.step__ico {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 12px;
}

.step strong {
  display: block;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0;
  margin-bottom: 4px;
}

.step p {
  font-size: 13px;
  color: var(--m);
  line-height: 1.45;
  margin: 0;
}

.note {
  margin-top: 18px;
  font-size: 14px;
  color: var(--m);
  line-height: 1.5;
  padding: 14px 16px;
  background: var(--surface);
  border-radius: 14px;
  border: 1px solid var(--line);
}

.note strong {
  color: var(--ink);
}

/* Trust section */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.trust-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 22px 20px;
}

.trust-card:hover {
  border-color: var(--line-strong);
}

.trust-card__ico {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--y-soft);
  border: 1px solid var(--y-line);
  display: grid;
  place-items: center;
  font-size: 16px;
  margin-bottom: 14px;
}

.trust-card h3 {
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0;
  margin-bottom: 6px;
}

.trust-card p {
  font-size: 13.5px;
  color: var(--m);
  line-height: 1.5;
  margin: 0;
}

/* FAQ */
.faq {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 720px;
}

.faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0;
  overflow: hidden;
}

.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 18px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: '+';
  font-weight: 500;
  color: var(--y);
  font-size: 20px;
  line-height: 1;
}

.faq details[open] summary::after {
  content: '−';
}

.faq details p {
  padding: 0 18px 16px;
  font-size: 14px;
  color: var(--m);
  line-height: 1.55;
  margin: 0;
}

.faq a {
  font-weight: 600;
  color: var(--y);
}

/* Cookie banner */
.cookie {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  background: rgba(16, 14, 18, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
}

.cookie__in {
  max-width: var(--w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.cookie__text {
  flex: 1;
  min-width: 220px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--t);
  margin: 0;
}

.cookie__text a {
  color: var(--y);
  font-weight: 500;
  text-underline-offset: 2px;
}

.cookie__btn {
  width: auto;
  min-width: 120px;
  height: 44px;
  padding: 0 20px;
  flex-shrink: 0;
  font-size: 15px;
}

/* Footer */
.ft {
  border-top: 1px solid var(--line);
  padding: 28px 0 24px;
  background: var(--bg);
}

.ft__in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.ft__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}

.ft__nav a {
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--t);
  padding: 7px 11px;
  border-radius: 999px;
}

.ft__nav a:hover {
  background: var(--soft);
  color: var(--ink);
}

.ft__copy {
  font-size: 12.5px;
  color: var(--s);
  line-height: 1.45;
  margin: 0;
}

.ft__copy a {
  color: var(--m);
}

.ft__legal {
  display: none;
}

/* Loader */
.loader {
  position: fixed;
  inset: 0;
  z-index: 85;
  background: rgba(16, 14, 18, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.loader__card {
  width: 100%;
  max-width: 340px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  padding: 34px 26px 30px;
  text-align: center;
}

.loader__spin {
  width: 46px;
  height: 46px;
  margin: 0 auto 18px;
  border-radius: 50%;
  border: 3px solid var(--soft);
  border-top-color: var(--y);
  border-right-color: var(--ink);
  animation: spin 0.8s linear infinite;
}

.loader__title {
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--ink);
  margin-bottom: 6px;
}

.loader__sub {
  font-size: 14px;
  color: var(--m);
  line-height: 1.4;
  min-height: 2.6em;
}

.loader__dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 16px;
}

.loader__dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--y);
  animation: bounce 1.1s ease-in-out infinite;
}

.loader__dots span:nth-child(2) { animation-delay: 0.15s; }
.loader__dots span:nth-child(3) { animation-delay: 0.3s; }

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.45; }
  40% { transform: translateY(-5px); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .loader__spin { animation: none; border-top-color: var(--y); }
  .loader__dots span { animation: none; opacity: 0.7; }
  html { scroll-behavior: auto; }
}

/* Toast / modal */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 80;
  max-width: min(380px, calc(100% - 32px));
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  padding: 13px 18px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 400;
  text-align: center;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal__box {
  background: var(--surface);
  border-radius: 24px;
  padding: 26px;
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  position: relative;
  border: 1px solid var(--line-strong);
}

.modal__box--form {
  max-width: 420px;
  max-height: min(90vh, 740px);
  overflow-y: auto;
  gap: 14px;
}

.modal__box--form form#apply-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 4px;
}

.modal__box--form .f {
  gap: 8px;
}

.modal__box--form .f-group-title {
  margin-top: 6px;
  margin-bottom: 2px;
}

.modal__box--form .f-row {
  gap: 12px;
}

.modal__box--form .f,
.modal__box--form .switch,
.modal__box--form .hint,
.modal__box--form .f-row {
  width: 100%;
}

.modal__box--form .b--y {
  margin-top: 4px;
}

.modal__lead {
  font-size: 14px;
  color: var(--m);
  margin: -4px 0 0;
  line-height: 1.45;
}

.modal__trust {
  font-size: 12.5px !important;
  color: var(--t) !important;
  font-weight: 500;
  background: var(--ok-bg);
  border: 1px solid rgba(61, 214, 140, 0.22);
  border-radius: 12px;
  padding: 11px 12px;
  margin: 0 0 2px !important;
  line-height: 1.45 !important;
}

.modal__x {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 11px;
  background: var(--soft);
  color: var(--t);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.modal__x:hover {
  background: var(--bg-hover);
  color: var(--ink);
}

.modal__box h3 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  padding-right: 36px;
}

.modal__box p {
  font-size: 14px;
  color: var(--m);
  line-height: 1.5;
  margin-bottom: 4px;
}

/* Static pages */
.page {
  padding: 44px 0 72px;
  max-width: 640px;
}

.page--wide { max-width: 680px; }

.page__art {
  margin: 22px 0 10px;
  max-width: 440px;
}

.page__art img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 18px;
  user-select: none;
  pointer-events: none;
}

.page h1 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-bottom: 14px;
  line-height: 1.1;
}

.page h2,
.page__h2 {
  font-size: 16px;
  font-weight: 500;
  margin: 28px 0 10px;
  color: var(--ink);
  letter-spacing: 0;
}

.page__lead {
  font-size: 16px !important;
  line-height: 1.55 !important;
  color: var(--t);
  margin-bottom: 8px;
}

.page__meta {
  margin-top: 24px;
  font-size: 13px !important;
  color: var(--m) !important;
}

.page p, .page li {
  font-size: 14.5px;
  color: var(--t);
  line-height: 1.6;
  margin-bottom: 8px;
}

.page ul { padding-left: 1.15em; margin-bottom: 8px; }
.page ol { padding-left: 1.25em; margin-bottom: 12px; }

.page .note {
  font-size: 13px;
  color: var(--m);
  margin-bottom: 14px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.f__ta {
  height: auto !important;
  min-height: 92px;
  padding: 12px 14px !important;
  resize: vertical;
  line-height: 1.45;
}

.err--mt { margin-top: 12px; }
.b--mt { margin-top: 14px; }

.prices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 22px 0;
}

.price {
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  padding: 20px;
  background: var(--surface);
}

.price--hot {
  background: var(--surface);
  border-color: var(--y);
}

.price h3 {
  font-size: 13px;
  font-weight: 400;
  color: var(--m);
  margin-bottom: 8px;
  text-transform: none;
  letter-spacing: 0;
}

.price .n {
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-bottom: 6px;
}

.price--hot .n {
  color: var(--y);
}

.price p {
  font-size: 13px;
  color: var(--m);
  margin: 0;
}

.panel {
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  padding: 24px;
  margin-top: 22px;
  background: var(--surface);
}

.panel h2 {
  font-size: 18px;
  font-weight: 500;
  margin: 0 0 2px;
  letter-spacing: 0;
  color: var(--ink);
}

.panel .sub {
  font-size: 13px;
  color: var(--m);
  margin-bottom: 16px;
}

.err-page {
  min-height: 50vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 0;
}

.err-page .code {
  font-size: 56px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--y);
  line-height: 1;
  margin-bottom: 8px;
}

.err-page__h {
  font-size: 22px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 8px;
}

.err-page__p {
  color: var(--m);
  margin-bottom: 16px;
  font-size: 15px;
}

/* Admin (aligned with WATA dark) — 8px rhythm */
.admin-body { background: var(--bg); color: #eee; font-family: var(--font); font-size: 14px; line-height: 1.5; }
.admin-wrap {
  max-width: min(1680px, 100%);
  margin: 0 auto;
  padding: var(--sp-5) var(--sp-5) var(--sp-7);
  width: 100%;
  box-sizing: border-box;
}
.admin-login {
  max-width: 380px;
  margin: 12vh auto;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.admin-login h1 {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  margin: 0;
  line-height: 1.25;
}
.admin-login p {
  color: #999;
  font-size: 13px;
  margin: 0;
  line-height: 1.5;
}
.admin-login input {
  width: 100%;
  height: var(--control-h);
  border-radius: var(--sp-3);
  border: 1.5px solid var(--line-strong);
  background: var(--bg);
  color: #fff;
  padding: 0 var(--sp-4);
  margin: 0;
}
.admin-login input:focus { outline: none; border-color: var(--y); box-shadow: var(--sh-focus); }
.admin-login .b {
  width: 100%;
  height: var(--control-h);
  margin-top: var(--sp-1);
}
.admin-code { color: var(--y); font-size: 12px; }
.admin-login-err {
  color: #fca5a5;
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  display: none;
}
.admin-login-err.is-visible { display: block; }
.admin-top {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-4);
  flex-wrap: wrap;
  margin-bottom: var(--sp-5);
  align-items: flex-start;
}
.admin-top h1 { font-size: 20px; font-weight: 600; color: #fff; margin: 0; line-height: 1.25; }
.admin-sub { color: #8f9b95; font-size: 13px; margin-top: var(--sp-2); line-height: 1.5; max-width: 36em; }
.admin-won-hint { color: #6ee7b7; }
.admin-help {
  background: rgba(110, 231, 183, 0.08);
  border: 1px solid rgba(110, 231, 183, 0.28);
  border-radius: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  margin-bottom: var(--sp-4);
  color: #c8d5cf;
  font-size: 13px;
  line-height: 1.5;
}
.admin-help strong { color: #6ee7b7; }
.admin-top__actions { display: flex; gap: var(--sp-2); flex-wrap: wrap; align-items: center; }
.admin-link-site { color: var(--y) !important; }
.admin-link-out { color: #f28b82 !important; }
.admin-analytics-bar {
  margin-bottom: var(--sp-5);
}
.admin-toolbar--stats {
  margin-bottom: var(--sp-3);
}
.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}
.admin-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  align-items: flex-end;
  margin-bottom: var(--sp-3);
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--sp-3);
  background: var(--surface);
}
.admin-filter-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  color: #8f9b95;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.admin-filter-label select,
.admin-filter-label .f__i,
.admin-input-date {
  min-width: 120px;
  background: #111;
  color: #eee;
  border: 1px solid #333;
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 13px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}
.admin-filter-label--grow {
  flex: 1 1 180px;
  min-width: 160px;
}
.admin-filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.admin-analytics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}
.admin-analytics-card {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--sp-3);
  padding: var(--sp-4);
  min-height: 140px;
}
.admin-analytics-card--wide {
  grid-column: 1 / -1;
}
.admin-analytics-card .admin-form-section__h {
  margin-bottom: 12px;
}
.admin-day-chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 120px;
  padding-top: 8px;
}
.admin-day-bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  gap: 4px;
  min-width: 0;
}
.admin-day-bar__fill {
  width: 100%;
  max-width: 18px;
  background: var(--y);
  border-radius: 3px 3px 0 0;
  min-height: 2px;
  opacity: 0.9;
}
.admin-day-bar span {
  font-size: 9px;
  color: #666;
  transform: rotate(-45deg);
  transform-origin: center top;
  white-space: nowrap;
  margin-top: 6px;
  height: 18px;
}
.admin-funnel {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.admin-funnel-row {
  display: grid;
  grid-template-columns: 88px 1fr 40px;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  color: #c8d5cf;
}
.admin-funnel-track {
  height: 10px;
  background: #1a181c;
  border-radius: 4px;
  overflow: hidden;
}
.admin-funnel-fill {
  height: 100%;
  background: var(--y);
  border-radius: 4px;
  min-width: 2px;
}
.admin-funnel-fill--won { background: #6ee7b7; }
.admin-funnel-fill--lost { background: #f28b82; }
.admin-funnel-fill--rejected { background: #888; }
.admin-funnel-fill--new { background: #7dd3fc; }
.admin-funnel-fill--sent { background: #e1ff00; }
.admin-funnel-fill--in_progress { background: #fbbf24; }
.admin-table--compact { min-width: 0; font-size: 12px; }
.admin-table--compact th,
.admin-table--compact td { padding: 8px 10px; }
.admin-perms {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 10px;
}
.admin-tabs button.hidden { display: none !important; }
.admin-check-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #c8d5cf;
  text-transform: none;
  font-weight: 500;
}
.admin-online-line {
  margin: -8px 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.admin-online-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(110, 231, 183, 0.35);
  background: rgba(24, 128, 56, 0.15);
  color: #6ee7b7;
  font-size: 12px;
  font-weight: 600;
}
.admin-online-badge::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #6ee7b7;
  box-shadow: 0 0 0 3px rgba(110, 231, 183, 0.2);
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
}
.stat-card span {
  display: block;
  font-size: 11px;
  color: #888;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: var(--sp-2);
  letter-spacing: 0.02em;
  line-height: 1.25;
}
.stat-card strong { font-size: 16px; font-weight: 600; color: #fff; line-height: 1.25; }
.stat-card strong.money { color: var(--y); }
.stat-card--won {
  border-color: rgba(110, 231, 183, 0.45);
  background: linear-gradient(160deg, rgba(24, 128, 56, 0.18), var(--surface) 70%);
}
.stat-card--won strong.money { color: #6ee7b7; }
.stat-card--pipeline {
  border-color: rgba(225, 255, 0, 0.35);
  background: linear-gradient(160deg, rgba(225, 255, 0, 0.08), var(--surface) 70%);
}
.stat-ok { color: #81c995 !important; }
.stat-bad { color: #f28b82 !important; }
.admin-toolbar {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: var(--sp-4);
}
.admin-toolbar select, .admin-toolbar button {
  height: 40px;
  border-radius: var(--sp-2);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: #eee;
  padding: 0 var(--sp-3);
  font-size: 13px;
  cursor: pointer;
}
.admin-toolbar select { max-width: min(100%, 280px); }
.admin-table-hint {
  display: none;
  color: #6b7280;
  font-size: 12px;
  margin: 0 0 var(--sp-2);
  line-height: 1.5;
}
.admin-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line-strong);
  border-radius: var(--sp-3);
  overscroll-behavior-x: contain;
  width: 100%;
}
/* Высокие списки WhatsApp / прокси */
.admin-table-wrap--tall {
  max-height: min(72vh, 900px);
  min-height: 420px;
  overflow: auto;
  background: var(--surface);
}
.admin-table { width: 100%; border-collapse: collapse; font-size: 12px; min-width: 1040px; }
.admin-table--partners { min-width: 720px; }
.admin-table th, .admin-table td {
  text-align: left;
  padding: var(--sp-3) var(--sp-3);
  border-bottom: 1px solid #222;
  vertical-align: top;
  line-height: 1.4;
}
.admin-table th {
  background: #141214;
  color: #888;
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 600;
  white-space: nowrap;
}
.admin-table select {
  background: var(--bg); color: #eee; border: 1px solid var(--line-strong);
  border-radius: 6px; padding: 3px 6px; font-size: 11px; max-width: 160px;
}
.admin-empty { color: #8f9b95; padding: 24px !important; text-align: center; }
.admin-muted { color: #8f9b95; }
.admin-group { font-size: 0.7rem; margin-top: 4px; color: #6b7280; }
.admin-wa { color: var(--y); }
.admin-fee { color: var(--y); font-weight: 700; white-space: nowrap; }
.admin-badge-wrap { margin-top: 4px; }
.admin-nowrap { white-space: nowrap; }
.admin-comment { max-width: 220px; }
.admin-notes-cell { min-width: 120px; max-width: 180px; }
.admin-notes-text {
  color: #c8d5cf;
  font-size: 11px;
  line-height: 1.35;
  margin-bottom: 6px;
  word-break: break-word;
  max-height: 3.6em;
  overflow: hidden;
}
.admin-notes-btn {
  height: 28px;
  padding: 0 8px;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  color: #eee;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.admin-notes-btn:hover { border-color: var(--y); color: var(--y); }
.admin-notes-btn:focus-visible { outline: 2px solid var(--y); outline-offset: 1px; }
.badge { display: inline-block; padding: 2px 7px; border-radius: 999px; font-size: 10px; font-weight: 700; background: #2a2a2a; }
.badge--won { background: rgba(24, 128, 56, 0.3); color: #81c995; }
.badge--lost, .badge--rejected { background: rgba(217, 48, 37, 0.25); color: #f28b82; }
.badge--new { background: rgba(66, 133, 244, 0.25); color: #8ab4f8; }
.badge--sent, .badge--in_progress { background: rgba(225, 255, 0, 0.15); color: #e1ff00; }
.admin-tabs {
  display: flex;
  gap: var(--sp-2);
  margin-bottom: var(--sp-4);
  flex-wrap: wrap;
}
.admin-tabs button {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: #999;
  border-radius: 999px;
  height: 40px;
  padding: 0 var(--sp-4);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}
.admin-tabs button.active { background: var(--y); border-color: var(--y); color: var(--ink-inv); }

/* Admin companies form / modal — 8px rhythm */
.admin-btn-sm {
  width: auto !important;
  height: 40px !important;
  padding: 0 var(--sp-4) !important;
  font-size: 13px !important;
  min-height: 0 !important;
}
.admin-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(0, 0, 0, 0.72);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: var(--sp-5) var(--sp-4);
  overflow-y: auto;
}
.admin-modal__box {
  position: relative;
  width: 100%;
  max-width: 720px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  /* padding: equal 24 on all sides */
  padding: var(--sp-5);
  margin-bottom: var(--sp-7);
}
.admin-modal__x {
  position: absolute;
  top: var(--sp-4);
  right: var(--sp-4);
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: var(--sp-3);
  background: var(--soft);
  color: var(--ink);
  font-size: 22px;
  cursor: pointer;
  display: grid;
  place-items: center;
  line-height: 1;
}
.admin-modal__box h2 {
  font-size: 20px;
  font-weight: 600;
  color: #fff;
  /* title → form = 24 */
  margin: 0 0 var(--sp-5);
  padding-right: var(--sp-7);
  line-height: 1.25;
  min-height: 40px;
  display: flex;
  align-items: center;
}
.admin-company-form {
  display: flex;
  flex-direction: column;
  /* section → section = 16 */
  gap: var(--sp-4);
}
.admin-form-section {
  display: flex;
  flex-direction: column;
  /* header → content / field stacks = 16 */
  gap: var(--sp-4);
  /* inner padding 16 equal */
  padding: var(--sp-4);
  border: 1px solid var(--line);
  border-radius: var(--sp-4);
  background: rgba(255, 255, 255, 0.02);
}
.admin-form-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  flex-wrap: wrap;
  min-height: 32px;
}
.admin-form-section__h {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--m);
  line-height: 1.25;
}
.admin-form-hint {
  margin: calc(var(--sp-2) * -1) 0 0;
  font-size: 12px;
  color: var(--s);
  line-height: 1.5;
}
.admin-form-hint code {
  color: var(--y);
  font-size: 12px;
}
.admin-form-grid {
  display: grid;
  /* field gap: 16 vertical & horizontal */
  gap: var(--gap-field);
  align-items: start;
}
.admin-form-grid--2 { grid-template-columns: 1fr 1fr; }
.admin-form-grid--3 { grid-template-columns: 1fr 1fr 1fr; }
.admin-form-span-2 { grid-column: 1 / -1; }
.admin-company-form .f {
  gap: var(--gap-label);
  min-width: 0;
}
.admin-company-form .f__l {
  min-height: 16px;
  line-height: 1.25;
  font-size: 12px;
}
.admin-company-form .f__i,
.admin-company-form .f__ta {
  width: 100%;
}
.admin-company-form .f__i {
  height: var(--control-h);
}
.admin-company-form .f__ta {
  min-height: 80px;
  padding: var(--sp-3) var(--sp-4);
  line-height: 1.5;
}
.admin-check-row {
  display: flex;
  flex-direction: column;
  gap: var(--gap-label);
  min-height: 100%;
}
.admin-check-label--field {
  height: var(--control-h);
  min-height: var(--control-h);
  padding: 0 var(--sp-4);
  border: 1px solid var(--line-strong);
  border-radius: var(--sp-3);
  background: var(--bg);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.admin-region-actions {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
}
.admin-regions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-2) var(--sp-4);
  max-height: 192px; /* 24 * 8 */
  overflow-y: auto;
  padding: var(--sp-4);
  border: 1px solid var(--line-strong);
  border-radius: var(--sp-3);
  background: var(--bg);
}
.admin-region-item,
.admin-day-item,
.admin-check-label {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 13px;
  color: var(--t);
  cursor: pointer;
  min-width: 0;
  line-height: 1.25;
}
.admin-region-item {
  min-height: 32px;
  padding: var(--sp-1) 0;
}
.admin-region-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-days-wrap {
  display: flex;
  flex-direction: column;
  gap: var(--gap-label);
}
.admin-days-wrap > .f__l {
  font-size: 12px;
  color: var(--m);
  line-height: 1.25;
  min-height: 16px;
}
.admin-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: var(--sp-2);
}
.admin-day-item {
  justify-content: center;
  height: 40px;
  min-height: 40px;
  padding: 0 var(--sp-1);
  border: 1px solid var(--line-strong);
  border-radius: var(--sp-2);
  background: var(--bg);
  font-size: 12px;
  font-weight: 500;
}
.admin-day-item:has(input:checked) {
  border-color: var(--y-line);
  background: var(--y-soft);
  color: var(--ink);
}
.admin-formula-grid {
  align-items: stretch;
}
.admin-formula-col {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: var(--sp-4);
  border: 1px solid var(--line);
  border-radius: var(--sp-3);
  background: var(--bg);
  min-height: 100%;
}
.admin-formula-col__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.25;
  min-height: 16px;
}
.admin-formula-presets {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}
.admin-chip {
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  border-radius: 999px;
  height: 32px;
  padding: 0 var(--sp-3);
  font-size: 12px;
  cursor: pointer;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.admin-chip:hover {
  border-color: var(--y);
  color: var(--y);
}
.admin-preview {
  font-size: 12px;
  color: var(--m);
  margin: 0;
  line-height: 1.5;
  min-height: 36px; /* 1.5 * 12 * 2 lines */
}
.admin-preview-inputs {
  /* same 16 gap as other grids; no odd margin */
  margin: 0;
}
.admin-form-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4);
  /* form → buttons: 8 above already from form gap; add top pad for separation */
  margin-top: var(--sp-2);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--line);
}
.admin-form-actions .b {
  width: 100%;
  height: var(--control-h);
  font-size: 15px;
}
.admin-form-ok,
#company-form-error.admin-login-err {
  margin: 0;
  min-height: 0;
}
.admin-form-ok {
  color: #6ee7b7;
  font-size: 13px;
  line-height: 1.5;
}
.admin-company-actions {
  white-space: nowrap;
}
.admin-table--companies { min-width: 920px; }
.cabinet-profile {
  max-width: 520px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--sp-4);
  padding: var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}
.admin-templates {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}
.admin-template-body {
  min-height: 220px !important;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
}
.admin-wa-panel {
  width: 100%;
  max-width: none;
  min-height: 60vh;
}
.admin-wa-panel .admin-table-wrap {
  width: 100%;
}
.admin-wa-qr {
  margin-top: var(--sp-4);
  padding: var(--sp-5);
  border: 1px solid var(--line-strong);
  border-radius: var(--sp-4);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  align-items: flex-start;
  max-width: 480px;
  width: 100%;
}
.admin-wa-qr img {
  width: min(360px, 100%);
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  background: #fff;
  border-radius: var(--sp-2);
}
.admin-table--wa {
  min-width: 1280px;
  width: 100%;
  font-size: 13px;
}
.admin-table--wa th,
.admin-table--wa td {
  padding: 12px 14px;
  vertical-align: middle;
}
.admin-table--proxies {
  min-width: 1280px;
  width: 100%;
  font-size: 13px;
}
.admin-table--proxies th,
.admin-table--proxies td {
  padding: 12px 14px;
  vertical-align: middle;
}
.admin-table--companies { min-width: 1100px; }
.admin-wide-panel {
  width: 100%;
  max-width: none;
}
.admin-table--wa select,
.admin-table--proxies select {
  min-width: 140px;
  font-size: 13px;
  padding: 8px 10px;
}
.admin-form-actions--flush {
  border: 0;
  padding-top: 12px;
  margin-top: 8px;
}
.admin-table-wrap--mt {
  margin-top: 16px;
}
.admin-input-sm {
  width: 72px;
  background: #111;
  color: #eee;
  border: 1px solid #333;
  border-radius: 6px;
  padding: 4px 6px;
  font-size: 13px;
}
.admin-select-sm {
  max-width: 160px;
  width: 100%;
  background: #111;
  color: #eee;
  border: 1px solid #333;
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 13px;
}
.admin-code-sm {
  font-size: 11px;
  word-break: break-all;
}
.admin-text-sm {
  font-size: 11px;
  margin-top: 4px;
  line-height: 1.35;
}
.admin-mb-4 { margin-bottom: 16px; }
.admin-mt-3 { margin-top: 12px; }
.admin-mt-4 { margin-top: 16px; }
.admin-list {
  margin: 12px 0 0;
  padding-left: 1.2em;
  line-height: 1.6;
}
.admin-form-actions--tight {
  padding-top: 0;
  margin-top: 0;
}
.admin-launch-list {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.admin-launch-item {
  border: 1px solid var(--line-strong);
  border-radius: var(--sp-3);
  padding: 14px 16px;
  background: var(--surface);
}
.admin-launch-item--ok {
  border-color: rgba(110, 231, 183, 0.35);
}
.admin-launch-item--bad {
  border-color: rgba(242, 139, 130, 0.55);
}
.admin-launch-item--warn {
  border-color: rgba(225, 255, 0, 0.28);
}
.admin-launch-item__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.admin-launch-item p {
  margin: 4px 0 0;
}
@media (max-width: 900px) {
  .admin-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .admin-analytics-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  .admin-form-grid--2,
  .admin-form-grid--3,
  .admin-formula-grid,
  .admin-regions,
  .admin-form-actions {
    grid-template-columns: 1fr;
  }
  .admin-form-span-2 { grid-column: auto; }
  .admin-days {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .admin-modal {
    padding: var(--sp-4) var(--sp-3);
  }
  .admin-modal__box {
    padding: var(--sp-4);
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Admin: theme picker */
.admin-theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.admin-theme-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  text-align: left;
  width: 100%;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: inherit;
  cursor: pointer;
  font: inherit;
  transition: border-color 0.15s, background 0.15s;
}

.admin-theme-card:hover {
  border-color: rgba(225, 255, 0, 0.35);
  background: var(--bg-soft);
}

.admin-theme-card--active {
  border-color: var(--y);
  box-shadow: 0 0 0 1px var(--y);
}

.admin-theme-card__swatch {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  flex-shrink: 0;
  border: 1px solid var(--line);
}

.admin-theme-card__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.admin-theme-card__body strong {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

.admin-theme-card__body .admin-muted {
  font-size: 12.5px;
  line-height: 1.4;
}

.admin-theme-card__badge {
  display: inline-flex;
  align-self: flex-start;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--y);
  color: var(--ink-inv);
}

.admin-theme-card__badge--idle {
  background: var(--soft);
  color: var(--m);
}

/* Date/time inputs in dark theme */
input[type="date"],
input[type="time"] {
  color-scheme: dark;
}

/* Select options */
select.f__i option {
  background: var(--bg);
  color: var(--ink);
}

/* Autofill in dark UI */
input.f__i:-webkit-autofill,
input.f__i:-webkit-autofill:hover,
input.f__i:-webkit-autofill:focus,
textarea.f__i:-webkit-autofill,
select.f__i:-webkit-autofill {
  -webkit-text-fill-color: var(--ink);
  -webkit-box-shadow: 0 0 0 1000px var(--bg) inset;
  transition: background-color 9999s ease-in-out 0s;
  caret-color: var(--ink);
}

/* Selection */
::selection {
  background: rgba(225, 255, 0, 0.28);
  color: var(--ink);
}

/* Map bold request to DemiBold (600) — WATA has no 700 cut */
b, strong {
  font-weight: 600;
}

/* ─── Responsive ─── */
@media (max-width: 960px) {
  .top__grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .box {
    position: static;
    order: -1;
  }

  .steps,
  .steps--page { grid-template-columns: 1fr 1fr; }
  .trust-grid { grid-template-columns: 1fr; }
  .cookie__in { align-items: stretch; }
  .cookie__btn { width: 100%; }

  .card__row {
    flex-direction: column;
    align-items: stretch;
  }

  .card__side {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    width: 100%;
    gap: 12px;
  }

  .card__price { text-align: left; }

  .card__side .b--k {
    max-width: none;
    flex-shrink: 0;
  }
}

@media (max-width: 560px) {
  .w { padding: 0 16px; }
  .h__nav a:not(.h__cta) { display: none; }
  .f-row { grid-template-columns: 1fr; }
  .steps,
  .steps--page { grid-template-columns: 1fr; }
  .prices { grid-template-columns: 1fr; }
  .admin-stats { grid-template-columns: 1fr 1fr; }
  .admin-table-hint { display: block; }
  .stat-card strong { font-size: 15px; }
  .top { padding: 32px 0 36px; }
  .box { padding: 20px 16px 18px; border-radius: 22px; }
  .top h1 { font-size: 32px; }
  .top__p { font-size: 15.5px; margin-bottom: 16px; }
  .assurances { gap: 6px; margin-bottom: 20px; }
  .assurances li { font-size: 11.5px; padding: 7px 10px; }
  .card { padding: 16px; }
  .card__price strong { font-size: 24px; }
  .res__h { font-size: 24px; }
  .card__side {
    flex-direction: column;
    align-items: stretch;
  }
  .card__side .b--k { width: 100%; max-width: none; }
  .modal__box--form {
    max-height: min(92vh, 720px);
    padding: 22px 16px;
  }
  .b { min-height: 50px; }
  .top__art img {
    max-height: 260px;
    border-radius: 18px;
  }
  .block { padding: 40px 0; }
  .block__h { font-size: 24px; }
}
