/* ========================================
   Elite Car Care - Custom CSS
   Colors: Red (#DC143C), White (#FFFFFF), Navy Blue (#001F5B)
   ======================================== */

:root {
  --br-red: #dc143c;
  --br-red-dark: #a50e2a;
  --br-red-light: #ff4d6d;
  --br-navy: #001f5b;
  --br-navy-dark: #001040;
  --br-navy-light: #1a3a7c;
  --br-white: #ffffff;
  --br-light-bg: #f8f9fa;
  --br-gray: #6c757d;
  --br-border: #dee2e6;
}

/* ---- Global ---- */
* {
  box-sizing: border-box;
}
body {
  font-family:
    "Segoe UI",
    system-ui,
    -apple-system,
    sans-serif;
  background: #f4f6fb;
  color: #222;
}

a {
  color: var(--br-red);
  text-decoration: none;
}
a:hover {
  color: var(--br-red-dark);
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
  background: var(--br-navy);
  border-radius: 3px;
}

/* ---- Navbar ---- */
.navbar-brand {
  font-weight: 900;
  font-size: 1.6rem;
  letter-spacing: -0.5px;
}
.navbar-brand span.red,
.navbar-brand span.text-white {
  font-weight: 900;
}
.navbar-brand span.red {
  color: var(--br-red);
}
.navbar-brand span.blue {
  color: var(--br-navy);
}

.navbar-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.75);
  padding: 0;
  background: transparent;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}
.navbar-brand:hover .navbar-logo,
.navbar-logo:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.18);
  border-color: rgba(255, 255, 255, 0.95);
}
.brand-text {
  white-space: nowrap;
  line-height: 1.1;
}
.navbar-brand.d-flex {
  gap: 0.75rem;
}
.auth-logo {
  display: inline-flex;
  justify-content: center;
  width: 100%;
}
.auth-logo img {
  max-width: 160px;
  max-height: 160px;
  width: auto;
  height: auto;
  border-radius: 50%;
  border: 4px solid var(--br-red);
  padding: 10px;
  background: white;
}

.navbar-custom {
  background: var(--br-navy) !important;
  box-shadow: 0 2px 20px rgba(0, 31, 91, 0.3);
}
.navbar {
  position: relative;
  z-index: 1040 !important;
}
.navbar .dropdown-menu {
  z-index: 1050 !important;
}
.navbar-custom .nav-link {
  color: rgba(255, 255, 255, 0.85) !important;
  font-weight: 500;
  transition: color 0.2s;
}
.navbar-custom .nav-link:hover,
.navbar-custom .nav-link.active {
  color: var(--br-red-light) !important;
}
.navbar-custom .navbar-toggler {
  border-color: rgba(255, 255, 255, 0.3);
}
.navbar-custom .navbar-toggler-icon {
  filter: invert(1);
}

.btn-nav-login {
  background: var(--br-red);
  color: white !important;
  border-radius: 25px;
  padding: 6px 20px !important;
  font-weight: 600;
  transition:
    background 0.2s,
    transform 0.1s;
}
.btn-nav-login:hover {
  background: var(--br-red-dark);
  transform: scale(1.03);
}

/* ---- Hero / Carousel ---- */
.hero-section {
  position: relative;
  background: var(--br-navy);
  color: white;
  overflow: hidden;
  min-height: 580px;
}
.hero-overlay {
  background: linear-gradient(
    135deg,
    rgba(0, 31, 91, 0.92) 0%,
    rgba(220, 20, 60, 0.55) 100%
  );
  position: absolute;
  inset: 0;
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
}
.hero-badge {
  display: inline-block;
  background: var(--br-red);
  color: white;
  padding: 4px 16px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.hero-title {
  font-size: clamp(2rem, 5vw, 3.8rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1rem;
}
.hero-title .accent {
  color: var(--br-red-light);
}
.hero-subtitle {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 2rem;
}
.hero-cta-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.btn-hero-primary {
  background: var(--br-red);
  color: white;
  padding: 14px 36px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 1rem;
  border: 2px solid var(--br-red);
  transition: all 0.25s;
}
.btn-hero-primary:hover {
  background: var(--br-red-dark);
  border-color: var(--br-red-dark);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(220, 20, 60, 0.4);
}
.btn-hero-outline {
  background: transparent;
  color: white;
  padding: 14px 36px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.5);
  transition: all 0.25s;
}
.btn-hero-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: white;
  color: white;
}

.hero-stats {
  display: flex;
  gap: 32px;
  margin-top: 48px;
  flex-wrap: wrap;
}
.hero-stat {
  text-align: center;
}
.hero-stat-number {
  font-size: 2rem;
  font-weight: 900;
  color: var(--br-red-light);
}
.hero-stat-label {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ---- Service Cards ---- */
.section-label {
  color: var(--br-red);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
}
.section-title {
  font-weight: 800;
  color: var(--br-navy);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.service-card {
  border: none;
  border-radius: 16px;
  overflow: hidden;
  transition:
    transform 0.3s,
    box-shadow 0.3s;
  background: white;
  box-shadow: 0 4px 20px rgba(0, 31, 91, 0.08);
  height: 100%;
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(0, 31, 91, 0.15);
}
.service-icon-wrap {
  width: 64px;
  height: 64px;
  background: linear-gradient(
    135deg,
    var(--br-red) 0%,
    var(--br-red-dark) 100%
  );
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: white;
  margin-bottom: 1rem;
}
.service-price {
  color: var(--br-red);
  font-weight: 700;
  font-size: 1.1rem;
}

/* ---- Status Badges ---- */
.status-pending {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffc107;
}
.status-confirmed {
  background: #cfe2ff;
  color: #084298;
  border: 1px solid #0d6efd;
}
.status-diagnosing {
  background: #fff0e6;
  color: #7c4000;
  border: 1px solid #fd7e14;
}
.status-in_progress {
  background: #e8f4f8;
  color: #0c5460;
  border: 1px solid #17a2b8;
}
.status-waiting_parts {
  background: #f3e5f5;
  color: #6a1b9a;
  border: 1px solid #9c27b0;
}
.status-completed {
  background: #d1f2e1;
  color: #0a5c36;
  border: 1px solid #28a745;
}
.status-cancelled {
  background: #f8d7da;
  color: #842029;
  border: 1px solid #dc3545;
}
.status-closed {
  background: #e9ecef;
  color: #495057;
  border: 1px solid #6c757d;
}
.status-requested {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffc107;
}
.status-accepted {
  background: #cfe2ff;
  color: #084298;
  border: 1px solid #0d6efd;
}
.status-rejected {
  background: #f8d7da;
  color: #842029;
  border: 1px solid #dc3545;
}
.status-resolved {
  background: #d1f2e1;
  color: #0a5c36;
  border: 1px solid #28a745;
}
.status-open {
  background: #d1ecf1;
  color: #0c5460;
  border: 1px solid #17a2b8;
}
.status-in_repair {
  background: #cce5ff;
  color: #004085;
  border: 1px solid #0d6efd;
}
.status-quality_check {
  background: #f3e5f5;
  color: #6a1b9a;
  border: 1px solid #9c27b0;
}
.status-parts_ordered {
  background: #fff3e0;
  color: #e65100;
  border: 1px solid #ff9800;
}
.status-mechanic_dispatched {
  background: #e3f2fd;
  color: #0d47a1;
}
.status-en_route {
  background: #e8f5e9;
  color: #1b5e20;
}
.status-arrived {
  background: #d1f2e1;
  color: #0a5c36;
}
.status-en_route_pickup {
  background: #e3f2fd;
  color: #0d47a1;
  border: 1px solid #2196f3;
}
.status-en_route_drop {
  background: #e0f2f1;
  color: #00695c;
  border: 1px solid #009688;
}

.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
}

/* ---- Dashboard Sidebar ---- */
.dashboard-wrapper {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 260px;
  min-width: 260px;
  background: var(--br-navy);
  color: white;
  padding: 0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  transition: width 0.3s;
}

.sidebar-header {
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--br-navy-dark);
}
.sidebar-brand {
  font-size: 1.3rem;
  font-weight: 900;
  color: white;
}
.sidebar-brand .red {
  color: var(--br-red-light);
}
.sidebar-sub {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.sidebar-nav {
  padding: 12px 0;
  flex: 1;
}
.sidebar-section-label {
  padding: 12px 20px 4px;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.4);
  font-weight: 600;
}
.sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: all 0.2s;
}
.sidebar-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: white;
  border-left-color: var(--br-red);
}
.sidebar-item.active {
  background: rgba(220, 20, 60, 0.2);
  color: white;
  border-left-color: var(--br-red);
  font-weight: 600;
}
.sidebar-item i {
  width: 20px;
  text-align: center;
  font-size: 1rem;
}
.sidebar-badge {
  margin-left: auto;
  background: var(--br-red);
  color: white;
  font-size: 0.68rem;
  padding: 2px 7px;
  border-radius: 10px;
  font-weight: 700;
}
.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
}

/* ---- Dashboard Main ---- */
.dashboard-main {
  flex: 1;
  background: #f0f2f8;
  overflow-x: hidden;
}
.dashboard-topbar {
  background: white;
  padding: 14px 28px;
  border-bottom: 1px solid var(--br-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 100;
}
.dashboard-content {
  padding: 28px;
}

/* ---- KPI Cards ---- */
.kpi-card {
  display: block;
  background: white;
  border-radius: 16px;
  padding: 20px 24px;
  box-shadow: 0 4px 16px rgba(0, 31, 91, 0.08);
  border: none;
  position: relative;
  overflow: hidden;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}
a.kpi-card {
  cursor: pointer;
  color: inherit;
  text-decoration: none;
}
.kpi-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 31, 91, 0.12);
}
.kpi-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 12px;
}
.kpi-icon.red {
  background: linear-gradient(135deg, var(--br-red), var(--br-red-dark));
  color: white;
}
.kpi-icon.navy {
  background: linear-gradient(135deg, var(--br-navy), var(--br-navy-light));
  color: white;
}
.kpi-icon.orange {
  background: linear-gradient(135deg, #ff6b35, #e55a00);
  color: white;
}
.kpi-icon.green {
  background: linear-gradient(135deg, #28a745, #1e7e34);
  color: white;
}
.kpi-icon.purple {
  background: linear-gradient(135deg, #6f42c1, #5a2d9e);
  color: white;
}
.kpi-icon.teal {
  background: linear-gradient(135deg, #20c997, #17a589);
  color: white;
}
.kpi-number {
  font-size: 2rem;
  font-weight: 900;
  color: var(--br-navy);
  line-height: 1;
}
.kpi-label {
  font-size: 0.82rem;
  color: var(--br-gray);
  font-weight: 500;
  margin-top: 4px;
}
.kpi-sub {
  font-size: 0.75rem;
  color: #28a745;
  margin-top: 6px;
  font-weight: 600;
}

.kpi-card::after {
  content: "";
  position: absolute;
  top: -30px;
  right: -30px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  opacity: 0.05;
  background: var(--br-navy);
}

/* ---- Tables ---- */
.table-card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0, 31, 91, 0.06);
  overflow: hidden;
}
.table-card-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--br-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.table-card-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--br-navy);
}
.table th {
  background: #f8f9fa;
  color: var(--br-navy);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
  border-bottom: 2px solid var(--br-border);
  padding: 12px 16px;
}
.table td {
  padding: 12px 16px;
  vertical-align: middle;
  font-size: 0.9rem;
}
.table tbody tr:hover {
  background: #f8f9fb;
}

/* ---- Forms ---- */
.form-card {
  background: white;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 4px 20px rgba(0, 31, 91, 0.08);
}
.form-label {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--br-navy);
}
.form-control:focus,
.form-select:focus {
  border-color: var(--br-red);
  box-shadow: 0 0 0 0.2rem rgba(220, 20, 60, 0.15);
}
.btn-primary {
  background: var(--br-red) !important;
  border-color: var(--br-red) !important;
  font-weight: 600;
}
.btn-primary:hover {
  background: var(--br-red-dark) !important;
  border-color: var(--br-red-dark) !important;
}
.btn-outline-primary {
  color: var(--br-red) !important;
  border-color: var(--br-red) !important;
}
.btn-outline-primary:hover {
  background: var(--br-red) !important;
  color: white !important;
}

.action-icon-btn {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 6px !important;
  line-height: 1 !important;
  font-size: 14px !important;
  vertical-align: middle !important;
}

.action-icon-btn i {
  font-size: 14px !important;
  line-height: 1 !important;
}

.action-icon-btn + form,
form + .action-icon-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* ---- Auth Pages ---- */
.auth-wrapper {
  min-height: 100vh;
  background: linear-gradient(
    135deg,
    var(--br-navy) 0%,
    var(--br-navy-light) 50%,
    var(--br-red-dark) 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.auth-card {
  background: white;
  border-radius: 24px;
  padding: 40px;
  width: 100%;
  max-width: 460px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.auth-logo {
  font-size: 2rem;
  font-weight: 900;
}
.auth-logo .red {
  color: var(--br-red);
}
.auth-logo .blue {
  color: var(--br-navy);
}

/* ---- Booking Tracking ---- */
.tracking-card {
  border-radius: 16px;
  border: none;
  box-shadow: 0 4px 20px rgba(0, 31, 91, 0.08);
  transition: transform 0.2s;
}
.tracking-card:hover {
  transform: translateY(-3px);
}
.progress-tracker {
  display: flex;
  justify-content: space-between;
  position: relative;
  padding: 0 10px;
}
.progress-tracker::before {
  content: "";
  position: absolute;
  top: 16px;
  left: 10%;
  right: 10%;
  height: 3px;
  background: #dee2e6;
  z-index: 0;
}
.tracker-step {
  text-align: center;
  position: relative;
  z-index: 1;
}
.tracker-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #dee2e6;
  color: #999;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 6px;
  font-size: 0.9rem;
  font-weight: 700;
  transition: all 0.3s;
}
.tracker-dot.active {
  background: var(--br-red);
  color: white;
  box-shadow: 0 0 0 4px rgba(220, 20, 60, 0.2);
}
.tracker-dot.done {
  background: #28a745;
  color: white;
}
.tracker-label {
  font-size: 0.7rem;
  color: #666;
  white-space: nowrap;
}

/* ---- Rescue Section ---- */
.rescue-card {
  border: 2px solid var(--br-red);
  border-radius: 16px;
  padding: 28px;
  background: linear-gradient(135deg, #fff 0%, #fff5f7 100%);
}
.rescue-pulse {
  display: inline-block;
  width: 12px;
  height: 12px;
  background: var(--br-red);
  border-radius: 50%;
  animation: pulse 1.5s infinite;
  margin-right: 8px;
}
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(220, 20, 60, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(220, 20, 60, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(220, 20, 60, 0);
  }
}

/* ---- Footer ---- */
.footer-main {
  background: var(--br-navy-dark);
  color: rgba(255, 255, 255, 0.8);
  padding: 56px 0 0;
}
.footer-brand {
  font-size: 1.8rem;
  font-weight: 900;
  color: white;
}
.footer-brand .red {
  color: var(--br-red-light);
}
.footer-tagline {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
  margin-top: 6px;
}
.footer-heading {
  color: white;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-links li {
  margin-bottom: 8px;
}
.footer-links a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}
.footer-links a:hover {
  color: var(--br-red-light);
}
.footer-contact-item {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}
.footer-contact-icon {
  color: var(--br-red-light);
  width: 18px;
  text-align: center;
  margin-top: 2px;
  flex-shrink: 0;
}
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: white;
  margin-right: 8px;
  font-size: 0.9rem;
  transition: background 0.2s;
}
.footer-social a:hover {
  background: var(--br-red);
}
.footer-bottom {
  background: rgba(0, 0, 0, 0.3);
  padding: 16px 0;
  margin-top: 40px;
  text-align: center;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.4);
}

/* ---- About Section ---- */
.about-hero {
  background: linear-gradient(
    135deg,
    var(--br-navy) 0%,
    var(--br-navy-light) 100%
  );
  padding: 80px 0;
  color: white;
}
.team-card {
  border: none;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 31, 91, 0.1);
  text-align: center;
  padding: 28px;
  transition: transform 0.2s;
}
.team-card:hover {
  transform: translateY(-4px);
}
.team-avatar {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--br-navy), var(--br-red));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: white;
  margin: 0 auto 16px;
}

/* ---- Rescue Map Area ---- */
.map-placeholder {
  background: linear-gradient(135deg, #e8f0fe, #e3f2fd);
  border-radius: 12px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed #90caf9;
  cursor: pointer;
  transition: all 0.2s;
}
.map-placeholder:hover {
  border-color: var(--br-navy);
  background: #dce9fd;
}

/* ---- Sidebar Mobile ---- */
@media (max-width: 768px) {
  .dashboard-wrapper {
    flex-direction: column;
  }
  .sidebar {
    position: fixed;
    left: -260px;
    top: 0;
    z-index: 1000;
    width: 260px;
    min-width: unset;
    max-width: 100%;
    height: 100%;
    transition:
      left 0.3s ease,
      box-shadow 0.3s ease;
  }
  .sidebar.open {
    left: 0;
    box-shadow: 4px 0 30px rgba(0, 0, 0, 0.18);
  }
  body.sidebar-open {
    overflow: hidden;
  }
  .dashboard-main {
    margin-left: 0;
    width: 100%;
  }
  .sidebar-toggle {
    display: block;
    background: var(--br-navy);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 1.2rem;
    cursor: pointer;
  }
  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 999;
  }
  .sidebar-overlay.active {
    display: block;
  }
  .dashboard-topbar {
    flex-wrap: wrap;
    gap: 10px;
  }
  .dashboard-content {
    padding: 16px;
  }
  .table-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .table-card-header .table-card-title {
    margin-bottom: 0;
  }
  .hero-stats {
    gap: 16px;
  }
}

/* ---- Job Card Bill ---- */
.bill-section {
  border-top: 2px solid var(--br-border);
  margin-top: 20px;
  padding-top: 16px;
}
.bill-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 0.9rem;
}
.bill-row.total {
  font-weight: 800;
  font-size: 1.1rem;
  border-top: 2px solid var(--br-navy);
  padding-top: 10px;
  margin-top: 6px;
  color: var(--br-navy);
}

/* ---- Stat Cards ---- */
.stat-card {
  background: white;
  border-radius: 18px;
  padding: 22px 20px;
  box-shadow: 0 6px 20px rgba(0, 31, 91, 0.08);
  transition:
    transform 0.2s,
    box-shadow 0.2s;
  min-height: 120px;
}
.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(0, 31, 91, 0.12);
}
.stat-number {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 8px;
}
.stat-label {
  color: var(--br-gray);
  font-size: 0.95rem;
}

/* ---- Responsive helpers ---- */
.checkbox-section {
  border: 1px solid #dee2e6;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}
.checkbox-section summary {
  cursor: pointer;
  padding: 14px 18px;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  color: var(--br-navy);
  background: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
}
.checkbox-section summary::-webkit-details-marker {
  display: none;
}
.checkbox-section summary::after {
  content: "+";
  font-size: 1rem;
  line-height: 1;
  color: var(--br-gray);
}
.checkbox-section[open] summary::after {
  content: "-";
}
.checkbox-section-body {
  padding: 0 18px 18px;
}
.table-card {
  overflow: hidden;
}
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.table-responsive table {
  min-width: 700px;
}
.table-hover tbody tr:hover {
  background: rgba(220, 20, 60, 0.05);
  cursor: pointer;
}
.table-card-header .table-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

@media (max-width: 992px) {
  .page-header-dash {
    padding: 18px 20px;
  }
  .page-header-dash form {
    width: 100%;
  }
  .page-header-dash .btn {
    width: 100%;
  }
  .page-header-dash .btn + .btn {
    width: auto;
  }
  .stat-card {
    min-height: 120px;
  }
}

@media (max-width: 768px) {
  .page-header-dash {
    padding: 16px;
    flex-direction: column;
    gap: 16px;
  }
  .page-header-dash .d-flex.flex-column.flex-md-row {
    flex-direction: column !important;
  }
  .page-header-dash .form-control {
    width: 100%;
  }
  .page-header-dash .btn {
    width: 100%;
  }
  .stat-card {
    min-height: unset;
    padding: 18px 16px;
  }
  .stat-number {
    font-size: 1.8rem;
  }
  .stat-label {
    font-size: 0.92rem;
  }
  .table-responsive {
    margin: 0 -16px;
    padding: 0 16px;
  }
}

@media (max-width: 576px) {
  .page-header-dash {
    padding: 14px;
  }
  .page-header-dash .btn {
    font-size: 0.95rem;
    padding: 10px 16px;
  }
  .table-card {
    border-radius: 18px;
  }
  .table-responsive table {
    min-width: 100%;
  }
  .table th,
  .table td {
    padding: 10px 8px;
    font-size: 0.78rem;
  }
}

/* ---- Misc ---- */
.badge-red {
  background: var(--br-red);
  color: white;
}
.badge-navy {
  background: var(--br-navy);
  color: white;
}
.text-red {
  color: var(--br-red) !important;
}
.text-navy {
  color: var(--br-navy) !important;
}
.bg-navy {
  background: var(--br-navy) !important;
}
.bg-red {
  background: var(--br-red) !important;
}
.border-red {
  border-color: var(--br-red) !important;
}

.card-hover {
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}
.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 31, 91, 0.12);
}

.page-header-dash {
  background: white;
  border-radius: 16px;
  padding: 20px 28px;
  margin-bottom: 24px;
  box-shadow: 0 2px 10px rgba(0, 31, 91, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.low-stock-badge {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffc107;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}
.no-stock-badge {
  background: #f8d7da;
  color: #842029;
  border: 1px solid #dc3545;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* ========================================
   RESPONSIVE — Tablet (max 992px)
   ======================================== */
@media (max-width: 992px) {
  .hero-section {
    min-height: 460px;
  }
  .hero-title {
    font-size: clamp(1.7rem, 5vw, 2.8rem);
  }
  .hero-stats {
    gap: 20px;
    margin-top: 32px;
  }
  .hero-stat-number {
    font-size: 1.6rem;
  }

  .dashboard-content {
    padding: 20px;
  }
  .dashboard-topbar {
    padding: 12px 20px;
  }

  .table-card-header {
    flex-wrap: wrap;
    gap: 10px;
  }
  .page-header-dash {
    flex-wrap: wrap;
    gap: 12px;
  }

  .form-card {
    padding: 24px;
  }

  .kpi-card {
    padding: 16px 18px;
  }
  .kpi-number {
    font-size: 1.6rem;
  }
}

/* ========================================
   RESPONSIVE — Mobile (max 768px)
   ======================================== */
@media (max-width: 768px) {
  /* Sidebar already handled above */
  .hero-stats {
    gap: 16px;
  }
  .dashboard-content {
    padding: 16px;
  }

  /* Tables — horizontal scroll on mobile */
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .table th,
  .table td {
    white-space: nowrap;
    font-size: 0.82rem;
    padding: 10px 12px;
  }

  /* Progress tracker wraps on mobile */
  .tracker-label {
    white-space: normal;
    font-size: 0.65rem;
  }
  .progress-tracker {
    gap: 4px;
  }

  /* Footer */
  .footer-main {
    padding: 40px 0 0;
  }
}

/* ========================================
   RESPONSIVE — Small Mobile (max 576px)
   ======================================== */
/* Cart mobile card helpers */
.cart-mobile-card {
  border-radius: 12px;
  background: white;
  box-shadow: 0 2px 12px rgba(0, 31, 91, 0.07);
  border: 1px solid #eee;
}

@media (max-width: 576px) {
  /* Navbar */
  .navbar-brand {
    font-size: 1.25rem;
  }
  #brLangBtn {
    font-size: 0.72rem;
    padding: 3px 9px;
  }
  .btn-nav-login {
    padding: 5px 14px !important;
    font-size: 0.85rem;
  }

  /* Hero */
  .hero-section {
    min-height: auto;
  }
  .hero-content {
    padding-top: 2.5rem !important;
    padding-bottom: 2.5rem !important;
  }
  .hero-title {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
  }
  .hero-subtitle {
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
  }
  .hero-badge {
    font-size: 0.7rem;
    letter-spacing: 1px;
  }
  .btn-hero-primary,
  .btn-hero-outline {
    padding: 11px 22px;
    font-size: 0.9rem;
  }
  .hero-cta-group {
    flex-direction: column;
    gap: 10px;
  }
  .hero-cta-group a {
    text-align: center;
  }
  .hero-stats {
    gap: 12px;
    margin-top: 24px;
    justify-content: center;
  }
  .hero-stat-number {
    font-size: 1.4rem;
  }
  .hero-stat-label {
    font-size: 0.7rem;
  }

  /* Sections */
  .section-title {
    font-size: 1.5rem;
  }
  .py-5 {
    padding-top: 2.5rem !important;
    padding-bottom: 2.5rem !important;
  }

  /* Service cards */
  .service-card {
    margin-bottom: 4px;
  }

  /* Auth */
  .auth-card {
    padding: 24px 20px;
    border-radius: 18px;
  }
  .auth-logo {
    font-size: 1.6rem;
  }

  /* Forms */
  .form-card {
    padding: 20px 16px;
    border-radius: 14px;
  }

  /* Tables */
  .table th,
  .table td {
    font-size: 0.78rem;
    padding: 8px 10px;
  }
  .table-card-header {
    padding: 14px 16px;
    flex-direction: column;
    align-items: flex-start;
  }
  .table-card-header .d-flex {
    flex-wrap: wrap;
    gap: 8px;
  }

  /* Dashboard */
  .dashboard-topbar {
    padding: 10px 14px;
  }
  .dashboard-content {
    padding: 12px;
  }
  .kpi-card {
    padding: 14px 16px;
  }
  .kpi-number {
    font-size: 1.4rem;
  }
  .kpi-icon {
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
  }
  .page-header-dash {
    padding: 14px 16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  /* Job card bill */
  .bill-row {
    font-size: 0.82rem;
  }
  .bill-row.total {
    font-size: 0.95rem;
  }

  /* Rescue */
  .rescue-card {
    padding: 18px;
  }

  /* Footer */
  .footer-main {
    padding: 32px 0 0;
  }
  .footer-brand {
    font-size: 1.4rem;
  }
  .footer-heading {
    font-size: 0.88rem;
    margin-bottom: 10px;
  }
  .footer-links a {
    font-size: 0.85rem;
  }
  .footer-contact-item {
    font-size: 0.85rem;
  }
  .footer-bottom {
    font-size: 0.75rem;
    padding: 12px 0;
    margin-top: 24px;
  }

  /* Contact page map */
  iframe[src*="google.com/maps"] {
    height: 240px !important;
  }

  /* Misc */
  .btn {
    font-size: 0.88rem;
  }
  .modal-dialog {
    margin: 10px;
  }
  .modal-content {
    border-radius: 14px !important;
  }
  .modal-body {
    padding: 16px;
  }
  .rounded-pill {
    border-radius: 20px !important;
  }
}
