/* ===================================================================
   Design tokens — "Harbor" palette (deeper, richer navy than the
   earlier low-contrast Mist direction). Every page built from here on
   should reference these tokens rather than hardcoding hex values,
   so a future palette swap is a one-file change again.
   =================================================================== */
:root {
  --brand-1: #1b3a5c;
  --brand-2: #0f2438;
  --brand-accent: #2f6690;
  --brand-accent-soft: #e3ecf2;
  --brand-accent-ink: #ffffff;
  --ink-900: #1c2b3a;
  --ink-600: #5b6b7a;
  --border-soft: #dbe3ea;
  --surface: #ffffff;
  --surface-tint: #f2f6f9;
  --page-bg: #eef2f6;
  --status-danger: #c0392b;
  --status-danger-soft: #f7dedc;
  --status-success: #1f7a52;
  --status-success-soft: #dcf0e5;
  --status-neutral: #8894a0;
  --status-neutral-soft: #ebeef1;
  --status-warn: #ad7a35;
  --status-warn-soft: #f2e8d8;

  /* Retint Bootstrap's own primary color (buttons, text-primary,
     bg-primary, badges, etc.) to match Harbor across the whole app,
     since Bootstrap 5.3's component CSS is built on these variables. */
  --bs-primary: #2f6690;
  --bs-primary-rgb: 47, 102, 144;
  --bs-link-color: #2f6690;
  --bs-link-color-rgb: 47, 102, 144;
  --bs-link-hover-color: #234d6d;
  --bs-link-hover-color-rgb: 35, 77, 109;

  /* Round buttons, cards, inputs and dropdowns to the same radius as the
     workbench panes/cards, since Bootstrap's own components read this
     variable as their base radius. */
  --bs-border-radius-sm: 0.375rem;
  --bs-border-radius: 0.625rem;
  --bs-border-radius-lg: 0.75rem;

  /* Bootstrap's prebuilt CDN CSS bakes these "subtle"/"text-emphasis" tokens
     in as static hex (not derived from --bs-primary), so card-headers using
     bg-secondary-subtle/bg-primary-subtle and the accordion's expanded state
     (which reads --bs-primary-bg-subtle / --bs-primary-text-emphasis) would
     otherwise stay Bootstrap-default blue/grey instead of following Mist. */
  --bs-primary-bg-subtle: var(--brand-accent-soft);
  --bs-secondary-bg-subtle: var(--brand-accent-soft);
  --bs-primary-text-emphasis: var(--ink-900);
}

/* Bootstrap sets --bs-accordion-btn-focus-box-shadow as a literal (not a
   var() reference) directly on .accordion, so a :root override can't reach
   it - it has to be redeclared on the same selector. */
.accordion {
  --bs-accordion-btn-focus-box-shadow: 0 0 0 0.25rem rgba(82, 104, 124, 0.25);
  --bs-accordion-border-color: var(--border-soft);
}

#spinner {
  position: absolute;
  z-index: 9999;
  top: 0%;
  left: 0%;
  width: 100vw;
  height: 100vh;
  background: black;
  opacity: 0.25;
}
html {

  font-size: 14px

}

#check1{
  background-color: rebeccapurple;
}

#loader {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: block;
  margin: 0 auto;
  top:50%;
  position: relative;
  color: #0167ca;
  box-sizing: border-box;
  animation: animloader 2s linear infinite;
}

@keyframes animloader {
  0% {
    box-shadow: 14px 0 0 -2px,  38px 0 0 -2px,  -14px 0 0 -2px,  -38px 0 0 -2px;
  }
  25% {
    box-shadow: 14px 0 0 -2px,  38px 0 0 -2px,  -14px 0 0 -2px,  -38px 0 0 2px;
  }
  50% {
    box-shadow: 14px 0 0 -2px,  38px 0 0 -2px,  -14px 0 0 2px,  -38px 0 0 -2px;
  }
  75% {
    box-shadow: 14px 0 0 2px,  38px 0 0 -2px,  -14px 0 0 -2px,  -38px 0 0 -2px;
  }
  100% {
    box-shadow: 14px 0 0 -2px,  38px 0 0 2px,  -14px 0 0 -2px,  -38px 0 0 -2px;
  }
}

.headingbackground{
  background: transparent !important;
  background-image: none !important;
  border: none !important;
  border-bottom: 1px solid var(--border-soft) !important;
  border-radius: 0 !important;
  padding: 6px 2px 14px !important;
  margin-bottom: 4px;
}
.headingbackground h5{
  color: var(--ink-900) !important;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}



.modal_background{
  background-color: #ffffff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 2000 1500'%3E%3Cdefs%3E%3Crect stroke='%23ffffff' stroke-width='0.3' width='1' height='1' id='s'/%3E%3Cpattern id='a' width='3' height='3' patternUnits='userSpaceOnUse' patternTransform='scale(13.35) translate(-925.09 -693.82)'%3E%3Cuse fill='%23fcfcfc' href='%23s' y='2'/%3E%3Cuse fill='%23fcfcfc' href='%23s' x='1' y='2'/%3E%3Cuse fill='%23fafafa' href='%23s' x='2' y='2'/%3E%3Cuse fill='%23fafafa' href='%23s'/%3E%3Cuse fill='%23f7f7f7' href='%23s' x='2'/%3E%3Cuse fill='%23f7f7f7' href='%23s' x='1' y='1'/%3E%3C/pattern%3E%3Cpattern id='b' width='7' height='11' patternUnits='userSpaceOnUse' patternTransform='scale(13.35) translate(-925.09 -693.82)'%3E%3Cg fill='%23f5f5f5'%3E%3Cuse href='%23s'/%3E%3Cuse href='%23s' y='5' /%3E%3Cuse href='%23s' x='1' y='10'/%3E%3Cuse href='%23s' x='2' y='1'/%3E%3Cuse href='%23s' x='2' y='4'/%3E%3Cuse href='%23s' x='3' y='8'/%3E%3Cuse href='%23s' x='4' y='3'/%3E%3Cuse href='%23s' x='4' y='7'/%3E%3Cuse href='%23s' x='5' y='2'/%3E%3Cuse href='%23s' x='5' y='6'/%3E%3Cuse href='%23s' x='6' y='9'/%3E%3C/g%3E%3C/pattern%3E%3Cpattern id='h' width='5' height='13' patternUnits='userSpaceOnUse' patternTransform='scale(13.35) translate(-925.09 -693.82)'%3E%3Cg fill='%23f5f5f5'%3E%3Cuse href='%23s' y='5'/%3E%3Cuse href='%23s' y='8'/%3E%3Cuse href='%23s' x='1' y='1'/%3E%3Cuse href='%23s' x='1' y='9'/%3E%3Cuse href='%23s' x='1' y='12'/%3E%3Cuse href='%23s' x='2'/%3E%3Cuse href='%23s' x='2' y='4'/%3E%3Cuse href='%23s' x='3' y='2'/%3E%3Cuse href='%23s' x='3' y='6'/%3E%3Cuse href='%23s' x='3' y='11'/%3E%3Cuse href='%23s' x='4' y='3'/%3E%3Cuse href='%23s' x='4' y='7'/%3E%3Cuse href='%23s' x='4' y='10'/%3E%3C/g%3E%3C/pattern%3E%3Cpattern id='c' width='17' height='13' patternUnits='userSpaceOnUse' patternTransform='scale(13.35) translate(-925.09 -693.82)'%3E%3Cg fill='%23f2f2f2'%3E%3Cuse href='%23s' y='11'/%3E%3Cuse href='%23s' x='2' y='9'/%3E%3Cuse href='%23s' x='5' y='12'/%3E%3Cuse href='%23s' x='9' y='4'/%3E%3Cuse href='%23s' x='12' y='1'/%3E%3Cuse href='%23s' x='16' y='6'/%3E%3C/g%3E%3C/pattern%3E%3Cpattern id='d' width='19' height='17' patternUnits='userSpaceOnUse' patternTransform='scale(13.35) translate(-925.09 -693.82)'%3E%3Cg fill='%23ffffff'%3E%3Cuse href='%23s' y='9'/%3E%3Cuse href='%23s' x='16' y='5'/%3E%3Cuse href='%23s' x='14' y='2'/%3E%3Cuse href='%23s' x='11' y='11'/%3E%3Cuse href='%23s' x='6' y='14'/%3E%3C/g%3E%3Cg fill='%23efefef'%3E%3Cuse href='%23s' x='3' y='13'/%3E%3Cuse href='%23s' x='9' y='7'/%3E%3Cuse href='%23s' x='13' y='10'/%3E%3Cuse href='%23s' x='15' y='4'/%3E%3Cuse href='%23s' x='18' y='1'/%3E%3C/g%3E%3C/pattern%3E%3Cpattern id='e' width='47' height='53' patternUnits='userSpaceOnUse' patternTransform='scale(13.35) translate(-925.09 -693.82)'%3E%3Cg fill='%23CFE2FF'%3E%3Cuse href='%23s' x='2' y='5'/%3E%3Cuse href='%23s' x='16' y='38'/%3E%3Cuse href='%23s' x='46' y='42'/%3E%3Cuse href='%23s' x='29' y='20'/%3E%3C/g%3E%3C/pattern%3E%3Cpattern id='f' width='59' height='71' patternUnits='userSpaceOnUse' patternTransform='scale(13.35) translate(-925.09 -693.82)'%3E%3Cg fill='%23CFE2FF'%3E%3Cuse href='%23s' x='33' y='13'/%3E%3Cuse href='%23s' x='27' y='54'/%3E%3Cuse href='%23s' x='55' y='55'/%3E%3C/g%3E%3C/pattern%3E%3Cpattern id='g' width='139' height='97' patternUnits='userSpaceOnUse' patternTransform='scale(13.35) translate(-925.09 -693.82)'%3E%3Cg fill='%23CFE2FF'%3E%3Cuse href='%23s' x='11' y='8'/%3E%3Cuse href='%23s' x='51' y='13'/%3E%3Cuse href='%23s' x='17' y='73'/%3E%3Cuse href='%23s' x='99' y='57'/%3E%3C/g%3E%3C/pattern%3E%3C/defs%3E%3Crect fill='url(%23a)' width='100%25' height='100%25'/%3E%3Crect fill='url(%23b)' width='100%25' height='100%25'/%3E%3Crect fill='url(%23h)' width='100%25' height='100%25'/%3E%3Crect fill='url(%23c)' width='100%25' height='100%25'/%3E%3Crect fill='url(%23d)' width='100%25' height='100%25'/%3E%3Crect fill='url(%23e)' width='100%25' height='100%25'/%3E%3Crect fill='url(%23f)' width='100%25' height='100%25'/%3E%3Crect fill='url(%23g)' width='100%25' height='100%25'/%3E%3C/svg%3E");
  background-attachment: fixed;
  background-size: cover;
}

#main_window {
  max-width: 100vw;
  height: 100vh;
  padding: 20px;
  margin-top: 0;
  margin-left: 76px;
  display: flex;
  flex-direction: column;
}

@media (max-width: 768px) {
  #main_window {
    margin-left: 0;
    height: auto;
    padding-bottom: 76px;
  }
}

.tooltip {
  position: relative;
  display: inline-block;
  border-bottom: 1px dotted black;
}

.tooltip .tooltiptext {
  visibility: hidden;
  width: 120px;
  background-color: black;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 5px 0;
  
  /* Position the tooltip */
  position: absolute;
  z-index: 1;
  bottom: 100%;
  left: 50%;
  margin-left: -60px;
}

.tooltip:hover .tooltiptext {
  visibility: visible;
}

.pol-view { font-family: 'Segoe UI', system-ui, sans-serif; color: var(--ink-900); background: var(--page-bg); padding: 16px 18px; border-radius: 14px; }
.pol-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.pol-title { font-size: 18px; font-weight: 700; }
.pol-sub { font-size: 13px; color: var(--ink-600); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.pill-info { background: var(--brand-accent-soft); color: var(--brand-accent); }
.pill-muted { background: var(--status-neutral-soft); color: var(--ink-600); }
.pill-success { background: var(--status-success-soft); color: var(--status-success); }
.pill-danger { background: var(--status-danger-soft); color: var(--status-danger); }

.pol-timeline { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 12px; background: var(--surface); border: 1px solid var(--border-soft); border-radius: 12px; margin-bottom: 14px; }
.pol-step { text-align: center; position: relative; padding-top: 6px; }
.pol-step-dot { width: 10px; height: 10px; border-radius: 50%; background: #cbd0d4; margin: 0 auto 6px; }
.pol-step.active .pol-step-dot { background: var(--brand-accent); }
.pol-step-label { font-size: 11px; color: var(--ink-600); text-transform: uppercase; letter-spacing: 0.4px; }
.pol-step-date { font-size: 12px; font-weight: 600; color: var(--ink-900); }

.pol-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.pol-card { background: var(--surface); border: 1px solid var(--border-soft); border-radius: 12px; padding: 12px; }
.pol-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.4px; color: var(--ink-600); }
.pol-value { font-size: 14px; font-weight: 600; color: var(--ink-900); }
.mt-1 { margin-top: 4px; }

.pol-section { margin-top: 14px; }
.pol-section-title { font-size: 13px; font-weight: 700; color: var(--ink-900); margin-bottom: 8px; }
.pol-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border-soft); font-size: 13px; }
.chip-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.chip-green { background: var(--status-success); }
.chip-blue  { background: var(--brand-accent); }
.chip-text { color: var(--ink-900); }
.chip-action { color: var(--brand-accent); font-weight: 600; cursor: pointer; text-decoration: none; }
.chip-action:hover { text-decoration: none; }
.chip-action i { color: var(--status-success); }

/* Dashboard: greeting header */
.dash-greeting {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 16px 22px;
}
.dash-greeting-brand { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand-accent); margin-bottom: 3px; }
.dash-greeting h4 { font-size: 1.3rem; font-weight: 800; margin: 0; color: var(--ink-900); }
.dash-greeting p { margin: 2px 0 0; color: var(--ink-600); font-size: 0.86rem; }
.dash-greeting-icons { display: flex; align-items: center; gap: 18px; color: var(--ink-600); font-size: 1.1rem; }
.dash-greeting-icons i { cursor: pointer; }
.dash-greeting-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--brand-accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.95rem;
  padding: 0; cursor: pointer;
}

/* Dashboard: KPI stat tiles (white cards, mockup style) */
.dash-stat-tile {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 20px 22px;
  height: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 10px 24px -18px rgba(27, 58, 92, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  text-decoration: none;
  color: inherit;
}
.dash-stat-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -16px rgba(27, 58, 92, 0.4);
}
.dash-stat-value { font-size: 3.2rem; font-weight: 800; color: var(--ink-900); line-height: 1; }
.dash-stat-label { font-size: 0.92rem; color: var(--ink-600); margin-top: 6px; }
.dash-stat-delta { flex: none; font-size: 1rem; font-weight: 700; margin-top: 4px; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.dash-stat-delta.up { color: var(--status-success); }
.dash-stat-delta.down { color: var(--status-danger); }
.dash-stat-delta i { font-size: 0.8rem; }
.dash-stat-delta .dash-delta-context { color: var(--ink-600); font-weight: 500; }

/* Bootstrap's row-cols-* utilities stop at 6, so the 7-tile KPI strip needs
   its own equal-sevenths rule on wide screens (4+3 wrap below that). */
@media (min-width: 1400px) {
  .dash-kpi-row > .col { flex: 0 0 auto; width: 14.2857%; }
  .dash-kpi-row .dash-stat-value { font-size: 2.4rem; }
}

/* Calendar-style "today" tile at the start of the KPI strip */
.dash-date-tile {
  background: linear-gradient(160deg, var(--brand-1), var(--brand-2));
  cursor: default;
}
.dash-date-tile .dash-stat-value { color: #fff; }
.dash-date-tile .dash-stat-label { color: rgba(255, 255, 255, 0.75); }
.dash-date-weekday {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 4px;
}

/* Dashboard: generic card polish - softer shadow than the app-wide default */
.dash-card {
  border-radius: 14px;
  border: 1px solid var(--border-soft);
  box-shadow: 0 12px 28px -20px rgba(27, 58, 92, 0.3);
}

/* Dashboard: list rows shared by Top Customers / Recent Inward / Upcoming Renewals */
.dash-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.dash-card-header h6 { font-weight: 800; margin: 0; color: var(--ink-900); }
.dash-card-header h6 i { color: var(--brand-accent); margin-right: 6px; }
.dash-card-link { font-size: 0.8rem; font-weight: 700; color: var(--brand-accent); text-decoration: none; }
.dash-card-link:hover { text-decoration: underline; }
.dash-list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border-soft);
}
.dash-list-row:last-child { border-bottom: none; }
.dash-avatar {
  flex: none;
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.78rem; font-weight: 700; color: #fff;
}
.dash-list-main { flex: 1; min-width: 0; }
.dash-list-title { font-size: 0.86rem; font-weight: 700; color: var(--ink-900); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-list-sub { font-size: 0.76rem; color: var(--ink-600); }
.dash-list-value { font-size: 0.86rem; font-weight: 700; color: var(--ink-900); white-space: nowrap; }
.dash-list-empty { color: var(--ink-600); font-style: italic; font-size: 0.86rem; padding: 10px 0; }

.dash-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 0.72rem; font-weight: 700;
}
.dash-chip.success { background: var(--status-success-soft); color: var(--status-success); }
.dash-chip.warn { background: var(--status-warn-soft); color: var(--status-warn); }
.dash-chip.danger { background: var(--status-danger-soft); color: var(--status-danger); }
.dash-chip.neutral { background: var(--status-neutral-soft); color: var(--ink-600); }

.dash-task-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.dash-task-check {
  flex: none; width: 20px; height: 20px; border-radius: 5px;
  background: var(--brand-accent-soft); color: var(--brand-accent);
  display: flex; align-items: center; justify-content: center; font-size: 0.7rem;
}
.dash-task-label { font-size: 0.86rem; font-weight: 600; color: var(--ink-900); flex: 1; }
.dash-task-due { font-size: 0.74rem; font-weight: 700; color: var(--status-danger); }

/* Dashboard: chart metric/granularity segmented controls */
.dash-seg {
  display: inline-flex;
  background: var(--surface-tint);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}
.dash-seg button {
  border: none;
  background: transparent;
  color: var(--ink-600);
  font-size: 0.76rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}
.dash-seg button.active {
  background: var(--brand-accent);
  color: #fff;
}
.dash-seg-sm button { padding: 3px 9px; font-size: 0.7rem; }

.dash-donut-wrap { flex: none; width: 120px; height: 120px; position: relative; }
.dash-donut-wrap-sm { width: 84px; height: 84px; }
.dash-donut-legend { display: flex; flex-direction: column; gap: 8px; justify-content: center; min-width: 0; }
.dash-donut-legend-row { display: flex; align-items: center; gap: 8px; font-size: 0.82rem; }
.dash-donut-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.dash-donut-legend-row .lbl { color: var(--ink-600); }
.dash-donut-legend-row .val { font-weight: 700; color: var(--ink-900); margin-left: auto; }

/* Dashboard: 3-across mini donuts (Portfolio Mix card) */
.dash-mix-row { display: flex; align-items: stretch; justify-content: space-between; gap: 8px; height: 100%; }
.dash-mix-cell { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.dash-mix-cell canvas { width: 110px !important; height: 110px !important; }
.dash-mix-title { font-size: 0.72rem; color: var(--ink-600); text-align: center; line-height: 1.15; }

/* Dashboard: fixed-height chart wrapper (e.g. Top Insurers bar chart) */
/* Fixed (not min-) height is required here: Chart.js responsive resize
   measures this container, and if the container's own height depends on
   the canvas (e.g. via height:100% up an auto-height ancestor chain), the
   two feed back into each other and the chart grows taller on every layout
   pass. A hard pixel height breaks that loop. */
/* Top Insurers chart fills whatever height its card gets (the card splits
   the right column with Portfolio Mix), instead of a fixed height that left
   dead space below. flex-basis 0 + overflow hidden keep the canvas from
   feeding its own height back into the card - the infinite-grow bug this
   chart had once before (todo #53) - height is allocation-driven only. */
.dash-chart-sm {
  flex: 1 1 0;
  min-height: 96px;
  overflow: hidden;
  position: relative;
}
#topInsurersBody {
  padding: 2px 12px 10px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.dash-card .dash-card-header { margin-bottom: 6px; }

/* Support / contact page */
.support-wrap {
  margin-top: 20px;
  display: flex;
  align-items: stretch;
  gap: 20px;
  flex: 1;
  min-height: 0;
}
.support-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  box-shadow: 0 12px 28px -20px rgba(27, 58, 92, 0.3);
  padding: 22px 24px;
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.support-link-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}
.support-link-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.88rem;
  color: var(--ink-900);
  text-decoration: none;
}
a.support-link-row:hover { background: var(--surface-tint); color: var(--brand-accent); }
.support-link-row i { color: var(--brand-accent); flex: none; }
.support-link-row-muted { color: var(--ink-600); }
.support-link-row-muted i { color: var(--ink-600); }
.support-link-sub { display: block; font-size: 0.76rem; color: var(--ink-600); margin-top: 1px; }
.support-card-title { font-weight: 800; color: var(--ink-900); margin-bottom: 2px; }
.support-card-sub { font-size: 0.84rem; color: var(--ink-600); margin-bottom: 18px; }

.support-action-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  margin-bottom: 12px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.support-action-btn:last-child { margin-bottom: 0; }
.support-action-btn:hover {
  transform: translateY(-2px);
  border-color: var(--brand-accent);
  box-shadow: 0 10px 22px -16px rgba(27, 58, 92, 0.4);
}
.support-action-icon {
  flex: none;
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--brand-accent);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
}
.support-action-label { display: block; font-weight: 700; color: var(--ink-900); font-size: 0.92rem; }
.support-action-sub { display: block; font-size: 0.8rem; color: var(--ink-600); margin-top: 1px; }

/* Address/hours aren't real data yet - a visibly muted badge + cursor marks
   the row as an unfilled slot rather than something fabricated to look genuine. */
.support-action-btn-placeholder { cursor: default; }
.support-action-btn-placeholder:hover {
  transform: none;
  border-color: var(--border-soft);
  box-shadow: none;
}
.support-action-btn-placeholder .support-action-icon {
  background: var(--status-neutral-soft);
  color: var(--status-neutral);
}
.support-info-placeholder-text { font-weight: 500; font-style: italic; color: var(--ink-600); }

@media (max-width: 768px) {
  .support-wrap { flex-direction: column; }
  .support-card { flex: none; }
  .support-link-list { max-height: 320px; }
  .support-info-grid { grid-template-columns: 1fr; }

  /* KPI tiles: stack value over delta so the nowrap delta text can't
     spill past the card edge on narrow screens */
  .dash-stat-tile { flex-direction: column; align-items: flex-start; gap: 6px; padding: 16px 18px; }
  .dash-stat-value { font-size: 2.2rem; }
  .dash-stat-delta { white-space: normal; margin-top: 0; font-size: 0.9rem; }
}

/* ===================================================================
   Icon rail (replaces the push-sidebar as global nav chrome)
   =================================================================== */
.app-rail {
  position: fixed;
  top: 0;
  left: 0;
  width: 60px;
  height: 100vh;
  background-image: linear-gradient(to bottom, var(--brand-1), var(--brand-2));
  box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .15);
  z-index: 1030;
  overflow-y: auto;
  overflow-x: visible;
}
.app-rail-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 60px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  margin-bottom: 6px;
}
.app-rail-brand img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  border-radius: 8px;
}
.app-rail-list {
  list-style: none;
  margin: 0;
  padding: 10px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.app-rail-item {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
}
.app-rail-icon {
  position: relative;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: #ffffff;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.app-rail-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--status-danger);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}
.app-rail-icon:hover,
.app-rail-icon[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}
/* Marks the current page's rail icon. Pages set this today via
   classList.add("fst-italic")/("fs-bolder") on the menulist_* id, a
   convention kept from the old flyout-text-link design - re-purposed here
   as the "you are here" highlight for a flat icon link. */
.app-rail-icon.fst-italic,
.app-rail-icon.fs-bolder {
  background: rgba(255, 255, 255, 0.32);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}
.app-rail-divider {
  width: 30px;
  height: 1px;
  background: rgba(255, 255, 255, 0.3);
  margin: 6px 0;
}
.app-rail-flyout {
  list-style: none;
  margin: 0;
  padding: 8px 0;
  position: absolute;
  left: 100%;
  top: 0;
  min-width: 210px;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 .5rem 1.5rem rgba(0, 0, 0, .25);
  z-index: 1031;
}
.app-rail-flyout-title {
  padding: 4px 16px 8px;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
}
.app-rail-flyout-link {
  display: block;
  padding: 8px 16px;
  color: #1f2937;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.app-rail-flyout-link:hover {
  background: #f1f5f9;
}
.app-rail-home {
  position: fixed;
  left: 9px;
  bottom: 14px;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-size: 1.15rem;
  z-index: 1030;
  text-decoration: none;
}
.app-rail-home:hover {
  background: rgba(255, 255, 255, 0.3);
  color: #ffffff;
}

@media (max-width: 768px) {
  .app-rail-brand {
    display: none;
  }
  .app-rail {
    top: auto;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 56px;
    overflow: visible;
  }
  .app-rail-list {
    flex-direction: row;
    /* 9+ icons don't fit a phone width - let the bar scroll sideways
       instead of piling icons under the fixed Home button */
    justify-content: flex-start;
    overflow-x: auto;
    padding: 6px 8px;
    width: 100%;
    /* keep the scroll end clear of the fixed Home button at bottom-right */
    padding-right: 64px;
  }
  .app-rail-item { width: auto; flex: none; }
  .app-rail-flyout {
    left: 0;
    right: 0;
    top: auto;
    bottom: 56px;
    min-width: 0;
    width: 100%;
    border-radius: 12px 12px 0 0;
  }
  .app-rail-home {
    left: auto;
    right: 8px;
    bottom: 8px;
  }
}

/* ===================================================================
   Workbench shell: worklist + persistent detail pane
   =================================================================== */
.workbench {
  display: flex;
  align-items: stretch;
  gap: 16px;
  flex: 1;
  min-height: 60vh;
  overflow: hidden;
}
.wb-worklist {
  flex: none;
  width: 460px;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--surface-tint);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  overflow: hidden;
}
/* Reports: the worklist is just a handful of report-type names, not detailed
   records - a narrower rail leaves far more room for the results table
   (todo #97, more so now that vehicle-detail columns widen every register). */
.wb-worklist-narrow {
  width: 220px;
}
.wb-worklist-search {
  padding: 12px;
  border-bottom: 1px solid var(--border-soft);
}
.wb-worklist-body {
  overflow-y: auto;
  flex: 1;
  min-height: 200px;
}
.wb-worklist-row {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  border-bottom: 1px solid var(--border-soft);
  border-left: 4px solid transparent;
  padding: 10px 14px;
  cursor: pointer;
}
.wb-worklist-row:hover {
  background: var(--surface);
}
.wb-worklist-row.wb-row-active {
  background: var(--brand-accent-soft);
  border-left-color: var(--brand-accent);
}
/* Selected row: also tint the left border with the same color as its
   status dot, on top of the existing light shading. */
.wb-worklist-row.wb-row-active:has(.wb-row-dot-pending),
.wb-worklist-row.wb-row-active:has(.wb-row-dot-expired) {
  border-left-color: var(--status-danger);
}
.wb-worklist-row.wb-row-active:has(.wb-row-dot-converted),
.wb-worklist-row.wb-row-active:has(.wb-row-dot-active) {
  border-left-color: var(--status-success);
}
.wb-worklist-row.wb-row-active:has(.wb-row-dot-deleted) {
  border-left-color: var(--status-neutral);
}
.wb-row-top {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.9rem;
}
.wb-row-id {
  margin-left: auto;
  font-weight: 600;
  color: var(--ink-600);
  font-size: 0.78rem;
}
.wb-row-sub {
  font-size: 0.78rem;
  color: var(--ink-600);
  margin-top: 2px;
}
.wb-row-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: none;
  background: var(--status-neutral);
}
.wb-row-dot-pending { background: var(--status-danger); }
.wb-row-dot-converted { background: var(--status-success); }
.wb-row-dot-deleted { background: var(--status-neutral); }
.wb-row-dot-active { background: var(--status-success); }
.wb-row-dot-expired { background: var(--status-danger); }
.wb-row-actions {
  margin-top: 6px;
  display: flex;
  gap: 6px;
}
.wb-worklist-empty {
  padding: 24px 16px;
  color: var(--ink-600);
  text-align: center;
  font-size: 0.85rem;
}
.wb-detail {
  flex: 1;
  min-width: 0;
  min-height: 0;
  background: var(--surface-tint);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 18px 20px;
  overflow-y: auto;
}
.wb-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.wb-empty-state {
  height: 100%;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--ink-600);
  text-align: center;
  gap: 8px;
}
.wb-back-btn {
  display: none;
}

@media (max-width: 768px) {
  .workbench {
    flex-direction: column;
  }
  .wb-worklist,
  .wb-detail {
    width: 100%;
  }
  .wb-hide-mobile {
    display: none !important;
  }
  .wb-back-btn {
    display: inline-flex;
  }
}
