/* ================================
   SaaS Dashboard Theme (Bootstrap 5)
   ================================ */

/* 🎨 Colour variables */
:root {
    --primary: #1E3A5F;
    --secondary: #3B82F6;
    --accent: #F59E0B;
    --danger: #EF4444;
    --bg: #F9FAFB;
    --surface: #FFFFFF;
    --sidenav-bg: #F3F4F6;
    --border: #E5E7EB;
    --text: #111827;
    --text-muted: #6B7280;
  }
    
  /* Page base */
  body {
    background-color: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 0.95rem;
    transition: background-color 0.3s ease, color 0.3s ease;
  }
  
  /* Card logo */
  .card-logo {
    width: auto;
    object-fit: contain;
    max-height: 60px;   /* default: smaller on mobile */
  }
  
  @media (min-width: 768px) {   /* tablets and up */
    .card-logo {
      max-height: 80px;
    }
  }
  
  @media (min-width: 1200px) {  /* desktops and up */
    .card-logo {
      max-height: 120px;
    }
  }
  

  /* Sidebar */
.sidebar {
    width: 220px;
    min-height: 100vh;
    background-color: var(--primary);
    border-right: 1px solid rgba(255, 255, 255, 0.12);
    position: fixed;
    top: 0;
    left: 0;
    transition: transform 0.3s ease;
    z-index: 1050;
  }
  
  .side-bar-logo {
    height: auto;
    width: 12rem;
  }
  
  .sidebar .nav-link {
    color: rgba(255, 255, 255, 0.82);
    font-weight: 500;
    border-radius: 8px;
    padding: 0.75rem 0.9rem;
  }

  .sidebar-nav {
    gap: 0.35rem;
  }

  .sidebar-icon {
    width: 1.1rem;
    text-align: center;
    font-size: 1rem;
    flex-shrink: 0;
  }
  
  .sidebar .nav-link:hover,
  .sidebar .nav-link.active {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.14);
  }
  
  /* Responsive sidebar */
  .sidebar.collapsed {
    transform: translateX(-100%);
  }
  
  @media (min-width: 992px) {
    .sidebar {
      transform: none !important;
    }
  }
  
  /* Content */
  .content {
    margin-left: 220px;
    transition: margin-left 0.3s ease;
  }
  
  @media (max-width: 991px) {
    .content {
      margin-left: 0;
    }
  }
  
  /* Top navbar */
  .topbar {
    background-color: var(--surface);
    border-bottom: 1px solid var(--border);
  }
  
  .topbar .nav-link {
    color: var(--text-muted);
  }
  
  .topbar .nav-link:hover {
    color: var(--primary);
  }
  
  /* Cards */
  .card {
    border: none;
    border-radius: 12px;
    background-color: var(--surface);
    transition: background-color 0.3s ease;
  }
  
  .card .card-title {
    color: var(--text-muted);
    font-weight: 600;
  }
  
  .card .display-6 {
    color: var(--primary);
    font-weight: bold;
  }
  
  /* Tables */
  .table th {
    background-color: var(--sidenav-bg);
    color: var(--text);
  }
  
  .table td,
  .table th {
    vertical-align: middle;
  }
  
  .crm-contact-list {
    max-height: 520px;
    overflow-y: auto;
    padding-right: 0.25rem;
  }

  .crm-contact-item {
    padding: 0.75rem;
    border-radius: 0.75rem;
    transition: background-color 0.15s ease;
  }

  .crm-contact-item:hover,
  .crm-contact-item:focus-visible {
    background-color: rgba(15, 23, 42, 0.04);
  }

  /* Buttons */
  .btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
  }
  
  .btn-primary:hover {
    background-color: #1E40AF;
    border-color: #1E40AF;
  }
  
  .btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
  }
  
  .btn-outline-primary:hover {
    background-color: var(--primary);
    color: #fff;
  }
  
  /* Alerts */
  .alert {
    border-radius: 8px;
  }
  
  /* Utility tweaks */
  .ul-no-bullets {
    list-style: none;
    margin: 0;
    padding: 0;
  }
  
/* User Dropdown Styling */
.navbar .dropdown-menu {
    border-radius: 10px;
    border: 1px solid var(--border);
    background-color: var(--surface);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    min-width: 180px;
    transition: background-color 0.3s ease;
  }
  
.navbar .dropdown-item {
    font-weight: 500;
    color: var(--text);
  }

.settings-page {
  max-width: 1180px;
}

.settings-section {
  border: 1px solid var(--bs-border-color);
  border-radius: 8px;
  background: #fff;
}

.settings-section-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--bs-border-color);
  background: #f8fafc;
}

.settings-section-body {
  padding: 1.25rem;
}

.company-logo-preview {
  width: 140px;
  height: 140px;
  object-fit: contain;
  border: 1px solid var(--bs-border-color);
  border-radius: 8px;
  background: #f8fafc;
  padding: 0.75rem;
}
  
  .navbar .dropdown-item:hover {
    background-color: rgba(37,99,235,0.1);
    color: var(--primary);
    border-radius: 6px;
  }
  
  .navbar .dropdown-divider {
    border-top: 1px solid var(--border);
  }


/* Default collapsed state for sidebar */
.sidebar {
  width: 220px;
  transition: all 0.3s ease;
}

/* Collapsed state */
.sidebar.collapsed {
  transform: translateX(-100%); /* slide out */
}

/* On large screens, sidebar should always show */
@media (min-width: 992px) {
  .sidebar {
    transform: none !important; /* always visible */
  }
}

/* Message boxes */

.alert {
  border-radius: 8px;
    margin: 0 auto;
    width: fit-content;
}

.custom-close-btn {
  border: none;
  font-size: 1.2rem;
  font-weight: bold;
  color: #333;
  opacity: 0.8;
  transition: color 0.3s ease, opacity 0.3s ease;
}

.custom-close-btn:hover {
  color: #ff0000; /* Red color on hover */
  opacity: 1;
  cursor: pointer;
}

.custom-close-btn:focus {
  outline: none;
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);
}

/* Clickable table rows */
.clickable-row:hover {
  cursor: pointer;
  background-color: #f1f1f1;
}
