.poa-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(17, 24, 39, 0.65);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
}
.poa-popup {
  background: #fffbe6;
  color: #b45309;
  border: 2px solid #fde68a;
  border-radius: 12px;
  padding: 24px 32px;
  min-width: 320px;
  max-width: 90vw;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  font-size: 16px;
  text-align: left;
}
.poa-popup header {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 12px;
}
.poa-popup ul {
  margin: 0 0 10px 0;
  padding: 0 0 0 18px;
}
.poa-popup li {
  margin-bottom: 6px;
}
.btn-small {
  padding: 5px 14px !important;
  font-size: 14px !important;
  border-radius: 8px !important;
  min-width: 80px !important;
  height: 32px !important;
  box-sizing: border-box;
}
.poa-alert {
  background: #fffbe6;
  color: #b45309;
  border: 1px solid #fde68a;
  border-radius: 6px;
  padding: 4px 10px;
  margin: 4px 0 0 0;
  font-size: 14px;
  display: inline-block;
}
/* Base layout */
:root { color-scheme: light dark; }
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; background:#f4f4f4; color:#111; }
.container { max-width: 1100px; margin: 2em auto; background:#fff; padding: 2em; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,.06); }

/* Navbar */
.fm-nav { position: sticky; top: 0; z-index: 1000; width: 100%; background: #0f172a; color: #e2e8f0; border-bottom: 1px solid rgba(255,255,255,.06); }
.fm-nav-inner { max-width: 1100px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.fm-left, .fm-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.fm-brand { font-weight: 700; color: #fff; text-decoration: none; margin-right: 8px; letter-spacing: .2px; }
.fm-link { color: #cbd5e1; text-decoration: none; padding: 8px 10px; border-radius: 6px; transition: background .15s ease, color .15s ease; display: inline-flex; align-items: center; }
.fm-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.fm-active { background: rgba(59,130,246,.18) !important; color: #fff !important; }
.fm-divider { height: 20px; width: 1px; background: rgba(255,255,255,.12); margin: 0 6px; }
.fm-badge { font-size: .85em; opacity: .85; padding: 0 6px; }
.fm-btn { background: #3b82f6; color: #fff; border: 0; padding: 8px 12px; border-radius: 6px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; }
.fm-btn:hover { background: #2563eb; }
.fm-btn-danger { background: #ef4444; }
.fm-btn-danger:hover { background: #dc2626; }

/* Buttons */
.btn { background:#1976d2; color:#fff; border:0; border-radius:4px; padding:8px 12px; cursor:pointer; text-decoration:none; display:inline-block; }
.btn:hover { background:#1565c0; }
.btn-danger { background:#ef4444; }
.btn-danger:hover { background:#dc2626; }

/* Tables */
table { border-collapse: collapse; width: 100%; }
th, td { border: 1px solid #e5e7eb; padding: 8px; text-align: left; }
thead th { background:#f8fafc; }

/* Forms */
label { display:block; margin: 10px 0 6px; font-weight: 600; }
input[type=text], input[type=password], input[type=date], textarea, select {
  width: 100%; 
  padding: 8px; 
  border: 1px solid #cbd5e1; 
  border-radius: 4px;
  background: #fff;
  color: #111; /* FIX: make text visible inside fields and dropdowns */
}
/* Styled tier select to match rounded toolbar inputs */
select.tier-select {
  max-width: 420px;
  padding:10px 12px;
  border:1px solid var(--border, #e5e7eb);
  border-radius:12px;
  background:#fff;
  font-size:16px;
  line-height:1.3;
  box-shadow:0 1px 2px rgba(0,0,0,0.04);
  transition: border-color .15s ease, box-shadow .15s ease;
}
select.tier-select:focus {
  outline:2px solid #3b82f6;
  outline-offset:2px;
  border-color:#3b82f6;
  box-shadow:0 0 0 3px rgba(59,130,246,0.25);
}
select.tier-select:hover { border-color:#94a3b8; }
.issues-toolbar input[type="text"], .issues-toolbar select {
  width:260px; max-width:100%; padding:10px 12px; border:1px solid var(--border, #e5e7eb); border-radius:10px; background:#fff; font-size:16px;
  color: #111 !important;
}
input, select, textarea {
  color: #111 !important;
  background: #fff !important;
}
.actions { margin-top: 12px; }
.error { color:#b71c1c; margin: 8px 0; }
.success { color:#15803d; margin: 8px 0; }

/* Dashboard cards */
.cards { display:grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 14px; }
.card { border:1px solid #e5e7eb; border-radius:8px; padding:14px; background:#fff; }
.card h3 { margin:0 0 6px; font-size: 1rem; }
.card .num { font-size: 1.8rem; font-weight: 700; color:#0f172a; }
.list { list-style: none; padding: 0; margin: 0; }
.list li { padding: 8px 0; border-bottom:1px solid #f1f5f9; }
.list li:last-child { border-bottom: none; }

/* Removed column-hiding rules so all columns display and expand properly */

/* FleetFix global left-side logo styling */
.fleetfix-logo-left {
  display: block;
  max-width: 220px;    /* Controls logo width on sidebar/left column */
  width: 100%;         /* Responsive scaling within container */
  height: auto;        /* Maintain aspect ratio */
  margin: 0 auto 28px; /* Centered, add space below */
  padding: 12px 0 0 0; /* Space above */
}

.logo-center-container {
  display: flex;
  justify-content: center;   /* centers horizontally */
  align-items: center;       /* centers vertically */
  min-height: 70vh;          /* takes up 70% of viewport height; adjust as needed */
}

.fleetfix-logo-left {
  max-width: 140px;
  max-height: 120px;
  width: 100%;
  height: auto;
  object-fit: contain;
  margin: 0;
  padding: 0;
}

/* Mobile Utilities & Responsive Adjustments */
.hide-mobile { display: initial; }
.show-mobile { display: none; }

@media (max-width: 1024px) {
  .container { max-width: 100%; margin: 0; border-radius:0; padding: 1.25rem 1rem 3.5rem; }
}

@media (max-width: 780px) {
  .fm-nav-inner { align-items: flex-start; }
  .mobile-nav-toggle { display:inline-flex !important; }
  .fm-left { flex-direction: column; align-items: stretch; width:100%; order: 2; }
  body.nav-menu-collapsed .fm-left { display: none; }
  .fm-link { padding:10px 12px; width:100%; }
  .fm-right { order:1; margin-left:auto; }
  .cards { grid-template-columns: repeat(auto-fit,minmax(150px,1fr)); }
  table { width:100%; border-collapse:collapse; }
  thead, tbody, tr { width:auto; }
  th, td { white-space: normal; }
  .issues-toolbar input[type="text"], .issues-toolbar select { width:100%; }
  .hide-mobile { display:none !important; }
  .show-mobile { display: initial !important; }
  .actions { display:flex; flex-wrap:wrap; gap:.5rem; }
  input[type=text], input[type=password], input[type=date], textarea, select { font-size:16px; } /* prevent iOS zoom */
}

@media (max-width: 500px) {
  .fm-brand { font-size:15px; }
  .fm-btn, .btn { padding:10px 14px; font-size:14px; }
  .card { padding:12px; }
  .card h3 { font-size:.95rem; }
  .card .num { font-size:1.4rem; }
  label { font-size:14px; }
}

/* Mobile nav toggle button */
.mobile-nav-toggle { display:none; background:#1e293b; color:#fff; border:1px solid rgba(255,255,255,.15); padding:8px 10px; border-radius:6px; cursor:pointer; align-items:center; gap:6px; font-weight:600; }
.mobile-nav-toggle:hover { background:#334155; }

/* Prevent horizontal scroll jitter for body */
html, body { overflow-x:hidden; }

/* Utility to make any table wrapper scrollable if class applied */
.scroll-x { overflow-x:auto; -webkit-overflow-scrolling:touch; }