/* ============================================================
   Savandara Travels & Tours — Brand Design System
   Brand Colors:
     --dark:       #000047  (sidebar, header, nav)
     --gold:       #eab21c  (CTA buttons, highlights)
     --light-grey: #c8c9cb  (borders, dividers)
     --white:      #ffffff  (content bg, cards)
   ============================================================ */

/* ─── Google Fonts & CSS Variables ─────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --dark:          #000047;
  --gold:          #eab21c;
  --gold-hover:    #d4a017;
  --light-grey:    #c8c9cb;
  --white:         #ffffff;
  --content-bg:    #f4f5f7;
  --error:         #dc3545;
  --success:       #28a745;
  --sidebar-width: 260px;
  --header-height: 60px;
  --shadow-sm:     0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md:     0 4px 20px rgba(0, 0, 0, 0.12);
  --shadow-lg:     0 8px 40px rgba(0, 0, 0, 0.18);
  --radius:        10px;
  --radius-sm:     6px;
  --transition:    0.2s ease;
}

/* ─── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  color: var(--dark);
  background: var(--content-bg);
  line-height: 1.6;
  margin: 0;
  overflow-x: hidden;
}

/* ─── App Layout ─────────────────────────────────────────────── */
.app-wrapper {
  display: flex;
  min-height: 100vh;
}

/* ─── SIDEBAR ─────────────────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--dark);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  overflow-y: auto;
  overflow-x: hidden;
  transition: transform var(--transition);
}

/* Brand */
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}

.brand-logo {
  width: 70px;
  height: 70px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-text { flex: 1; }

.brand-name {
  font-weight: 700;
  font-size: 15px;
  color: var(--white);
  line-height: 1.2;
}

.brand-sub {
  font-size: 11px;
  color: var(--light-grey);
  font-weight: 400;
}

/* Nav */
.sidebar-nav {
  flex: 1;
  padding: 16px 0;
  overflow-y: auto;
}

.sidebar-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-section-title {
  padding: 16px 20px 6px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: rgba(200, 201, 203, 0.5);
}

.sidebar-nav .nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 20px;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  transition: all var(--transition);
  border-left: 3px solid transparent;
  font-size: 13.5px;
  font-weight: 400;
  position: relative;
}

.sidebar-nav .nav-link i {
  font-size: 16px;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-nav .nav-link:hover {
  color: var(--white);
  background: rgba(255,255,255,0.06);
  border-left-color: rgba(234, 178, 28, 0.4);
}

.sidebar-nav .nav-link.active {
  color: var(--gold);
  background: rgba(234, 178, 28, 0.1);
  border-left-color: var(--gold);
  font-weight: 600;
}

/* Footer */
.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.user-avatar {
  width: 34px;
  height: 34px;
  background: var(--gold);
  color: var(--dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}

.user-details { min-width: 0; }

.user-display-name {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role-badge {
  font-size: 10px;
  color: var(--gold);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.logout-btn {
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  font-size: 18px;
  flex-shrink: 0;
  transition: color var(--transition);
  padding: 4px;
}
.logout-btn:hover { color: var(--error); }

/* ─── MAIN WRAPPER ────────────────────────────────────────────── */
.main-wrapper {
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  flex: 1;
  min-width: 0;
}

/* ─── TOP HEADER ──────────────────────────────────────────────── */
.top-header {
  height: var(--header-height);
  background: var(--dark);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 999;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  flex-shrink: 0;
}

.sidebar-toggle {
  background: none;
  border: none;
  color: var(--white);
  font-size: 22px;
  cursor: pointer;
  padding: 4px;
  display: none;
  line-height: 1;
}

.page-heading {
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  color: var(--white);
  margin: 0;
}

.header-cta { flex-shrink: 0; }

/* Flash messages area */
.flash-container {
  padding: 0 24px;
}

.flash-container .alert {
  border-radius: var(--radius-sm);
  margin-top: 12px;
}

/* ─── CONTENT AREA ────────────────────────────────────────────── */
.content-area {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
}

.page-content { max-width: 1400px; }

/* Page action bar */
.page-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* ─── BUTTONS ─────────────────────────────────────────────────── */
.btn-gold {
  background: var(--gold);
  color: var(--dark) !important;
  border: none;
  font-weight: 600;
  transition: background var(--transition), box-shadow var(--transition);
}
.btn-gold:hover, .btn-gold:focus {
  background: var(--gold-hover);
  color: var(--dark) !important;
  box-shadow: 0 4px 12px rgba(234, 178, 28, 0.35);
}

.btn-xs {
  padding: 3px 8px;
  font-size: 12px;
  border-radius: 4px;
}

/* ─── STAT CARDS ──────────────────────────────────────────────── */
.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  overflow: hidden;
  border-top: 3px solid var(--light-grey);
  transition: box-shadow var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow-md); }

.stat-icon {
  font-size: 24px;
  color: var(--dark);
  opacity: 0.3;
  position: absolute;
  top: 16px;
  right: 20px;
}
.stat-icon.gold    { color: var(--gold);    opacity: 0.6; }
.stat-icon.success { color: var(--success); opacity: 0.6; }
.stat-icon.danger  { color: var(--error);   opacity: 0.6; }

.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--dark);
  line-height: 1;
}
.stat-value.gold    { color: var(--gold); }
.stat-value.success { color: var(--success); }
.stat-value.danger  { color: var(--error); }

.stat-label {
  font-size: 12px;
  color: #888;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ─── DATA CARDS ──────────────────────────────────────────────── */
.data-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.data-card-header {
  padding: 16px 20px;
  background: var(--dark);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
}

.data-card-header h5, .data-card-header h6 {
  color: var(--white);
  font-weight: 600;
}

/* ─── DATA TABLES ─────────────────────────────────────────────── */
.data-table thead th {
  background: #f8f9fa;
  color: var(--dark);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--light-grey);
  padding: 10px 14px;
  white-space: nowrap;
}

.data-table tbody td {
  padding: 10px 14px;
  border-color: #f0f0f0;
  vertical-align: middle;
  font-size: 13.5px;
}

.data-table tbody tr:hover { background: #fafafa; }

.table-muted-row { opacity: 0.55; }

/* ─── FORM CARDS ──────────────────────────────────────────────── */
.form-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  border-top: 3px solid var(--light-grey);
}

.form-card-gold { border-top-color: var(--gold); }

.form-card-dark {
  background: var(--dark);
  border-top: none;
}

.form-card-header {
  padding: 14px 20px;
  background: #f8f9fa;
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #555;
  border-bottom: 1px solid var(--light-grey);
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-card-dark .form-card-header {
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.7);
  border-bottom-color: rgba(255,255,255,0.1);
}

.form-card-body { padding: 20px; }
.form-card-dark .form-card-body { padding: 20px; }

/* ─── FORM INPUTS ─────────────────────────────────────────────── */
.form-control, .form-select {
  border-color: var(--light-grey);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-control:focus, .form-select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(234, 178, 28, 0.18);
}

.form-label {
  font-weight: 500;
  font-size: 13px;
  color: #444;
  margin-bottom: 5px;
}

.required-label::after {
  content: ' *';
  color: var(--error);
}

.form-text { font-size: 11px; color: #888; }

/* Readonly / auto-calculated fields */
.readonly-field {
  background: #f5f6f7 !important;
  border-color: var(--light-grey) !important;
  color: #666;
  cursor: default;
}

/* ─── CALC DISPLAYS ───────────────────────────────────────────── */
.calc-display {
  background: #f5f6f7;
  border: 1px solid var(--light-grey);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 15px;
  font-weight: 600;
  color: var(--dark);
  min-height: 38px;
  display: flex;
  align-items: center;
}

.calc-display-gold {
  background: rgba(234, 178, 28, 0.1);
  border-color: var(--gold);
  color: var(--dark);
  font-size: 20px;
  font-weight: 700;
}

/* Income formula hint */
.income-formula-hint {
  background: rgba(234, 178, 28, 0.06);
  border: 1px solid rgba(234, 178, 28, 0.2);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: #555;
  font-size: 13px;
}

/* ─── SUMMARY VALUES (dark card) ──────────────────────────────── */
.summary-value {
  font-size: 26px;
  font-weight: 700;
  color: var(--white);
  line-height: 1;
}
.summary-value.gold { color: var(--gold); }

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

/* ─── TRIP DETAIL ─────────────────────────────────────────────── */
.detail-header-card {
  background: var(--dark);
  border-radius: var(--radius);
  padding: 24px 28px;
  color: var(--white);
}
.detail-title { font-size: 22px; font-weight: 700; color: var(--white); }
.detail-meta  { color: rgba(255,255,255,0.6); font-size: 14px; }

.summary-stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border-top: 4px solid var(--light-grey);
  position: relative;
}
.summary-stat-card.gold  { border-top-color: var(--gold); }
.summary-stat-card.dark  { background: var(--dark); border-top-color: rgba(255,255,255,0.1); }
.summary-stat-card.green { border-top-color: var(--success); }
.summary-stat-card.red   { border-top-color: var(--error); }

.summary-stat-card .label  { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: #888; margin-bottom: 8px; }
.summary-stat-card.dark .label { color: rgba(255,255,255,0.5); }
.summary-stat-card .value  { font-size: 22px; font-weight: 700; color: var(--dark); }
.summary-stat-card.gold .value { color: var(--dark); }
.summary-stat-card.dark .value { color: var(--white); }
.summary-stat-card .sub    { font-size: 12px; color: #888; margin-top: 4px; }
.summary-stat-card.dark .sub   { color: rgba(255,255,255,0.4); }

/* ─── BADGES ──────────────────────────────────────────────────── */
.bus-badge {
  background: var(--dark);
  color: var(--white);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  letter-spacing: 0.3px;
}

.bus-badge-lg {
  background: var(--gold);
  color: var(--dark);
  font-size: 14px;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 6px;
  display: inline-block;
}

.badge-active   { background: rgba(40,167,69,0.15) !important; color: #1a7c35 !important; }
.badge-inactive { background: rgba(108,117,125,0.15) !important; color: #5a6268 !important; }
.badge-admin    { background: rgba(234,178,28,0.15) !important; color: #8a6600 !important; }
.badge-staff    { background: rgba(0,0,26,0.1) !important; color: var(--dark) !important; }
.badge-setting  { background: rgba(0,0,26,0.08); color: #444; font-size: 11px; font-weight: 500; }

/* ─── REPORT CARDS ────────────────────────────────────────────── */
.report-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border-top: 4px solid var(--light-grey);
  position: relative;
  overflow: hidden;
}
.report-card.gold  { border-top-color: var(--gold); }
.report-card.dark  { background: var(--dark); border-top-color: rgba(255,255,255,0.2); }
.report-card.green { border-top-color: var(--success); }
.report-card.red   { border-top-color: var(--error); }

.rc-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #888;
  margin-bottom: 8px;
}
.report-card.dark .rc-label { color: rgba(255,255,255,0.5); }

.rc-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 4px;
}
.report-card.gold .rc-value  { color: var(--dark); }
.report-card.dark .rc-value  { color: var(--white); }
.report-card.green .rc-value { color: var(--success); }
.report-card.red .rc-value   { color: var(--error); }

.rc-sub {
  font-size: 11px;
  color: #888;
}
.report-card.dark .rc-sub { color: rgba(255,255,255,0.4); }

.rc-icon {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 28px;
  opacity: 0.15;
  color: currentColor;
}

/* Report controls bar */
.report-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  background: var(--white);
  border-radius: var(--radius);
  padding: 16px 20px;
  box-shadow: var(--shadow-sm);
}

/* ─── SETTINGS ────────────────────────────────────────────────── */
.settings-card .form-card-header { font-size: 13px; }

.settings-current-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 4px;
}

.text-gold { color: var(--gold) !important; }

/* ─── USER TABLE ──────────────────────────────────────────────── */
.user-table-avatar {
  width: 28px;
  height: 28px;
  background: var(--dark);
  color: var(--white);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  margin-right: 8px;
}

/* ─── AUTH PAGE ───────────────────────────────────────────────── */
.auth-body { background: var(--dark); min-height: 100vh; }

.auth-page {
  min-height: 100vh;
  display: flex;
}

.auth-left {
  width: 42%;
  background: #000047;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 40px;
  position: relative;
  overflow: hidden;
}

.auth-logo {
  width: 140px;
  height: 140px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  overflow: hidden;
}

.auth-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.auth-brand { text-align: center; z-index: 2; position: relative; }

.auth-brand-name {
  color: var(--white);
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 4px;
}

.auth-brand-tagline {
  color: var(--gold);
  font-size: 15px;
  font-weight: 500;
}

.auth-footer-text {
  position: absolute;
  bottom: 30px;
  color: rgba(255,255,255,0.3);
  font-size: 12px;
  letter-spacing: 0.5px;
  z-index: 2;
}

/* Decorative circles */
.auth-decorative { position: absolute; inset: 0; pointer-events: none; z-index: 1; }

.deco-circle {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(234, 178, 28, 0.08);
}
.deco-1 { width: 300px; height: 300px; top: -100px;  left: -100px;  border-width: 1px; }
.deco-2 { width: 200px; height: 200px; bottom: -60px; right: -60px;  border-color: rgba(234,178,28,0.12); }
.deco-3 { width: 120px; height: 120px; top: 40%;      right: 40px;   border-color: rgba(234,178,28,0.06); }

/* Auth right panel */
.auth-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f4f5f7;
  padding: 40px 20px;
}

.auth-card {
  background: var(--white);
  border-radius: 16px;
  padding: 48px 44px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
}

.auth-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 6px;
}

.auth-subtitle {
  color: #777;
  font-size: 14px;
  margin-bottom: 32px;
}

.form-control-auth {
  padding: 11px 11px 11px 40px;
  border-color: var(--light-grey);
  border-radius: 8px;
  font-size: 14px;
}
.form-control-auth:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(234, 178, 28, 0.18);
}

.input-icon-wrap { position: relative; }

.input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #aaa;
  font-size: 16px;
  z-index: 5;
  pointer-events: none;
}

.password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #aaa;
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
  z-index: 5;
}
.password-toggle:hover { color: var(--dark); }

.btn-login {
  padding: 12px;
  font-size: 15px;
  border-radius: 8px;
}

.auth-version { font-size: 12px; color: #aaa; }

/* ─── SPINNER ─────────────────────────────────────────────────── */
.spinner-border-sm { width: 14px; height: 14px; }

/* ─── PRINT ───────────────────────────────────────────────────── */
@media print {
  /* Hide UI chrome, sidebars, buttons, alerts, filters */
  .sidebar, 
  .top-header, 
  .page-actions, 
  .btn, 
  .flash-container, 
  .report-controls,
  .d-print-none,
  .password-toggle,
  #sidebarToggle { 
    display: none !important; 
  }

  /* Reset layout constraints */
  html, body {
    background: #ffffff !important;
    color: #000047 !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
    font-size: 12px !important;
    line-height: 1.4 !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    overflow: visible !important;
  }

  .app-wrapper, 
  .main-wrapper, 
  .content-area, 
  .page-content {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    position: static !important;
    float: none !important;
    overflow: visible !important;
  }

  /* Fix container/row margins */
  .row {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .row > * {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-bottom: 20px !important;
    padding: 0 !important;
    float: none !important;
  }

  /* Force side-by-side printing for grid rows on standard landscape/portrait paper */
  .row.g-3, .row.g-4 {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
  }

  /* For summary cards, let's print 4 in a row (25% width each) or 2 in a row (50%) */
  .row.g-3 > .col-sm-6, 
  .row.g-3 > .col-lg-3 {
    flex: 0 0 24% !important;
    max-width: 24% !important;
    margin-right: 1% !important;
    margin-bottom: 15px !important;
    display: inline-block !important;
    vertical-align: top !important;
  }

  /* Trip details page summary cards: 3 columns */
  .row.g-3 > .col-md-4 {
    flex: 0 0 32% !important;
    max-width: 32% !important;
    margin-right: 1% !important;
    margin-bottom: 15px !important;
    display: inline-block !important;
    vertical-align: top !important;
  }

  /* Stack detail tables vertically for better room on monthly report, but keep col-md-6 side-by-side for Trip Details */
  .row.g-4 > .col-lg-8,
  .row.g-4 > .col-lg-4 {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
    display: block !important;
  }

  .row.g-4 > .col-md-6 {
    flex: 0 0 49% !important;
    max-width: 49% !important;
    margin-right: 1% !important;
    display: inline-block !important;
    vertical-align: top !important;
  }

  /* Card and table print optimizations */
  .report-card, .stat-card, .summary-stat-card, .data-card {
    background: #ffffff !important;
    border: 1px solid #c8c9cb !important;
    border-radius: 6px !important;
    box-shadow: none !important;
    color: #000047 !important;
    margin-bottom: 8px !important;
    padding: 6px 10px !important;
    page-break-inside: avoid;
    display: block !important;
  }

  /* Ensure text remains dark/legible on white background regardless of print settings */
  .report-card *, .stat-card *, .summary-stat-card *, .data-card * {
    color: #000047 !important;
  }

  /* Ensure card headers print cleanly */
  .data-card-header {
    background: #f5f6f7 !important;
    border-bottom: 1px solid #c8c9cb !important;
    color: #000047 !important;
    padding: 10px 15px !important;
  }

  .data-card-header *, .data-card-header h5, .data-card-header h6 {
    color: #000047 !important;
    margin: 0 !important;
  }

  /* Reset subtext colors */
  .rc-sub, .sub, .text-muted, .text-white-50 {
    color: #555555 !important;
  }

  /* Specific values highlight color */
  .stat-value, .rc-value, .summary-stat-card .value {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #000047 !important;
  }

  .rc-icon, .stat-icon {
    display: none !important; /* Icons don't print well */
  }

  /* Header cards (dark header cards like trip show page) */
  .detail-header-card {
    background: #f5f6f7 !important;
    border: 1px solid #c8c9cb !important;
    border-radius: 6px !important;
    color: #000047 !important;
    padding: 12px 16px !important;
    margin-bottom: 15px !important;
    display: block !important;
  }

  .detail-header-card .row {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin: 0 !important;
  }

  .detail-header-card .col-md-6 {
    flex: 0 0 48% !important;
    max-width: 48% !important;
  }

  .detail-header-card * {
    color: #000047 !important;
  }

  .bus-badge-lg {
    background: #000047 !important;
    color: #ffffff !important;
    border: none !important;
    font-size: 13px !important;
    padding: 4px 10px !important;
    font-weight: bold !important;
    display: inline-block !important;
  }

  /* Table responsive wrapper override - CRITICAL FOR PRINTING WITHOUT CUT-OFF */
  .table-responsive {
    overflow: visible !important;
    display: block !important;
    width: 100% !important;
  }

  /* Data tables styling */
  .data-table {
    width: 100% !important;
    border-collapse: collapse !important;
    margin: 0 0 10px 0 !important;
  }
  .data-table th, .data-table td {
    border: 1px solid #dee2e6 !important;
    padding: 2px 3px !important;
    color: #000047 !important;
    font-size: 9px !important;
    text-align: left !important;
    background: transparent !important;
  }
  
  .data-table th.text-end, .data-table td.text-end {
    text-align: right !important;
  }
  
  .data-table thead th {
    background-color: #f8f9fa !important;
    font-weight: 600 !important;
    border-bottom: 2px solid #dee2e6 !important;
  }

  /* High contrast highlight colors */
  .text-success { color: #1e7e34 !important; font-weight: bold !important; }
  .text-danger { color: #bd2130 !important; font-weight: bold !important; }
  .text-gold { color: #000047 !important; font-weight: bold !important; }

  /* Badges */
  .badge {
    border: 1px solid #c8c9cb !important;
    background: transparent !important;
    color: #000047 !important;
  }

  .table-dark {
    background-color: #f5f6f7 !important;
    color: #000047 !important;
  }

  .table-dark td {
    color: #000047 !important;
    font-weight: bold !important;
    border-top: 2px solid #000047 !important;
  }

  /* Avoid charts stretching too large or cutting off */
  canvas {
    max-width: 100% !important;
    max-height: 120px !important;
    height: 120px !important;
    display: block !important;
    margin: 0 auto !important;
  }

  /* Page breaks */
  tr {
    page-break-inside: avoid !important;
  }
  thead {
    display: table-header-group !important;
  }
  .print-page-break {
    page-break-before: always !important;
    break-before: page !important;
  }
}

/* ─── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 992px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 40px rgba(0,0,0,0.4);
  }
  .main-wrapper {
    margin-left: 0;
  }
  .sidebar-toggle {
    display: block;
  }
  .auth-left {
    display: none;
  }
}

@media (max-width: 576px) {
  .content-area { padding: 16px; }
  .rc-value { font-size: 16px; }
  .auth-card { padding: 32px 24px; }
}

/* ─── Custom Scrollbar ────────────────────────────────────────── */
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 2px; }

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.page-content { animation: fadeIn 0.25s ease; }

/* ─── Insurance, Loans & Land Commitments Module ──────────────── */
.commitment-highlight-red {
  color: #dc3545;
  background-color: rgba(220, 53, 69, 0.08);
  padding: 6px 12px;
  border-radius: 4px;
  font-weight: 700;
  display: inline-block;
  border: 1px solid rgba(220, 53, 69, 0.2);
}
.commitment-highlight-gold {
  color: #cda21c; /* darker gold for readability */
  background-color: rgba(234, 178, 28, 0.08);
  padding: 6px 12px;
  border-radius: 4px;
  font-weight: 700;
  display: inline-block;
  border: 1px solid rgba(234, 178, 28, 0.2);
}
