﻿/* Settings + Profile shell — align with Admin horizontal nav pattern. */

.account-shell-nav {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  margin: 0 0 16px;
  padding: 12px;
  background: #0d0b14;
  border: 1px solid rgba(124, 58, 237, 0.55);
  border-radius: 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

.account-shell-destination,
.account-shell-action {
  min-height: 44px;
  min-width: 44px;
  flex: 0 0 auto;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid #7c3aed;
  background: #140f1c;
  color: #f4efe4;
  cursor: pointer;
  white-space: nowrap;
  font: inherit;
}

.account-shell-destination[aria-current="page"] {
  background: #3b1f3a;
  border-color: #c9a227;
}

.account-shell-destination:focus-visible,
.account-shell-action:focus-visible {
  outline: 2px solid #c9a227;
  outline-offset: 2px;
}

.account-shell-destination-panel {
  background: #140f1c;
  border: 1px solid rgba(90, 45, 85, 0.85);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
}

.account-shell-destination-panel[hidden] {
  display: none !important;
}

.account-shell-overview {
  margin: 0 0 12px;
  color: #f4efe4;
}

.account-shell-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  list-style: none;
  margin: 0;
  padding: 0;
}

#view-settings.settings-shell-ready .settings-shell-details:not(.settings-shell-active) {
  display: none;
}

#view-settings.settings-shell-ready .settings-shell-details.settings-shell-active > summary {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

#view-profile.profile-shell-ready .profile-shell-parked-inline {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
}

#view-profile.profile-shell-ready .profile-shell-panels {
  max-width: 100%;
  overflow-x: hidden;
}

#view-profile.profile-shell-ready .profile-shell-content[hidden] {
  display: none !important;
}

#view-profile.profile-shell-ready #profile-shell-dest-overview .profile-layout {
  margin-top: 0;
}

#view-profile.profile-shell-ready[data-profile-section="overview"] #profile-membership {
  display: none !important;
}

/* Admin subsection actions: one horizontal row (Costs: Set goals | Plans…). */
.admin-shell-actions {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 8px !important;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

.admin-shell-action-row {
  flex: 0 0 auto;
  margin: 0;
}

.admin-shell-action {
  width: auto !important;
  white-space: nowrap;
}

/* Session Capture — uniform controls, Phantom dark/purple theme (avoid warm yellow accents). */
#admin-session-logs-panel .creations-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: stretch;
}

#admin-session-logs-panel .creations-actions > button {
  flex: 1 1 160px;
  min-height: 44px;
  height: 44px;
  padding: 0 14px;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 10px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

#admin-session-logs-panel #btn-export-session-logs {
  background: #3b1f3a;
  border: 1px solid #7c3aed;
  color: #f4efe4;
}

#admin-session-logs-panel #btn-refresh-session-logs {
  background: #140f1c;
  border: 1px solid #7c3aed;
  color: #f4efe4;
}

#admin-session-logs-panel #btn-clear-session-logs {
  background: #1a0f18;
  border: 1px solid #a855f7;
  color: #f5d0fe;
}

#admin-session-logs-panel #btn-clear-session-logs:focus-visible,
#admin-session-logs-panel #btn-export-session-logs:focus-visible,
#admin-session-logs-panel #btn-refresh-session-logs:focus-visible {
  outline: 2px solid #c9a227;
  outline-offset: 2px;
}

#clear-logs-dialog .phantom-dialog-sheet {
  background: #0d0b14;
  color: #f4efe4;
  border-color: #7c3aed;
}

#clear-logs-dialog button.primary {
  background: #3b1f3a;
  border-color: #a855f7;
  color: #f5d0fe;
}

@media (max-width: 720px) {
  #view-settings,
  #view-profile,
  #view-admin {
    overflow-x: hidden;
    max-width: 100%;
  }
}

/* Account actions have independent panels, with compact accessible forms. */
#view-settings #settings-section-account {
  border: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
}
#view-settings .settings-account-card {
  border: 1px solid #8b5cf6;
  border-radius: 12px;
  background: #0d0d14;
  padding: 18px;
  margin: 0 0 16px;
  min-width: 0;
  scroll-margin-top: 16px;
}
#view-settings .settings-account-card h3 { margin-top: 0; }
#view-settings .settings-account-card input:not([type="checkbox"]):not(.sr-only) {
  display: block;
  width: 100%;
  max-width: 420px;
  min-width: 0;
  box-sizing: border-box;
  min-height: 44px;
}
#view-settings .settings-account-card #delete-account-phrase { max-width: 240px; }
#view-settings label.check {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  width: fit-content;
  max-width: 100%;
  margin: 14px 0;
  text-align: left;
}
#view-settings label.check input[type="checkbox"] {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  margin: 0;
  padding: 0;
  accent-color: #8b5cf6;
}
