/* ============================================================
   Concept Chest AI Core — Global Header Account & Quota Bar
   ============================================================ */

/* Mount containers */
.cc-global-mount.mode-floating {
  position: fixed !important;
  top: 16px !important;
  right: 20px !important;
  z-index: 999999 !important;
}

.cc-global-mount.mode-docked {
  display: inline-flex !important;
  align-items: center !important;
  vertical-align: middle !important;
  margin-left: 12px !important;
}

/* Account Wrap */
:where(body, #page, .site, header, nav) .cc-header-account-wrap,
.cc-header-account-wrap {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
  line-height: 1.4 !important;
  box-sizing: border-box !important;
}

.cc-header-account-wrap *,
.cc-header-account-wrap *::before,
.cc-header-account-wrap *::after {
  box-sizing: border-box !important;
}

/* Profile Chip Button */
:where(body, #page, .site, header, nav) button.cc-header-chip,
.cc-header-chip {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 3px 10px 3px 4px !important;
  height: 36px !important;
  max-height: 36px !important;
  border-radius: 999px !important;
  background: #11172a !important;
  background-image: none !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #f1f5f9 !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35) !important;
  margin: 0 !important;
  transition: all 0.15s ease !important;
  outline: none !important;
}

.cc-header-chip:hover {
  background: #182038 !important;
  border-color: rgba(99, 102, 241, 0.4) !important;
}

.cc-h-avatar {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  border-radius: 50% !important;
  background: linear-gradient(135deg, #4f46e5, #06b6d4) !important;
  color: #ffffff !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  margin: 0 !important;
}

.cc-h-name {
  color: #f8fafc !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  max-width: 120px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.cc-h-quota {
  display: inline-flex !important;
  align-items: center !important;
  padding: 2px 7px !important;
  border-radius: 999px !important;
  background: rgba(56, 189, 248, 0.14) !important;
  border: 1px solid rgba(56, 189, 248, 0.3) !important;
  color: #7dd3fc !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
}

.cc-h-quota.low {
  background: rgba(244, 63, 94, 0.14) !important;
  border-color: rgba(244, 63, 94, 0.35) !important;
  color: #fca5a5 !important;
}

.cc-h-chevron {
  width: 14px !important;
  height: 14px !important;
  min-width: 14px !important;
  stroke: #94a3b8 !important;
  transition: transform 0.2s ease !important;
}

.cc-header-chip[aria-expanded="true"] .cc-h-chevron {
  transform: rotate(180deg) !important;
}

/* ---------- Popover Card ---------- */
.cc-header-popover {
  position: absolute !important;
  top: calc(100% + 8px) !important;
  right: 0 !important;
  width: 290px !important;
  background: #0f1629 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 16px !important;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.7) !important;
  padding: 16px !important;
  z-index: 1000000 !important;
  color: #f1f5f9 !important;
}

.cc-pop-header {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding-bottom: 14px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.cc-pop-avatar {
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  border-radius: 50% !important;
  background: linear-gradient(135deg, #4f46e5, #06b6d4) !important;
  color: #ffffff !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 17px !important;
  font-weight: 700 !important;
}

.cc-pop-details {
  flex: 1 !important;
  min-width: 0 !important;
}

.cc-pop-name {
  font-size: 14.5px !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.cc-pop-email {
  font-size: 12px !important;
  color: #94a3b8 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  margin-bottom: 4px !important;
}

.cc-pop-badge {
  display: inline-block !important;
  font-size: 10.5px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  padding: 2px 7px !important;
  border-radius: 4px !important;
}

.cc-pop-badge.admin {
  background: rgba(56, 189, 248, 0.16) !important;
  color: #38bdf8 !important;
  border: 1px solid rgba(56, 189, 248, 0.3) !important;
}

.cc-pop-badge.pro {
  background: rgba(168, 85, 247, 0.16) !important;
  color: #c084fc !important;
  border: 1px solid rgba(168, 85, 247, 0.3) !important;
}

.cc-pop-badge.free {
  background: rgba(148, 163, 184, 0.15) !important;
  color: #cbd5e1 !important;
  border: 1px solid rgba(148, 163, 184, 0.25) !important;
}

/* Popover Body / Quota */
.cc-pop-body {
  padding: 14px 0 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.cc-pop-metric {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  margin-bottom: 8px !important;
}

.cc-pop-metric-label {
  font-size: 12px !important;
  color: #94a3b8 !important;
}

.cc-pop-metric-val {
  font-size: 12.5px !important;
  color: #ffffff !important;
  font-variant-numeric: tabular-nums !important;
}

.cc-pop-progress {
  height: 6px !important;
  background: rgba(255, 255, 255, 0.07) !important;
  border-radius: 999px !important;
  overflow: hidden !important;
  margin-bottom: 8px !important;
}

.cc-pop-bar {
  height: 100% !important;
  border-radius: 999px !important;
  background: linear-gradient(90deg, #38bdf8, #818cf8) !important;
  transition: width 0.3s ease !important;
}

.cc-pop-bar.low {
  background: linear-gradient(90deg, #f59e0b, #ef4444) !important;
}

.cc-pop-note {
  font-size: 11px !important;
  color: #64748b !important;
  font-style: italic !important;
}

/* Popover Footer / Sign out */
.cc-pop-footer {
  padding-top: 12px !important;
}

.cc-pop-signout {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  width: 100% !important;
  padding: 8px 12px !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #e2e8f0 !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  transition: all 0.15s ease !important;
}

.cc-pop-signout:hover {
  background: rgba(244, 63, 94, 0.15) !important;
  border-color: rgba(244, 63, 94, 0.3) !important;
  color: #fca5a5 !important;
}

.cc-pop-icon {
  width: 15px !important;
  height: 15px !important;
}

/* Guest Wrap (Logged Out) */
.cc-header-guest-wrap {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.cc-header-signin-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 6px 14px !important;
  height: 34px !important;
  border-radius: 999px !important;
  background: linear-gradient(135deg, #4f46e5, #7c3aed) !important;
  color: #ffffff !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4) !important;
  transition: all 0.15s ease !important;
}

.cc-header-signin-btn:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.5) !important;
  color: #ffffff !important;
}

.cc-header-signup-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 6px 14px !important;
  height: 34px !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #cbd5e1 !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  transition: all 0.15s ease !important;
}

.cc-header-signup-btn:hover {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #ffffff !important;
}

.cc-h-icon {
  width: 15px !important;
  height: 15px !important;
}

/* Full Header Bar [concept_chest_header] */
.cc-global-header-bar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 12px 24px !important;
  background: #0b0f1d !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
}

.cc-gh-brand {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  font-size: 17px !important;
  font-weight: 700 !important;
}

.cc-gh-logo-icon {
  font-size: 18px !important;
}

/* ============================================================
   Concept Chest AI Core — Built-In Auth Modal
   ============================================================ */

.cc-auth-backdrop {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(4, 7, 18, 0.78) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  z-index: 10000000 !important;
  display: none !important;
  pointer-events: none !important;
  visibility: hidden !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 16px !important;
  overflow-y: auto !important;
  box-sizing: border-box !important;
  opacity: 0 !important;
  transition: opacity 0.2s ease, visibility 0.2s ease !important;
}

.cc-auth-backdrop.active {
  display: flex !important;
  pointer-events: auto !important;
  visibility: visible !important;
  opacity: 1 !important;
}

:where(.cc-auth-card, .cc-auth-backdrop) * {
  box-sizing: border-box !important;
}

.cc-auth-card {
  position: relative !important;
  width: 100% !important;
  max-width: 440px !important;
  background: linear-gradient(180deg, #10162a 0%, #0c1020 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 20px !important;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.85), 0 0 40px rgba(99, 102, 241, 0.15) !important;
  padding: 28px 24px 24px !important;
  box-sizing: border-box !important;
  color: #f1f5f9 !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
  transform: scale(0.96) translateY(8px);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.cc-auth-backdrop.active .cc-auth-card {
  transform: scale(1) translateY(0) !important;
}

.cc-auth-close-btn {
  position: absolute !important;
  top: 16px !important;
  right: 16px !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #94a3b8 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  padding: 0 !important;
  transition: all 0.15s ease !important;
  outline: none !important;
}

.cc-auth-close-btn:hover {
  background: rgba(255, 255, 255, 0.14) !important;
  color: #ffffff !important;
}

.cc-auth-close-btn svg {
  width: 16px !important;
  height: 16px !important;
}

.cc-auth-header {
  text-align: center !important;
  margin-bottom: 20px !important;
}

.cc-auth-brand-badge {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 44px !important;
  height: 44px !important;
  border-radius: 12px !important;
  background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%) !important;
  box-shadow: 0 4px 16px rgba(79, 70, 229, 0.4) !important;
  margin-bottom: 12px !important;
}

.cc-auth-sparkle {
  width: 22px !important;
  height: 22px !important;
  stroke: #ffffff !important;
  fill: rgba(255, 255, 255, 0.2) !important;
}

.cc-auth-title {
  margin: 0 0 4px 0 !important;
  font-size: 20px !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  letter-spacing: -0.01em !important;
}

.cc-auth-sub {
  margin: 0 !important;
  font-size: 13px !important;
  color: #94a3b8 !important;
}

/* Tabs */
.cc-auth-tabs {
  display: flex !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 10px !important;
  padding: 4px !important;
  gap: 4px !important;
  margin-bottom: 18px !important;
}

.cc-auth-tab {
  flex: 1 !important;
  height: 34px !important;
  border-radius: 8px !important;
  border: none !important;
  background: transparent !important;
  color: #94a3b8 !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  outline: none !important;
}

.cc-auth-tab:hover {
  color: #f1f5f9 !important;
}

.cc-auth-tab.active {
  background: #1e293b !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

/* Alert */
.cc-auth-alert {
  display: none !important;
  padding: 10px 14px !important;
  border-radius: 10px !important;
  font-size: 12.5px !important;
  line-height: 1.45 !important;
  margin-bottom: 16px !important;
  align-items: center !important;
  gap: 8px !important;
}

.cc-auth-alert.error {
  display: flex !important;
  background: rgba(244, 63, 94, 0.14) !important;
  border: 1px solid rgba(244, 63, 94, 0.35) !important;
  color: #fca5a5 !important;
}

.cc-auth-alert.success {
  display: flex !important;
  background: rgba(16, 185, 129, 0.14) !important;
  border: 1px solid rgba(16, 185, 129, 0.35) !important;
  color: #6ee7b7 !important;
}

/* Fields & Inputs */
.cc-auth-field {
  margin-bottom: 14px !important;
}

.cc-auth-field label {
  display: block !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  color: #cbd5e1 !important;
  margin-bottom: 6px !important;
}

.cc-auth-label-row {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  margin-bottom: 6px !important;
}

.cc-auth-label-row label {
  margin-bottom: 0 !important;
}

.cc-auth-req {
  color: #f43f5e !important;
}

.cc-auth-opt {
  color: #64748b !important;
  font-weight: normal !important;
  font-size: 11px !important;
}

.cc-auth-input-wrap {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
}

.cc-auth-input-icon {
  position: absolute !important;
  left: 12px !important;
  width: 16px !important;
  height: 16px !important;
  stroke: #64748b !important;
  pointer-events: none !important;
}

.cc-auth-input-wrap input {
  width: 100% !important;
  height: 42px !important;
  border-radius: 10px !important;
  background: rgba(15, 23, 42, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  padding: 0 38px 0 38px !important;
  color: #ffffff !important;
  font-size: 13.5px !important;
  font-family: inherit !important;
  box-sizing: border-box !important;
  transition: all 0.15s ease !important;
  outline: none !important;
}

.cc-auth-input-wrap input:focus {
  border-color: #6366f1 !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25) !important;
  background: rgba(15, 23, 42, 0.98) !important;
}

.cc-auth-input-wrap input::placeholder {
  color: #475569 !important;
}

.cc-auth-pw-toggle {
  position: absolute !important;
  right: 6px !important;
  width: 30px !important;
  height: 30px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: transparent !important;
  border: none !important;
  color: #64748b !important;
  cursor: pointer !important;
  padding: 0 !important;
  border-radius: 6px !important;
  transition: color 0.15s !important;
  outline: none !important;
}

.cc-auth-pw-toggle:hover {
  color: #cbd5e1 !important;
}

.cc-auth-pw-toggle svg {
  width: 16px !important;
  height: 16px !important;
}

/* Options row */
.cc-auth-options-row {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  margin-bottom: 16px !important;
}

.cc-auth-check-label {
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
  font-size: 12.5px !important;
  color: #94a3b8 !important;
  cursor: pointer !important;
  user-select: none !important;
}

.cc-auth-check-label input[type="checkbox"] {
  appearance: auto !important;
  -webkit-appearance: checkbox !important;
  width: 14px !important;
  height: 14px !important;
  accent-color: #6366f1 !important;
  margin: 0 !important;
}

.cc-auth-link-btn {
  background: transparent !important;
  border: none !important;
  color: #818cf8 !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  padding: 0 !important;
  text-decoration: none !important;
  transition: color 0.15s !important;
  font-family: inherit !important;
}

.cc-auth-link-btn:hover {
  color: #a5b4fc !important;
  text-decoration: underline !important;
}

/* Submit button */
button.cc-auth-submit-btn,
.cc-auth-submit-btn {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  width: 100% !important;
  height: 42px !important;
  border-radius: 10px !important;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%) !important;
  border: none !important;
  color: #ffffff !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  font-family: inherit !important;
  cursor: pointer !important;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.4) !important;
  transition: all 0.15s ease !important;
  margin-top: 6px !important;
  outline: none !important;
}

.cc-auth-submit-btn:hover:not(:disabled) {
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.5) !important;
  color: #ffffff !important;
}

.cc-auth-submit-btn:disabled {
  opacity: 0.65 !important;
  cursor: not-allowed !important;
  transform: none !important;
}

.cc-btn-spinner {
  display: none !important;
  width: 16px !important;
  height: 16px !important;
  border: 2px solid rgba(255, 255, 255, 0.3) !important;
  border-top-color: #ffffff !important;
  border-radius: 50% !important;
  animation: ccSpin 0.7s linear infinite !important;
  box-sizing: border-box !important;
}

.cc-auth-submit-btn.loading .cc-btn-spinner {
  display: inline-block !important;
}

@keyframes ccSpin {
  to { transform: rotate(360deg); }
}

/* Perk Badge */
.cc-auth-perk-badge {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  background: rgba(99, 102, 241, 0.12) !important;
  border: 1px solid rgba(99, 102, 241, 0.28) !important;
  border-radius: 8px !important;
  padding: 8px 12px !important;
  font-size: 12px !important;
  color: #c7d2fe !important;
  margin: 12px 0 16px !important;
}

.cc-perk-icon {
  font-size: 14px !important;
}

/* Switch note */
.cc-auth-switch-note {
  text-align: center !important;
  margin-top: 18px !important;
  padding-top: 14px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  font-size: 12.5px !important;
  color: #94a3b8 !important;
}

.cc-auth-switch-note .cc-auth-link-btn {
  font-size: 12.5px !important;
}

.cc-auth-forgot-desc {
  font-size: 13px !important;
  color: #94a3b8 !important;
  line-height: 1.45 !important;
  margin: 0 0 16px !important;
}

.cc-back-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
}
