/* Font Declarations */
/* Almarai Font (Arabic) */
@font-face {
  font-family: 'Almarai';
  src: url('/static/fonts/Almarai-Light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Almarai';
  src: url('/static/fonts/Almarai-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Almarai';
  src: url('/static/fonts/Almarai-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Almarai';
  src: url('/static/fonts/Almarai-ExtraBold.ttf') format('truetype');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

/* RedHat Display Font (English) */
@font-face {
  font-family: 'RedHatDisplay';
  src: url('/static/fonts/RedHatDisplay-Light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'RedHatDisplay';
  src: url('/static/fonts/RedHatDisplay-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'RedHatDisplay';
  src: url('/static/fonts/RedHatDisplay-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'RedHatDisplay';
  src: url('/static/fonts/RedHatDisplay-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'RedHatDisplay';
  src: url('/static/fonts/RedHatDisplay-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'RedHatDisplay';
  src: url('/static/fonts/RedHatDisplay-ExtraBold.ttf') format('truetype');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'RedHatDisplay';
  src: url('/static/fonts/RedHatDisplay-Black.ttf') format('truetype');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --primary-color: #5757ef; /* Drive Purple: RGB 87 87 239, HEX 5757ef */
  --background-color:#d9e3ed; /* Cloud Gray: RGB 217 227 237, HEX d9e3ed */
  /*--background-color:#ffffff;*/
  --white: rgb(255, 255, 255); /* White */
  --black: rgb(0, 0, 0); /* Black: RGB 0 0 0, HEX 000000 */
  --transition-speed: 0.3s;
    --border-color: #c9d3e0;
    --card-radius: 10px;
    --shadow-light: 0 2px 10px rgba(0,0,0,0.08);
}

/* Filter Section */
  .filter-section {
    background-color: var(--white);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  }

  .form-top {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
  }

  .form-group {
    flex: 1;
    min-width: 250px;
  }

  label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
  }

  input[type="text"],
select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    background-color: var(--white);
  }


* {
  box-sizing: border-box;
  transition: all var(--transition-speed) ease-in-out;
}

body {
  margin: 0;
  font-family: "Almarai", Arial, sans-serif;
  background-color: var(--background-color);
  direction: rtl;
}

/* Language-specific font settings */
html[lang="en"] body {
  font-family: "RedHatDisplay", Arial, sans-serif;
  direction: ltr;
}

html[lang="ar"] body {
  font-family: "Almarai", Arial, sans-serif;
  direction: rtl;
}

/* Header Styles */
.main-header {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 1rem 2rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  z-index: 1000;
  right: 0;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  text-decoration: none;
  transition: color var(--transition-speed);
}

.logo:hover {
  color: rgba(87, 87, 239, 0.8);
}

.header-nav {
  display: flex;
  gap: 2rem;
}

.header-nav a {
  color: var(--white);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: background-color var(--transition-speed), color var(--transition-speed);
}

.header-nav a:hover {
  background-color: rgba(87, 87, 239, 0.8);
  color: var(--white);
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--white);
  transition: color var(--transition-speed);
}

.notification-icon {
  position: relative;
  cursor: pointer;
  color: var(--white);
  transition: transform var(--transition-speed), color var(--transition-speed);
}

.notification-icon:hover {
  transform: scale(1.1);
  color: var(--primary-color);
}

.notification-badge {
  position: absolute;
  top: -5px;
  left: -5px;
  background-color: red;
  color: white;
  border-radius: 50%;
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
}

.notification-icon:hover .notification-badge {
  background-color: var(--primary-color);
}
.main-content {
  margin-right: 0;
  padding: 20px 20px 20px;
}

/* Stats Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background-color: var(--white);
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  transform: translateY(0);
  text-align: right;
}

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

.stat-card h3 {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 10px;
}

.stat-card h3 i {
  margin-left: 0.5rem;
}

.stat-card .number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* Section Title */
.section-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

/* Active Investigations Table */
.investigations-table {
  background-color: var(--white);
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  width: 100%;
  margin-bottom: 30px;
}

.investigations-table th,
.investigations-table td {
  padding: 15px;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
}


.status-badge {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
}

.status-in-progress {
  background-color: var(--background-color);
  color: var(--primary-color);
}

.status-pending {
  background-color: #fff3e0;
  color: #f57c00;
}

.priority-high {
  color: var(--primary-color);
  font-weight: 500;
}

.priority-medium {
  color: var(--secondary-color);
  font-weight: 500;
}

.view-details {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background-color var(--transition-speed) ease;
}

.view-details:hover {
  background-color: var(--background-color);
}

/* Recent Activity */
.activity-list {
  background-color: var(--white);
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
  transition: background-color var(--transition-speed) ease;
  flex-direction: row-reverse;
}

.activity-item:hover {
  background-color: var(--background-color);
}

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

.activity-icon {
  background-color: var(--background-color);
  color: var(--primary-color);
  padding: 0.75rem;
  border-radius: 8px;
  transition: transform var(--transition-speed) ease;
}

.activity-item:hover .activity-icon {
  transform: scale(1.1);
}

.activity-content {
  flex: 1;
  text-align: right;
}

.activity-text {
  margin-bottom: 0.25rem;
}

.activity-time {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* Customer Info in Table */
.customer-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: flex-end;
}

.customer-info i {
  margin-left: 0.5rem;
}

/* Buttons */
.btn {
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.3s ease;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

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

.btn-assign {
  background-color: var(--secondary-color);
  color: var(--white);
}

.btn:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.15)
}

/* Form Styling */
.assign-form .form-group {
  margin-bottom: 20px;
}

.assign-form .form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: bold;
  color: var(--text-primary);
}

.assign-form .form-control {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 10px;
  background: #fff;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
  font-family: inherit;
}

/* === Section Header Style === */
.section-header {
  background-color: var(--white);
  padding: 1rem 1.5rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;:root {
  --primary-color: #5757ef;
  --secondary-color: #6c757d;
  --success-color: #28a745;
  --background-color: rgb(230, 220, 255);
  --white: rgb(255, 255, 255);
  --border-color: #ddd;
  --text-primary: rgb(0, 0, 0);
  --text-secondary: #666;
  --transition-speed: 0.3s;
}

* {
  box-sizing: border-box;
  transition: all var(--transition-speed) ease-in-out;
}

body {
  margin: 0;
  font-family: "Almarai", Arial, sans-serif;
  background-color: var(--background-color);
  direction: rtl;
}

/* Header Styles */
.main-header {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 1rem 2rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  z-index: 1000;
  right: 0;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  text-decoration: none;
  transition: color var(--transition-speed);
}

.logo:hover {
  color: rgba(91, 79, 244, 0.8);
}

.header-nav {
  display: flex;
  gap: 2rem;
}

.header-nav a {
  color: var(--white);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: background-color var(--transition-speed), color var(--transition-speed);
}

.header-nav a:hover {
  background-color: rgba(91, 79, 244, 0.8);
  color: var(--white);
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--white);
  transition: color var(--transition-speed);
}

.notification-icon {
  position: relative;
  cursor: pointer;
  color: var(--white);
  transition: transform var(--transition-speed), color var(--transition-speed);
}

.notification-icon:hover {
  transform: scale(1.1);
  color: rgba(91, 79, 244, 0.8);
}

.notification-badge {
  position: absolute;
  top: -5px;
  left: -5px;
  background-color: red;
  color: white;
  border-radius: 50%;
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
}

.notification-icon:hover .notification-badge {
  background-color: var(--primary-color);
}

/* Sidebar */
.sidebar {
  display: none;
}

/* Main Content */
.main-content {
  margin-right: 0;
  padding: 20px 20px 20px;
}

/* Stats Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background-color: var(--white);
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transform: translateY(0);
  text-align: right;
}

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

.stat-card h3 {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 10px;
}

.stat-card h3 i {
  margin-left: 0.5rem;
}

.stat-card .number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* Section Title */
.section-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

/* Active Investigations Table */
.investigations-table {
  background-color: var(--white);
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  width: 100%;
  margin-bottom: 30px;
}

.investigations-table th,
.investigations-table td {
  padding: 15px;
  text-align: right;
  border-bottom: 1px solid var(--border-color);
}

.investigations-table th {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.875rem;
}

.status-badge {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
}

.status-in-progress {
  background-color: var(--background-color);
  color: var(--primary-color);
}

.status-pending {
  background-color: #fff3e0;
  color: #f57c00;
}

.priority-high {
  color: var(--primary-color);
  font-weight: 500;
}

.priority-medium {
  color: var(--secondary-color);
  font-weight: 500;
}

.view-details {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background-color var(--transition-speed) ease;
}

.view-details:hover {
  background-color: var(--background-color);
}

/* Recent Activity */
.activity-list {
  background-color: var(--white);
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
  transition: background-color var(--transition-speed) ease;
  flex-direction: row-reverse;
}

.activity-item:hover {
  background-color: var(--background-color);
}

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

.activity-icon {
  background-color: var(--background-color);
  color: var(--primary-color);
  padding: 0.75rem;
  border-radius: 8px;
  transition: transform var(--transition-speed) ease;
}

.activity-item:hover .activity-icon {
  transform: scale(1.1);
}

.activity-content {
  flex: 1;
  text-align: right;
}

.activity-text {
  margin-bottom: 0.25rem;
}

.activity-time {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* Customer Info in Table */
.customer-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: flex-end;
}

.customer-info i {
  margin-left: 0.5rem;
}

/* Buttons */
.btn {
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

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

.btn-assign {
  background-color: var(--secondary-color);
  color: var(--white);
}

.btn:hover {
  opacity: 0.1;
}

/* Form Styling */
.assign-form .form-group {
  margin-bottom: 20px;
}

.assign-form .form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: bold;
  color: var(--text-primary);
}

.assign-form .form-control {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 10px;
  background: #fff;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
  font-family: inherit;
}

/* === Section Header Style === */
.section-header {
  background-color: var(--white);
  padding: 1rem 1.5rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  border-right: 5px solid var(--primary-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.25rem;
  font-weight: bold;
  color: var(--primary-color);
  direction: rtl;
}

  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  border-right: 5px solid var(--primary-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.25rem;
  font-weight: bold;
  color: var(--primary-color);
  direction: rtl;
}

.investigators-workload {
  background-color: var(--white);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 30px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.workload-bar {
  margin-bottom: 20px;
}

.workload-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text-primary);
}

.investigator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  color: var(--text-secondary);
}

.workload-progress {
  background-color: #e0e0e0;
  height: 12px;
  border-radius: 10px;
  overflow: hidden;
}

.workload-progress .fill {
  height: 100%;
  background-color: var(--primary-color);
  border-radius: 10px 0 0 10px;
  transition: width var(--transition-speed) ease-in-out;
}


/* Dashboard Styles */

.car-row-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 10px;
  padding: 10px 15px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.car-detail-box {
  background-color: #f1f1f1;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 0.95rem;
  color: #333;
  display: flex;
  align-items: center;
  gap: 6px;
  direction: rtl;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.modal-content {
  background-color: white;
  padding: 20px;
  border-radius: 10px;
  width: 600px;
  text-align: center;
}

.modal-buttons {
  display: flex;
  justify-content: space-around;
  margin-top: 20px;
}

.modal-btn {
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
  border: none;
  background-color: var(--primary-color);
  color: var(--white);
  border-radius: 5px;
}

.modal-btn:hover {
 transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.15)
}
.radio-buttons-group {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.radio-option {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  border-radius: 12px;
  padding: 18px 30px;
  background-color: var(--white);
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  transition: 0.3s;
}

.radio-option.reject {
  border-color: var(--black);
  color: var(--black);
}

.radio-option input[type="radio"] {
  display: none;
}

.radio-option input[type="radio"]:checked + span {
  background-color: var(--primary-color);
  color: var(--white);
  border-radius: 10px;
  padding: 5px 15px;
}

.radio-option.reject input[type="radio"]:checked + span {
  background-color: var(--black);
}

 .buttons-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
  }

  .big-btn {
    flex: 1;
    min-width: 160px;
    padding: 18px 30px;
    font-size: 18px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    background-color: var(--primary-color);
    color: var(--white);
    transition: var(--transition-speed);
  }

  .big-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
  }

/* ================= Responsive Design ================= */

/* --- Tablet (Medium Screens) --- */
@media (max-width: 991px) {
  .stats-grid {
    display: flex;
    gap: 15px;
  }
  .stat-card {
    flex: 1 1 0;
    min-width: 0;
    padding: 15px;
  }
  .stat-card h3 {
    font-size: 0.9rem;
    gap: 8px;
  }
  .stat-card .number {
    font-size: 1.8rem;
  }

  .main-content {
    padding: 20px 15px 15px;
  }

  .filter-section .form-group {
     min-width: 200px;
  }

  .modal-content {
    width: 90%;
    max-width: 550px;
  }

  .section-header,
  .filter-section,
  .investigations-table th,
  .investigations-table td,
  .activity-list,
  .activity-item,
  .stat-card,
  .investigators-workload {
     padding: 15px;
  }
}

/* --- General Mobile (Small Screens) --- */
@media (max-width: 767px) {
  .main-header {
    padding: 0.8rem 1rem;
    flex-wrap: nowrap;
  }

  .header-nav {
    display: flex;
    gap: 0.3rem;
    align-items: center;
  }

  .header-nav a {
    padding: 0.2rem 0.3rem;
    font-size: 0.7rem;
    white-space: nowrap;
  }

  .header-nav a i {
    font-size: 0.9rem;
    display: block;
    margin-bottom: 0.1rem;
    text-align: center;
    width: 100%;
  }

  .logo {
    font-size: 1.3rem;
    flex-shrink: 0;
  }

  .user-menu {
    gap: 0.5rem;
    flex-shrink: 0;
  }

  .stats-grid {
    display: flex;
    gap: 10px;
  }
  .stat-card {
    flex: 1 1 0;
    min-width: 0;
    padding: 12px;
  }
  .stat-card h3 {
    font-size: 0.85rem;
    gap: 6px;
  }
  .stat-card .number {
    font-size: 1.6rem;
  }

  .main-content {
    padding: 20px 10px 10px;
  }

  .filter-section .form-top {
    flex-direction: column;
    gap: 10px;
  }

  .filter-section .form-group {
    min-width: 100%;
  }

  .section-title {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    margin-top: 0;
  }

  .section-header {
    font-size: 1.1rem;
    padding: 0.8rem 1rem;
  }

  .investigations-table thead {
  }
  .investigations-table th,
  .investigations-table td {
    padding: 10px 8px;
    font-size: 0.9rem;
  }
  .customer-info {
    font-size: 0.9rem;
  }

  .activity-item {
    padding: 0.8rem;
    gap: 0.8rem;
  }
  .activity-icon {
    padding: 0.6rem;
  }
  .activity-text,
  .activity-time {
    font-size: 0.85rem;
  }

  .investigator {
    font-size: 0.9rem;
  }

  .modal-content {
    padding: 15px;
    width: 95%;
    max-width: none;
  }
  .modal-buttons {
    flex-direction: column;
    gap: 10px;
  }
  .modal-btn,
  .radio-option,
  .big-btn {
    font-size: 16px;
    padding: 12px 20px;
  }

  .buttons-group {
      gap: 10px;
   }
   .big-btn {
     min-width: 140px;
   }

  .car-row-inline {
      flex-direction: column;
      align-items: flex-start;
      gap: 8px;
  }
  .car-detail-box {
      font-size: 0.9rem;
      padding: 6px 10px;
  }
}

/* --- Mobile L and below (Trigger table scroll, further reductions) --- */
@media (max-width: 425px) {
  .stats-grid {
      display: flex;
      gap: 5px;
  }
  .stat-card {
      flex: 1;
      min-width: 0;
      padding: 10px;
  }

  .investigations-table-container {
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
      width: 100%;
      margin-bottom: 20px;
      border: 1px solid var(--border-color);
      border-radius: var(--card-radius);
  }
  .investigations-table {
      width: auto;
      min-width: 100%;
      box-shadow: none;
      border-radius: 0;
      margin-bottom: 0;
      overflow: visible;
  }
  .investigations-table th,
  .investigations-table td {
      white-space: nowrap;
      padding: 8px 10px;
      font-size: 0.85rem;
  }

  .stat-card {
      padding: 15px;
  }
  .stat-card .number {
      font-size: 1.8rem;
  }

  .main-content {
      padding: 15px 5px 5px;
  }

  .modal-btn,
  .radio-option,
  .big-btn {
     font-size: 14px;
     padding: 10px 15px;
  }
}

/* --- Mobile S (Smallest Screens) --- */
@media (max-width: 350px) {
  .main-content {
      padding: 20px 5px 5px;
  }

  .stats-grid {
      gap: 5px;
  }

  .stat-card {
      padding: 8px;
  }
  .stat-card h3 {
       font-size: 0.8rem;
  }
  .stat-card .number {
      font-size: 1.5rem;
  }

  .investigations-table th,
  .investigations-table td {
      padding: 6px 8px;
      font-size: 0.8rem;
  }

  .section-title,
  .section-header {
     font-size: 1rem;
  }

  .modal-btn,
  .radio-option,
  .big-btn {
     font-size: 13px;
     padding: 8px 12px;
  }
}

