/* === LIGHT THEME === */
html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  width: 100%;
}

body {
  background-color: #E7EFF5;
  color: #4b4b4b;
  font-family: "Segoe UI", sans-serif;
}

/* === LAYOUT === */
#wrapper {
  display: flex;
  min-height: 100vh;
  width: 100%;
  background-color: inherit;
}

#sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 250px;
  height: 100vh;
  background: #5FA2DD;
  color: #fff;
  transition: all 0.3s;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  z-index: 1040;
}

#page-content-wrapper {
  flex: 1;
  margin-left: 250px;
  min-height: 100vh;
  padding-top: 45px;
  transition: margin-left 0.3s ease;
}

/* === NAVBAR === */
.navbar {
  position: fixed;
  top: 0;
  left: 250px;
  right: 0;
  z-index: 1030;
  background-color: #5FA2DD;
  border-radius: 8px;
  margin: 0.25rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.navbar .nav-link {
  color: #ffffff;
  padding: 0.5rem 1rem;
}

.navbar .nav-link:hover {
  color: rgba(255, 255, 255, 0.8);
}

.navbar .navbar-brand {
  color: #ffffff;
}

.navbar .navbar-brand:hover {
  color: rgba(255, 255, 255, 0.8);
}

.navbar .dropdown-toggle::after {
  display: none;
}

/* === TOGGLED STATE === */
#wrapper.toggled .sidebar {
  left: -250px;
}

#wrapper.toggled #page-content-wrapper {
  margin-left: 0;
}

#wrapper.toggled .navbar {
  left: 0;
}

/* Dark theme navbar */
body.dark-theme .navbar {
  background-color: #0F1535 !important;
  color: #cccae1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

body.dark-theme .navbar .nav-link,
body.dark-theme .navbar .navbar-brand {
  color: #cccae1;
}

body.dark-theme .navbar .nav-link:hover,
body.dark-theme .navbar .navbar-brand:hover {
  color: #ffffff;
}

/* === RESPONSIVE STYLES === */
@media (max-width: 991.98px) {
  .sidebar {
    left: -250px;
  }

  .navbar {
    left: 0;
    margin: 0.15rem;
    border-radius: 6px;
  }

  #page-content-wrapper {
    margin-left: 0;
    padding: 40px 0.25rem 0.25rem 0.25rem;
  }
}

/* === MOBILE OPTIMIZATION === */
@media (max-width: 576px) {
  .navbar {
    left: 0;
    margin: 0;
    border-radius: 0;
    width: 100%;
  }

  #page-content-wrapper {
    padding: 35px 0.15rem 0.15rem 0.15rem;
  }

  .container-fluid {
    padding-left: 0.15rem;
    padding-right: 0.15rem;
  }
}

.sidebar .nav-link {
  color: #333;
  text-decoration: none;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
  background-color: #e0e0e0;
  color: #000;
}

.card {
  background-color: #ffffff;
  border: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* === DARK THEME === */
/* Base */
body.dark-theme {
  color: #cccae1;
}

/* Layout */
body.dark-theme #wrapper {
  background-color: #0F1535;
}

body.dark-theme #page-content-wrapper {
  background-color: #0F1535;
}

body.dark-theme .container-fluid {
  background-color: #0F1535;
}

/* Navbar */
body.dark-theme .navbar {
  background-color: #0F1535;
  color: #cccae1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Sidebar */
body.dark-theme #sidebar {
  background: #1a1a1a;
  color: #fff;
}

body.dark-theme .sidebar .nav-link {
  color: #cccae1;
}

body.dark-theme .sidebar .nav-link:hover,
body.dark-theme .sidebar .nav-link.active {
  background-color: rgba(204, 202, 225, 0.1);
  color: #ffffff;
}

/* Cards */
body.dark-theme .card {
  background-color: #0B102B;
  color: #cccae1;
  border: 1px solid rgba(204, 202, 225, 0.1);
}

body.dark-theme .card-header {
  background-color: #0B102B;
  border-bottom: 1px solid rgba(204, 202, 225, 0.1);
}

body.dark-theme .card-body {
  background-color: #0B102B;
}

body.dark-theme .card-title {
  color: #cccae1;
}

/* Dropdowns */
body.dark-theme .dropdown-menu {
  background-color: #1e1e2d;
  border: 1px solid rgba(204, 202, 225, 0.1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

body.dark-theme .dropdown-item {
  color: #cccae1;
}

body.dark-theme .dropdown-item:hover {
  background-color: rgba(204, 202, 225, 0.1);
  color: #ffffff;
}

body.dark-theme .dropdown-divider {
  border-color: rgba(204, 202, 225, 0.1);
}

/* Buttons */
body.dark-theme .btn-outline-primary {
  background-color: rgba(204, 202, 225, 0.05);
  border: 1px solid rgba(204, 202, 225, 0.1);
  color: #cccae1;
}

body.dark-theme .btn-outline-primary:hover {
  background-color: rgba(204, 202, 225, 0.1);
  border-color: rgba(204, 202, 225, 0.2);
  color: #ffffff;
}

body.dark-theme .btn-check:checked + .btn-outline-primary {
  background-color: rgba(204, 202, 225, 0.2);
  border-color: rgba(204, 202, 225, 0.3);
  color: #ffffff;
}

/* Alerts */
body.dark-theme .alert-info {
  background-color: rgba(204, 202, 225, 0.1);
  border-color: rgba(204, 202, 225, 0.2);
  color: #cccae1;
}

body.dark-theme .alert-success {
  background-color: rgba(25, 135, 84, 0.2);
  border-color: rgba(25, 135, 84, 0.3);
  color: #cccae1;
}

/* Modals */
body.dark-theme .modal-content {
  background-color: #1e1e2d;
  border-color: rgba(204, 202, 225, 0.1);
}

body.dark-theme .modal-header,
body.dark-theme .modal-footer {
  border-color: rgba(204, 202, 225, 0.1);
}

body.dark-theme .modal-title {
  color: #cccae1;
}

/* Text colors */
body.dark-theme .text-body {
  color: #cccae1 !important;
}

body.dark-theme .text-body-secondary {
  color: rgba(204, 202, 225, 0.7) !important;
}

/* Loading states */
body.dark-theme .loading-overlay {
  background-color: rgba(30, 30, 45, 0.8);
}

/* Tooltips */
body.dark-theme .tooltip {
  background-color: #1e1e2d;
  border: 1px solid rgba(204, 202, 225, 0.1);
}

/* Mobile sidebar overlay */
@media (max-width: 991.98px) {
  body.dark-theme #sidebar {
    background-color: #1e1e2d;
    border-right: 1px solid rgba(204, 202, 225, 0.1);
  }
}

#sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1039;
  display: none;
}

/* Mobile sidebar */
@media (max-width: 991.98px) {
  #sidebar {
    left: -250px;
  }

  body.dark-theme #sidebar {
    background-color: #1e1e2d;
  }

  #sidebar.active {
    left: 0;
  }

  #sidebar.active + #sidebar-overlay {
    display: block;
  }

  #page-content-wrapper {
    margin-left: 0;
  }
}

/* Mobile menu button */
@media (max-width: 576px) {
  #menu-toggle {
    padding: 0.25rem 0.5rem;
  }

  .navbar .navbar-brand {
    font-size: 1rem;
  }

  .navbar img {
    width: 24px;
    height: 24px;
  }

  .sidebar .nav-link {
    padding: 0.5rem 1rem;
  }

  .navbar .dropdown-toggle span {
    display: none;
  }

  .dropdown-menu .dropdown-item {
    padding: 0.5rem 1rem;
  }
}

/* Avatar card */
.avatar-card {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.avatar-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.avatar-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.05));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.avatar-card .card-body {
  position: relative;
  z-index: 1;
}

.avatar-card .card-title {
  margin-bottom: 0.5rem;
  font-weight: 600;
}

/* Dark theme avatar card */
body.dark-theme .avatar-card {
  background-color: #1e1e2d;
}

body.dark-theme .avatar-card .card-body {
  background-color: #1e1e2d;
}

/* Card images */
.card-img-top {
  object-fit: cover;
  height: 200px;
}

/* Tooltips */
.tooltip {
  font-size: 0.875rem;
}

/* Dark theme general */
body.dark-theme .card,
body.dark-theme .modal-content {
  background-color: #1e1e2d;
  border-color: rgba(204, 202, 225, 0.1);
}

body.dark-theme .card-header {
  background-color: #1e1e2d;
  border-bottom-color: rgba(204, 202, 225, 0.1);
}

body.dark-theme .alert-info {
  background-color: rgba(204, 202, 225, 0.1);
  border-color: rgba(204, 202, 225, 0.2);
}

/* Customer Table Styles */
.table-dark.customer-table {
    background-color: #0C112C !important;
    color: white !important;
}

.table-dark.customer-table thead th {
    background-color: #0C112C !important;
    color: white !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

.table-dark.customer-table tbody tr {
    background-color: #0C112C !important;
    color: white !important;
}

.table-dark.customer-table tbody td {
    background-color: #0C112C !important;
    color: white !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

.table-dark.customer-table tbody tr:hover td {
    background-color: #161d3f !important;
    color: white !important;
}

.card-dark {
    background-color: #0C112C !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

.card-dark .card-header {
    background-color: #0C112C !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: white !important;
}

.card-dark .card-body {
    background-color: #0C112C !important;
    color: white !important;
}

/* Customer Table Override Styles */
.table-dark.customer-table,
.table-dark.customer-table > :not(caption) > * > * {
    --bs-table-color: #ffffff !important;
    --bs-table-bg: #0C112C !important;
    --bs-table-border-color: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
    background-color: #0C112C !important;
}

.table-dark.customer-table tbody tr:hover > * {
    --bs-table-color: #ffffff !important;
    --bs-table-bg: #161d3f !important;
    color: #ffffff !important;
    background-color: #161d3f !important;
}

.table-dark.customer-table thead {
    --bs-table-color: #ffffff !important;
    --bs-table-bg: #0C112C !important;
    color: #ffffff !important;
    background-color: #0C112C !important;
}

.card-dark {
    --bs-card-bg: #0C112C !important;
    --bs-card-border-color: rgba(255, 255, 255, 0.1) !important;
    background-color: #0C112C !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

.card-dark .card-header {
    --bs-card-cap-bg: #0C112C !important;
    --bs-card-cap-color: #ffffff !important;
    background-color: #0C112C !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

.card-dark .card-body {
    background-color: #0C112C !important;
    color: #ffffff !important;
}

/* End of file */ 