:root {
  --sidebar-width: 260px;
  --primary-color: #155DFC;
  --secondary-bg: #eef6ff; 
  --navbar-height: 70px;
  --title-color: #101828; 
  --text-color: #364153;  
  --light-color: #6A7282; 
  --border-color: #E5E7EB;
}

body {
  font-family: 'Roboto', sans-serif;
  background: #F8F9FC;
  margin: 0;
  overflow-x: hidden;
}

/* ============================ */
/* START SIDEBAR DESIGN  */
/* ============================ */

.sidebar {
  width: var(--sidebar-width);
  background: #fff;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1100;
  border-right: 1px solid var(--border-color);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

/* 1. Sidebar Header */
.sidebar-header {
  padding: 24px 24px 10px 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 0.8px solid var(--border-color);
}

.sidebar .logo h4 {
  color: var(--title-color);
  font-weight: 700;
  margin: 0 0 2px 0;
  font-size: 20px;
  letter-spacing: -0.5px;
}

.sidebar .logo p {
  font-size: 14px;
  color: var(--light-color);
  font-weight: 400;
  margin: 0;
}

/* 2. Navigation Menu */
.menu {
  list-style: none;
  padding: 10px 16px;
  margin: 0;
  flex-grow: 1;
  overflow-y: auto;
}

.menu li {
  margin-bottom: 4px;
}

.menu li a {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-radius: 8px;
  color: var(--text-color);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.2s ease;
}

/* Icons */
.menu li a i, 
.menu li a svg {
  font-size: 18px;
  width: 24px;
  text-align: center;
  margin-right: 12px;
  color: var(--light-color);
  transition: color 0.2s ease;
}

/* Hover State */
.menu li a:hover {
  background-color: #f8fafc;
  color: var(--primary-color);
}
.menu li a:hover i {
  color: var(--primary-color);
}

/* Active State  */
.menu li.active a {
  background: var(--secondary-bg);
  color: var(--primary-color);
  font-weight: 600;
}

.menu li.active a i, 
.menu li.active a svg {
  color: var(--primary-color);
}

/* 3. Sidebar Footer (User Profile) */
.sidebar-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--border-color);
  background-color: #fff;
  margin-top: auto;
}

.user-avatar {
  width: 42px;
  height: 42px;
  background-color: var(--primary-color);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 500;
  flex-shrink: 0;
}

.user-info h6 {
  font-size: 14px;
  font-weight: 600;
  color: var(--title-color);
  margin: 0;
}

.user-info small {
  font-size: 12px;
  color: var(--light-color);
  display: block;
}

/* Sidebar Overlay for mobile */
  .sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.4);
    z-index: 1050;
}

/* End Of Sidebar */

/* Main Wrapper */
  .main-wrapper {
    margin-left: var(--sidebar-width);
    margin-top: 20px;
    padding: 0 20px 20px 20px;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

/*  ===== 1- Dashboard Page =====*/
/* Chart Row */
  .card-box {
    background: #fff;
    border: 0.8px solid #E5E7EB;
    border-radius: 16px;
    padding: 24px;
    height: 100%;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.04);
  }
  .card-box h6 {
    font-size: 18px;
    font-weight: 600;
    color: var(--title-color);
    margin-bottom: 20px;
    line-height: 28px;
  }
  /* ==== End Of Dashboard Page==== */

  /* Header */
  .page-title {
    font-size: 30px;
    font-weight: 700;
    color: var(--title-color);
    margin-bottom: 4px;
    line-height: 36px;
  }

  .page-subtitle {
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
    color: var(--light-color);
  }

  /* Add  Button */
  .add-btn{
    background-color: var(--primary-color);
    color: #ffffff;
    border-radius: 10px;
    padding: 10px 16px;
    font-size: 16px;
    line-height: 24px;
    font-weight: 400;
    border: none;
  }

  /* Modals Styles*/
  .modal-backdrop{
    z-index: 3000 !important;
    background: rgba(0,0,0,0.7) !important;
    backdrop-filter: blur(2px);
  }

  /* Modal itself */
  .modal{
    z-index: 4000 !important;
  }

  /* Modal dialog */
  .modal-dialog{
    z-index: 4100 !important; 
  }

  /* Filters & Search bar */
  .content {
    background: #ffffff;
    border: 0.8px solid #E5E7EB;
    border-radius: 16px;
    padding: 14px;
    box-shadow: 0 2px 3px rgba(0,0,0,0.06);
  }

  /* Search Box */
  .search-box {
    position: relative;
  }

  .search-box i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: var(--light-color);
  }

  .search-box input {
    width: 100%;
    height: 50px;
    padding: 0 16px 0 52px;
    border-radius: 14px;
    border: 0.8px solid #E5E7EB;
    font-size: 15px;
    color: #111827;
    outline: none;
  }

  .search-box input::placeholder {
    color: #9ca3af;
  }

  /* Select Box */
  .select-box {
    position: relative;
  }

  .select-box select {
    appearance: none;
    width: 100%;
    height: 50px;
    font-weight: 400;
    line-height: 24px;
    padding: 0 48px 0 18px;
    border-radius: 14px;
    border: 0.8px solid #E5E7EB;
    font-size: 16px;
    color: var(--title-color);
    background: #fff;
    cursor: pointer;
  }

  .select-box i {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--light-color);
    pointer-events: none;
  }

   /* Status Cards */
    .stat-card {
      background: #ffffff;
      border-radius: 16px;
      border: 0.8px solid #e5e7eb;
      padding: 20px;
      width: 100%;
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      box-shadow: 0 6px 20px rgba(0, 0, 0, 0.04);
    }

    .stat-card:hover {
      transform: translateY(-4px);
      transition: 0.3s ease;
    }
    /* Icon Of status cards*/
    .icon-box {
      background-color: #f0fdf4;
      width: 12px;
      height: 18px;
      border-radius: 10px;
      padding: 20px;
      display: flex;
      align-items: center;
      justify-content: center;
      background: #eff6ff;
      color: #00a63e;
    }

    /*  Text */
    .stat-card .info h3 {
      font-size: 24px;
      font-weight: 600;
      color: var(--title-color);
      margin: 0 0 8px;
      line-height: 32px;
    }

    .stat-card p {
      font-size: 20px;
      font-weight: 600;
      color: #00a63e;
    }
    .stat-card span {
      font-size: 13px;
      color: #6a7282;
    }

/* Data-table  */
.table-container {
  border: 0.8px solid #E5E7EB;
  border-radius: 16px;
  margin-top: 24px;
  box-shadow: 0 2px 3px rgba(0,0,0,0.06);
  width: 100%;
  overflow-x: auto; 
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 2px 3px rgba(0,0,0,0.06);
}

table.dataTable {
  border-collapse: collapse !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

table.dataTable thead th {
  background-color: #F9FAFB;
  padding: 15px !important;
  color: var(--light-color);
  font-weight: 500;
  font-size: 14px;
  text-transform: capitalize;
  border-bottom: 0.8px solid #E5E7EB !important;
}

table.dataTable tbody td {
  padding: 15px !important;
  vertical-align: middle;
  border-bottom: 1px solid #F3F4F6;
  white-space: nowrap;
  color: var(--light-color);
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}

/* Status Badges */
.badge-status-active {
  background-color: #DCFCE7;
  color: #008236;
  border-radius: 12px;
  padding: 6px 12px;
  font-weight: 400;
}

.badge-status-inactive {
  background-color: #F3F4F6; 
  color: #364153; 
  border-radius: 12px; 
  padding: 6px 12px; 
  font-weight: 400; 
}

.badge-status-pending {
  background-color: #FEF9C2; 
  color: #A65F00; 
  border-radius: 12px; 
  padding: 6px 12px; 
  font-weight: 400; 
}

.badge-status-assigned {
  background-color: #F3E8FF; 
  color: #8200DB; 
  border-radius: 12px; 
  padding: 6px 12px; 
  font-weight: 400; 
}

.badge-status-suspended {
  background-color: #FFE2E2; 
  color: #C10007; 
  border-radius: 12px; 
  padding: 6px 12px; 
  font-weight: 400; 
}

.badge-status-completed {
  background-color: #DCFCE7; 
  color: #008236; 
  border-radius: 12px; 
  padding: 6px 12px; 
  font-weight: 400; 
}

.badge-status-in-progress{
  background-color: #DBEAFE; 
  color: #1447E6; 
  border-radius: 12px; 
  padding: 6px 12px; 
  font-weight: 400; 
}

.badge-status-pending {
  background-color: #FEF9C2; 
  color: #A65F00; 
  border-radius: 12px; 
  padding: 6px 12px; 
  font-weight: 400; 
}
.badge-status-cancelled , .badge-status-rejected {
  background-color: #FFE2E2; 
  color: #C10007; 
  border-radius: 12px; 
  padding: 6px 12px; 
  font-weight: 400; 
}
.badge-priority-urgent{
  background-color: #FFEDD4;
  color: #CA3500;
  border: none;
  border-radius: 4px;
  padding: 6px;
}
.badge-priority-high{
  background-color: #FEF2F2;
  color: #E7000B;
  border-radius: 12px; 
  padding: 6px 12px; 
  font-weight: 400; 
}
.badge-priority-medium{
  background-color: #FEF9C2;
  color: #A65F00;
  border-radius: 12px; 
  padding: 6px 12px; 
  font-weight: 400; 
}
.badge-priority-low{
  background-color: #DCFCE7;
  color: #008236;
  border-radius: 12px; 
  padding: 6px 12px; 
  font-weight: 400; 
}
.badge-priority-normal {
  background-color: #F3F4F6;
  color: #4A5565;
  border: none;
  border-radius: 4px;
  padding: 6px;
}

.badge-role-admin{
  background-color: #F3E8FF;
  color: #8200DB;
  border-radius: 12px;
  padding: 6px 12px;
  font-weight: 400;
}
.badge-role-dispatcher{
  background-color: #DBEAFE;
  color: #1447E6;
  border-radius: 12px;
  padding: 6px 12px;
  font-weight: 400;
}

/* Hide Default DataTables Search and Length */
  .dataTables_filter, .dataTables_length { 
    display: none; }

  .required::after{
    content:" *";
    color:red;
  }

/* Status Badges  */
.badge-soft {
  padding: 6px 12px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* In Progress */
.badge-soft-primary {
  background-color: #DBEAFE;
  color: #1E40AF;
}

/* Pending  */
.badge-soft-warning {
  background-color: #FEF3C7;
  color: #92400E;
}

/* Completed  */
.badge-soft-success {
  background-color: #D1FAE5;
  color: #065F46;
}

/* Rejected */
.badge-soft-danger {
  background-color: #FEE2E2;
  color: #991B1B;
}

/* Priority Badges */
.badge-priority {
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
}

.badge-priority-urgent {
  background-color: #FFEDD5; 
  color: #C2410C;
}

.badge-priority-normal {
  background-color: #F3F4F6;
  color: #4B5563;
}

/* ===== Validation Styles ===== */
.input-error{
  border: 1.5px solid #dc2626 !important;
  background: #fff5f5;
}

.error-text{
  font-size: 12px;
  color: #dc2626;
  margin-top: 4px;
  display: none;
}

/* --- Desktop Toggled State (Collapsed) --- */
body.sidebar-collapsed .sidebar {
  transform: translateX(-100%);
}

body.sidebar-collapsed .main-wrapper {
  margin-left: 0;
}

/* Overlay Backdrop */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.4);
  z-index: 1050;
}

/* Companies Area Page */
 /* ===== ADD Area MODAL ===== */
  .add-area-modal{
    border-radius: 16px;
    background: #FFFFFF;
  }
   .modal-header{
    display: flex;
    flex-direction: column;
    justify-content: left;
    align-items: start;
  }
  .modal-title{
    font-weight: 800;
    color:#1F2937;
  }
  .modal-body input{
   background: #F3F3F5;
  }

  .modal-subtitle{
    font-size:14px;
    color:#1F2937;
    margin:0;
  }
  .modal-footer{
    display: flex;
    flex-direction: column;
    border: none;
  }
  .create-btn{
  width: 100%;
  background: #2563EB;
  border-radius: 8px;
  font-weight: 500;
  font-size: 14px;
  color: #FFFFFF;
  }
  .cancel-btn {
  width: 100%;
  background: transparent;
  border: 0.8px solid var(--border-color);
  border-radius: 8px;
  font-weight: 500;
  font-size: 14px;
  color: #0A0A0A;
  }

/* --- Tablet Responsive--- */
@media (max-width: 992px) {
  .navbar { left: 0; width: 100%; }

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

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

  body.sidebar-open .sidebar { transform: translateX(0); }

  body.sidebar-open .sidebar-overlay { display: block; }

  .stat-card { width: 100%; }
}

/* --- Mobile Responsive--- */
@media (max-width: 768px) {
  .content h3{
  font-size: 20px;
  }

  /* Priority cards block view */
  .priority-wrapper {
    flex-direction: column;
  }

  .priority-card {
    padding: 12px;
    gap: 10px;
  }

  .priority-card strong {
    font-size: 14px;
  }

  .priority-card p {
    font-size: 12px;
  }

}


/* Animation */
@keyframes fade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}