/* ===================== */
/* Global Variables */
/* ===================== */
:root {
  --primary-color: #1F4B7E;
  --secondary-color: #F4F4F4;
  --accent-color: #4CAF50;
  --text-color: #333;
  --light-text: #fff;
  --border-radius: 8px;
  --input-padding: 12px 15px;
  --transition-speed: 0.3s;
}

/* ===================== */
/* Reset & Base */
/* ===================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: #F8F9FA;
  padding: 2rem;
  color: var(--text-color);
  line-height: 1.6;
  min-height: 100vh;
}


/* ===================== */
/* Profile */
/* ===================== */

/* ===== Settings layout (scoped) ===== */
  .lg-settings { font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; }
  .lg-settings .card {
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,.05);
    border: 1px solid rgba(0,0,0,.06);
    overflow: hidden;
  }

  .lg-settings .wrap {
    display: flex;
    flex-wrap: nowrap;
  }

  /* Sidebar */
  .lg-settings .sidenav {
    flex: 0 0 260px;               /* fixed width on desktop */
    background: #fafbfc;
    border-right: 1px solid #e9ecef;
  }
  .lg-settings .sidenav .nav {
    flex-direction: column;
    padding: 16px;
    gap: 4px;
  }
  .lg-settings .sidenav .nav-link {
    text-align: left;
    border-radius: 8px;
    font-weight: 500;
    color: #495057;
    padding: 10px 14px;
    white-space: nowrap;
  }
  .lg-settings .sidenav .nav-link.active {
    background: #ffffff;
    color: #000;
    box-shadow: inset 2px 0 0 #1F4B7E; /* left accent */
  }

  /* Content */
  .lg-settings .content {
    flex: 1 1 auto;
    padding: 24px;
    background: #ffffff;
  }
  .lg-settings .profile-img {
    width: 250px; height: 250px; border-radius: 50%; object-fit: cover;
    border: 1px solid #e9ecef;
  }
  .lg-settings .form-label { margin-bottom: 4px; font-weight: 600; }
  .lg-settings .form-control { font-size: 14px; }

  /* Buttons */
  .lg-settings .btn { font-size: 14px; }
  .lg-settings .btn-outline-primary { border-color:#1F4B7E; color:#ffffff; }
  .lg-settings .btn-outline-danger { border-color:#F42D42; color:#ffffff; } 

 
/* ===================== */
/* Topbar */
/* ===================== */
.topbar {
  background-color: #fff;
  border-bottom: 1px solid #dee2e6;
  padding: 0.5rem 1rem;
}

.topbar a {
  text-decoration: none !important;
}

.navbar-nav .nav-link {
  color: #6C7380;
  font-size: 0.95rem;
}

.navbar-nav .nav-link i {
  margin-right: 6px;
}

.navbar-nav .nav-link:hover {
  background-color: #F9F9FA;
  border-radius: 15%;
}

.dropdown-menu {
    z-index: 2000; /* higher than navbar's default */
}

.dropdown-menu .dropdown-item {
  color: #6C7380 !important; 
}

.dropdown-menu .dropdown-item:hover {
  background-color: #f8f9fa;
  color: #000 !important;
}

.dropdown-menu a {
  text-decoration: none !important;
}

.dropdown-menu .small {
  font-size: 0.75rem;
}

.profile-name {
  color: #000;
}

.profile-position {
  color: #6C7380;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.abbr-icon {
  width: 2em;
  height: 2em;
  vertical-align: middle;
}
.text-warning { color: #ffc107; }
.text-success { color: #198754; }
.text-dark { color: #212529; }
.text-danger { color: #DD391E; }
.text-primary { color: #03AAEF; }

/* ===================== */
/* Menu Bar */
/* ===================== */
.menu-bar {
  background-color: #fff;
  border-top: 0.5px solid #E1E3E8;
  border-bottom: 0.5px solid #E1E3E8;
}

.menu-bar .nav-link.active {
  color: #373F4D;
  border-bottom: 2px solid #1F4B7E;
}

.badge-new {
  font-size: 0.6rem;
  margin-left: 4px;
}

  
/* ===================== */
/* Cards */
/* ===================== */
.tabler-card {
  background: #fff;
  border: 1px solid #e3e6ec;
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.05);
  transition: 0.2s ease;
  position: relative;
  overflow: hidden;
  height: 250px;
  justify-content: center;
} 

.tabler-card:hover {
  box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.08);
}

.tabler-card::after {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 100px;
  height: 100px;
  background: rgba(13, 110, 253, 0.1);
  border-radius: 50%;
}

.card-title {
  font-weight: 700;
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.card-subtitle {
  font-size: 0.875rem;
  color: #6c757d;
  margin-bottom: 1rem;
}

.value {
  font-size: 1.8rem;
  font-weight: 700;
  margin-top: 0.5rem;
}

.change-up {
  color: #198754;
  font-size: 0.875rem;
}

.change-down {
  color: #F42D42;
  font-size: 0.875rem;
}

.card-square {
  width: 100%;
}

@media (min-width: 992px) {
  .col-lg-3 .tabler-card {
    min-height: 230px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }
}

/* ===================== */
/* Notification Dropdown */
/* ===================== */

.notification-dropdown {
    min-width: 300px;
    max-width: 350px;
    border-radius: 8px;
    background: #fff;
    font-family: Arial, sans-serif;
}

.notification-name {
    font-size: 16px;
    color: #333;
}

.notification-grid-compressed {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 5px;
    border-radius: 5px;
    transition: background-color 0.2s ease-in-out;
}

.notification-grid-compressed:hover {
    background-color: #f8f9fa;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-top: 6px;
}

.status-dot.red {
    background-color: #e74c3c;
}

.notification-content {
    flex: 1;
    text-align: left;
}

.notification-title {
    font-weight: bold;
    font-size: 14px;
    color: #000;
    margin-bottom: 2px;
}

.notification-message {
    font-size: 13px;
    color: #555;
    line-height: 1.3;
}

.notification-show-more {
    display: inline-block;
    font-size: 13px;
    color: #007bff;
    text-decoration: none;
}

.notification-show-more:hover {
    text-decoration: underline;
}

/* ===================== */
/* Apps Dropdown */
/* ===================== */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 1rem;
  padding: 1rem;
  width: 260px;
} 

.app-grid-compressed .apps-name {
  margin-top: 0.1rem !important;
  font-size: 0.65rem !important;
}

.apps-dropdown {
  min-width: 200px !important;
  max-width: 220px;
}

.apps-grid a {
  text-decoration: none;
  color: #6C7380;
  font-size: 0.85rem;
  text-align: center;
}

.apps-grid a:hover {
  color: #000;
}

.apps-grid i {
  font-size: 1.5rem;
  margin-bottom: 0.3rem;
}

.app-grid-compressed .col-4 {
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
  border-radius: 6px;
  padding: 2px;
}

.app-grid-compressed .col-4:hover {
  background-color: #f1f1f1;
  transform: scale(1.05);
}

.app-grid-compressed .apps-name {
  margin-top: 0.25rem !important;
  font-size: 0.7rem;
}

/* ===================== */
/* Dark Mode */
/* ===================== */
body.dark-mode {
  background-color: #121723;
  color: #e5e5e5;
}

body.dark-mode #site-logo {
    content: url("../../assets/img/dark-logo.png");
}

body.dark-mode .topbar {
  background-color: #1D2530;
  border-bottom-color: #444;
}

body.dark-mode .apps-name{
    color: #fff;
}

body.dark-mode .profile-name {
  color: #fff;
}

body.dark-mode .profile-position {
  color: #ccc;
}

body.dark-mode .topbar a,
body.dark-mode .topbar i {
  color: #e5e5e5 !important;
}

body.dark-mode .menu-bar {
  background-color: #1D2530;
  border-top-color: #444;
  border-bottom-color: #444;
}

body.dark-mode .menu-bar .nav-link {
  color: #e5e5e5 !important;
}

body.dark-mode .menu-bar .nav-link.active {
  color: #fff !important;
  border-bottom: 2px solid #1F4B7E;
}

body.dark-mode .tabler-card {
  background-color: #1D2530;
  border-color: #444;
  color: #e5e5e5;
}

body.dark-mode .card-subtitle {
  color: #bbb;
}

body.dark-mode .dropdown-menu {
  background-color: #1D2530 !important;
  border-color: #444;
}

body.dark-mode .dropdown-menu .dropdown-item {
  color: #e5e5e5 !important;
}

body.dark-mode .dropdown-menu .dropdown-item:hover {
  background-color: #2a3240 !important;
}

body.dark-mode hr {
  border-color: #555;
}

.tooltip-inner {
  font-size: 0.85rem;
  padding: 6px 10px;
  border-radius: 6px;
}

/* Light mode tooltip */
body:not(.dark-mode) .tooltip-inner {
  background-color: #f8f9fa;
  color: #212529;
  border: 1px solid #ccc;
}

/* Dark mode tooltip */
body.dark-mode .tooltip-inner {
  background-color: #212529;
  color: #f8f9fa;
  border: 1px solid #555;
}

body.dark-mode .menu-bar {
    background-color: #1D2530 !important;
}

body.dark-mode .menu-bar .nav-link {
    color: #e0e0e0;
}

body.dark-mode .menu-bar .nav-link:hover {
    background-color: #2a3240;
    color: #ffffff;
}

/* Active Link */
.menu-bar .nav-link.active {
    font-weight: bold;
    color: #0E78DE !important;
}

body.dark-mode .menu-bar .nav-link.active {
    color: #4dabff !important;
}

/* Dropdown in Dark Mode */
body.dark-mode .dropdown-menu {
    background-color: #1D2530;
    border-color: #2a3240;
}

body.dark-mode .dropdown-menu .dropdown-item {
    color: #e0e0e0;
}

body.dark-mode .dropdown-menu .dropdown-item:hover {
    background-color: #2a3240;
    color: #ffffff;
}

/* Tooltip arrow color adjustments */
body:not(.dark-mode) .tooltip.bs-tooltip-auto[data-popper-placement^=bottom] .tooltip-arrow::before {
  border-bottom-color: #f8f9fa;
}
body.dark-mode .tooltip.bs-tooltip-auto[data-popper-placement^=bottom] .tooltip-arrow::before {
  border-bottom-color: #212529;
}

body.dark-mode .app-grid-compressed .col-4:hover {
  background-color: #2a3240;
}

.dark-mode .profile-header .profile-name {
    color: #fff;
}

.dark-mode .profile-header .profile-position {
    color: #bbb;
}

body.dark-mode .notification-dropdown {
    background: #1D2530; /* Dropdown background */
    color: #e0e0e0;
}

body.dark-mode .notification-name {
    color: #e0e0e0;
}

body.dark-mode .notification-title {
    color: #ffffff;
}

body.dark-mode .notification-message {
    color: #c7c7c7;
}

body.dark-mode .notification-grid-compressed:hover {
    background-color: #2a3240; /* Hover background in dark mode */
}

body.dark-mode .notification-show-more {
    color: #4dabff;
}

body.dark-mode .lg-settings .card { background:#15171a; border-color:#2a2d31; box-shadow: none; }
body.dark-mode .lg-settings .sidenav { background:#111315; border-color:#2a2d31; }
body.dark-mode .lg-settings .sidenav .nav-link { color:#cbd5e1; }
body.dark-mode .lg-settings .sidenav .nav-link.active { background:#1a1d21; color:#fff; box-shadow: inset 2px 0 0 #1F4B7E; }
body.dark-mode .lg-settings .content { background:#1a1d21; color:#e5e7eb; }
body.dark-mode .lg-settings .form-control { background:#0f1113; border-color:#2a2d31; color:#e5e7eb; }
body.dark-mode .lg-settings small.text-muted { color:#94a3b8 !important; }

/* ===================== */
/* Navbar & Logo */
/* ===================== */
.top-logo {
  max-height: 50px;
  height: auto;
}

/* @media (max-width: 991px) {
  .topbar {
    justify-content: center !important;
    padding: 0.5rem 0;
  }
  .top-logo {
    max-width: 80%;
    height: auto;
  }
  body.dark-mode .navbar-brand img {
    content: url("../../assets/img/dark-favicon.png");
  }
} */

.navbar-toggler {
  display: inline-block !important;
  border: none;
}

.navbar-toggler-icon {
  background-image: var(--bs-navbar-toggler-icon-bg);
}
 
body.dark-mode .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='white' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
} 

/* ===================== */
/* Loader */
/* ===================== */
#theme-loader {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  color: white;
  font-size: 1.5rem;
  font-family: sans-serif;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
}

#page-loader {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  display: flex; /* show immediately */
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.8);
  z-index: 9999;
  color: white;
  font-size: 1.5rem;
  font-family: sans-serif;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease;
}

/* ===================== */
/* Login & OTP Styles */
/* ===================== */
.login-container {
  width: 100%;
  max-width: 400px;
  padding: 2rem;
  background-color: white;
  border-radius: var(--border-radius);
  box-shadow: 0 0 15px rgba(0,0,0,0.1);
  margin: 0 auto;
}

.login-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: var(--border-radius);
}

.header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.header h1 {
  font-size: 1.5rem;
  color: var(--primary-color);
}

.header p {
  margin-top: 0.5rem;
  color: var(--text-color);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.form-control {
  width: 100%;
  padding: var(--input-padding);
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  font-size: 1rem;
  transition: border var(--transition-speed);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(31, 75, 126, 0.2);
}

.btn {
  display: inline-block;
  background-color: var(--primary-color);
  color: var(--light-text);
  border: none;
  padding: var(--input-padding);
  border-radius: var(--border-radius);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  width: 100%;
  transition: background-color var(--transition-speed);
}

.btn:hover {
  background-color: #173a61;
}

.forgot-password {
  text-align: right;
  margin-top: 1rem;
}

.forgot-password a {
  color: var(--primary-color);
  text-decoration: none;
}

.forgot-password a:hover {
  text-decoration: underline;
}

.footer {
  text-align: center;
  padding: 1rem;
  color: #666;
  font-size: 0.9rem;
  background-color: white;
}

.otp-container {
  margin-bottom: 1.5rem;
  text-align: center;
}

.otp-inputs {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
}

.otp-inputs input {
  width: 40px;
  height: 50px;
  text-align: center;
  font-size: 1.2rem;
  border: 2px solid #ddd;
  border-radius: var(--border-radius);
  transition: all var(--transition-speed);
  -moz-appearance: textfield;
  user-select: none;
}

.otp-inputs input::-webkit-outer-spin-button,
.otp-inputs input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.otp-inputs input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(31, 75, 126, 0.2);
}

/* ===================== */
/* Mobile Adjustments */
/* ===================== */
@media (max-width: 480px) {
  .login-container {
    padding: 1rem;
    margin: 1rem;
    box-shadow: none;
    border-radius: 0;
  }
  .header h1 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
  }
  .header p {
    font-size: 0.9rem;
  }
  .form-control {
    padding: 10px 12px;
  }
  .btn {
    padding: 10px 12px;
  }
}

@media (max-width: 991px) {
  .topbar {
    display: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
  }
  .top-logo {
    max-width: 80%;
    height: auto;
  }

  .navbar-brand {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }
  /* Hide the name and position in profile dropdown */
  #profileDropdown .d-none.d-sm-block {
      display: none !important;
  }
 
  .navbar-toggler {
    z-index: 1051; /* Make sure it's above the logo */
  }

  /* Make sure avatar is small and clickable */
  .avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
  } 
  /* Keep mobile profile icon aligned right */
  .navbar .dropdown.d-lg-none {
    margin-left: auto;
  }  
  .dropdown-avatar {
      width: 40px;
      height: 40px;
      border-radius: 50%;
      object-fit: cover;
  }

  .dropdown-menu {
      min-width: 180px;
  }

  .dropdown-menu li {
      font-size: 14px;
  }
  .fixed-mobile-logo { 
        top: 5px; /* adjust for spacing */
        left: 50%;
        transform: translateX(-50%);
        z-index: 1050; /* stays above menu */
  }
  body.dark-mode .navbar-brand img {
    content: url("../../assets/img/dark-favicon.png");
  } 
  .lg-settings .wrap { flex-direction: column; }
    .lg-settings .sidenav {
      flex: 0 0 auto;
      border-right: none;
      border-bottom: 1px solid #e9ecef;
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
    }
    .lg-settings .sidenav .nav {
      flex-direction: row;
      padding: 8px 12px;
      gap: 6px;
      margin: 0;
      white-space: nowrap;
    }
    .lg-settings .sidenav .nav-link {
      border-radius: 999px;                /* pill look on mobile */
      padding: 10px 14px;
      box-shadow: none;
    }
    .lg-settings .sidenav .nav-link.active {
      box-shadow: none;
      background:#1F4B7E;                  /* highlight as pill */
      color:#fff;
    }
    body.dark-mode .lg-settings .sidenav { border-bottom-color:#2a2d31; }
    .lg-settings .content { padding: 16px; }
    .lg-settings .actions { flex-direction: column; gap: 10px; }
    .lg-settings .actions .btn { width: 100%; }

    .lg-settings .profile-img {
      width: 120px; height: 120px; border-radius: 50%; object-fit: cover;
      border: 1px solid #e9ecef;
    }
}

@media (min-width: 992px) {
  .navbar-toggler {
    display: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
  } 
}

 