/* ============================================================
   Стили экранов входа (телефон/код) и подписки (paywall)
   ============================================================ */
.auth-screen {
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px 18px calc(24px + var(--safe-bottom, 0px));
  padding-top: calc(24px + var(--safe-top, 0px));
  background: linear-gradient(160deg, #f2f5f9 0%, #e8edf3 100%);
}
.auth-screen.active { display: flex; }

.auth-card {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: 22px;
  padding: 32px 24px 26px;
  box-shadow: 0 12px 40px rgba(33, 45, 64, .12);
  text-align: center;
}
.auth-card .app-logo-img { width: 78px; height: 78px; border-radius: 20px; object-fit: cover; margin-bottom: 12px; }
.auth-card .app-title { font-size: 26px; font-weight: 800; color: #212d40; margin: 0 0 4px; }
.auth-card .app-subtitle { font-size: 14px; color: #7a8798; margin: 0 0 22px; }

.auth-label {
  display: block; text-align: left; font-size: 13px; font-weight: 600;
  color: #55637a; margin: 14px 4px 6px;
}
.auth-input {
  width: 100%; box-sizing: border-box; height: 52px;
  border: 1.5px solid #dde3ec; border-radius: 14px;
  padding: 0 16px; font-size: 17px; color: #212d40; outline: none;
  transition: border-color .15s; background: #fff;
}
.auth-input:focus { border-color: #3b82f6; }
.auth-code-input { text-align: center; letter-spacing: 8px; font-size: 24px; font-weight: 700; }

.btn-auth {
  width: 100%; height: 52px; margin-top: 18px;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff; border: none; border-radius: 14px;
  font-size: 16px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform .1s, opacity .15s;
}
.btn-auth:active { transform: scale(.98); }
.btn-auth:disabled { opacity: .6; cursor: default; }
.btn-auth.loading { opacity: .7; }

.btn-auth-ghost {
  width: 100%; height: 44px; margin-top: 10px;
  background: transparent; color: #7a8798; border: none;
  font-size: 14px; cursor: pointer;
}
.auth-hint { font-size: 13px; color: #8a96a6; margin-top: 16px; }
.auth-hint .fa-telegram { color: #29a9eb; }

.auth-dev-hint {
  margin-top: 12px; padding: 10px 12px; border-radius: 12px;
  background: #fff7e6; border: 1px dashed #f0b429;
  color: #8a6d00; font-size: 14px;
}
.auth-dev-hint b { font-size: 18px; letter-spacing: 2px; }

/* -------- Paywall -------- */
.paywall-card { max-width: 440px; text-align: center; }
.paywall-status { margin-bottom: 14px; }
.paywall-warn {
  background: #fff3e6; border: 1px solid #ffcf99; color: #b25b00;
  padding: 12px; border-radius: 12px; font-size: 14px; font-weight: 600;
}
.paywall-locked {
  background: #f4f6f9; border: 1px solid #e2e8f0; color: #55637a;
  padding: 18px; border-radius: 14px; font-size: 15px; line-height: 1.5;
}
.paywall-locked .fa-lock { font-size: 22px; color: #94a3b8; display: block; margin-bottom: 8px; }

.paywall-plans { display: flex; flex-direction: column; gap: 14px; margin-top: 6px; }
.plan-card {
  border: 1.5px solid #e2e8f0; border-radius: 18px; padding: 18px 16px;
  text-align: left; position: relative; background: #fff;
}
.plan-promo { border-color: #f0b429; background: linear-gradient(180deg, #fffdf5, #fff8e6); }
.plan-badge {
  position: absolute; top: -10px; right: 16px;
  background: #f0b429; color: #fff; font-size: 11px; font-weight: 700;
  padding: 3px 10px; border-radius: 20px; text-transform: uppercase;
}
.plan-title { font-size: 17px; font-weight: 800; color: #212d40; }
.plan-sub { font-size: 13px; color: #7a8798; margin-top: 2px; }
.plan-price { font-size: 24px; font-weight: 800; color: #2563eb; margin: 10px 0; }
.plan-price span { font-size: 13px; font-weight: 500; color: #7a8798; }

.plan-periods { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.btn-period {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 10px 6px; border: 1.5px solid #dde3ec; border-radius: 12px;
  background: #f8fafc; cursor: pointer; transition: border-color .15s, background .15s;
}
.btn-period:hover { border-color: #3b82f6; background: #eff6ff; }
.pp-price { font-size: 16px; font-weight: 800; color: #212d40; }
.pp-label { font-size: 11px; color: #7a8798; }

.btn-pay {
  width: 100%; margin-top: 12px; height: 46px;
  background: linear-gradient(135deg, #f0b429, #e0961a); color: #fff;
  border: none; border-radius: 12px; font-size: 15px; font-weight: 700; cursor: pointer;
}
.btn-pay:active { transform: scale(.98); }

.plan-custom {
  margin-top: 16px; padding: 12px; border-radius: 12px;
  background: #f4f6f9; color: #55637a; font-size: 13px; line-height: 1.5;
}
.plan-custom .fa-briefcase { color: #64748b; margin-right: 4px; }

/* Ссылка «Вход для администратора» */
.auth-admin-link { margin-top: 18px; text-align: center; }
.auth-admin-link a {
  font-size: 13px; color: #94a3b8; text-decoration: none;
  border-bottom: 1px dashed #cbd5e1; padding-bottom: 1px;
}
.auth-admin-link a:hover { color: #64748b; }

/* ===== Панель тестировщика (dev-switcher) ===== */
#dev-switcher {
  position: fixed; left: 8px; bottom: 8px; z-index: 99999;
  background: rgba(17,24,39,.92); color: #fff; border-radius: 12px;
  padding: 8px 10px; box-shadow: 0 6px 24px rgba(0,0,0,.35);
  font-size: 12px; backdrop-filter: blur(6px); max-width: calc(100vw - 16px);
}
#dev-switcher .ds-title { font-weight: 700; margin-bottom: 6px; opacity: .9; }
#dev-switcher .ds-row { display: flex; gap: 6px; flex-wrap: wrap; }
#dev-switcher .ds-btn {
  border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08);
  color: #fff; border-radius: 8px; padding: 6px 9px; font-size: 12px; cursor: pointer;
  transition: background .15s, border-color .15s;
}
#dev-switcher .ds-btn:hover:not(:disabled) { background: rgba(255,255,255,.18); }
#dev-switcher .ds-btn.ds-active { background: #2563eb; border-color: #2563eb; font-weight: 700; }
#dev-switcher .ds-btn:disabled { opacity: .35; cursor: not-allowed; }
#dev-switcher .ds-hint { margin-top: 6px; opacity: .6; font-size: 10px; line-height: 1.3; max-width: 220px; }

/* ===== Поле телефона с фиксированным префиксом +7 ===== */
.phone-field {
  display: flex; align-items: stretch; gap: 0;
  border: 1.5px solid #dde3ec; border-radius: 12px; overflow: hidden;
  background: #fff; transition: border-color .15s;
}
.phone-field:focus-within { border-color: #3b82f6; }
.phone-prefix {
  display: flex; align-items: center; justify-content: center;
  padding: 0 12px; font-size: 16px; font-weight: 700; color: #212d40;
  background: #f4f6f9; border-right: 1.5px solid #dde3ec; user-select: none;
}
.phone-field .phone-input {
  flex: 1; border: none !important; border-radius: 0 !important;
  margin: 0 !important; background: transparent !important; box-shadow: none !important;
  font-size: 16px; letter-spacing: .5px;
}
.phone-field .phone-input:focus { outline: none; }
