/* Shared ConfluenceView user-app shell + dark mode (cv_dashboard_theme in localStorage) */

body {
  background: #f5f7fb;
  transition: background-color 0.2s ease, color 0.2s ease;
}

body.bg-gradient-primary {
  background: linear-gradient(180deg, #4e73df 10%, #224abe 100%) !important;
}

.topbar-lite {
  background: #fff;
  border-bottom: 1px solid #e8edf5;
  padding: 0.8rem 1rem;
  position: sticky;
  top: 0;
  z-index: 99;
}

.topbar-lite-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-lite {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  color: #0f172a;
  text-decoration: none;
}

.brand-lite .brand-logo-dark { display: none; }

.menu-lite a,
.menu-lite .theme-toggle-btn {
  margin-left: 0.35rem;
  display: inline-flex;
  align-items: center;
  padding: 0.42rem 0.7rem;
  border-radius: 8px;
  text-decoration: none;
  color: #334155;
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.25;
  white-space: nowrap;
}

.menu-lite a:hover { background: #eff6ff; color: #1d4ed8; }
.menu-lite a.active {
  background: #dbeafe;
  color: #1e40af;
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.28);
}

.topbar-support-link.active {
  background: #dbeafe;
  color: #1e40af;
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.28);
}

.theme-toggle-btn {
  border: 1px solid #e2e8f0;
  background: #fff;
  cursor: pointer;
  font-family: inherit;
  gap: 0.4rem;
}

.theme-toggle-btn:hover { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }

.topbar-support-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.42rem 0.7rem;
  border-radius: 8px;
  text-decoration: none;
  color: #334155;
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
}

.topbar-support-link:hover { background: #eff6ff; color: #1d4ed8; }

.profile-dropdown-wrap { position: relative; }

.profile-dropdown-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #334155;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
}

.profile-dropdown-btn:hover { background: #f8fafc; border-color: #cbd5e1; }
.profile-dropdown-btn img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }

.profile-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.35rem;
  min-width: 200px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
  z-index: 1000;
  padding: 0.35rem 0;
}

.profile-dropdown-wrap.open .profile-dropdown-menu { display: block; }

.profile-dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  color: #334155;
  text-decoration: none;
  font-size: 0.9rem;
}

.profile-dropdown-menu a:hover { background: #eff6ff; color: #1d4ed8; }
.profile-dropdown-menu .dropdown-divider { height: 1px; background: #e2e8f0; margin: 0.35rem 0; }

.card-clean {
  border: 1px solid #e9edf5;
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

.cv-theme-toggle-float {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1000;
}

.cv-theme-toggle-float .theme-toggle-btn { margin: 0; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12); }

.landing-theme-toggle-wrap {
  display: inline-flex;
  align-items: center;
  padding: 0 !important;
}

.landing-theme-toggle-wrap .theme-toggle-btn {
  margin: 0;
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
}

body.dark-mode.landing-page .landing-theme-toggle-wrap .theme-toggle-btn {
  border-color: #334155;
  background: #1e293b;
  color: #e2e8f0;
}

body.dark-mode.landing-page .landing-theme-toggle-wrap .theme-toggle-btn:hover {
  background: #334155;
  color: #93c5fd;
}

/* ---- Dark mode ---- */

body.dark-mode {
  background: #0b1220;
  color: #e2e8f0;
}

body.dark-mode.bg-gradient-primary {
  background: #0b1220 !important;
}

body.dark-mode .topbar-lite {
  background: #0f172a;
  border-bottom-color: #1f2937;
}

body.dark-mode .brand-lite,
body.dark-mode .menu-lite a,
body.dark-mode .topbar-support-link,
body.dark-mode .profile-dropdown-btn,
body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6,
body.dark-mode .card-header strong,
body.dark-mode label,
body.dark-mode .form-group label,
body.dark-mode .col-form-label {
  color: #e2e8f0;
}

body.dark-mode .menu-lite a:hover,
body.dark-mode .topbar-support-link:hover,
body.dark-mode .theme-toggle-btn:hover,
body.dark-mode .profile-dropdown-btn:hover {
  background: #1e293b;
  color: #93c5fd;
  border-color: #334155;
}

body.dark-mode .menu-lite a.active,
body.dark-mode .topbar-support-link.active {
  background: rgba(37, 99, 235, 0.28);
  color: #dbeafe !important;
  border: 1px solid rgba(96, 165, 250, 0.55);
  box-shadow: 0 0 0 1px rgba(147, 197, 253, 0.12);
}

body.dark-mode .menu-lite a.active:hover,
body.dark-mode .topbar-support-link.active:hover {
  background: rgba(37, 99, 235, 0.38);
  color: #eff6ff !important;
  border-color: rgba(147, 197, 253, 0.65);
}

body.dark-mode .theme-toggle-btn,
body.dark-mode .profile-dropdown-btn,
body.dark-mode .profile-dropdown-menu,
body.dark-mode .card-clean,
body.dark-mode .card,
body.dark-mode .table,
body.dark-mode .modal-content,
body.dark-mode .support-card,
body.dark-mode .feedback-card,
body.dark-mode .auth-card {
  background: #0f172a;
  border-color: #1f2937;
  color: #e2e8f0;
}

body.dark-mode .profile-dropdown-menu a { color: #e2e8f0; }
body.dark-mode .profile-dropdown-menu a:hover { background: #1e293b; color: #93c5fd; }
body.dark-mode .profile-dropdown-menu .dropdown-divider { background: #1f2937; }

body.dark-mode .text-muted,
body.dark-mode .small.text-muted,
body.dark-mode .support-intro,
body.dark-mode .char-hint,
body.dark-mode .feedback-intro,
body.dark-mode .session-card .meta,
body.dark-mode .thank-you-text,
body.dark-mode .ended-sub {
  color: #94a3b8 !important;
}

body.dark-mode .card-header:not(.dash-header-accent):not(.support-card .card-header):not(.feedback-card .card-header),
body.dark-mode .thead-light th {
  background: #111827;
  color: #e2e8f0;
  border-color: #1f2937;
}

body.dark-mode .card-header.dash-header-accent {
  background: linear-gradient(135deg, #5b21b6 0%, #7c3aed 45%, #6d28d9 100%);
  color: #f8fafc;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

body.dark-mode .card-header.dash-header-accent strong { color: #f8fafc; }

body.dark-mode .card-header.dash-header-accent.text-primary,
body.dark-mode .card-header.dash-header-accent .text-primary { color: #e9d5ff !important; }

body.dark-mode .card-header.dash-header-accent .badge-primary {
  background: rgba(255, 255, 255, 0.22);
  color: #faf5ff;
}

body.dark-mode .card-header.dash-header-accent .btn-primary {
  background: #faf5ff;
  color: #5b21b6;
  border-color: #faf5ff;
}

body.dark-mode .card-header.dash-header-accent .btn-primary:hover {
  background: #ede9fe;
  color: #4c1d95;
  border-color: #ede9fe;
}

.dash-recording-player {
  width: 100%;
  max-height: 70vh;
  background: #000;
  border-radius: 8px;
}

body.dark-mode .brand-lite .brand-logo-light { display: none; }
body.dark-mode .brand-lite .brand-logo-dark { display: block; }

body.dark-mode .table td,
body.dark-mode .table th,
body.dark-mode .table thead th { border-color: #1f2937; color: #e2e8f0; }

body.dark-mode .table-hover tbody tr:hover { background: rgba(51, 65, 85, 0.35); }

body.dark-mode .form-control,
body.dark-mode select.form-control,
body.dark-mode textarea.form-control {
  background: #111827;
  color: #e2e8f0;
  border-color: #334155;
}

body.dark-mode .form-control:focus {
  background: #111827;
  color: #e2e8f0;
  border-color: #60a5fa;
  box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.15);
}

body.dark-mode .custom-control-label { color: #e2e8f0; }

body.dark-mode .modal-header,
body.dark-mode .modal-footer { border-color: #1f2937; }

body.dark-mode code { color: #93c5fd; background: #111827; }

body.dark-mode .btn-outline-secondary {
  color: #cbd5e1;
  border-color: #475569;
}

body.dark-mode .btn-outline-secondary:hover {
  background: #1e293b;
  color: #f8fafc;
  border-color: #64748b;
}

body.dark-mode .btn-outline-primary { color: #93c5fd; border-color: #3b82f6; }
body.dark-mode .btn-outline-primary:hover { background: #1e3a5f; color: #f8fafc; }

body.dark-mode .alert-success { background: #14532d; color: #bbf7d0; border-color: #166534; }
body.dark-mode .alert-danger { background: #7f1d1d; color: #fecaca; border-color: #991b1b; }
body.dark-mode .alert .close { color: #f8fafc; text-shadow: none; }

body.dark-mode .ticket-row:hover { background: rgba(51, 65, 85, 0.35); }
body.dark-mode .ticket-row { border-bottom-color: #1f2937; }

body.dark-mode .reply-item { background: #111827; border-bottom-color: #1f2937; }
body.dark-mode .reply-item.staff { background: #1e293b; }
body.dark-mode .reply-meta { color: #94a3b8; }

body.dark-mode .ticket-status.closed { background: #334155; color: #cbd5e1; }

body.dark-mode .support-card .card-body,
body.dark-mode .feedback-card .card-body { background: #0f172a; }

body.dark-mode .support-links { border-top-color: #1f2937; }
body.dark-mode .support-links a { color: #93c5fd; }

body.dark-mode .session-card {
  background: #111827;
  border-color: #334155;
}

body.dark-mode .session-card .title { color: #f8fafc; }

body.dark-mode .thank-you-title,
body.dark-mode .ended-title { color: #f8fafc; }

body.dark-mode .btn-dashboard {
  background: #111827;
  color: #93c5fd;
  border-color: #6366f1;
}

body.dark-mode .btn-dashboard:hover { background: #1e293b; color: #bfdbfe; }

body.dark-mode .dash-recording-player { background: #000; }

body.dark-mode .kpi { color: #f8fafc; }
body.dark-mode .local-time { color: #93c5fd; }

body.dark-mode .landing-header {
  background: rgba(15, 23, 42, 0.98) !important;
  border-bottom: 1px solid #1f2937;
}

body.dark-mode.landing-page .landing-nav-link,
body.dark-mode.landing-page .landing-profile-dropdown-btn {
  color: #e2e8f0;
}

body.dark-mode.landing-page .landing-nav-link:hover,
body.dark-mode.landing-page .landing-profile-dropdown-btn:hover {
  background: #1e293b;
  color: #93c5fd;
}

body.dark-mode.landing-page .landing-profile-dropdown-menu {
  background: #0f172a;
  border-color: #334155;
}

body.dark-mode.landing-page .landing-section-light {
  background: #0f172a;
  color: #e2e8f0;
}

body.dark-mode.landing-page .landing-meeting-box,
body.dark-mode.landing-page .landing-welcome-dashboard {
  background: #111827;
  border-color: #334155;
  color: #e2e8f0;
}

body.dark-mode.landing-page .landing-footer {
  background: #0b1220;
  border-top-color: #1f2937;
}

body.dark-mode.landing-page .landing-footer-links a { color: #94a3b8; }
body.dark-mode.landing-page .landing-footer-links a:hover { color: #e2e8f0; }

body.dark-mode .profile-photo-wrap { background: #334155; }

body.dark-mode .landing-country-picker-display,
body.dark-mode .landing-modal {
  background: #0f172a;
  border-color: #334155;
  color: #e2e8f0;
}

body.dark-mode .text-gray-900 { color: #f8fafc !important; }
body.dark-mode .text-gray-600 { color: #94a3b8 !important; }
body.dark-mode .card .btn-link { color: #93c5fd; }
body.dark-mode .card .btn-link:hover { color: #bfdbfe; }
body.dark-mode .close { color: #f8fafc; text-shadow: none; opacity: 0.8; }
