/* Custom styles from original template */
/* Global Styles */
:root {
  --primary-color: #0f3b5b;
  --secondary-color: #1a6aa5;
  --accent-color: #3498db;
  --text-color: #333;
  --light-text: #6c757d;
  --border-color: #dee2e6;
  --light-bg: #f8f9fa;
  --sidebar-width: 220px;
  --sidebar-collapsed-width: 70px;
  --header-height: 48px;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text-color);
  background-color: #f5f7fa;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  font-size: 14px;
  line-height: 1.4;
}

/* Top Navbar */
.top-navbar {
  background-color: var(--primary-color);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  height: var(--header-height);
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 1001;
  transition: all 0.3s;
  padding: 0 1rem;
  display: flex;
  align-items: center;
}

/* Remove navbar brand styles since we're moving it */
.navbar-brand {
  display: none;
}

.navbar-nav {
  display: flex;
  align-items: center;
}

.top-navbar .nav-link {
  color: rgba(255, 255, 255, 0.8);
  padding: 0.5rem 0.75rem;
  font-weight: 500;
  font-size: 0.875rem;
  height: var(--header-height);
  display: flex;
  align-items: center;
  margin: 0 0.25rem;
}

.top-navbar .nav-item.me-3 {
  margin-right: 1rem !important;
}

.top-navbar .nav-link i {
  font-size: 1rem;
  margin-right: 0.5rem;
}

.top-navbar .nav-link.active {
  color: #ffc107;
  border-bottom: 2px solid #ffc107;
}

.top-navbar .nav-link:hover {
  color: white;
}

.top-navbar .navbar-toggler {
  border-color: rgba(255, 255, 255, 0.5);
}

.top-navbar .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='rgba(255, 255, 255, 0.8)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.top-navbar .dropdown-menu {
  background-color: white;
  border: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.top-navbar .dropdown-item {
  color: var(--text-color);
}

.top-navbar .dropdown-item:hover {
  background-color: var(--light-bg);
  color: var(--primary-color);
}

.top-navbar .dropdown-divider {
  border-color: var(--border-color);
}

/* User Profile */
.user-profile {
  display: flex;
  align-items: center;
}

.user-profile-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  margin-right: 0.75rem;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.user-avatar {
  display: none; /* Hide the initials avatar since we're using image now */
}

/* Notification Icons */
.notification-container {
  position: relative;
  margin: 0 0.5rem;
}

.notification-icon {
  font-size: 1.2rem;
}

.notification-badge {
  position: absolute;
  top: 3px;
  right: -5px;
  background-color: #dc3545;
  color: white;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  background-color: white;
  color: var(--text-color);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  transition: all 0.3s;
  overflow-y: auto;
  box-shadow: 1px 0 2px rgba(0, 0, 0, 0.05);
}

.sidebar-logo {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 1.5rem;
  margin-top: var(--header-height);
  border-bottom: 1px solid var(--border-color);
}

.sidebar-logo img {
  max-width: 100%;
  height: auto;
  max-height: 40px;
}

.sidebar .nav-item {
  margin: 2px 0;
}

.sidebar .nav-link {
  color: var(--text-color);
  padding: 0.625rem 1rem;
  display: flex;
  align-items: center;
  transition: all 0.2s;
  font-size: 0.875rem;
  border-radius: 0;
}

.sidebar .nav-link i {
  margin-right: 0.75rem;
  width: 16px;
  text-align: center;
  color: var(--primary-color);
  font-size: 1rem;
}

.sidebar .nav-link:hover {
  color: var(--primary-color);
  background-color: var(--light-bg);
}

.sidebar .nav-link.active {
  color: var(--primary-color);
  background-color: var(--light-bg);
  border-left: 3px solid var(--primary-color);
  font-weight: 500;
}

/* Main Content */
.main-content {
  flex: 1;
  margin-top: var(--header-height);
  margin-left: var(--sidebar-width);
  padding: 1rem;
  min-height: calc(100vh - var(--header-height));
  display: flex;
  flex-direction: column;
  transition: all 0.3s;
  background-color: #f5f7fa;
}

/* Cards */
.card {
  border: none;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  margin-bottom: 0.375rem;
}

.card-header {
  background-color: white;
  border-bottom: 1px solid var(--border-color);
  padding: 0.5rem 0.75rem;
  display: flex;
  align-items: center;
  min-height: 42px;
}

.card-title {
  margin-bottom: 0;
  color: var(--primary-color);
  font-size: 1rem;
  font-weight: 500;
}

.card-body {
  padding: 0.75rem;
}

/* Form Sections */
.form-section {
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.form-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.form-section-title {
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

/* Form Controls */
.form-control,
.form-select {
  border-radius: 3px;
  border: 1px solid var(--border-color);
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  min-height: 32px;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.15);
}

/* Buttons */
.btn {
  font-size: 0.875rem;
  padding: 0.375rem 0.75rem;
  border-radius: 3px;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
}

.btn i {
  margin-right: 0.5rem;
  font-size: 1rem;
}

/* Tables */
.table {
  margin-bottom: 0;
  font-size: 0.875rem;
}

.table th {
  font-weight: 500;
  background-color: var(--light-bg);
  border-bottom-width: 1px;
  padding: 0.5rem 0.75rem;
}

.table td {
  padding: 0.5rem 0.75rem;
  vertical-align: middle;
}

/* Breadcrumb */
.breadcrumb {
  background-color: transparent;
  padding: 0.25rem 0;
  margin-bottom: 0.375rem;
  font-size: 0.875rem;
}

.breadcrumb-item a {
  color: var(--primary-color);
  text-decoration: none;
}

.breadcrumb-item a:hover {
  text-decoration: underline;
}

/* Footer */
.footer {
  background-color: var(--light-bg);
  padding: 1rem 0;
  margin-top: auto;
  border-top: 1px solid var(--border-color);

  .container-fluid {
    text-align: center;
    color: var(--light-text);
  }
}

/* Responsive */
@media (max-width: 992px) {
  .top-navbar {
    padding: 0 1rem;
  }

  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.show {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
  }
}

/* Adjust collapsed sidebar styles */
body.sidebar-collapsed .sidebar {
  width: var(--sidebar-collapsed-width);
}

body.sidebar-collapsed .sidebar-logo {
  padding: 0 0.5rem;
}

body.sidebar-collapsed .sidebar-logo img {
  max-height: 30px;
}

body.sidebar-collapsed .sidebar .nav-link span {
  display: none;
}

body.sidebar-collapsed .main-content {
  margin-left: var(--sidebar-collapsed-width);
}

/* Adjust row spacing */
.row {
  margin-right: -0.25rem;
  margin-left: -0.25rem;
  margin-bottom: 0.375rem;
}

.row:last-child {
  margin-bottom: 0;
}

.row > [class^="col-"] {
  padding-right: 0.25rem;
  padding-left: 0.25rem;
}

/* Welcome Card */
.welcome-card {
  margin-bottom: 0.375rem;
}

/* Stats Cards */
.stat-card {
  margin-bottom: 0.375rem;
}

/* Form Elements */
.form-group {
  margin-bottom: 0.5rem;
}

/* List Groups */
.list-group-item {
  padding: 0.5rem 0.75rem;
}

/* Tabs and Pills */
.nav-tabs .nav-link,
.nav-pills .nav-link {
  padding: 0.375rem 0.75rem;
}

/* Buttons in Cards */
.card .btn-group {
  margin-bottom: 0.375rem;
}

