:root {
  --navy: #0f2540;
  --accent: #17a673;
  --teal: #0d9488;
  --muted: #6c757d;
  --card-bg: #ffffff;
  --bg: #f3f4f6;
}

html,
body {
  height: 100%;
}
@font-face {
  font-family: inter;
  src: url(../font/Inter-Black/woff);
}

body {
  font-family: "inter", sans-serif;
  /* font-family: Geneva, Verdana, sans-serif; */
  background: var(--bg);
  color: #111827;
  margin: 0;
}

/* SIDEBAR */
#sidebar {
  width: 250px;
  /* background: linear-gradient(180deg, var(--accent), var(--teal)); */
  /* background:linear-gradient(180deg, #047857, #10B981); */
  /* background-color: #0f766e; */
  background-color: var(--card-bg);
  /* color: #e6eef4; */
  color: #000;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  transition: all 0.28s ease;
  z-index: 1040;
}

#sidebar.collapsed {
  width: 70px;
}
svg {
  height: 20px;
  width: 20px;
  margin: 0 0px 0 3px;
  fill: rgba(47, 56, 79, 0.1);
}


.brand {
  display: flex;
  align-items: center;
  padding: 6px 6px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.brand .logo img {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  margin-right: 15px;
}

#sidebar.collapsed .brand div {
  display: none;
}

#sidebar.collapsed .brand .logo {
  display: inline;
}

#sidebar .nav-link {
  /* color: rgba(230, 238, 244, 0.9); */
  color: black;
  padding: 10px 8px;
  border-radius: 8px;
  margin: 6px 10px !important;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  font-size: 15px;
  transition: all 0.5s ease;
}

#sidebar .nav-link span {
  display: inline;
}

#sidebar.collapsed .nav-link span {
  display: none;
}
.logo-name {
  font-family: system-ui;
  font-weight: 700;
  font-size: 22px;
 background: linear-gradient(90deg, #2ecc71, #3498db);

  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

#sidebar .nav-link:hover,
#sidebar .nav-link.active {
  /* background-color:  !important; */
  color: #287f71 !important;
  background-color: #e9f2f1 !important;
  text-decoration: none;
  width: 80%;
}

#sidebar .nav-link {
  justify-content: flex-start;
}

#sidebar.collapsed .nav-link {
  justify-content: center;
  padding: 10px;
}

#sidebar .small-muted {
  font-size: 0.78rem;
  /* color: rgba(230, 238, 244, 0.6); */
}

/* Overlay for mobile */
#overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1035;
}

/* MAIN */
#main {
  margin-left: 252px;
  transition: all 0.28s ease;
  min-height: 100vh;
}

#sidebar.collapsed + #main {
  margin-left: 70px;
}

/* TOPBAR */
.topbar {
  height: 68px;
  background: #ffffff;
  border-bottom: 1px solid rgba(15, 37, 64, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  position: sticky;
  top: 0;
  z-index: 1030;
}

.hamburger {
  font-size: 20px;
  cursor: pointer;
  color: var(--navy);
  margin-right: 12px;
}
.vehicle-select-wrapper {
  position: relative;
  display: inline-block;
  width: 140px; /* Adjust width */
}

.vehicle-select {
  padding-left: 15px !important;
  border-radius: 8px;
  border: 1px solid #ddd;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  height: 38px;
  font-size: 14px;
}

.vehicle-select:hover {
  border-color: green;
  box-shadow: 0 3px 8px rgba(13, 110, 253, 0.15);
}

.vehicle-select:focus {
  outline: none;
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.card-compact {
  border-radius: 12px;
  background: var(--card-bg);
  padding: 18px;
  box-shadow: 0 6px 20px rgba(11, 33, 54, 0.06);
}
/* ---------- Page Heading ---------- */

.page-header h5 {
  font-weight: 700;
  font-size: 1.25rem;
  color: #4a5a6b;
  font-family: "inter", sans-serif;
  line-height: 22px;
  margin-bottom: 10px;
  color: #333;
}
.page-header small {
  color: #888;
}

/* ---------- KPI Cards ---------- */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  padding: 0 20px;
}

.kpi-card {
  padding: 20px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: 0.3s ease;
}

.kpi-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
}

.kpi-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.kpi-icon {
  font-size: 24px;
  padding: 8px;
  border-radius: 50%;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kpi-icon.green {
  background-color: #4caf50;
}
.kpi-icon.red {
  background-color: #f44336;
}
.kpi-icon.blue {
  background-color: #2196f3;
}
.kpi-icon.yellow {
  background-color: #ff9800;
}

.kpi-title {
  font-size: 1rem;
  font-weight: 500;
  color: #555;
}

.kpi-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: #222;
  margin-bottom: 8px;
}

.kpi-trend {
  display: inline-flex;
  align-items: center;
  font-size: 0.8rem;
}

.kpi-trend span {
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}

.kpi-trend.green span:first-child {
  background-color: rgba(76, 175, 80, 0.2);
  color: #4caf50;
}
.kpi-trend.red span:first-child {
  background-color: rgba(244, 67, 54, 0.2);
  color: #f44336;
}
.kpi-trend.blue span:first-child {
  background-color: rgba(33, 150, 243, 0.2);
  color: #2196f3;
}
.kpi-trend.yellow span:first-child {
  background-color: rgba(255, 152, 0, 0.2);
  color: #ff9800;
}

.kpi-trend .trend-text {
  color: #888;
  margin-left: 8px;
  background: none;
  font-weight: normal;
}

/* ---------- Table ---------- */

.table-container {
  margin: 20px;
  padding: 15px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #eee;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.table thead {
  background: #f8f9fa;
  font-size: 0.9rem;
}
.table td {
  vertical-align: middle;
  font-size: 0.9rem;
  padding: 10px !important;
  width: max-content !important;
}
.nowrap-table.dataTables_empty {
  overflow-x: hidden !important;
}
.dataTables_scrollBody {
  overflow-x: hidden !important; /* scroll sirf tab dikhaye jab row ho */
}
table.dataTable thead th {
  text-align: center !important;
}

/* ---------- Badges ---------- */
.badge-rev {
  background: #e8f5e9;
  color: #2e7d32;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.8rem;
}
.badge-exp {
  background: #ffebee;
  color: #c62828;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.8rem;
}

@media (max-width: 992px) {
  #sidebar {
    transform: translateX(-100%);
  }

  #sidebar.active {
    transform: translateX(0);
  }

  #main {
    margin-left: 0;
  }

  #overlay.show {
    display: block;
  }
}

.table thead th {
  border-bottom: none;
  font-weight: 600;
  color: #374151;
}
/* Table ke cells nowrap */
.nowrap-table th,
.nowrap-table td {
  white-space: nowrap !important;
  border-bottom: none !important;
  text-overflow: ellipsis; /* lambi text ... dikhegi */
  overflow: hidden;
  max-width: 200px; /* zaroori hai taake scrollbar aaye */
}
.table-responsive::-webkit-scrollbar {
  height: 0; /* horizontal scrollbar height */
}
.table-responsive {
  -ms-overflow-style: none; /* IE and Edge */
  scrollbar-width: none; /* Firefox */
}

.badge-soft {
  background: rgba(23, 166, 115, 0.12);
  color: var(--accent);
  font-weight: 600;
  border-radius: 8px;
  padding: 0.35rem 0.6rem;
  font-size: 0.85rem;
}
.dataTables_wrapper .dataTables_paginate .paginate_button {
  background-color: #0d6efd;
  color: white !important;
  border-radius: 5px;
  padding: 5px 12px;
  margin: 2px;
  cursor: pointer;
  transition: background-color 0.3s;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background-color: #0056b3 !important;
}
.dataTables_filter input {
  border-radius: 5px;
  border: 1px solid #ced4da;
  padding: 5px 10px;
  width: 250px;
  margin-left: 10px;
}
