@font-face {
    font-family: 'SolaimanLipi';
    src: url('../fonts/SolaimanLipi.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

:root {
    --primary-color: #0f172a;
    --secondary-color: #1e293b;
    --accent-color: #f97316;
    --text-dark: #1f2937;
    --bg-light: #f8fafc;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #06b6d4;
    --sidebar-width: 250px;
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--bg-light);
    font-family: "SolaimanLipi", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Mobile Menu Toggle - Show on mobile */
.mobile-menu-toggle {
  display: block;
  background: none;
  border: none;
  color: white;
  font-size: 1.2rem;
  padding: 0.5rem;
  cursor: pointer;
}



/* Top Navigation Bar - Responsive */
.top-navbar {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 0.5rem 1rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px;
  transition: left 0.3s ease;
}

.top-navbar.sidebar-open {
  left: var(--sidebar-width);
}

.top-navbar .navbar-brand {
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  display: flex;
  align-items: center;
}

.top-navbar .navbar-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.top-navbar .nav-item {
  position: relative;
}

.top-navbar .nav-link {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  padding: 0.5rem;
  border-radius: 4px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
}

.top-navbar .nav-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
}

.notification-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  background-color: var(--danger-color);
  color: white;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

/* Dropdown Menus - Responsive */
.dropdown-menu {
  border: none;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  border-radius: 6px;
  padding: 0.5rem 0;
  min-width: 220px;
  font-size: 0.875rem;
  z-index: 1050;
  position: absolute;
}

.top-navbar .dropdown-menu {
  z-index: 1060;
  margin-top: 0.5rem;
}

.dropdown-item {
  padding: 0.5rem 1rem;
  color: var(--text-dark);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  font-size: 0.875rem;
}

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

.dropdown-item i {
  width: 16px;
  text-align: center;
}

.dropdown-divider {
  margin: 0.5rem 0;
  border-top: 1px solid #e5e7eb;
}

.dropdown-header {
  padding: 0.375rem 1rem;
  font-weight: 600;
  color: var(--text-dark);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Notification Dropdown */
.notification-item {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f3f4f6;
  transition: all 0.3s ease;
}

.notification-item:last-child {
  border-bottom: none;
}

.notification-item:hover {
  background-color: var(--bg-light);
}

.notification-item .notification-content {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.notification-item .notification-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.notification-item .notification-text {
  flex: 1;
}

.notification-item .notification-title {
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 0.2rem;
  color: var(--text-dark);
}

.notification-item .notification-desc {
  font-size: 0.8rem;
  color: #6b7280;
  margin-bottom: 0.2rem;
}

.notification-item .notification-time {
  font-size: 0.75rem;
  color: #9ca3af;
}

/* Profile Dropdown */
.profile-info {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f3f4f6;
}

.profile-info .profile-name {
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.2rem;
  font-size: 0.875rem;
}

.profile-info .profile-email {
  font-size: 0.8rem;
  color: #6b7280;
}

/* Sidebar Styles - Responsive */
.sidebar {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  min-height: 100vh;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  position: fixed;
  top: 0;
  left: -var(--sidebar-width);
  width: var(--sidebar-width);
  z-index: 1040;
  overflow-y: auto;
  overflow-x: hidden;
  transition: left 0.3s ease;
}

.sidebar.show {
  left: 0;
}

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

.sidebar-overlay.show {
  display: block;
}

/* Sidebar content wrapper */
.sidebar-content {
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: 1rem;
}

.sidebar .nav-link {
  color: rgba(255, 255, 255, 0.8);
  padding: 12px 20px;
  margin: 2px 10px;
  border-radius: 8px;
  transition: all 0.3s ease;
  font-size: 0.95rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

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

.sidebar .nav-link i {
  width: 20px;
  text-align: center;
}

.logo {
  font-size: 1.4rem;
  font-weight: bold;
  color: white;
  text-decoration: none;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.user-info {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 15px;
  margin: 15px;
  color: white;
}

/* Main content adjustment - Responsive */
.main-content {
 /* margin-top: 60px;*/
  padding: 15px;
  min-height: calc(100vh - 60px);
  transition: margin-left 0.3s ease;
}

/* Header Card */
.header-card {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Cards */
.form-card,
.table-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  border: none;
  overflow: hidden;
}

.form-card .card-header,
.table-card .card-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  border: none;
  padding: 15px 20px;
}
.datepicker{
    padding: 8px !important;
}

.stats-card {
  background: white;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  border: none;
  margin-bottom: 1rem;
}

.stats-card:hover {
  transform: translateY(-3px);
}

.stats-number {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 5px;
}

.stats-label {
  color: #6b7280;
  font-weight: 500;
  font-size: 0.9rem;
}

/* Form Styles - Responsive */
.form-control,
.form-select {
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 10px 12px;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 0.15rem rgba(59, 130, 246, 0.2);
  outline: none;
}

.form-label {
  font-weight: 500;
  margin-bottom: 6px;
  font-size: 0.9rem;
  color: var(--text-dark);
}

.input-group-text {
  background-color: var(--bg-light);
  border: 1px solid #d1d5db;
  font-size: 0.9rem;
}

textarea.form-control {
  min-height: 100px;
  resize: vertical;
}

.required {
  color: var(--danger-color);
}

/* Fieldset Styles - Responsive */
fieldset {
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 5px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

fieldset:hover {
  border-color: var(--secondary-color);
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.1);
}

legend {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 8px 20px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 14px !important;
  margin-bottom: 8px;
  box-shadow: 0 2px 8px rgba(30, 58, 138, 0.3);
  border: none;
  display: flex;
  align-items: center;
  gap: 8px;
  width: auto;
}

/* Button Styles */
.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border: none;
  padding: 10px 25px;
  border-radius: 6px;
  font-weight: 600;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  color: white;
  text-decoration: none;
  display: inline-block;
  cursor: pointer;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
  color: white;
}

.btn-secondary {
  background: #6b7280;
  border: none;
  padding: 10px 25px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  color: white;
  cursor: pointer;
}

.btn-outline-primary {
  background: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  padding: 8px 20px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-outline-primary:hover {
  background: var(--primary-color);
  color: white;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

/* Table Styles - Responsive */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table {
  font-size: 0.9rem;
  margin-bottom: 0;
}

.table th {
  background-color: var(--bg-light);
  border-top: none;
  font-weight: 600;
  color: var(--text-dark);
  font-size: 0.85rem;
  white-space: nowrap;
}

.table td {
  vertical-align: middle;
}

.table-hover tbody tr:hover {
  background-color: rgba(59, 130, 246, 0.05);
}

/* Badge Styles */
.badge {
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 4px;
}

/* Quick Actions */
.quick-actions {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  margin-bottom: 20px;
}

.action-btn {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  padding: 15px;
  text-align: center;
  transition: all 0.3s ease;
  text-decoration: none;
  color: var(--text-dark);
  display: block;
  height: 100%;
}

.action-btn:hover {
  border-color: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  color: var(--secondary-color);
  text-decoration: none;
}

.action-btn i {
  font-size: 1.5rem;
  margin-bottom: 8px;
  display: block;
}

/* Login Page Styles - Responsive */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.login-card {
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  max-width: 900px;
  width: 100%;
}

.login-left {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  min-height: 400px;
}

.login-right {
  padding: 40px;
}

.login-left .logo {
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 20px;
  padding: 0;
}

.welcome-text {
  font-size: 1.2rem;
  opacity: 0.9;
  margin-bottom: 30px;
}

.feature-list {
  list-style: none;
  padding: 0;
  text-align: left;
}

.feature-list li {
  padding: 10px 0;
  display: flex;
  align-items: center;
}

.feature-list li i {
  margin-right: 15px;
  font-size: 1.2rem;
}

.login-header {
  text-align: center;
  margin-bottom: 40px;
}

.login-header h2 {
  color: var(--primary-color);
  font-weight: 700;
  margin-bottom: 10px;
}

.btn-login {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border: none;
  padding: 15px 30px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  width: 100%;
  color: white;
  cursor: pointer;
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(59, 130, 246, 0.4);
}

/* Responsive Design */
@media (min-width: 992px) {
  .mobile-menu-toggle {
    display: none !important;
  }

  .top-navbar {
    left: var(--sidebar-width);
  }

  .sidebar {
    left: 0;
  }

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

  .sidebar-overlay {
    display: none !important;
  }
}

@media (max-width: 991.98px) {
  .mobile-menu-toggle {
    display: block;
  }

  .top-navbar {
    left: 0;
    padding: 0.5rem;
  }

  .top-navbar .navbar-brand {
    font-size: 0.9rem;
  }

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

  .sidebar {
    left: -var(--sidebar-width);
  }

  .stats-card {
    margin-bottom: 1rem;
  }

  .header-card {
    padding: 15px;
  }

  .header-card .d-flex {
    flex-direction: column;
    gap: 1rem;
  }

  .header-card .text-end {
    text-align: left !important;
  }
}

@media (max-width: 767.98px) {
  .top-navbar {
    height: 50px;
    padding: 0.25rem 0.5rem;
  }

  .main-content {
    margin-top: 50px;
    padding: 10px;
  }

  .header-card {
    padding: 12px;
    margin-bottom: 15px;
  }

  .stats-number {
    font-size: 1.5rem;
  }

  .stats-card {
    padding: 15px;
  }

  fieldset {
    padding: 15px;
    margin-bottom: 20px;
  }

  legend {
    font-size: 0.85rem;
    padding: 6px 15px;
  }

  .form-card .card-body,
  .table-card .card-body {
    padding: 15px;
  }

  .quick-actions {
    padding: 15px;
  }

  .action-btn {
    padding: 12px;
  }

  .action-btn i {
    font-size: 1.2rem;
  }

  .dropdown-menu {
    min-width: 200px;
    font-size: 0.8rem;
  }

  .table {
    font-size: 0.8rem;
  }

  .table th,
  .table td {
    padding: 0.5rem 0.25rem;
  }

  /* DataTables Responsive */
  .dataTables_wrapper .dataTables_length,
  .dataTables_wrapper .dataTables_filter {
    text-align: center;
    margin-bottom: 1rem;
  }

  .dataTables_wrapper .dataTables_info,
  .dataTables_wrapper .dataTables_paginate {
    text-align: center;
    margin-top: 1rem;
  }

  .table-responsive {
    font-size: 0.8rem;
  }
}

@media (max-width: 575.98px) {
  .login-card .row {
    flex-direction: column;
  }

  .login-left {
    padding: 30px 20px;
    min-height: 300px;
  }

  .login-right {
    padding: 30px 20px;
  }

  .login-left .logo {
    font-size: 2rem;
  }

  .welcome-text {
    font-size: 1rem;
  }

  .feature-list li {
    font-size: 0.9rem;
  }

  .stats-card {
    text-align: center;
  }

  .btn-group-vertical .btn {
    margin-bottom: 0.5rem;
  }

  .d-flex.gap-2 {
    flex-direction: column;
  }

  .d-flex.gap-2 .btn {
    margin-bottom: 0.5rem;
  }
}

/* Custom scrollbar */
.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}

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

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

/* Print Styles */
@media print {
  .sidebar,
  .top-navbar,
  .mobile-menu-toggle,
  .sidebar-overlay,
  .btn,
  .action-btn {
    display: none !important;
  }

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

  .table {
    font-size: 12px;
  }
}

/* Utility Classes */
.text-primary {
  color: var(--primary-color) !important;
}
.text-success {
  color: var(--success-color) !important;
}
.text-warning {
  color: var(--warning-color) !important;
}
.text-info {
  color: var(--info-color) !important;
}
.text-danger {
  color: var(--danger-color) !important;
}

.bg-success {
  background-color: var(--success-color) !important;
}
.bg-warning {
  background-color: var(--warning-color) !important;
}
.bg-info {
  background-color: var(--info-color) !important;
}
.bg-secondary {
  background-color: #6b7280 !important;
}
.bg-light {
  background-color: #f3f4f6 !important;
  color: var(--text-dark) !important;
}

@media (min-width: 992px) {
  .mobile-menu-toggle {
    display: none !important;
  }
}
/* Sidebar Default Style */
.sidebar {
  background-color: #343a40;
  color: #fff;
  width: 250px;
  height: 100vh;
  padding-top: 60px;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1050;
}

.sidebar a {
  color: #fff;
  display: block;
  padding: 12px 20px;
  text-decoration: none;
}

.sidebar a:hover {
  background-color: #495057;
}

/* Overlay for mobile */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  z-index: 1049;
}

.sidebar-overlay.show {
  display: block;
}

/* Mobile Sidebar Behavior */
@media (max-width: 991.98px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

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

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

/* Desktop Sidebar */
@media (min-width: 992px) {
  .main-content {
    margin-left: 250px;
  }
}

.top-navbar {
  height: 60px;
  background-color: #007bff;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 1060;
}

.mobile-menu-toggle {
  background: none;
  border: none;
  font-size: 24px;
  color: #fff;
}

.main-content {
  padding: 20px;
}

/* Fieldset and Legend Styles */
fieldset {
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    background: linear-gradient(135deg, #babcc1 0%, #d4dce3 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    position: relative;
}

fieldset:hover {
    border-color: var(--secondary-color);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.1);
}

fieldset:focus-within {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

legend {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(30, 58, 138, 0.3);
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
    width: auto;
    float: none;
}

legend i {
    font-size: 1rem;
}

/* Fieldset variants */
.fieldset-primary {
    border-color: var(--primary-color);
}

.fieldset-primary legend {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.fieldset-success {
    border-color: var(--success-color);
}

.fieldset-success legend {
    background: linear-gradient(135deg, var(--success-color), #059669);
}

.fieldset-warning {
    border-color: var(--warning-color);
}

.fieldset-warning legend {
    background: linear-gradient(135deg, var(--warning-color), #d97706);
}

.fieldset-info {
    border-color: var(--info-color);
}

.fieldset-info legend {
    background: linear-gradient(135deg, var(--info-color), #0891b2);
}

/* Responsive fieldset adjustments */
@media (max-width: 768px) {
    fieldset {
        padding: 15px;
        margin-bottom: 20px;
    }

    legend {
        font-size: 0.9rem;
        padding: 6px 15px;
    }
}

@media (max-width: 576px) {
    fieldset {
        padding: 12px;
        margin-bottom: 15px;
    }

    legend {
        font-size: 0.85rem;
        padding: 5px 12px;
    }
}

/* Enhanced form row spacing within fieldsets */
fieldset .row {
    margin-bottom: 0;
}

fieldset .form-group {
    margin-bottom: 15px;
}

/* Special styling for nested fieldsets */
fieldset fieldset {
    border: 1px solid #d1d5db;
    background: #ffffff;
    margin-bottom: 15px;
    padding: 15px;
}

fieldset fieldset legend {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    font-size: 0.85rem;
    padding: 4px 12px;
}
