:root {
  --bg: #070a10;
  --bg2: #0b1320;
  --card: rgba(255,255,255,0.04);
  --stroke: rgba(255,255,255,0.1);
  --text: #eef3ff;
  --muted: rgba(238,243,255,0.72);
  --r: 18px;
}

body {
  background: radial-gradient(1200px 700px at 20% 0%, rgba(27,43,65,0.55) 0%, rgba(7,10,15,0) 55%),
              linear-gradient(180deg, var(--bg2) 0%, var(--bg) 60%);
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.auth-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  border: 1px solid var(--stroke);
  border-radius: var(--r);
  padding: 36px 32px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 18px 60px rgba(0,0,0,0.55);
}

.auth-logo {
  text-align: center;
  font-size: 13px;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-decoration: none;
  display: block;
  margin-bottom: 28px;
}

.auth-title {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 24px;
  text-align: center;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.auth-field label {
  font-size: 13px;
  color: var(--muted);
}

.auth-field input {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--stroke);
  border-radius: 10px;
  color: var(--text);
  font-size: 15px;
  padding: 11px 14px;
  outline: none;
  transition: border-color 0.15s;
  width: 100%;
  box-sizing: border-box;
}

.auth-field input:focus {
  border-color: rgba(60,120,220,0.6);
}

.password-wrap {
  position: relative;
}

.password-wrap input {
  padding-right: 44px;
}

.password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  padding: 4px;
  display: flex;
  align-items: center;
  line-height: 0;
  transition: color 0.15s;
}

.password-toggle:hover { color: var(--text); }

.auth-btn {
  width: 100%;
  min-height: 48px;
  border-radius: 999px;
  border: 1px solid rgba(60,100,200,0.5);
  background: linear-gradient(135deg, #071840, #0f2a6e);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
  transition: filter 0.15s, transform 0.15s;
}

.auth-btn:hover { filter: brightness(1.1); transform: translateY(-1px); }
.auth-btn:disabled { opacity: 0.5; cursor: default; transform: none; }

.auth-link {
  text-align: center;
  margin-top: 18px;
  font-size: 13px;
  color: var(--muted);
}

.auth-link a { color: #6ba3ff; text-decoration: none; }
.auth-link a:hover { text-decoration: underline; }

.auth-error {
  background: rgba(220,60,60,0.15);
  border: 1px solid rgba(220,60,60,0.3);
  border-radius: 10px;
  color: #ff9090;
  font-size: 13px;
  padding: 10px 14px;
  margin-bottom: 16px;
  display: none;
}

.auth-error.visible { display: block; }

/* Сторінка підписки */
.sub-price {
  text-align: center;
  font-size: 42px;
  font-weight: 800;
  margin: 8px 0 4px;
}

.sub-price span { font-size: 18px; font-weight: 400; color: var(--muted); }

.sub-features {
  list-style: none;
  padding: 0;
  margin: 20px 0 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sub-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--muted);
}

.sub-features li::before {
  content: "✓";
  color: #6ba3ff;
  font-weight: 700;
  flex-shrink: 0;
}

.sub-note {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  margin-top: 14px;
}

.sub-status {
  text-align: center;
  padding: 16px;
  border-radius: 12px;
  background: rgba(60,180,100,0.1);
  border: 1px solid rgba(60,180,100,0.25);
  color: #7de8a0;
  margin-bottom: 20px;
  display: none;
}

.sub-status.visible { display: block; }

.hidden { display: none !important; }

.auth-btn--danger {
  background: rgba(220,60,60,0.15);
  border-color: rgba(220,60,60,0.4);
  margin-top: 10px;
}

.auth-btn--ghost {
  background: transparent;
  border-color: var(--stroke);
  color: var(--muted);
}

.account-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--stroke);
  font-size: 14px;
}
.account-row:last-of-type { border-bottom: none; }
.account-row .label { color: var(--muted); }
.account-row .value { font-weight: 600; }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.badge-active  { background: rgba(60,180,100,0.15); color: #7de8a0; border: 1px solid rgba(60,180,100,0.3); }
.badge-inactive{ background: rgba(180,60,60,0.1);   color: #ff9090; border: 1px solid rgba(180,60,60,0.3); }

.auth-btn--block {
  display: block;
  text-align: center;
  text-decoration: none;
  line-height: 48px;
  padding: 0;
}

.success-icon {
  text-align: center;
  font-size: 48px;
  margin-bottom: 16px;
  line-height: 1;
}

.success-text {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 24px;
}

/* ── Farewell Modal ───────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}
.modal-overlay.hidden { display: none; }
.modal-card {
  background: #12122a;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 2rem 1.75rem;
  max-width: 440px;
  width: 100%;
  text-align: center;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
}
.modal-author {
  font-size: 0.75rem;
  opacity: 0.45;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}
.modal-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 0.75rem;
}
.modal-text {
  font-size: 0.88rem;
  line-height: 1.65;
  opacity: 0.72;
  margin-bottom: 1.25rem;
}
.modal-reasons {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 1rem;
}
.modal-reason {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.88rem;
  cursor: pointer;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  transition: background 0.15s;
  opacity: 0.8;
}
.modal-reason:hover { background: rgba(255,255,255,0.06); opacity: 1; }
.modal-reason input { accent-color: #6ba3ff; width: 16px; height: 16px; flex-shrink: 0; }
.modal-textarea {
  width: 100%;
  box-sizing: border-box;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 0.75rem;
  color: #fff;
  font-size: 0.85rem;
  font-family: inherit;
  resize: vertical;
  min-height: 72px;
  margin-bottom: 1.25rem;
  transition: border-color 0.2s;
}
.modal-textarea:focus { outline: none; border-color: rgba(107,163,255,0.4); }
.modal-textarea::placeholder { opacity: 0.35; }
.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}
.modal-stay-btn { font-size: 1rem; padding: 0.85rem; }
.auth-btn--ghost-small {
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.35);
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0.3rem;
  transition: color 0.2s;
}
.auth-btn--ghost-small:hover { color: rgba(255,255,255,0.65); }
.modal-note {
  font-size: 0.72rem;
  opacity: 0.35;
  margin: 0;
}

/* ── Goodbye screen ───────────────────────────────────── */
.goodbye-wrap {
  text-align: center;
  padding: 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.goodbye-icon { font-size: 2.5rem; }
.goodbye-title { font-size: 1.2rem; font-weight: 700; color: #fff; margin: 0; }
.goodbye-text { font-size: 0.88rem; opacity: 0.65; line-height: 1.6; margin: 0; }
