:root {
  --primary-color: #183986;
  --secondary-color: #da251c;
  --success-color: #28a745;
  --warning-color: #ffc107;
  --danger-color: #dc3545;
  --info-color: #17a2b8;
  --light-color: #f8f9fa;
  --dark-color: #343a40;
  --sidebar-width: 280px;
  --sidebar-collapsed-width: 70px;
  --header-height: 70px;
  --border-radius: 8px;
  --box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  --transition: all 0.3s ease;
}
.bg-primary{
  background-color: var(--primary-color) !important;
}
.bg-warning{
  background-color: var(--secondary-color) !important;
}
* {
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f5f6fa;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* Sidebar Styles */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: linear-gradient(180deg, var(--primary-color), #2c5aa0);
  color: white;
  z-index: 1000;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid rgb(255, 255, 255);
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-height);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  font-size: 1.4rem;
  font-weight: 700;
  color: white;
  text-decoration: none;
}

.brand-text {
  margin-left: 8px;
  transition: var(--transition);
}

.sidebar-toggle {
  background: none;
  border: none;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.sidebar-toggle:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.sidebar-content {
  flex: 1;
  overflow-x: hidden;
  padding: 20px 0;
}

.sidebar-nav .nav {
  padding: 0;
}

.sidebar-nav .nav-item {
  margin-bottom: 5px;
}

.sidebar-nav .nav-link {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: var(--transition);
  border-radius: 0;
  font-weight: 500;
  position: relative;
}

.sidebar-nav .nav-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
  transform: translateX(5px);
}

.sidebar-nav .nav-link.active {
  background-color: rgba(255, 255, 255, 0.2);
  color: white;
  font-weight: 600;
}
.dropdown-toggle::after {
    display: none !important;
    margin-left: 0;
    vertical-align: .255em;
    content: "";
    border-top: .3em solid;
    border-right: .3em solid transparent;
    border-bottom: 0;
    border-left: .3em solid transparent;
}
.sidebar-nav .nav-link.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background-color: var(--secondary-color);
}

.sidebar-nav .nav-link i {
  width: 20px;
  margin-right: 12px;
  text-align: center;
  font-size: 1.1rem;
}

.sidebar-nav .nav-link span {
  flex: 1;
}

.dropdown-arrow {
  margin-left: auto !important;
  margin-right: 0 !important;
  transition: var(--transition);
  font-size: 0.8rem !important;
}

.nav-link[aria-expanded="true"] .dropdown-arrow {
  transform: rotate(180deg);
}

.submenu {
  background-color: rgba(0, 0, 0, 0.2);
  margin: 0;
  padding: 0;
}

.submenu .nav-link {
  padding-left: 52px;
  font-size: 0.9rem;
}

.submenu .nav-link i {
  width: 16px;
  font-size: 0.9rem;
}

.sidebar-footer {
  padding: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.user-info {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  padding: 10px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius);
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
}

.user-details {
  flex: 1;
}

.user-name {
  font-weight: 600;
  font-size: 0.9rem;
}

.user-role {
  font-size: 0.8rem;
  opacity: 0.7;
}

.logout-link {
  color: var(--secondary-color) !important;
  font-weight: 600;
}

.logout-link:hover {
  background-color: rgba(218, 37, 28, 0.1) !important;
  color: var(--secondary-color) !important;
}

/* Sidebar Overlay for Mobile */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.sidebar-overlay.show {
  opacity: 1;
  visibility: visible;
}

/* Main Wrapper */
.main-wrapper {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

/* Top Header */
.top-header {
  background: white;
  height: var(--header-height);
  padding: 0 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--box-shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: center;
}

.header-left .sidebar-toggle {
  background: none;
  border: none;
  color: var(--dark-color);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--border-radius);
  margin-right: 15px;
  transition: var(--transition);
}

.header-left .sidebar-toggle:hover {
  background-color: var(--light-color);
}

.page-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--dark-color);
  margin: 0;
}

.header-right {
  display: flex;
  align-items: center;
}

.header-date {
  color: var(--dark-color);
  font-weight: 500;
}

/* Main Content */
.main-content {
  flex: 1;
  padding: 30px;
}

/* Card Styles */
.card {
  border: none;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  margin-bottom: 20px;
}

.card:hover {
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.card-header {
  background-color: white;
  border-bottom: 1px solid #e9ecef;
  font-weight: 600;
  padding: 1rem 1.25rem;
}

/* Statistics Cards */
.stat-card {
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.stat-icon {
  opacity: 0.3;
}

/* Form Styles */
.form-floating {
  margin-bottom: 1rem;
}

.form-control,
.form-select {
  border-radius: var(--border-radius);
  border: 2px solid #e9ecef;
  transition: var(--transition);
  font-weight: 500;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(24, 57, 134, 0.25);
}

.form-label {
  font-weight: 600;
  color: var(--dark-color);
}

/* Button Styles */
.btn {
  border-radius: var(--border-radius);
  font-weight: 600;
  transition: var(--transition);
  border: none;
  padding: 10px 20px;
  min-height: 48px;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), #2c5aa0);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--secondary-color), #e63946);
}

.login-container {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--primary-color) 0%, #2c4ba0 100%);
}

.login-card {
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Table Styles */
.table {
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
}

.table thead th {
  background-color: var(--primary-color);
  color: white;
  font-weight: 600;
  border: none;
  padding: 15px;
}

.table tbody tr {
  transition: var(--transition);
}

/* .table tbody tr:hover {
  background-color: rgba(24, 57, 134, 0.05);
  transform: scale(1.01);
} */

.table tbody td {
  vertical-align: middle;
  border-color: #e9ecef;
}

/* Activity Feed */
.activity-feed {
  max-height: 400px;
  overflow-y: auto;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e9ecef;
}

.activity-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.activity-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  color: white;
  font-size: 14px;
}

.activity-content {
  flex: 1;
}

/* Floating Action Button */
.fab-container {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 1000;
}

.fab {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--secondary-color), #e63946);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 5px 20px rgba(218, 37, 28, 0.4);
  transition: var(--transition);
  font-size: 24px;
}

.fab:hover {
  transform: scale(1.1) rotate(90deg);
  box-shadow: 0 10px 30px rgba(218, 37, 28, 0.6);
  color: white;
}

/* Badge Styles */
.badge {
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 20px;
}

/* Filter Styles */
.filter-section {
  background-color: white;
  border-radius: var(--border-radius);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--box-shadow);
}

/* Mobile Responsive */
@media (max-width: 991.98px) {
  .sidebar {
    transform: translateX(-100%);
  }

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

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

  .page-title {
    font-size: 1.2rem;
  }
}

@media (max-width: 768px) {
  .main-content {
    padding: 20px 15px;
  }
    .btn {
        padding: 10px 10px;
        font-size: 13px;
    }
.sidebar-header{
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-direction: column;
}
.header-left .sidebar-toggle{
  margin-bottom: 0;
}
.sidebar-toggle {
    padding: 8px 15px;
    margin-bottom: 20px;
}
  .top-header {
    padding: 0 15px;
  }

  .stat-card .card-body {
    padding: 1rem;
  }

  .stat-card h3 {
    font-size: 1.5rem;
  }

  .table-responsive {
    border-radius: var(--border-radius);
  }

  .fab-container {
    bottom: 20px;
    right: 20px;
  }

  .fab {
    width: 50px;
    height: 50px;
    font-size: 20px;
  }

  .card-body {
    padding: 1rem;
  }

  .btn {
    min-height: 44px;
  }
}

@media (max-width: 576px) {
  .main-content {
    padding: 15px 10px;
  }

  .top-header {
    padding: 0 10px;
  }

  .page-title {
    font-size: 1.1rem;
  }

  .stat-card h3 {
    font-size: 1.25rem;
  }

  .activity-icon {
    width: 35px;
    height: 35px;
    font-size: 12px;
  }

  .sidebar {
    width: 100%;
  }
}

/* Sidebar Collapsed State (for future enhancement) */
.sidebar.collapsed {
  width: var(--sidebar-collapsed-width);
}

.sidebar.collapsed .brand-text,
.sidebar.collapsed .nav-link span {
  display: none;
}

.sidebar.collapsed .sidebar-footer {
  display: none;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #2c5aa0;
}

/* Animation Classes */
.fade-in {
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.slide-in {
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}

/* Loading Spinner */
.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Priority Colors */
.priority-high {
  color: var(--danger-color);
}
.priority-medium {
  color: var(--warning-color);
}
.priority-low {
  color: var(--success-color);
}

/* Status Colors */
.status-completed {
  color: var(--success-color);
}
.status-pending {
  color: var(--warning-color);
}
.status-cancelled {
  color: var(--danger-color);
}
.status-processing {
  color: var(--info-color);
}
