:root {
  --yl-yellow: #f6d40c;
  --yl-black: #000;
  --yl-dark: #111;
  --yl-light: #f9f9f9;
  --danger: #d9534f;
  --success: #4caf50;
  --warning: #f0ad4e;
}

/* ================= RESET ================= */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: #222;
  background: var(--yl-light);
}

/* ✅ GLOBAL HIDDEN */
.hidden {
  display: none !important;
}

/* ================= TOP NAV ================= */

.top-nav {
  background: var(--yl-black);
  color: var(--yl-yellow);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-left {
  font-size: 20px;
  font-weight: 800;
}

.nav-right a {
  color: var(--yl-yellow);
  text-decoration: none;
  margin-left: 18px;
  font-weight: 700;
}

.nav-right a.active,
.nav-right a:hover {
  border-bottom: 2px solid var(--yl-yellow);
}

/* ================= PAGE BACKGROUNDS ================= */

body.main-bg {
  background:
    linear-gradient(rgba(0,0,0,.65), rgba(0,0,0,.65)),
    url("../img/yankeeline-bg.jpg") center/cover no-repeat fixed;
  color: white;
}

body.fleet-bg {
  background:
    linear-gradient(rgba(0,0,0,.45), rgba(0,0,0,.45)),
    url("../img/fleetbackground.jpg") center/cover no-repeat fixed;
  color: white;
}

body.mx-bg {
  background:
    linear-gradient(rgba(0,0,0,.75), rgba(0,0,0,.75)),
    url("../img/mxdashboard.jpg") center/cover no-repeat fixed;
  color: white;
}

/* ================= CONTAINER ================= */

.container {
  padding: 24px;
  max-width: 1200px;
  margin: auto;
}

/* ================= CONTROLS ================= */

.controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

select,
input {
  padding: 8px 12px;
  border-radius: 20px;
  border: 1px solid #ccc;
  font-weight: 600;
  min-width: 180px;
}

button {
  padding: 7px 14px;
  border-radius: 20px;
  border: none;
  background: var(--yl-yellow);
  font-weight: 800;
  cursor: pointer;
}

button:hover {
  filter: brightness(0.95);
}

/* ================= STATUS TAGS ================= */

.status-new {
  background: var(--danger);
  color: white;
  padding: 3px 8px;
  border-radius: 16px;
  font-size: 10px;
}

.status-progress {
  background: var(--warning);
  color: black;
  padding: 3px 8px;
  border-radius: 16px;
  font-size: 10px;
}

.status-closed {
  background: var(--success);
  color: white;
  padding: 3px 8px;
  border-radius: 16px;
  font-size: 10px;
}

/* ======================================================
   ✅ FLEET BUS CARDS — SOURCE OF TRUTH
====================================================== */

#vehicleList,
#issueList {
  max-width: 1000px;
  margin: auto;
}

.bus-card {
  position: relative;
  background: rgba(255,255,255,0.96);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 14px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.22);
  border-left: 6px solid var(--yl-yellow);
  color: #111;
}

.bus-card h3 {
  font-size: 16px;
  margin-bottom: 6px;
}

.bus-controls {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

/* ✅ DVIRs LIVE INSIDE BUS CARD */
.bus-tickets {
  background: #eee;
  border-radius: 8px;
  padding: 8px;
  margin-top: 10px;
  max-height: 220px;
  overflow-y: auto;
}

.bus-tickets .ticket {
  font-size: 11px;
  padding: 6px 8px;
  margin-bottom: 6px;
  border-left: 4px solid var(--yl-yellow);
  background: white;
  border-radius: 6px;
  line-height: 1.4;
}

/* ======================================================
   ✅ SAMSARA FUEL BOX — HARD LOCKED
====================================================== */

.bus-card .fuel-box {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 210px;
  padding: 8px 10px;
  background: #2b2b2b;
  color: white;
  border: 2px solid var(--yl-yellow);
  border-radius: 8px;
  font-size: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.45);
  z-index: 5;
}

.bus-card .fuel-box strong {
  color: var(--yl-yellow);
  font-weight: 900;
}

/* ✅ Prevent text underlap */
.bus-card h3,
.bus-card p,
.bus-card .bus-controls {
  padding-right: 240px;
}

/* ✅ Tickets stay full width */
.bus-card .bus-tickets {
  padding-right: 0;
}

/* ✅ MOBILE */
@media (max-width: 700px) {
  .bus-card .fuel-box {
    position: static;
    width: 100%;
    margin-top: 10px;
  }

  .bus-card h3,
  .bus-card p,
  .bus-card .bus-controls {
    padding-right: 0;
  }
}

/* ================= MODAL ================= */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: #fff;
  color: #000;
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.6);
}

.modal-content * {
  position: relative;
  z-index: 2;
}

/* ================= DASHBOARD ================= */

.dashboard-grid {
  margin-top: 30px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.dash-card {
  background: rgba(255, 255, 255, 0.94);
  color: #000 !important;
  border-radius: 14px;
  padding: 16px 18px;
  border-left: 6px solid var(--yl-yellow);
  box-shadow: 0 8px 20px rgba(0,0,0,.25);
  cursor: pointer;
  min-height: 80px;
}

.dash-card h3 {
  color: #000 !important;
  font-weight: 800;
}

.dash-card p {
  color: #222 !important;
  font-size: 14px;
  font-weight: 600;
}

/* ================= PAGINATION ================= */

#paginationControls {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 40px auto 20px auto;
}

#paginationControls button {
  background: var(--yl-yellow);
  border: none;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 800;
  cursor: pointer;
}

#paginationControls button.active {
  background: black !important;
  color: var(--yl-yellow) !important;
}

/* ================= REMOVE ALL CHECK ICONS ================= */

.ticket::before,
.ticket::after,
select::before,
select::after,
li::before,
li::after {
  content: none !important;
  display: none !important;
}

/* ================= PRINT ================= */

@media print {
  .top-nav,
  .controls,
  button { display: none !important; }
  body { background: white !important; }
  img { max-width: 180px !important; }
}
/* =======================================================
   ✅ FINAL DVIR + REPORTS TICKET CARD FIX (FLEET STYLE)
======================================================= */

#issueList,
#reportList,
#resolvedList {
  max-width: 1000px;
  margin: 20px auto;
}

/* ✅ MASTER TICKET CARD */
.ticket-card {
  background: rgba(20, 20, 20, 0.95) !important;
  border-left: 6px solid var(--yl-yellow);
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 16px;
  box-shadow: 0 8px 22px rgba(0,0,0,.45);
  color: #fff !important;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}

.ticket-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(0,0,0,.65);
}

/* ✅ HEADER ROW */
.ticket-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 10px;
}

/* ✅ STATUS BADGES */
.ticket-badge {
  padding: 5px 12px;
  font-size: 12px;
  border-radius: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.badge-safe {
  background: #198754;
  color: white;
}

.badge-resolved {
  background: #0d6efd;
  color: white;
}

.badge-open {
  background: #dc3545;
  color: white;
}

/* ✅ BODY GRID */
.ticket-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 18px;
  font-size: 14px;
}

.ticket-body div {
  line-height: 1.5;
}

/* ✅ DEFECT SECTION */
.ticket-defects {
  grid-column: span 2;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #444;
  color: #ffd966;
  font-weight: 700;
}

/* ✅ REMOVE ALL RAW INLINE STACKING */
#issueList > div:not(.ticket-card),
#reportList > div:not(.ticket-card),
#resolvedList > div:not(.ticket-card) {
  display: none !important;
}

/* ✅ MOBILE STACK */
@media (max-width: 700px) {
  .ticket-body {
    grid-template-columns: 1fr;
  }
}

/* =======================================================
   ✅ FINAL FLEET-STYLE DVIR + REPORT TICKET CARDS
   (MATCHES BUS CARDS EXACTLY)
======================================================= */

#issueList,
#reportList,
#resolvedList {
  max-width: 1000px;
  margin: auto;
}

/* ✅ TICKET CARD — EXACT BUS CARD STYLE */
.ticket-card {
  background: rgba(255, 255, 255, 0.96) !important;
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 16px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.22);
  border-left: 6px solid var(--yl-yellow);
  color: #111 !important;
  position: relative;
}

/* ✅ HEADER */
.ticket-header {
  font-size: 16px;
  font-weight: 900;
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ✅ BADGES */
.ticket-badge {
  padding: 5px 12px;
  font-size: 12px;
  border-radius: 999px;
  font-weight: 900;
}

.badge-safe {
  background: #ffc107;
  color: black;
}

.badge-resolved {
  background: #198754;
  color: white;
}

.badge-open {
  background: #dc3545;
  color: white;
}

/* ✅ BODY LAYOUT */
.ticket-body {
  font-size: 14px;
  line-height: 1.6;
  margin-top: 6px;
}

/* ✅ DEFECT SECTION */
.ticket-defects {
  background: #f1f1f1;
  border-radius: 8px;
  padding: 8px 12px;
  margin-top: 10px;
  font-weight: 700;
  border-left: 4px solid var(--yl-yellow);
}

/* ✅ BUTTON ROW (MATCHES FLEET BUTTONS) */
.ticket-actions {
  margin-top: 10px;
  display: flex;
  gap: 10px;
}

.ticket-actions button {
  background: var(--yl-yellow);
  border-radius: 999px;
  font-weight: 800;
  padding: 7px 14px;
  border: none;
}

/* ✅ DELETE OLD DARK STYLES */
.ticket-card * {
  color: #111 !important;
}

/* ✅ MOBILE */
@media (max-width: 700px) {
  .ticket-actions {
    flex-direction: column;
  }
}











