/* ================================
   MODERN SIDEBAR - OPTION 3
   Navy Blue with Cyan Accent
   ComplianceHub - Professional Enterprise Theme
   
   To revert: Delete this file and remove the link from index.html
   ================================ */

/* ===== Base Sidebar - Soft Slate Gradient ===== */
.sidebar {
  background: linear-gradient(180deg, #334155 0%, #1e293b 100%) !important;
  backdrop-filter: none !important;
  border-right: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1) !important;
}

/* ===== Sidebar Header ===== */
.sidebar-header {
  background: transparent !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  padding: 20px 16px !important;
}

.sidebar-logo {
  color: #ffffff !important;
}

/* Logo Icon - Cyan Gradient Background */
.sidebar-logo i,
.sidebar-logo svg {
  width: 36px !important;
  height: 36px !important;
  padding: 8px !important;
  background: linear-gradient(135deg, #38bdf8, #0ea5e9) !important;
  border-radius: 10px !important;
  color: white !important;
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.3) !important;
}

.sidebar-title {
  color: #ffffff !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em !important;
}

.sidebar-subtitle {
  color: #7dd3fc !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  letter-spacing: 0.02em !important;
  text-transform: uppercase !important;
}

/* ===== Section Headers ===== */
.nav-section-header {
  margin-top: 20px !important;
  padding: 0 16px !important;
  margin-bottom: 8px !important;
}

.nav-section-header span {
  color: #64748b !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
}

/* ===== Nav Items - Base State ===== */
.sidebar .nav-item {
  color: #cbd5e1 !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  padding: 11px 16px !important;
  margin: 2px 12px !important;
  border-radius: 10px !important;
  transition: all 0.2s ease !important;
  background: transparent !important;
  border: none !important;
  border-left: 3px solid transparent !important;
}

.sidebar .nav-item i,
.sidebar .nav-item svg {
  color: #94a3b8 !important;
  width: 18px !important;
  height: 18px !important;
  transition: color 0.2s ease !important;
  flex-shrink: 0 !important;
}

.sidebar .nav-item span {
  flex: 1 !important;
}

/* ===== Nav Items - Hover State ===== */
.sidebar .nav-item:hover {
  background: rgba(56, 189, 248, 0.12) !important;
  color: #f1f5f9 !important;
}

.sidebar .nav-item:hover i,
.sidebar .nav-item:hover svg {
  color: #cbd5e1 !important;
}

/* ===== Nav Items - Active State (Cyan Accent) ===== */
.sidebar .nav-item.active {
  background: rgba(56, 189, 248, 0.2) !important;
  color: #7dd3fc !important;
  border-left: 3px solid #38bdf8 !important;
  font-weight: 600 !important;
}

.sidebar .nav-item.active i,
.sidebar .nav-item.active svg {
  color: #38bdf8 !important;
}

/* Remove the old indicator */
.sidebar .nav-item::before,
.sidebar .nav-item::after {
  display: none !important;
}

/* ===== Sidebar Bottom Section ===== */
.sidebar-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
  padding-top: 16px !important;
  margin-top: 16px !important;
  background: transparent !important;
}

/* ===== Sidebar Footer ===== */
.sidebar-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
  padding: 16px !important;
  background: transparent !important;
}

.delegation-status {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 10px !important;
  padding: 12px !important;
  position: relative !important;
}

.delegation-status i,
.delegation-status svg {
  color: #38bdf8 !important;
}

.delegation-label {
  color: #94a3b8 !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
}

.delegation-name,
.delegation-names {
  color: #f1f5f9 !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  margin-top: 2px !important;
}

.delegation-info {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
}

/* New delegation section styles */
.delegation-section {
  transition: background 0.2s !important;
  border-radius: 6px !important;
  padding: 4px !important;
  margin: -4px !important;
}

.delegation-section:hover {
  background: rgba(255, 255, 255, 0.05) !important;
}

.delegation-row {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
}

.delegation-settings-btn {
  position: absolute !important;
  top: 10px !important;
  right: 10px !important;
  background: none !important;
  border: none !important;
  cursor: pointer !important;
  padding: 4px !important;
  border-radius: 4px !important;
  color: #64748b !important;
  transition: all 0.2s !important;
}

.delegation-settings-btn:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #f1f5f9 !important;
}

/* ===== Custom Scrollbar ===== */
.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ===== Nav Divider ===== */
.nav-divider {
  height: 1px !important;
  background: rgba(255, 255, 255, 0.08) !important;
  margin: 16px 0 !important;
}

/* ===== Focus States for Accessibility ===== */
.sidebar .nav-item:focus-visible {
  outline: 2px solid #38bdf8 !important;
  outline-offset: -2px !important;
}

/* ===== Sidebar Content Wrapper ===== */
.sidebar-content {
  background: transparent !important;
}

.sidebar-nav {
  background: transparent !important;
}

/* ===== Responsive Adjustments ===== */
@media (max-width: 1023px) {
  .sidebar {
    box-shadow: 4px 0 30px rgba(0, 0, 0, 0.3) !important;
  }
}
/* ================================
   COHESIVE THEME - Navy Sidebar + Clean Layout
   Makes the whole page work together
   ================================ */

/* ===== Body Background - Neutral Gray instead of Purple ===== */
body {
  background: #f1f5f9 !important;
}

/* ===== Top Navigation - Clean White ===== */
#top-nav {
  background: #ffffff !important;
  backdrop-filter: none !important;
  border-bottom: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

/* Logo in top nav */
#top-nav .logo {
  color: #0f172a !important;
}

#top-nav .logo i,
#top-nav .logo svg {
  color: #2563eb !important;
}

#top-nav .logo-text {
  color: #0f172a !important;
  font-weight: 700 !important;
}

/* ===== Search Bar - Enhanced ===== */
#top-nav .search-container {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  transition: all 0.2s ease !important;
}

#top-nav .search-container:hover {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
}

#top-nav .search-container:focus-within {
  background: #ffffff !important;
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
}

#top-nav .search-container input {
  color: #334155 !important;
  font-size: 14px !important;
}

#top-nav .search-container input::placeholder {
  color: #94a3b8 !important;
}

#top-nav .search-container i,
#top-nav .search-container svg {
  color: #64748b !important;
}

/* ===== Login Button (only visible when logged out) ===== */
#top-nav .btn-login {
  align-items: center;
  gap: 6px;
  padding: 8px 20px !important;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
  color: white !important;
  border: none !important;
  border-radius: 10px !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  cursor: pointer !important;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3) !important;
  transition: all 0.2s ease !important;
}

#top-nav .btn-login:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4) !important;
}

#top-nav .btn-login i,
#top-nav .btn-login svg {
  width: 16px !important;
  height: 16px !important;
}

/* ===== Icon Buttons in Top Nav - Enhanced ===== */
#top-nav .icon-button {
  position: relative !important;
  width: 40px !important;
  height: 40px !important;
  color: #64748b !important;
  background: transparent !important;
  border: none !important;
  border-radius: 10px !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

#top-nav .icon-button:hover {
  background: #f1f5f9 !important;
  color: #334155 !important;
}

#top-nav .icon-button:active {
  background: #e2e8f0 !important;
  transform: scale(0.95) !important;
}

#top-nav .icon-button i,
#top-nav .icon-button svg {
  width: 20px !important;
  height: 20px !important;
}

/* Notification Badge */
#top-nav .notification-badge {
  position: absolute !important;
  top: 4px !important;
  right: 4px !important;
  min-width: 18px !important;
  height: 18px !important;
  padding: 0 5px !important;
  background: #ef4444 !important;
  color: white !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  border-radius: 10px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* ===== User Menu - Enhanced ===== */
#top-nav .user-button {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  padding: 6px 12px 6px 6px !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

#top-nav .user-button:hover {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
}

#top-nav .user-name {
  color: #334155 !important;
  font-weight: 500 !important;
  font-size: 14px !important;
  max-width: 150px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

#top-nav .user-avatar {
  width: 32px !important;
  height: 32px !important;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
  color: white !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

#top-nav .user-chevron {
  width: 16px !important;
  height: 16px !important;
  color: #94a3b8 !important;
  transition: transform 0.2s ease !important;
}

#top-nav .user-button:hover .user-chevron {
  color: #64748b !important;
}

/* ===== Main Content Area ===== */
.main-content {
  background: #f1f5f9 !important;
}

.app-container {
  background: #f1f5f9 !important;
}

/* ===== Cards in Main Content ===== */
.card,
.dashboard-card,
.stat-card,
.action-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

/* ===== Alert/Action Banner ===== */
.alert-banner,
.action-required-banner {
  border-left: 4px solid #ef4444 !important;
}

/* ===== Primary Buttons - Use Cyan Accent ===== */
.btn-primary,
button.primary {
  background: linear-gradient(135deg, #0ea5e9, #0284c7) !important;
  border: none !important;
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.3) !important;
}

.btn-primary:hover,
button.primary:hover {
  background: linear-gradient(135deg, #38bdf8, #0ea5e9) !important;
}

/* ===== Links - Cyan accent ===== */
.view-all-link,
a.view-all {
  color: #0ea5e9 !important;
}

.view-all-link:hover,
a.view-all:hover {
  color: #0284c7 !important;
}

/* ===== Page Headers ===== */
.page-header h1,
.page-title,
.section-title {
  color: #0f172a !important;
}

.page-header p,
.page-subtitle {
  color: #64748b !important;
}

/* ===== Notification Badge ===== */
.notification-badge {
  background: #ef4444 !important;
}

/* ===== Status Badges ===== */
.badge-high,
.priority-high {
  background: #fef2f2 !important;
  color: #dc2626 !important;
  border: 1px solid #fecaca !important;
}

.badge-medium,
.priority-medium {
  background: #fffbeb !important;
  color: #d97706 !important;
  border: 1px solid #fde68a !important;
}

.badge-low,
.priority-low {
  background: #f0fdf4 !important;
  color: #16a34a !important;
  border: 1px solid #bbf7d0 !important;
}

/* ===== Smooth Transitions ===== */
#top-nav,
.sidebar,
.main-content,
.card {
  transition: all 0.2s ease !important;
}

/* ===== Remove any remaining purple tints ===== */
.glass-bg,
[class*="glass"] {
  background: #ffffff !important;
  backdrop-filter: none !important;
}


/* ===== Coming Soon Section ===== */
.nav-coming-soon {
  opacity: 0.6 !important;
  cursor: default !important;
  pointer-events: none !important;
}

.nav-coming-soon:hover {
  background: transparent !important;
  color: #cbd5e1 !important;
}

.coming-soon-badge {
  font-size: 9px !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.03em !important;
  padding: 2px 6px !important;
  border-radius: 4px !important;
  background: rgba(148, 163, 184, 0.2) !important;
  color: #94a3b8 !important;
  margin-left: auto !important;
}

/* ===== Collapsible Coming Soon Section ===== */
.nav-section-collapsible {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-right: 16px;
}

.nav-section-collapsible:hover {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
}

.nav-section-collapsible .collapse-icon {
  width: 16px;
  height: 16px;
  color: #64748b;
  transition: transform 0.2s ease;
}

.coming-soon-items {
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.2s ease;
  max-height: 500px;
  opacity: 1;
}

.coming-soon-items.collapsed {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
}
