:root {
  --imlu-cobalt: #0B3D91;
  --imlu-cobalt-dark: #082C6B;
  --imlu-red: #C8102E;
  --imlu-red-dark: #A30D26;
}

body {
  background: #f4f3ee;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---- Brand utility classes (kept separate from Bootstrap's own .btn-primary
   etc. so brand colors apply reliably without fighting Bootstrap's compiled
   defaults) ---- */

.bg-cobalt        { background-color: var(--imlu-cobalt) !important; }
.text-cobalt       { color: var(--imlu-cobalt) !important; }
.border-cobalt      { border-color: var(--imlu-cobalt) !important; }

.btn-cobalt {
  background-color: var(--imlu-cobalt);
  border-color: var(--imlu-cobalt);
  color: #fff;
}
.btn-cobalt:hover, .btn-cobalt:focus {
  background-color: var(--imlu-cobalt-dark);
  border-color: var(--imlu-cobalt-dark);
  color: #fff;
}
.btn-outline-cobalt {
  background-color: transparent;
  border: 1px solid var(--imlu-cobalt);
  color: var(--imlu-cobalt);
}
.btn-outline-cobalt:hover {
  background-color: var(--imlu-cobalt);
  color: #fff;
}

/* Toggle-chip selection states for btn-check + label pairs (method of
   torture, case type). Bootstrap's own .btn-check:checked + .btn only
   colors its built-in variants (btn-outline-primary etc) — these rules
   extend that same mechanism to our brand's custom outline classes, so a
   selected chip actually looks selected instead of staying the same
   color it started as. */
.btn-check:checked + .btn-outline-cobalt,
.btn-check:active + .btn-outline-cobalt {
  background-color: var(--imlu-cobalt);
  border-color: var(--imlu-cobalt);
  color: #fff;
}
.btn-check:checked + .btn-outline-red,
.btn-check:active + .btn-outline-red {
  background-color: var(--imlu-red);
  border-color: var(--imlu-red);
  color: #fff;
}
.btn-outline-red {
  background-color: transparent;
  border: 1.5px solid #d8d6cc;
  color: #6b6a63;
}
.btn-outline-red:hover {
  border-color: var(--imlu-red);
  color: var(--imlu-red);
}

.btn-brand-red {
  background-color: var(--imlu-red);
  border-color: var(--imlu-red);
  color: #fff;
}
.btn-brand-red:hover, .btn-brand-red:focus {
  background-color: var(--imlu-red-dark);
  border-color: var(--imlu-red-dark);
  color: #fff;
}

/* ---- Layout pieces ---- */

.imlu-navbar {
  background: var(--imlu-cobalt);
}
.imlu-navbar .navbar-brand, .imlu-navbar .nav-link {
  color: #fff !important;
}
.imlu-navbar .nav-link { opacity: .85; }
.imlu-navbar .nav-link:hover, .imlu-navbar .nav-link.active { opacity: 1; }

.imlu-nav-links .nav-link {
  border-radius: 8px;
  padding: 8px 14px !important;
  transition: background-color .15s ease;
}
.imlu-nav-links .nav-link:hover {
  background-color: rgba(255,255,255,.14);
  opacity: 1;
}

.imlu-logo-badge {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  overflow: hidden;
  padding: 2px;
}
.imlu-logo-badge img { width: 100%; height: 100%; object-fit: contain; }

.imlu-hero-outer {
  padding: 20px 90px 0;
}
.imlu-hero {
  background: linear-gradient(135deg, var(--imlu-cobalt), #1650c9);
  padding-bottom: 30px;
  border-radius: 24px;
  box-shadow: 0 16px 34px rgba(11,61,145,.22);
}

.imlu-countdown-label {
  text-align: center;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #C9D8F5;
  margin-bottom: 14px;
}

.imlu-timer-tiles {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.imlu-timer-tile {
  background: #fff;
  border-radius: 10px;
  padding: 14px 18px;
  min-width: 68px;
  text-align: center;
}
.imlu-timer-tile.seconds { background: var(--imlu-red); }
.imlu-timer-tile .num { font-size: 24px; font-weight: 700; color: var(--imlu-cobalt); line-height: 1.1; }
.imlu-timer-tile.seconds .num { color: #fff; }
.imlu-timer-tile .unit { font-size: 10px; text-transform: uppercase; color: #5F5E5A; letter-spacing: .05em; margin-top: 2px; }
.imlu-timer-tile.seconds .unit { color: #FBD8D8; }

/* Content wrapper narrower than Bootstrap's default .container max-widths,
   so the dashboard doesn't stretch edge-to-edge on wide desktop screens.
   Loaded after bootstrap.min.css, so this wins at every breakpoint. */
.imlu-container { max-width: 1180px; }

.imlu-cta-row { text-align: center; margin-bottom: 26px; }

.imlu-stat-card {
  border-radius: 12px;
  padding: 16px;
  height: 100%;
}
.imlu-stat-card .num { font-size: 1.25rem; font-weight: 700; }
.imlu-stat-card .lbl { font-size: .75rem; margin-top: 2px; }

.imlu-stat-blue  { background: #E6F1FB; }
.imlu-stat-blue .num  { color: #0C447C; }
.imlu-stat-blue .lbl  { color: #185FA5; }

.imlu-stat-red   { background: #FCEBEB; }
.imlu-stat-red .num   { color: #791F1F; }
.imlu-stat-red .lbl   { color: #A32D2D; }

.imlu-stat-amber { background: #FAEEDA; }
.imlu-stat-amber .num { color: #633806; }
.imlu-stat-amber .lbl { color: #854F0B; }

.imlu-stat-gray  { background: #F1EFE8; }
.imlu-stat-gray .num  { color: #444441; }
.imlu-stat-gray .lbl  { color: #5F5E5A; }

.imlu-incident-row {
  cursor: pointer;
  transition: background-color .1s ease;
}
.imlu-incident-row:hover { background-color: #f9fafb; }
.imlu-incident-row .chevron { transition: transform .15s ease; }
.imlu-incident-row[aria-expanded="true"] .chevron { transform: rotate(90deg); }

#imlu-map { height: 420px; border-radius: 12px; }
#imlu-preview-map { height: 220px; border-radius: 8px; }

@media (max-width: 900px) {
  .imlu-hero-outer { padding: 20px 24px 0; }
}

@media (max-width: 576px) {
  .imlu-hero-outer { padding: 16px 12px 0; }
  #imlu-map { height: 300px; }
  #imlu-preview-map { height: 180px; }
  .imlu-timer-tile { padding: 10px 14px; min-width: 58px; }
  .imlu-timer-tile .num { font-size: 20px; }
  .imlu-stat-card { padding: 12px; }
  .imlu-stat-card .num { font-size: 1.1rem; }
}

.imlu-support-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid #eceae3;
  border-radius: 12px;
  padding: 10px 16px;
  flex-wrap: wrap;
}
.imlu-support-row .imlu-support-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #9a9a94;
  margin-right: 4px;
  white-space: nowrap;
}
.imlu-support-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #e4e2d9;
  border-radius: 999px;
  padding: 6px 14px 6px 10px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--imlu-cobalt);
  background: #fbfaf7;
}
.imlu-support-chip:hover { background: #f1f3f6; color: var(--imlu-cobalt); text-decoration: none; }
.imlu-support-chip .arrow { color: #b7b7b0; font-size: .7rem; margin-left: 2px; }

.imlu-tollfree-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  border-radius: 999px;
  padding: 6px 14px 6px 10px;
  font-size: .8rem;
  font-weight: 700;
  color: #791F1F;
  background: #FCEBEB;
  margin-left: auto;
}
.imlu-tollfree-chip:hover { color: #791F1F; text-decoration: none; }

.imlu-warning-banner {
  background: #FCEBEB;
  border: 1px solid #f0c2c2;
  border-radius: 10px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.imlu-warning-banner .title { font-weight: 600; font-size: .85rem; color: #791F1F; }
.imlu-warning-banner .desc { font-size: .8rem; color: #A32D2D; }

.imlu-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  background: #fff;
  border: 1px solid #eceae3;
  border-radius: 12px;
  padding: 14px 16px;
}
.imlu-filter-bar-centered {
  justify-content: center;
}
.imlu-filter-date-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #7a7a75;
  font-weight: 600;
}
.imlu-filter-bar select,
.imlu-filter-bar input {
  border: 1px solid #e4e2d9;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: .78rem;
  background: #f5f4ef;
  color: #444;
}
.imlu-filter-bar select { min-width: 130px; }
.imlu-filter-bar input[type="date"] { min-width: 130px; }
.imlu-filter-bar input[type="text"] { min-width: 130px; }

.imlu-evidence-thumb {
  width: 110px; height: 74px; border-radius: 6px; object-fit: cover; background: #e4e9f2;
}

/* ---- Website chatbot widget ---- */

#imlu-chat-toggle {
  position: fixed;
  bottom: 22px;
  right: 22px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--imlu-red);
  color: #fff;
  border: none;
  box-shadow: 0 6px 16px rgba(200,16,46,.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  z-index: 1050;
}

#imlu-chat-window {
  position: fixed;
  bottom: 90px;
  right: 22px;
  width: 320px;
  max-width: calc(100vw - 32px);
  max-height: min(420px, calc(100vh - 140px));
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 1050;
}

@media (max-width: 420px) {
  #imlu-chat-window { right: 16px; bottom: 82px; }
  #imlu-chat-toggle { right: 16px; bottom: 16px; }
}
#imlu-chat-window.open { display: flex; }

#imlu-chat-header {
  background: var(--imlu-cobalt);
  color: #fff;
  padding: 12px 16px;
  font-size: .85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

#imlu-chat-messages {
  padding: 14px;
  overflow-y: auto;
  flex: 1;
  font-size: .8rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 260px;
}

.imlu-chat-bubble-bot {
  background: #f1f3f6;
  border-radius: 10px 10px 10px 2px;
  padding: 8px 12px;
  max-width: 85%;
}
.imlu-chat-bubble-user {
  background: #E6F1FB;
  color: #0C447C;
  border-radius: 10px 10px 2px 10px;
  padding: 8px 12px;
  max-width: 85%;
  margin-left: auto;
}
.imlu-chat-suggestions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.imlu-chat-suggestion-btn {
  border: 1px solid var(--imlu-cobalt);
  color: var(--imlu-cobalt);
  background: #fff;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: .78rem;
  text-align: center;
  cursor: pointer;
}
.imlu-chat-suggestion-btn:hover { background: #E6F1FB; }

#imlu-chat-form {
  padding: 10px 14px;
  border-top: 1px solid #e9ecef;
  display: flex;
  gap: 8px;
}
