/* ── Auth pages ──────────────────────────────────────────────── */
/* Matches the landing-page design language: warm gradients,       */
/* Fraunces headings, Manrope body, pill buttons.                 */

.auth-page {
  --auth-ink: #15263b;
  --auth-muted: #50657e;
  --auth-border: #dce5ee;
  --auth-surface: #f4f8fb;
  --auth-accent: #0b8f8b;
  --auth-accent-dark: #114b5f;
  --auth-danger: #c0392b;
  --auth-danger-hover: #a93226;
  --auth-top-clearance: calc(var(--nav-height, 76px) + var(--page-top-buffer, 1.6rem));

  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 60vh;
  padding: var(--auth-top-clearance) 1rem 4rem;
  background:
    radial-gradient(circle at 8% 12%, #dff0f2 0%, rgba(223, 240, 242, 0) 43%),
    radial-gradient(circle at 92% 78%, #f8ecd2 0%, rgba(248, 236, 210, 0) 38%),
    #f6f4ef;
  font-family: "Manrope", "Segoe UI", sans-serif;
}

#main-content > .auth-page {
  margin-top: 0;
  padding-top: var(--auth-top-clearance);
}

/* ── Card ────────────────────────────────────────────────────── */
.auth-card {
  width: 100%;
  max-width: 420px;
  margin-top: 4rem;
  background: #fff;
  border: 1px solid var(--auth-border);
  border-radius: 18px;
  box-shadow: 0 12px 34px rgba(18, 37, 58, 0.09);
  padding: 2.4rem 2.2rem 2rem;
}

.auth-card--narrow { max-width: 380px; }

.auth-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--auth-ink);
  letter-spacing: -0.02em;
  margin: 0 0 0.25rem;
}

.auth-subtitle {
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 0.85rem;
  color: var(--auth-muted);
  margin: 0 0 1.5rem;
  line-height: 1.5;
}

/* ── Alert ───────────────────────────────────────────────────── */
.auth-alert {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  font-size: 0.82rem;
  padding: 0.6rem 0.9rem;
  border-radius: 10px;
  margin-bottom: 1.2rem;
}

.auth-alert p { margin: 0; }

.auth-alert--success {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}

/* ── Form ────────────────────────────────────────────────────── */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.auth-field label {
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--auth-muted);
}

.auth-input,
.auth-form .form-control {
  width: 100%;
  padding: 0.62rem 0.9rem;
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 0.88rem;
  color: var(--auth-ink);
  background: #fff;
  border: 1px solid var(--auth-border);
  border-radius: 12px;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.auth-input:focus,
.auth-form .form-control:focus {
  border-color: var(--auth-accent);
  box-shadow: 0 0 0 3px rgba(11, 143, 139, 0.12);
  background: #fff;
}

/* ── Password visibility toggle ─────────────────────────────── */
.auth-pw-wrap {
  position: relative;
}

.auth-pw-wrap .auth-input {
  padding-right: 2.8rem;
}

.auth-pw-toggle {
  position: absolute;
  right: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--auth-muted, #6c7f96);
  font-size: 0.88rem;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.auth-pw-toggle:hover {
  background: rgba(11, 143, 139, 0.06);
  color: var(--auth-ink);
}

.auth-pw-toggle .fa-eye-slash {
  display: none;
}

.auth-pw-toggle.is-visible .fa-eye {
  display: none;
}

.auth-pw-toggle.is-visible .fa-eye-slash {
  display: inline;
}

.auth-error {
  font-size: 0.75rem;
  color: var(--auth-danger);
}

/* ── Row helpers ─────────────────────────────────────────────── */
.auth-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
}

.auth-check {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  color: #3e4a5c;
}

.auth-link {
  color: var(--auth-accent);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s;
}

.auth-link:hover {
  color: var(--auth-accent-dark);
}

/* ── Buttons ─────────────────────────────────────────────────── */
.auth-btn {
  display: block;
  width: 100%;
  padding: 0.66rem 1.35rem;
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #fff;
  background: linear-gradient(120deg, #114b5f, #0b8f8b);
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(12, 102, 116, 0.28);
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease, color 0.22s ease, border-color 0.22s ease;
  margin-top: 0.5rem;
  text-align: center;
}

.auth-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 26px rgba(12, 102, 116, 0.36);
}

.auth-btn--outline {
  background: rgba(255, 255, 255, 0.8);
  color: #24405e;
  border-color: #ccd9e6;
  box-shadow: none;
}

.auth-btn--outline:hover {
  background: #fff;
  color: #17304a;
  border-color: #b7cadf;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(18, 37, 58, 0.06);
}

.auth-btn--danger {
  background: var(--auth-danger);
  box-shadow: 0 10px 22px rgba(192, 57, 43, 0.25);
}

.auth-btn--danger:hover {
  background: var(--auth-danger-hover);
  box-shadow: 0 14px 26px rgba(192, 57, 43, 0.32);
}

.auth-btn--sm {
  width: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.38rem 0.95rem;
  font-size: 0.78rem;
  margin-top: 0;
}

/* ── Divider ─────────────────────────────────────────────────── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin: 1.2rem 0;
  color: #b0bec5;
  font-size: 0.75rem;
  text-transform: lowercase;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--auth-border);
}

/* ── Social buttons ──────────────────────────────────────────── */
.auth-social {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.auth-social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.58rem 1rem;
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: #24405e;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid #ccd9e6;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s, border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.auth-social-btn:hover {
  border-color: #b7cadf;
  background: #fff;
  color: #17304a;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(18, 37, 58, 0.06);
}

/* ── Footer text ─────────────────────────────────────────────── */
.auth-footer-text {
  text-align: center;
  font-size: 0.8rem;
  color: var(--auth-muted);
  margin: 1.4rem 0 0;
}

.auth-footer-text a {
  color: var(--auth-ink);
  font-weight: 600;
  text-decoration: none;
}

.auth-footer-text a:hover {
  text-decoration: underline;
}

/* ── Settings page ───────────────────────────────────────────── */
.settings-card {
  width: 100%;
  max-width: 560px;
  margin-top: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}

.settings-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--auth-border);
  margin-bottom: 1.6rem;
}

.settings-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.6rem 1rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--auth-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
}

.settings-tab i {
  font-size: 0.75rem;
  opacity: 0.5;
}

.settings-tab:hover {
  color: #3e4a5c;
}

.settings-tab:hover i { opacity: 0.8; }

.settings-tab--active {
  color: var(--auth-ink);
  border-bottom-color: var(--auth-ink);
}

.settings-tab--active i { opacity: 1; }

.settings-panel { display: none; }
.settings-panel--active { display: block; }
.settings-form { gap: 1.1rem; }

/* ── Avatar block ────────────────────────────────────────────── */
.settings-avatar-block {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 1rem 1.2rem;
  background: rgba(255, 255, 255, 0.35);
  border: 1px solid var(--auth-border);
  border-radius: 14px;
  margin-bottom: 0.4rem;
}

.settings-avatar-preview {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--auth-surface);
}

.settings-avatar-info {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.settings-avatar-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.settings-avatar-clear {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.76rem;
  color: var(--auth-danger);
  cursor: pointer;
}

.settings-avatar-clear input { accent-color: var(--auth-danger); }

.settings-avatar-hint {
  font-size: 0.72rem;
  color: var(--auth-muted);
}

/* ── Sections (Security tab) ─────────────────────────────────── */
.settings-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--auth-border);
}

.settings-section:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.settings-section-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
}

.settings-section-icon {
  font-size: 0.88rem;
  color: var(--auth-muted);
  margin-top: 0.15rem;
  flex-shrink: 0;
}

.settings-section-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--auth-ink);
  margin: 0;
  line-height: 1.3;
}

.settings-section-desc {
  font-size: 0.78rem;
  color: var(--auth-muted);
  margin: 0.15rem 0 0;
  line-height: 1.4;
}

.settings-section--danger .settings-section-icon { color: var(--auth-danger); }
.settings-section--danger .settings-section-title { color: var(--auth-danger); }

/* ── Preferences toggles ────────────────────────────────────── */
.settings-pref-intro {
  font-size: 0.84rem;
  color: var(--auth-muted);
  margin: 0 0 0.5rem;
}

.settings-toggle-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.85rem;
  background: rgba(255, 255, 255, 0.35);
  border: 1px solid var(--auth-border);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.settings-toggle-row:hover {
  border-color: #b7cadf;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 4px 12px rgba(18, 37, 58, 0.04);
}

.settings-toggle-label {
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--auth-ink);
}

.settings-toggle-row .form-check-input {
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
}

.auth-hint {
  font-size: 0.74rem;
  color: var(--auth-muted);
}

/* ── Social links group label ────────────────────────────────── */
.settings-group-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--auth-muted);
  margin-top: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--auth-border);
}

.settings-group-label i {
  font-size: 0.68rem;
  opacity: 0.6;
}

/* ── Connected Accounts ──────────────────────────────────────── */
.settings-connections-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.settings-connection-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 0.9rem;
  background: rgba(255, 255, 255, 0.35);
  border: 1px solid var(--auth-border);
  border-radius: 12px;
}

.settings-connection-provider {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--auth-ink);
}

.settings-connection-provider i {
  font-size: 0.9rem;
  color: var(--auth-muted);
}

/* ── Notification page ───────────────────────────────────────── */
.notif-card {
  width: 100%;
  max-width: 600px;
  margin-top: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}

.notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 0 0.8rem;
}

/* ── Filter pills ───── */
.notif-filters {
  display: flex;
  gap: 0.35rem;
  padding: 0 0 0.9rem;
}

.notif-filter {
  padding: 0.3rem 0.75rem;
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--auth-muted);
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid #ccd9e6;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1.4;
}

.notif-filter:hover {
  color: var(--auth-ink);
  border-color: #b7cadf;
  background: #fff;
}

.notif-filter--active {
  color: #fff;
  background: linear-gradient(120deg, #114b5f, #0b8f8b);
  border-color: transparent;
}

.notif-filter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  font-size: 0.62rem;
  font-weight: 700;
  background: #ef4444;
  color: #fff;
  border-radius: 999px;
  margin-left: 2px;
  vertical-align: 1px;
}

/* ── List + groups ───── */
.notif-list {
  display: flex;
  flex-direction: column;
}

.notif-group-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--auth-muted);
  padding: 0.8rem 0 0.35rem;
  margin: 0;
  background: transparent;
  border-top: none;
}

/* ── Notification row ───── */
.notif-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 0.85rem;
  border-top: none;
  border-radius: 12px;
  color: var(--auth-ink);
  text-decoration: none;
  transition: background 0.15s;
  cursor: pointer;
  position: relative;
}

.notif-item:hover {
  background: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  color: var(--auth-ink);
}

.notif-item--unread {
  background: rgba(255, 255, 255, 0.35);
}

.notif-item--unread:hover {
  background: rgba(255, 255, 255, 0.6);
}

.notif-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 0.68rem;
  flex-shrink: 0;
}

.notif-icon--reply   { background: #eff6ff; color: #3b82f6; }
.notif-icon--like    { background: #fef2f2; color: #ef4444; }
.notif-icon--status_change { background: #ecfdf5; color: #10b981; }
.notif-icon--mention { background: #fef9c3; color: #ca8a04; }

.notif-body {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}

.notif-message {
  font-size: 0.8rem;
  color: var(--auth-ink);
  line-height: 1.4;
  margin: 0;
  flex: 1;
  min-width: 0;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notif-item--unread .notif-message {
  font-weight: 600;
}

.notif-time {
  font-size: 0.68rem;
  color: var(--auth-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.notif-unread-dot {
  width: 6px;
  height: 6px;
  background: #3b82f6;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── Load more ───── */
.notif-load-more-wrap {
  padding: 0.9rem 0;
  text-align: center;
  border-top: none;
}

.notif-load-more {
  padding: 0.42rem 1.3rem;
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  color: #24405e;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid #ccd9e6;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.notif-load-more:hover {
  color: #17304a;
  border-color: #b7cadf;
  background: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(18, 37, 58, 0.06);
}

.notif-load-more--loading {
  opacity: 0.5;
  pointer-events: none;
}

/* ── Empty state ───── */
.notif-empty {
  padding: 4rem 2rem;
  text-align: center;
}

.notif-empty-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #ecfdf5;
  color: #10b981;
  font-size: 1.2rem;
}

.notif-empty p {
  color: var(--auth-ink);
  font-size: 0.88rem;
  font-weight: 600;
  margin: 0 0 0.2rem;
}

.notif-empty-hint {
  font-size: 0.78rem;
  color: var(--auth-muted);
}


/* ── Responsive ──────────────────────────────────────────────── */

@media (max-width: 480px) {
  .auth-card {
    padding: 1.6rem 1.2rem 1.4rem;
    border-radius: 16px;
  }

  .notif-header,
  .notif-filters,
  .notif-load-more-wrap {
    padding-left: 0;
    padding-right: 0;
  }

  .notif-item {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  .notif-group-label {
    padding-left: 0;
    padding-right: 0;
  }

  .settings-tabs { gap: 0; }

  .settings-tab {
    flex: 1;
    text-align: center;
    padding: 0.5rem 0.4rem;
    font-size: 0.78rem;
  }

  .settings-tab i { display: none; }

  .settings-section {
    flex-direction: column;
    align-items: flex-start;
  }

  .settings-avatar-block {
    flex-direction: column;
    text-align: center;
    padding: 1rem;
  }

  .settings-avatar-info { align-items: center; }

  .notif-header {
    padding: 0 0 0.8rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .notif-item { padding: 0.6rem 0.5rem; }
}
