/* Регистрация, вход, подписка, личный кабинет. Рамка экрана — в flow.css. */

.auth, .sub { display: grid; gap: 14px; }
.auth-title { font-size: clamp(1.5rem, 6vw, 2rem); }
.auth-lead { margin: 0; color: var(--muted); }
.auth-submit { width: 100%; margin-top: 4px; }
.auth-switch { margin: 6px 0 0; text-align: center; color: var(--muted); }
.auth a, .sub a { color: var(--accent); font-weight: 600; text-underline-offset: 3px; }

/* --- Поля --- */
.field { display: grid; gap: 6px; }
.field-label { font-weight: 600; font-size: .95rem; }
.input {
  width: 100%; min-height: 52px; padding: 0 16px;
  font: inherit; color: var(--text); background: var(--option);
  border: 2px solid var(--line); border-radius: var(--radius-button);
  transition: border-color var(--speed);
}
.input:focus { outline: none; border-color: var(--accent); }
.has-error .input { border-color: var(--wrong-text); }
.field-error, .form-error { margin: 0; font-size: .9rem; color: var(--wrong-text); }
.form-error { padding: 10px 14px; border-radius: var(--radius-button); background: var(--wrong-bg); }
.field-hint { margin: -6px 0 0; font-size: .85rem; color: var(--muted); }

/* --- Галочка согласия (своя, крупная: удобно попасть пальцем) --- */
.consent { display: flex; gap: 12px; align-items: center; min-height: 44px; cursor: pointer; font-size: .95rem; }
.consent input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.consent-box {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 2px solid var(--line); background: var(--option); color: var(--on-accent);
  position: relative; isolation: isolate;
}
.consent-box::before {
  content: ""; position: absolute; inset: -2px; border-radius: inherit; z-index: -1;
  background: var(--accent); opacity: 0; transition: opacity var(--speed);
}
.consent-box svg { width: 16px; height: 16px; opacity: 0; transform: scale(.5); transition: opacity var(--speed), transform var(--speed); }
.consent input:checked + .consent-box::before { opacity: 1; }
.consent input:checked + .consent-box svg { opacity: 1; transform: none; }
.consent input:focus-visible + .consent-box { outline: 3px solid var(--accent-2); outline-offset: 2px; }
.consent.has-error .consent-box { border-color: var(--wrong-text); }

/* --- Вход через Яндекс и VK --- */
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .85rem; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.social { display: grid; gap: 10px; }
.social-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
  min-height: 52px; padding: 0 16px; cursor: pointer; font-weight: 700;
  border: 2px solid var(--line); border-radius: var(--radius-button); background: var(--option);
  transition: transform var(--speed) cubic-bezier(.2,.8,.2,1);
}
.social-btn:active { transform: scale(.98); }
.social-icon {
  width: 28px; height: 28px; border-radius: 8px; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 900; color: #fff;
}
.social-icon.yandex { background: #FC3F1D; }
.social-icon.vk { background: #0077FF; font-size: .7rem; }

/* --- Подписка --- */
.status-pill {
  justify-self: center; margin: 0; padding: 6px 14px; border-radius: 99px; font-size: .9rem; font-weight: 600;
  background: color-mix(in srgb, var(--accent-2) 16%, transparent);
}
.trial { text-align: center; }
.trial-days {
  margin: 0; font-family: var(--font-headings); font-weight: 900; line-height: 1;
  font-size: clamp(3.5rem, 18vw, 5rem);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.trial-title { font-size: clamp(1.5rem, 6vw, 2rem); margin-bottom: 8px; }

.includes { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.includes li { display: flex; gap: 10px; align-items: flex-start; }
.includes svg { flex: 0 0 auto; width: 22px; height: 22px; margin-top: 2px; padding: 3px; border-radius: 50%; color: var(--correct-text); background: var(--correct-bg); }

.sub-title { margin: 8px 0 0; font-size: 1.1rem; }

/* Текстовые страницы (политика конфиденциальности) */
.doc { padding-bottom: 40px; }
.doc p { margin: 0; line-height: 1.6; }
.doc-list { margin: 0; padding-left: 20px; display: grid; gap: 8px; line-height: 1.6; }
.consent a { color: var(--accent); }

/* «Почему здесь»: короткие карточки, на компьютере — по две в ряд */
.why { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.why-item {
  display: grid; gap: 2px; padding: 12px 16px; border-radius: var(--radius-button);
  background: var(--option); border-left: 3px solid var(--accent-2);
}
.why-title { font-family: var(--font-headings); font-size: 1rem; }
.why-text { font-size: .95rem; color: var(--muted); }
@media (min-width: 768px) { .why { grid-template-columns: 1fr 1fr; } }
.plans { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.plan {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 12px;
  padding: 14px 18px; border-radius: var(--radius-button); background: var(--option);
  box-shadow: 0 2px 10px #33221D0D;
}
.plan-name { font-weight: 700; }
.plan-price { font-family: var(--font-headings); font-weight: 800; font-size: 1.15rem; }
.plan-full { margin-right: 4px; font-family: var(--font-text); font-weight: 400; font-size: .85rem; color: var(--muted); }
.plan-month { grid-column: 1 / -1; font-size: .85rem; color: var(--muted); }
.plan-note { grid-column: 1 / -1; font-size: .85rem; color: var(--accent); font-weight: 600; }
.sub a.plan-pick {
  grid-column: 1 / -1; margin-top: 8px; min-height: 44px; border-radius: 99px;
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
  color: var(--on-accent); background: linear-gradient(135deg, var(--accent), var(--accent-2));
  transition: transform var(--speed) cubic-bezier(.2,.8,.2,1);
}
.sub a.plan-pick:active { transform: scale(.97); }

/* Выделенный тариф (PLAN_BEST в site_settings.py): рамка, значок сверху и яркая кнопка.
   У остальных кнопка спокойнее, чтобы глаз сразу шёл к выделенному */
.plans:has(.is-best) .plan:not(.is-best) a.plan-pick {
  color: var(--accent); background: transparent; box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--accent) 45%, transparent);
}
.plan.is-best {
  position: relative; margin-top: 10px;
  box-shadow: 0 0 0 2px var(--accent), 0 10px 26px -10px color-mix(in srgb, var(--accent) 55%, transparent);
}
.plan-badge {
  position: absolute; top: 0; left: 18px; transform: translateY(-50%);
  padding: 3px 12px; border-radius: 99px; font-size: .78rem; font-weight: 800;
  color: var(--on-accent); background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

/* --- Оплата по QR-коду --- */
.pay-head { text-align: center; }
.pay-head .task { margin-bottom: 4px; }
.pay-sum { font-size: clamp(2.2rem, 10vw, 3rem); font-weight: 900; }
.pay-card { display: grid; gap: 10px; padding: 16px 18px; border-radius: var(--radius-card); background: var(--option); box-shadow: 0 2px 14px #33221D0F; }
.pay-title { font-size: 1.05rem; }
/* QR всегда на белом: в тёмной теме его тоже должна прочитать камера */
.pay-qr { justify-self: center; width: min(240px, 100%); padding: 8px; border-radius: 16px; background: #fff; }
.pay-qr svg { display: block; width: 100%; height: auto; }
.pay-pending { color: var(--text); background: color-mix(in srgb, var(--accent-2) 16%, transparent); }

/* --- Ваша страница проверки оплат --- */
.pay-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pay-item { display: grid; gap: 4px; padding: 14px 18px; border-radius: var(--radius-button); background: var(--option); box-shadow: 0 2px 10px #33221D0D; }
.pay-item p { margin: 0; }
.pay-actions { display: flex; gap: 8px; margin-top: 6px; }
.pay-actions form { flex: 1; }
.pay-actions .btn { width: 100%; min-height: 44px; }
.pay-tag { font-size: .8rem; font-weight: 700; }
.pay-tag.is-confirmed { color: var(--correct-text); }
.pay-tag.is-rejected { color: var(--wrong-text); }
.pay-tag.is-auto { color: var(--muted); }

/* --- Личный кабинет --- */
.acc-card { padding: 16px 18px; border-radius: var(--radius-card); background: var(--option); box-shadow: 0 2px 14px #33221D0F; }
.acc-label { margin: 0; font-size: .85rem; color: var(--muted); }
.acc-value { margin: 2px 0 6px; font-weight: 700; font-size: 1.1rem; }
.acc-level { font-family: var(--font-headings); font-weight: 900; color: var(--accent); }

@media (min-width: 768px) {
  .plans { grid-template-columns: repeat(3, 1fr); }
  .plan { grid-template-columns: 1fr; text-align: center; }
  .plan.is-best { margin-top: 0; }
  .plan-badge { left: 50%; transform: translate(-50%, -50%); white-space: nowrap; }
}
