/* Shared light theme — matches guest homepage (sky / blue / violet) */
:root {
  --gl-bg: #f0f6ff;
  --gl-ink: #1a2340;
  --gl-muted: #5a6a8a;
  --gl-faint: #8b9bb8;
  --gl-line: #d4e0f5;
  --gl-violet: #7c5cfc;
  --gl-violet-deep: #5b3df5;
  --gl-grad: linear-gradient(135deg, #38bdf8 0%, #3b82f6 45%, #7c5cfc 100%);
  --gl-soft: linear-gradient(135deg, rgba(56, 189, 248, 0.16), rgba(124, 92, 252, 0.12));
  --gl-card: rgba(255, 255, 255, 0.9);
  --gl-shadow: 0 8px 28px rgba(59, 130, 246, 0.08);
}

html:has(body:not(.admin-wide):not(.home-guest)),
body:not(.admin-wide):not(.home-guest) {
  background:
    radial-gradient(900px 420px at 12% -8%, rgba(56, 189, 248, 0.28), transparent 55%),
    radial-gradient(800px 400px at 92% 0%, rgba(124, 92, 252, 0.22), transparent 50%),
    linear-gradient(180deg, #eaf3ff, #f5f0ff 55%, #eef4ff) !important;
  color: var(--gl-ink);
}

html:has(body.home-guest),
body.home-guest {
  background: #1a1430 !important;
  background-image: none !important;
}
@media (max-width: 768px) {
  html:has(body.home-guest),
  body.home-guest {
    background: #f3eefc !important;
  }
}

body:not(.admin-wide):not(.home-guest) .main-header,
body:not(.admin-wide):not(.home-guest) header.main-header {
  background: rgba(255, 255, 255, 0.82) !important;
  border-bottom-color: var(--gl-line) !important;
  border-top-color: var(--gl-line) !important;
  backdrop-filter: blur(14px);
}

body.home-guest .main-header,
body.home-guest header.main-header {
  border: 0 !important;
  border-top: 0 !important;
  border-bottom: 0 !important;
  box-shadow: none !important;
}

body:not(.admin-wide) .nav-item.is-active {
  background: var(--gl-soft);
}

body:not(.admin-wide) .nav-item.is-active i,
body:not(.admin-wide) .nav-item.is-active .nav-item__label {
  color: var(--gl-violet-deep);
}

body:not(.admin-wide):not(.chat-page):not(.home-page) > .container {
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
}

body:not(.admin-wide) h1,
body:not(.admin-wide) h2,
body:not(.admin-wide) h3,
body:not(.admin-wide) .module-title {
  font-family: "Playfair Display", Georgia, serif;
  color: var(--gl-ink);
}

body:not(.admin-wide) .submit-btn,
body:not(.admin-wide) .submit-btn-main,
body:not(.admin-wide) .btn-deposit,
body:not(.admin-wide) .buy-btn,
body:not(.admin-wide) .auth-submit,
body:not(.admin-wide) .submit-register-btn {
  background: var(--gl-grad) !important;
  border: 0 !important;
  color: #fff !important;
  border-radius: 999px !important;
  box-shadow: 0 12px 32px rgba(124, 92, 252, 0.28);
}

body:not(.admin-wide) input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]):not([type="range"]),
body:not(.admin-wide) select,
body:not(.admin-wide) textarea {
  background: #f3f7ff !important;
  border: 1px solid var(--gl-line) !important;
  color: var(--gl-ink) !important;
  border-radius: 12px !important;
}

body:not(.admin-wide) input:focus,
body:not(.admin-wide) select:focus,
body:not(.admin-wide) textarea:focus {
  outline: none;
  border-color: #a5b4fc !important;
  box-shadow: 0 0 0 3px rgba(124, 92, 252, 0.16);
}

/* —— Profile / cabinet —— */
body.profile-page {
  color: var(--gl-ink);
}

body.profile-page .container {
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
  max-width: none !important;
  width: 100%;
  margin: 0;
  padding-left: clamp(12px, 2vw, 28px);
  padding-right: clamp(12px, 2vw, 28px);
  padding-bottom: clamp(28px, 5vw, 56px);
  gap: 18px;
  align-items: stretch;
}

body.profile-page .sidebar {
  background: var(--gl-card) !important;
  color: var(--gl-ink) !important;
  border: 1px solid var(--gl-line);
  border-radius: 22px;
  box-shadow: var(--gl-shadow);
  padding: 18px 0;
  overflow: visible;
  flex: 0 0 280px;
  width: 280px;
  min-width: 280px;
}

body.profile-page .left-sidebar-toggle,
body.profile-page .left-sidebar-show {
  display: none !important;
}

@media (min-width: 769px) {
  body.profile-page .container .sidebar,
  body.profile-page.left-sidebar-hidden .container .sidebar {
    display: block !important;
    width: 280px !important;
    min-width: 280px !important;
  }
  body.profile-page .profile-mobile-nav,
  body.profile-page .profile-mobile-sheet {
    display: none !important;
  }
}

body.profile-page .sidebar .menu-group-header,
body.profile-page .sidebar .menu-group-header span,
body.profile-page .sidebar .menu-group-header a {
  color: var(--gl-ink) !important;
  font-family: "Playfair Display", Georgia, serif !important;
}

body.profile-page .sidebar .menu-group-header:hover,
body.profile-page .sidebar .menu-group-header.active {
  background: var(--gl-soft) !important;
  border-left-color: var(--gl-violet) !important;
}

body.profile-page .sidebar .submenu {
  background: rgba(243, 247, 255, 0.7) !important;
}

body.profile-page .sidebar .submenu-item,
body.profile-page .sidebar .submenu-item span {
  color: var(--gl-muted) !important;
}

body.profile-page .sidebar .submenu-item:hover,
body.profile-page .sidebar .submenu-item.active {
  background: #fff !important;
  color: var(--gl-violet-deep) !important;
}

body.profile-page .sidebar .logout-link {
  color: #dc2626 !important;
}

body.profile-page .content {
  background: transparent !important;
  min-width: 0;
  flex: 1 1 auto;
  width: auto !important;
  max-width: none !important;
}

body.profile-page .content-section,
body.profile-page .content-section.active {
  width: 100%;
  max-width: none;
}

body.profile-page .profile-card,
body.profile-page .profile-form,
body.profile-page .payment-info {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  body.profile-page #dataForm.profile-form .form-row,
  body.profile-page .profile-form .form-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1.5fr) minmax(7rem, 0.7fr) minmax(8.5rem, 0.9fr) minmax(8.5rem, 0.9fr) minmax(0, 1.5fr);
    gap: 16px;
    align-items: end;
    width: 100%;
    flex-wrap: wrap !important;
  }
  body.profile-page #dataForm.profile-form .form-row > .form-group,
  body.profile-page .profile-form .form-group:has(.fio-input),
  body.profile-page .profile-form .form-group:has(#gender),
  body.profile-page .profile-form .form-group:has(#birth_date),
  body.profile-page .profile-form .form-group:has(#time),
  body.profile-page .profile-form .form-group:has(#city) {
    min-width: 0 !important;
    max-width: none !important;
    width: auto !important;
    flex: none !important;
    overflow: visible;
  }
  body.profile-page .profile-form input.fio-input,
  body.profile-page .profile-form input,
  body.profile-page .profile-form select {
    max-width: none !important;
    min-width: 0 !important;
    width: 100% !important;
  }
}

body.profile-page .new-profile-photos-group {
  margin: 4px 0 18px;
  min-width: 0;
  max-width: 100%;
  overflow: visible;
}
body.profile-page .new-profile-photos-group .form-label-block {
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
}
body.profile-page .new-profile-photos-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

body.profile-page .cabinet-kicker,
body.profile-page .cabinet-people-label,
body.profile-page .cabinet-people {
  display: none !important;
}

body.profile-page .module-title {
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 600;
  margin: 0 0 16px;
}

body.profile-page .profile-card,
body.profile-page .profile-form,
body.profile-page .payment-info,
body.profile-page .knowledge-form,
body.profile-page .knowledge-item,
body.profile-page .package-card,
body.profile-page .usage-stats,
body.profile-page .saved-card-section,
body.profile-page .daily-horoscope-last-message,
body.profile-page .subscription-current-box {
  background: var(--gl-card) !important;
  border: 1px solid var(--gl-line) !important;
  border-radius: 18px !important;
  box-shadow: var(--gl-shadow);
}

body.profile-page .profile-card,
body.profile-page .profile-form {
  padding: clamp(18px, 3vw, 28px);
}

body.profile-page .info-row {
  background: #f3f7ff !important;
  border: 1px solid var(--gl-line);
  border-radius: 14px !important;
  color: var(--gl-ink);
}

body.profile-page .info-row label {
  color: var(--gl-muted);
  font-weight: 650;
}

body.profile-page .edit-btn,
body.profile-page .cancel-btn,
body.profile-page .btn-edit,
body.profile-page .btn-set-default,
body.profile-page .btn-upload-photo {
  background: #fff !important;
  color: var(--gl-violet-deep) !important;
  border: 1px solid var(--gl-line) !important;
  border-radius: 999px !important;
  box-shadow: none !important;
}

body.profile-page .edit-btn:hover,
body.profile-page .cancel-btn:hover,
body.profile-page .btn-edit:hover,
body.profile-page .btn-set-default:hover,
body.profile-page .btn-upload-photo:hover {
  border-color: #a5b4fc !important;
  background: var(--gl-soft) !important;
  transform: none;
}

body.profile-page .btn-delete,
body.profile-page .btn-delete-photo,
body.profile-page .btn-unlink-card {
  background: #fff !important;
  color: #dc2626 !important;
  border: 1px solid #fecaca !important;
  border-radius: 999px !important;
}

body.profile-page .submit-btn {
  padding: 12px 22px !important;
}

body.profile-page .profiles-table {
  background: var(--gl-card);
  border: 1px solid var(--gl-line);
  border-radius: 18px;
  box-shadow: var(--gl-shadow);
  overflow: auto;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}

body.profile-page #saved-data .profiles-table table,
body.profile-page .profiles-table table {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  table-layout: auto !important;
}

body.profile-page .profiles-table th {
  background: #f3f7ff !important;
  color: var(--gl-muted);
  font-weight: 700;
  border-bottom: 1px solid var(--gl-line) !important;
}

body.profile-page .profiles-table td {
  border-bottom: 1px solid var(--gl-line) !important;
  color: var(--gl-ink);
}

body.profile-page .profiles-table tr td:first-child strong {
  color: var(--gl-violet-deep) !important;
}

body.profile-page .balance-info {
  background: var(--gl-grad) !important;
  color: #fff !important;
  border-radius: 18px !important;
  box-shadow: 0 12px 32px rgba(124, 92, 252, 0.28);
}

body.profile-page .subscription-plan-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
body.profile-page .subscription-plan-option {
  background: #fff !important;
  border: 1px solid var(--gl-line) !important;
  border-radius: 16px !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
@media (max-width: 768px) {
  body.profile-page .subscription-plan-cards {
    grid-template-columns: 1fr;
  }
}

body.profile-page .subscription-plan-option:has(input:checked),
body.profile-page .subscription-plan-option.is-selected {
  border-color: transparent !important;
  box-shadow: 0 0 0 2px rgba(124, 92, 252, 0.4);
  background: var(--gl-soft) !important;
}

body.profile-page .subscription-plan-option .sub-card-price,
body.profile-page .price,
body.profile-page .popular-badge {
  color: var(--gl-violet-deep);
}

body.profile-page .popular-badge,
body.profile-page .package-card.popular .popular-badge {
  background: var(--gl-grad) !important;
  color: #fff !important;
}

body.profile-page .package-card.popular,
body.profile-page .package-card:hover {
  border-color: #a5b4fc !important;
}

body.profile-page .deposit-option {
  background: #fff !important;
  border: 1px solid var(--gl-line) !important;
  color: var(--gl-ink) !important;
  border-radius: 14px !important;
}

body.profile-page .deposit-option:hover,
body.profile-page .deposit-option.is-on {
  background: var(--gl-soft) !important;
  border-color: #a5b4fc !important;
  color: var(--gl-ink) !important;
}

body.profile-page .dh-history-item {
  background: #fff !important;
  border: 1px solid var(--gl-line) !important;
  border-radius: 14px !important;
}

body.profile-page .dh-history-item:hover,
body.profile-page .dh-history-item:active {
  background: var(--gl-soft) !important;
}

body.profile-page .dh-history-item-top,
body.profile-page .daily-horoscope-push-label,
body.profile-page .subscription-choice h3,
body.profile-page .subscription-current-box h3 {
  color: var(--gl-ink) !important;
}

body.profile-page .modal-content {
  background: #fff !important;
  border: 1px solid var(--gl-line);
  border-radius: 22px !important;
  box-shadow: 0 16px 48px rgba(59, 130, 246, 0.16) !important;
}

body.profile-page .profile-mobile-nav {
  background: var(--gl-card) !important;
  border: 1px solid var(--gl-line) !important;
  border-radius: 18px !important;
  box-shadow: var(--gl-shadow);
}

body.profile-page .profile-mobile-nav-btn {
  color: var(--gl-faint) !important;
}

body.profile-page .profile-mobile-nav-btn.is-active,
body.profile-page .profile-mobile-nav-btn.is-pressed {
  background: var(--gl-soft) !important;
  color: var(--gl-violet-deep) !important;
}

body.profile-page .profile-mobile-sheet-panel {
  background: #fff !important;
  border: 1px solid var(--gl-line);
  box-shadow: 0 -8px 32px rgba(59, 130, 246, 0.12) !important;
}

/* —— Chat —— */
body.chat-page,
html:has(body.chat-page) {
  background:
    radial-gradient(900px 420px at 12% -8%, rgba(56, 189, 248, 0.28), transparent 55%),
    radial-gradient(800px 400px at 92% 0%, rgba(124, 92, 252, 0.22), transparent 50%),
    linear-gradient(180deg, #eaf3ff, #f5f0ff 55%, #eef4ff) !important;
}

body.chat-page .container,
body.chat-page .chat-container,
body.chat-page .content {
  background: transparent !important;
}

body.chat-page .chat-container {
  box-shadow: none !important;
  backdrop-filter: none;
}

body.chat-page .data-section {
  background: var(--gl-card) !important;
  border-bottom: 1px solid var(--gl-line) !important;
}

body.chat-page .bot-message .message-content {
  background: #fff !important;
  border: 1px solid var(--gl-line);
  border-radius: 18px 18px 18px 6px;
}

body.chat-page .user-message .message-content {
  background: var(--gl-soft) !important;
  border: 1px solid #c7d2fe;
}

body.chat-page .sidebar {
  background: var(--gl-card) !important;
  border-right: 1px solid var(--gl-line) !important;
}

@media (max-width: 768px) {
  html:has(body.chat-page),
  body.chat-page {
    background: #eaf3ff !important;
  }
}

/* —— Result —— */
body.result-page {
  padding: clamp(12px, 3vw, 28px);
}

body.result-page .header h1 {
  color: var(--gl-ink);
}

body.result-page .header h1:after {
  background: var(--gl-grad);
}

body.result-page .back-link {
  background: var(--gl-grad) !important;
  border-radius: 999px !important;
  box-shadow: 0 12px 32px rgba(124, 92, 252, 0.28);
}

body.result-page .answer-container,
body.result-page .container > .header {
  background: var(--gl-card);
  border: 1px solid var(--gl-line);
  border-radius: 22px;
  box-shadow: var(--gl-shadow);
}

/* —— Auth —— */
body.auth-page {
  background:
    radial-gradient(900px 420px at 12% -8%, rgba(56, 189, 248, 0.35), transparent 55%),
    radial-gradient(800px 400px at 92% 0%, rgba(124, 92, 252, 0.28), transparent 50%),
    linear-gradient(180deg, #eaf3ff, #f5f0ff 55%, #eef4ff) !important;
}

body.auth-page .auth-container {
  background: var(--gl-card) !important;
  border: 1px solid var(--gl-line) !important;
  box-shadow: var(--gl-shadow) !important;
}

body.auth-page .auth-container::before {
  background: var(--gl-grad) !important;
}

body.auth-page .auth-header h1 {
  color: var(--gl-ink) !important;
}

body.auth-page .auth-header p {
  color: var(--gl-muted) !important;
}

/* Dark methodology banner: global ink headings / sky wash must not leak in */
html:has(body.methodology-page),
body.methodology-page {
  background: #f5f7fb !important;
  background-image: none !important;
}

body.methodology-page .method-hero {
  color: #fff;
}

body.methodology-page .method-hero h1,
body.methodology-page .method-hero h1 i,
body.methodology-page .method-hero h2,
body.methodology-page .method-hero h3 {
  color: #fff !important;
}

body.methodology-page .method-hero p {
  color: #d7d9ee !important;
}

body.methodology-page .method-hero .method-useful,
body.methodology-page .method-hero .method-famous {
  color: #e8eaff !important;
}

body.methodology-page .method-hero strong,
body.methodology-page .method-hero .method-useful-label {
  color: #fff !important;
}

body.methodology-page .method-hero .topic-link {
  color: #c4b5fd !important;
}
