/* ============================================================
   Borem Core — ServiceTrade-Faithful UI  v3.17
   Matches the ServiceTrade app aesthetic 1:1:
     - White sidebar with collapsible nav groups
     - Orange (#f05a28) accent for active states
     - Clean white content with subtle cards
     - Full expand/collapse sidebar with toggle
   ============================================================ */

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  --st-orange:      #f05a28;
  --st-orange-soft: #fff3ef;
  --borem-nav-active-color: var(--st-orange);
  --borem-nav-active-indicator: var(--st-orange);
  --borem-nav-active-bg: var(--st-orange-soft);
  --st-orange-mid:  #fde0d5;
  --st-blue:        #0d6efd;
  --st-blue-link:   #1a6cbf;
  --st-bg:          #f4f6f8;
  --st-surface:     #ffffff;
  --st-border:      #e0e4e8;
  --st-border-md:   #ccd2d8;
  --st-text:        #1c2733;
  --st-text-muted:  #6b7a8d;
  --st-text-label:  #8a95a0;
  /* Aliases — keep these last so they reference vars above */
  --st-card:   var(--st-surface);     /* alias: card backgrounds */
  --st-muted:  var(--st-text-muted);  /* alias: muted/dim text   */
  --db-slots:  28;                     /* dispatch board columns (overridden inline) */
  --st-shadow-sm:   0 1px 3px rgba(16,24,40,.07), 0 1px 2px rgba(16,24,40,.06);
  --st-shadow-md:   0 4px 8px rgba(16,24,40,.08), 0 1px 3px rgba(16,24,40,.06);
  --st-r:           8px;
  --st-r-sm:        6px;
  /* Sidebar dims */
  --st-sidebar-w:   220px;
  --st-sidebar-w-c: 64px;
}
[data-borem-theme="dark"] {
  --st-bg:         #0f1720;
  --st-surface:    #16202b;
  --st-border:     #2b3a49;
  --st-border-md:  #3d5063;
  --st-text:       #e8edf2;
  --st-text-muted: #94a3b8;
  --st-text-label: #607080;
  --st-shadow-sm:  0 1px 3px rgba(0,0,0,.3);
  --st-shadow-md:  0 4px 8px rgba(0,0,0,.32);
  --st-orange-soft:#2a1a14;
  --st-orange-mid: #3a2218;
  --st-card:   #1d2b38;               /* dark card background */
  --st-muted:  var(--st-text-muted);  /* alias */
}

/* ── Reset (scoped to .borem-app) ───────────────────────────── */
.borem-app, .borem-app * { box-sizing: border-box; }
.borem-app {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  color: var(--st-text);
  background: var(--st-bg);
  min-height: 100vh;
  /* Mobile: natural height so the page body can scroll */
}
.borem-app :where(h1,h2,h3,h4,h5,h6,p,ul,ol,li,dl) { margin:0; padding:0; }
.borem-app :where(ul,ol) { list-style: none; }
.borem-app a, .borem-app a:visited { color: var(--st-blue-link); text-decoration: none; }
.borem-app a:hover { text-decoration: underline; }
.borem-app button, .borem-app input, .borem-app select, .borem-app textarea {
  font: inherit; color: inherit; margin: 0; background-image: none;
}
.borem-app button { cursor: pointer; }
.borem-app img { max-width: 100%; border: 0; }
.borem-app table { border-collapse: separate; border-spacing: 0; }

/* ── App Layout ─────────────────────────────────────────────── */
@media (min-width: 980px) {
  /* Desktop: full-height locked layout — main area scrolls independently */
  .borem-app {
    display: flex;
    height: 100vh;
    overflow: hidden;
  }
}

/* ================================================================
   SIDEBAR  — ServiceTrade white sidebar with collapse support
   ================================================================ */
.borem-sidebar {
  width: var(--st-sidebar-w);
  flex: 0 0 var(--st-sidebar-w);
  background: var(--st-surface);
  border-right: 1px solid var(--st-border);
  display: none;
  flex-direction: column;
  overflow: hidden;
  transition: width .22s ease, flex-basis .22s ease;
  position: relative;
  z-index: 20;
}
@media (min-width: 980px) {
  .borem-sidebar { display: flex; }
}

/* Collapsed state */
.borem-app.sidebar-collapsed .borem-sidebar {
  width: var(--st-sidebar-w-c);
  flex-basis: var(--st-sidebar-w-c);
}
.borem-app.sidebar-collapsed .borem-nav-text,
.borem-app.sidebar-collapsed .borem-nav-group-label,
.borem-app.sidebar-collapsed .borem-logo-wordmark,
.borem-app.sidebar-collapsed .borem-sidebar-profile-info,
.borem-app.sidebar-collapsed .borem-nav-children,
.borem-app.sidebar-collapsed .borem-nav-caret,
.borem-app.sidebar-collapsed .borem-nav-section-sep { display: none !important; }
.borem-app.sidebar-collapsed .borem-nav-link { justify-content: center; padding: 8px 0; }
.borem-app.sidebar-collapsed .borem-nav-ico { margin: 0; }
.borem-app.sidebar-collapsed .borem-logo { justify-content: center; padding: 14px 0 12px; }
.borem-app.sidebar-collapsed .borem-sidebar-footer { justify-content: center; padding: 10px 0; }
.borem-app.sidebar-collapsed .borem-sidebar-avatar { margin: 0; }

/* ── Logo ────────── */
.borem-logo {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--st-border);
  flex-shrink: 0;
}
.borem-logo-img { width: 32px; height: 32px; object-fit: contain; flex-shrink: 0; display: block; }
.borem-logo-wordmark {
  font-size: 16px; font-weight: 800; letter-spacing: .01em;
  color: var(--st-text); white-space: nowrap; overflow: hidden;
}

/* ── Sidebar toggle button (double-chevron, top-right of sidebar) ── */
.borem-sidebar-toggle-wrap {
  position: absolute; top: 14px; right: 10px; z-index: 5;
}
.borem-app.sidebar-collapsed .borem-sidebar-toggle-wrap { right: 0; left: 0; top: 14px; display: flex; justify-content: center; }
#borem-sidebar-toggle {
  background: transparent; border: 1px solid var(--st-border); border-radius: 5px;
  width: 26px; height: 26px; display: flex; align-items: center; justify-content: center;
  color: var(--st-text-muted); transition: background .12s, color .12s, border-color .12s;
  padding: 0; flex-shrink: 0;
}
#borem-sidebar-toggle:hover { background: var(--st-orange-soft); border-color: var(--st-orange); color: var(--st-orange); }

/* ── Nav scroll wrapper ─────────────────────────────────────── */
.borem-nav-wrapper {
  flex: 1; overflow-y: auto; overflow-x: hidden; overflow-y: auto;
  padding: 8px 8px 4px;
}
.borem-nav-wrapper::-webkit-scrollbar { width: 4px; }
.borem-nav-wrapper::-webkit-scrollbar-track { background: transparent; }
.borem-nav-wrapper::-webkit-scrollbar-thumb { background: var(--st-border); border-radius: 4px; }

.borem-nav { display: flex; flex-direction: column; gap: 1px; }

/* ── Nav section separator/label ─── */
.borem-nav-section-sep {
  height: 1px; background: var(--st-border); margin: 6px 4px;
}

/* ── Top-level nav link ─────────────────────────────────────── */
.borem-nav-link {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 10px; border-radius: var(--st-r-sm);
  font-size: 13.5px; font-weight: 500; color: var(--st-text);
  text-decoration: none !important; white-space: nowrap;
  transition: background .1s, color .1s;
  border: none; background: transparent; width: 100%; text-align: left;
  position: relative;
}
.borem-nav-link:hover { background: var(--st-bg); color: var(--st-text); text-decoration: none !important; }
.borem-nav-link.active {
  color: var(--borem-nav-active-color); font-weight: 600;
  background: transparent;
}
.borem-nav-link.active[aria-current="page"] {
  background: var(--borem-nav-active-bg);
}
.borem-nav-link.active::before {
  content: ''; position: absolute; left: 0; top: 4px; bottom: 4px;
  width: 3px; border-radius: 0 3px 3px 0;
  background: var(--borem-nav-active-indicator);
}
[data-borem-theme="dark"] .borem-nav-link:hover { background: rgba(255,255,255,.05); }

/* ── Nav icon ───────────────────────────────────────────────── */
.borem-nav-ico {
  flex: 0 0 20px; width: 20px; height: 20px;
  display: grid; place-items: center;
  color: var(--st-text-muted);
}
.borem-nav-link.active .borem-nav-ico { color: var(--borem-nav-active-color); }
.borem-nav-link:hover .borem-nav-ico { color: var(--st-text); }
.borem-ico { width: 18px; height: 18px; display: block; }

/* ── Nav groups (collapsible sections) ──────────────────────── */
.borem-nav-group { display: flex; flex-direction: column; }
.borem-nav-group summary,
.borem-nav-group summary::-webkit-details-marker { list-style: none; display: inline-flex; }
.borem-nav-group-summary {
  display: flex; align-items: center;
}
.borem-nav-group-summary > .borem-nav-link { flex: 1; }
.borem-nav-caret {
  flex: 0 0 24px; width: 24px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  color: var(--st-text-muted); transition: transform .18s ease;
  flex-shrink: 0;
}
.borem-nav-caret svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.borem-nav-group[open] .borem-nav-caret { transform: rotate(90deg); color: var(--st-text); }
.borem-nav-group.active > summary .borem-nav-caret { color: var(--borem-nav-active-color); }

.borem-nav-children {
  display: flex; flex-direction: column; gap: 1px;
  padding: 2px 0 4px 28px;
}
.borem-nav-children .borem-nav-link {
  font-size: 13px; color: var(--st-text-muted);
  padding: 5px 8px;
}
.borem-nav-children .borem-nav-link:hover { color: var(--st-text); background: var(--st-bg); }
.borem-nav-children .borem-nav-link.active { color: var(--borem-nav-active-color); background: transparent; font-weight: 600; }
.borem-nav-children .borem-nav-link.active[aria-current="page"] { background: var(--borem-nav-active-bg); }
.borem-nav-children .borem-nav-link.active::before { display: none; }

.borem-nav-spacer { height: 4px; }

/* ── Sidebar footer (profile) ───────────────────────────────── */
.borem-sidebar-footer {
  flex-shrink: 0;
  border-top: 1px solid var(--st-border);
  padding: 8px;
  display: flex; flex-direction: column; gap: 1px;
}
.borem-sidebar-profile {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 8px; border-radius: var(--st-r-sm);
  text-decoration: none !important; color: var(--st-text);
  transition: background .1s;
}
.borem-sidebar-profile:hover { background: var(--st-bg); text-decoration: none !important; }
.borem-sidebar-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--st-orange); color: #fff;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 800; flex-shrink: 0;
}
.borem-sidebar-profile-info { min-width: 0; }
.borem-sidebar-profile-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.borem-sidebar-profile-role { font-size: 11px; color: var(--st-text-muted); }

/* ================================================================
   MAIN CONTENT AREA
   ================================================================ */
.borem-main {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column;
  background: var(--st-bg);
  /* Desktop: overflow auto lets main panel scroll inside 100vh */
  overflow: auto;
}
@media (max-width: 979px) {
  /* Mobile: let the page body scroll, not an inner container */
  .borem-main { overflow: visible; min-height: 0; }
}

/* ── Topbar ─────────────────────────────────────────────────── */
.borem-topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 18px;
  height: 54px;
  background: var(--st-surface);
  border-bottom: 1px solid var(--st-border);
  box-shadow: var(--st-shadow-sm);
  flex-shrink: 0;
}
.borem-topbar-left { display: flex; align-items: center; gap: 10px; }
.borem-page-title { font-size: 16px; font-weight: 700; color: var(--st-text); margin: 0; }
.borem-top-actions { display: flex; gap: 8px; align-items: center; }

/* Global search */
.borem-search { position: relative; }
.borem-search-ico {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; color: var(--st-text-label); pointer-events: none;
  stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round;
}
.borem-search input {
  padding: 6px 10px 6px 32px; border-radius: var(--st-r-sm);
  border: 1px solid var(--st-border); background: var(--st-bg);
  font-size: 13px; min-height: 32px; min-width: 220px; width: 100%;
  color: var(--st-text); transition: border-color .12s, box-shadow .12s;
}
.borem-search input:focus { outline: none; border-color: var(--st-orange); box-shadow: 0 0 0 3px rgba(240,90,40,.12); }
.borem-search input::placeholder { color: var(--st-text-label); }

/* Topbar avatar */
.borem-topbar-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--st-orange); color: #fff;
  display: grid; place-items: center; font-size: 12px; font-weight: 800;
  text-decoration: none !important; flex-shrink: 0;
  transition: opacity .12s;
}
.borem-topbar-avatar:hover { opacity: .85; text-decoration: none !important; }

/* ================================================================
   BUTTONS
   ================================================================ */
.borem-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 6px 12px; border-radius: var(--st-r-sm);
  border: 1px solid var(--st-border); background: var(--st-surface);
  font-size: 13px; font-weight: 500; color: var(--st-text);
  min-height: 32px; white-space: nowrap; cursor: pointer;
  text-decoration: none !important;
  transition: background .1s, border-color .1s, color .1s, box-shadow .1s;
}
.borem-btn:hover { background: var(--st-bg); border-color: var(--st-border-md); color: var(--st-text); text-decoration: none !important; }
.borem-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(240,90,40,.15); border-color: var(--st-orange); }
.borem-btn:active { transform: translateY(1px); }
.borem-btn.primary { background: var(--st-orange); color: #fff; border-color: var(--st-orange); }
.borem-btn.primary:hover { background: #d94e20; border-color: #d94e20; }
.borem-btn[disabled], .borem-btn:disabled { opacity: .55; cursor: not-allowed; }
.borem-btn-sm { padding: 4px 9px; font-size: 12px; min-height: 28px; }
.borem-icon-btn {
  width: 32px; height: 32px; padding: 0; display: flex; align-items: center; justify-content: center;
  border-radius: var(--st-r-sm); border: 1px solid var(--st-border); background: var(--st-surface);
  color: var(--st-text-muted); cursor: pointer; transition: all .1s;
}
.borem-icon-btn:hover { background: var(--st-bg); border-color: var(--st-border-md); color: var(--st-text); }
.borem-icon-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(240,90,40,.15); border-color: var(--st-orange); }

/* ================================================================
   STATUS BADGES  — ST badge system
   ================================================================ */
.st-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 20px;
  font-size: 12px; font-weight: 600; white-space: nowrap; line-height: 1.3;
}
.st-badge.primary     { background: var(--st-orange); color: #fff; }
.st-badge.secondary   { background: var(--st-border); color: var(--st-text-muted); }
.st-badge.warning     { background: #fff3cd; color: #856404; border: 1px solid #ffd86e; }
.st-badge.success     { background: #d4edda; color: #155724; border: 1px solid #b8dfc3; }
.st-badge.danger      { background: #f8d7da; color: #842029; border: 1px solid #f5c2c7; }
.st-badge.soft-primary  { background: var(--st-orange-soft); color: var(--st-orange); border: 1px solid var(--st-orange-mid); }
.st-badge.soft-secondary{ background: var(--st-bg); color: var(--st-text-muted); border: 1px solid var(--st-border); }
.st-badge.soft-warning  { background: #fff8ed; color: #c07000; border: 1px solid #fde599; }
.st-badge.soft-success  { background: #edfaf4; color: #0f7a50; border: 1px solid #b5ebd2; }

/* ── Specific job status badges ── */
.badge-unscheduled { background: var(--st-orange-soft); color: var(--st-orange); border: 1px solid var(--st-orange-mid); }
.badge-scheduled   { background: #e8f3ff; color: #1a6cbf; border: 1px solid #b8d4f0; }
.badge-in-progress { background: #fff8ed; color: #c07000; border: 1px solid #fde599; }
.badge-completed   { background: #edfaf4; color: #0f7a50; border: 1px solid #b5ebd2; }
.badge-cancelled   { background: var(--st-bg); color: var(--st-text-muted); border: 1px solid var(--st-border); }
.badge-secondary   { background: var(--st-bg); color: var(--st-text-muted); border: 1px solid var(--st-border); }

/* ================================================================
   CONTENT LAYOUT
   ================================================================ */
.borem-content { padding: 18px 20px 28px; flex: 1; max-width: 100%; min-width: 0; }

/* ── Cards ── */
.borem-card {
  background: var(--st-surface); border: 1px solid var(--st-border);
  border-radius: var(--st-r); box-shadow: var(--st-shadow-sm);
}
.borem-card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  flex-wrap: wrap;
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--st-border);
}
.borem-card-head h2 { font-size: 14px; font-weight: 700; color: var(--st-text); margin: 0; }
.borem-card-body { padding: 12px 14px 14px; min-width: 0; max-width: 100%; }

/* ── Grid layouts ── */
.borem-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 1060px) { .borem-grid { grid-template-columns: 2fr 1fr; } }
.borem-card-wide { grid-column: 1 / -1; }
@media (min-width: 1060px) { .borem-card-wide { grid-column: 1 / 2; } }

.borem-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
@media (max-width: 780px) { .borem-grid2 { grid-template-columns: 1fr; } }

/* ── Filters toolbar ── */
.borem-filters {
  display: flex; gap: 6px; flex-wrap: wrap; align-items: center;
}
.borem-filters input,
.borem-filters select {
  padding: 5px 8px; border-radius: var(--st-r-sm); border: 1px solid var(--st-border);
  background: var(--st-surface); font-size: 13px; min-height: 30px; color: var(--st-text);
}
.borem-filters input:focus, .borem-filters select:focus {
  outline: none; border-color: var(--st-orange); box-shadow: 0 0 0 3px rgba(240,90,40,.1);
}

/* ── Table ── */
.borem-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; width: 100%; }
.borem-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.borem-table th {
  padding: 9px 12px; text-align: left; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em; color: var(--st-text-muted);
  background: var(--st-bg); border-bottom: 1px solid var(--st-border);
  position: sticky; top: 0; z-index: 1; white-space: nowrap;
}
.borem-table td {
  padding: 10px 12px; text-align: left; font-size: 13px; color: var(--st-text);
  border-bottom: 1px solid rgba(224,228,232,.7); vertical-align: middle;
}
.borem-table tbody tr:hover { background: var(--st-orange-soft); }
.borem-table a { color: var(--st-blue-link); text-decoration: none; }
.borem-table a:hover { text-decoration: underline; }

/* ── Form fields ── */
.borem-field-group { display: grid; gap: 4px; }
.borem-label { font-size: 12px; font-weight: 600; color: var(--st-text-muted); text-transform: uppercase; letter-spacing: .05em; }
.borem-input {
  padding: 7px 10px; border-radius: var(--st-r-sm); border: 1px solid var(--st-border);
  background: var(--st-surface); font-size: 13px; color: var(--st-text);
  transition: border-color .12s, box-shadow .12s; width: 100%;
}
.borem-input:focus { outline: none; border-color: var(--st-orange); box-shadow: 0 0 0 3px rgba(240,90,40,.1); }
.borem-select { appearance: none; -webkit-appearance: none; }
textarea.borem-input { resize: vertical; min-height: 80px; }

/* ── KPI widget ── */
.borem-kpi { padding: 14px 16px; }
.borem-kpi .k { font-size: 11px; font-weight: 700; color: var(--st-text-muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.borem-kpi .v { font-size: 28px; font-weight: 800; color: var(--st-text); line-height: 1; }
.borem-kpi .v.orange { color: var(--st-orange); }

/* ── Donut chart ── */
.borem-donut { position: relative; width: 140px; height: 140px; margin: 8px auto; }
.borem-donut svg { width: 140px; height: 140px; transform: rotate(-90deg); }
.borem-donut circle { fill: none; stroke-width: 14; }
.borem-donut circle.bg { stroke: rgba(0,0,0,.06); }
.borem-donut circle.fg { stroke: var(--st-orange); stroke-linecap: round; stroke-dasharray: 270; stroke-dashoffset: 270; transition: stroke-dashoffset .4s ease; }
.borem-donut .center { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; }
.borem-donut .num { font-size: 28px; font-weight: 900; }
.borem-donut .label { font-size: 11px; letter-spacing: .1em; color: var(--st-text-muted); }

/* ── Legend ── */
.borem-legend { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }
.borem-legend .item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--st-text-muted); }
.borem-legend .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--st-orange); }

/* ── Results / autocomplete dropdown ── */
.borem-results { margin-top: 4px; max-height: 180px; overflow: auto; border: 1px solid var(--st-border); border-radius: var(--st-r-sm); background: var(--st-surface); box-shadow: var(--st-shadow-md); }
.borem-results:empty { display: none; }
.borem-results a, .borem-results-option { display: block; padding: 7px 10px; text-decoration: none; font-size: 13px; color: var(--st-text); border: 0; background: transparent; width: 100%; text-align: left; cursor: pointer; }
.borem-results a:hover, .borem-results-option:hover { background: var(--st-orange-soft); }
.borem-results .muted { padding: 8px 10px; }

/* ── Misc utilities ── */
.muted { color: var(--st-text-muted); }
.text-sm { font-size: 12px; }
.text-xs { font-size: 11px; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.borem-spacer { flex: 1; }
.borem-divider { height: 1px; background: var(--st-border); margin: 10px 0; }
.borem-inline { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.borem-inline-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.borem-inline-actions-end { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; }
.borem-field-full { grid-column: 1 / -1; }
.borem-field-action-end { align-self: end; }
.borem-space-top-xs { margin-top: 6px; }
.borem-space-top-sm { margin-top: 10px; }
.borem-space-top-md { margin-top: 14px; }
.borem-space-top-lg { margin-top: 18px; }
.borem-space-bottom-sm { margin-bottom: 10px; }
.borem-space-bottom-md { margin-bottom: 14px; }
.borem-kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px,1fr)); gap: 12px 20px; }
.borem-kv-item .label { font-size: 11px; font-weight: 700; color: var(--st-text-muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 2px; }
.borem-kv-item .value { font-size: 13px; color: var(--st-text); }

/* ── Panel (inline highlight box) ── */
.borem-panel { padding: 10px 12px; border: 1px solid var(--st-border); border-radius: var(--st-r); background: var(--st-bg); }
.borem-panel-inline { padding: 10px 12px; border: 1px solid var(--st-border); border-radius: var(--st-r-sm); background: var(--st-bg); }

/* ── Spinner ── */
.borem-spinner { display: inline-block; width: 14px; height: 14px; border-radius: 99px; border: 2px solid rgba(255,255,255,.5); border-top-color: transparent; margin-left: 6px; vertical-align: middle; animation: boremSpin .7s linear infinite; }
.borem-spinner.dark { border-color: rgba(28,39,51,.2); border-top-color: var(--st-orange); }
@keyframes boremSpin { to { transform: rotate(360deg); } }

/* ── ST Sub-header bar (under topbar) ── */
.st-sub-header {
  background: var(--st-surface); border-bottom: 1px solid var(--st-border);
  padding: 0 20px;
  display: flex; align-items: center; gap: 0;
  flex-shrink: 0;
}
.st-sub-header-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 14px; font-size: 13px; font-weight: 500;
  color: var(--st-text-muted); border: none; background: transparent;
  border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap;
  text-decoration: none; transition: color .1s, border-color .1s;
}
.st-sub-header-btn:hover { color: var(--st-text); border-bottom-color: var(--st-border); }
.st-sub-header-btn.active { color: var(--st-orange); border-bottom-color: var(--st-orange); font-weight: 600; }
.st-sub-header-spacer { flex: 1; }

/* ── Job detail page ── */
.st-job-page { display: flex; flex-direction: column; }
.st-job-header {
  background: var(--st-surface); border-bottom: 1px solid var(--st-border);
  padding: 14px 20px 10px;
}
.st-job-header-title-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 8px;
}
.st-job-title { font-size: 16px; font-weight: 700; color: var(--st-text); }
.st-job-meta-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.st-job-actions-bar {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  background: var(--st-surface); border-bottom: 1px solid var(--st-border);
  padding: 6px 20px;
}

/* ── Job overview details grid ── */
.st-job-overview {
  background: var(--st-surface); border: 1px solid var(--st-border);
  border-radius: var(--st-r); padding: 16px 20px; margin-bottom: 16px;
}
.st-job-overview-meta {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 12px 24px;
  margin-bottom: 14px;
}
.st-job-overview-meta-item .item-label {
  font-size: 11px; font-weight: 700; color: var(--st-text-muted);
  text-transform: uppercase; letter-spacing: .06em; margin-bottom: 3px;
}
.st-job-overview-meta-item .item-value { font-size: 13px; color: var(--st-text); }
.st-job-overview-meta-item .item-value a { color: var(--st-blue-link); }

/* ── Accordion sections ── */
.st-accordion { margin-bottom: 14px; border: 1px solid var(--st-border); border-radius: var(--st-r); overflow: hidden; background: var(--st-surface); }
.st-accordion-header {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 12px 16px; background: var(--st-surface); cursor: pointer;
  border-bottom: 1px solid var(--st-border); user-select: none;
}
.st-accordion-header:hover { background: var(--st-bg); }
.st-accordion-title { font-size: 14px; font-weight: 700; color: var(--st-text); }
.st-accordion-count { font-size: 12px; color: var(--st-text-muted); background: var(--st-bg); padding: 1px 8px; border-radius: 10px; border: 1px solid var(--st-border); }
.st-accordion-caret { width: 16px; height: 16px; color: var(--st-text-muted); transition: transform .18s; }
.st-accordion-caret svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.st-accordion[open] .st-accordion-caret { transform: rotate(180deg); }
.st-accordion-body { padding: 12px 16px; }

/* ── Quick actions bar (right side of ST) ── */
.st-quick-actions {
  position: fixed; right: 0; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 2px;
  background: var(--st-surface); border: 1px solid var(--st-border);
  border-right: none; border-radius: var(--st-r) 0 0 var(--st-r);
  padding: 6px 4px; box-shadow: var(--st-shadow-md); z-index: 30;
}
.st-quick-action-btn {
  width: 36px; height: 36px; display: grid; place-items: center;
  border-radius: var(--st-r-sm); border: none; background: transparent;
  color: var(--st-text-muted); cursor: pointer; transition: background .1s, color .1s;
}
.st-quick-action-btn:hover { background: var(--st-orange-soft); color: var(--st-orange); }
.st-quick-action-btn.danger:hover { background: #fef2f2; color: #dc2626; }

/* ── Attachment / media grid ── */
.borem-media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px,1fr)); gap: 12px; }
.borem-media-card { border: 1px solid var(--st-border); border-radius: var(--st-r); overflow: hidden; background: var(--st-surface); }
.borem-media-thumb { aspect-ratio: 4/3; background: var(--st-bg); overflow: hidden; display: grid; place-items: center; }
.borem-media-thumb img, .borem-media-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.borem-media-meta { padding: 8px 10px; }
.borem-media-title { font-size: 12px; font-weight: 600; word-break: break-all; }
.borem-media-sub { font-size: 11px; color: var(--st-text-muted); margin-top: 2px; }

/* ── Upload progress ── */
.borem-upload-progress { display: grid; gap: 8px; margin-top: 10px; }
.borem-upload-row { padding: 10px 12px; border-radius: var(--st-r); border: 1px solid var(--st-border); background: var(--st-bg); }
.borem-upload-row-top { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 8px; }
.borem-upload-name { font-weight: 700; word-break: break-all; font-size: 13px; }
.borem-upload-state { font-size: 12px; color: var(--st-text-muted); white-space: nowrap; }
.borem-upload-bar { height: 6px; width: 100%; border-radius: 999px; overflow: hidden; background: var(--st-border); }
.borem-upload-fill { height: 100%; width: 0%; border-radius: 999px; background: var(--st-orange); transition: width .18s ease; }

/* ── Service line picker ── */
.borem-service-line-picker { display: grid; gap: 10px; padding: 10px; border: 1px solid var(--st-border); border-radius: var(--st-r); background: var(--st-bg); }
.borem-service-line-picker-toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.borem-service-line-picker-toolbar input[type="search"] { flex: 1; min-width: 200px; padding: 7px 10px; border: 1px solid var(--st-border); border-radius: var(--st-r-sm); background: var(--st-surface); font-size: 13px; }
.borem-service-line-picker-results { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; max-height: 260px; overflow: auto; }
.borem-service-line-option { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--st-border); border-radius: var(--st-r); background: var(--st-surface); cursor: pointer; transition: border-color .1s; }
.borem-service-line-option:hover { border-color: var(--st-orange); background: var(--st-orange-soft); }
.borem-service-line-option-icon { width: 38px; height: 38px; flex-shrink: 0; border-radius: var(--st-r-sm); background: var(--st-bg); display: grid; place-items: center; border: 1px solid var(--st-border); overflow: hidden; }
.borem-service-line-option-icon img { width: 24px; height: 24px; object-fit: contain; }
.borem-service-line-icon-fallback { font-size: 11px; font-weight: 800; color: var(--st-text-muted); }
.borem-service-line-option-copy strong, .borem-service-line-option-copy small { display: block; }
.borem-service-line-option-copy small { color: var(--st-text-muted); font-size: 11px; }
.borem-service-line-cell { display: flex; align-items: center; gap: 8px; }
.borem-service-line-preview { width: 38px; height: 38px; flex-shrink: 0; border-radius: var(--st-r-sm); background: var(--st-bg); display: grid; place-items: center; border: 1px solid var(--st-border); overflow: hidden; }
.borem-service-line-preview img { width: 24px; height: 24px; object-fit: contain; }
.borem-table-actions { display: flex; gap: 6px; flex-wrap: wrap; }
@media (max-width: 900px) { .borem-service-line-picker-results { grid-template-columns: 1fr; } }

/* ── Rule editor ── */
.borem-rule-editor { display: grid; gap: 8px; padding: 10px; border: 1px solid var(--st-border); border-radius: var(--st-r); background: var(--st-bg); }
.borem-rule-editor-table { display: grid; gap: 8px; }
.borem-rule-editor-head, .borem-rule-editor-row { display: grid; grid-template-columns: 1.1fr .95fr .7fr 1.15fr auto; gap: 8px; align-items: center; }
.borem-rule-editor-head span { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--st-text-muted); }
.borem-rule-editor-row input { width: 100%; padding: 6px 9px; border: 1px solid var(--st-border); border-radius: var(--st-r-sm); background: var(--st-surface); font-size: 13px; }
.borem-rule-editor-actions { display: flex; justify-content: flex-start; }
@media (max-width: 900px) { .borem-rule-editor-head { display: none; } .borem-rule-editor-row { grid-template-columns: 1fr; } }

/* ── Editor textarea ── */
.borem-editor textarea { border: 1px solid var(--st-border); border-radius: var(--st-r-sm); padding: 8px 10px; background: var(--st-surface); font-size: 13px; color: var(--st-text); resize: vertical; width: 100%; }
.borem-editor textarea:focus { outline: none; border-color: var(--st-orange); box-shadow: 0 0 0 3px rgba(240,90,40,.1); }

/* ── Drag edit mode ── */
.borem-editing .borem-card { outline: 2px dashed rgba(240,90,40,.3); cursor: grab; }
.borem-editing .borem-card:active { cursor: grabbing; }
.borem-card.dragging { opacity: .55; }

/* ── Tech Day specific ── */
.borem-tech-day-shell { display: grid; gap: 16px; min-height: calc(100vh - 200px); }
.borem-tech-day-progress { display: grid; gap: 8px; max-width: 940px; margin: 0 auto; width: 100%; }
.borem-tech-day-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(8, minmax(0,1fr)); gap: 4px; }
.borem-tech-day-steps li { display: grid; gap: 3px; padding: 7px; border-radius: 8px; background: var(--st-bg); border: 1px solid transparent; opacity: .6; }
.borem-tech-day-steps li span { width: 18px; height: 18px; border-radius: 50%; background: var(--st-border); color: var(--st-text-muted); display: grid; place-items: center; font-weight: 800; font-size: 10px; }
.borem-tech-day-steps li strong { font-size: 11px; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.borem-tech-day-steps li small { display: none; }
.borem-tech-day-steps li.is-active { opacity: 1; background: var(--st-orange-soft); border-color: var(--st-orange-mid); }
.borem-tech-day-steps li.is-active span { background: var(--st-orange); color: #fff; }
.borem-tech-day-steps li.is-complete span { background: #edfaf4; color: #0f7a50; }
.borem-tech-day-main { background: var(--st-surface); border: 1px solid var(--st-border); border-radius: 20px; padding: 26px; min-height: 65vh; max-width: 940px; margin: 0 auto; width: 100%; box-shadow: var(--st-shadow-md); }
.borem-tech-day-hero { display: grid; justify-items: start; gap: 10px; padding: 0; min-height: 200px; }
.borem-tech-day-banner { display: inline-flex; align-items: center; width: max-content; max-width: 100%; padding: 6px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.borem-tech-day-banner.is-online { background: #edfaf4; color: #155724; }
.borem-tech-day-banner.is-offline { background: #fff8ed; color: #92680a; }
.borem-tech-day-prompt { display: grid; gap: 8px; }
.borem-tech-day-prompt .borem-subtitle { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--st-text-muted); }
.borem-tech-day-prompt h3 { margin: 0; font-size: 36px; line-height: .98; letter-spacing: -.04em; }
.borem-tech-day-prompt p { margin: 0; color: var(--st-text-muted); font-size: 14px; line-height: 1.45; }
.borem-tech-day-actions { display: flex; gap: 9px; flex-wrap: wrap; }
.borem-tech-day-actions#techday-primary-actions .borem-btn { min-height: 50px; padding: 0 20px; border-radius: 14px; font-size: 15px; }
.borem-tech-day-actions#techday-primary-actions .borem-btn.primary { box-shadow: 0 12px 28px rgba(240,90,40,.18); }
.borem-tech-day-utility { display: grid; gap: 8px; }
.borem-tech-day-section { padding: 0; border: 0; background: transparent; }
.borem-tech-day-job, .borem-tech-day-log, .borem-tech-day-note, .borem-tech-day-jobs { padding: 0; border: 0; background: transparent; }

/* ── Time / timesheet ── */
.borem-time-summary, .borem-time-tech, .borem-time-log, .borem-time-team { margin-bottom: 12px; }

/* ── Location page ── */
.borem-loc-page-kicker { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--st-text-muted); margin-bottom: 4px; }
.borem-loc-section { display: grid; gap: 8px; }
.borem-loc-detail-section { margin-bottom: 14px; }
.borem-loc-detail-section-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 0 6px; border-bottom: 1px solid var(--st-border); margin-bottom: 10px; }
.borem-loc-detail-section-head h3 { font-size: 13px; font-weight: 700; }
.borem-loc-edit-shell { border: 1px solid var(--st-border); border-radius: var(--st-r); padding: 12px; background: var(--st-bg); }

/* ── Invoice/Quote tables ── */
.borem-inv-table th:last-child, .borem-inv-table td:last-child { text-align: right; }
.borem-inv-total-row td { font-weight: 700; border-top: 2px solid var(--st-border); }

/* ── Mobile nav ── */
.borem-mobile-nav { display: none; }
.borem-hamburger { display: grid; gap: 4px; }
.borem-hamburger span { display: block; width: 18px; height: 2px; border-radius: 999px; background: currentColor; }
.borem-mobile-menu { position: fixed; inset: 0; z-index: 80; overflow: hidden; }
.borem-mobile-menu[hidden] { display: none; }
.borem-mobile-menu-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.38); backdrop-filter: blur(8px); }
.borem-mobile-menu-sheet { position: relative; z-index: 1; height: 100dvh; max-height: 100dvh; padding: 14px 12px 28px; background: var(--st-surface); overflow-y: auto; }
.borem-mobile-menu-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--st-border); }
.borem-mobile-menu-head h2 { font-size: 20px; font-weight: 800; }
.borem-mobile-menu-body { display: grid; gap: 6px; }
.borem-mobile-menu-link { display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--st-border); background: var(--st-bg); font-weight: 600; font-size: 14px; text-decoration: none !important; color: var(--st-text); }
.borem-mobile-menu-link:hover { background: var(--st-orange-soft); border-color: var(--st-orange-mid); }
.borem-mobile-menu-link.active { color: var(--st-orange); background: var(--st-orange-soft); border-color: var(--st-orange-mid); }
.borem-mobile-menu-ico { width: 20px; height: 20px; color: var(--st-text-muted); }
.borem-mobile-menu-link.active .borem-mobile-menu-ico { color: var(--st-orange); }

@media (max-width: 979px) {
  .borem-mobile-nav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 40; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); gap: 4px; background: var(--st-surface); border-top: 1px solid var(--st-border); box-shadow: 0 -2px 10px rgba(0,0,0,.06); }
  .borem-main { padding-bottom: 68px; }
}
.borem-mnav-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 52px; padding: 5px 4px; border-radius: 10px; border: 1px solid transparent; color: var(--st-text-muted); transition: all .12s; }
.borem-mnav-item:hover { background: var(--st-bg); }
.borem-mnav-item.active { color: var(--st-orange); background: var(--st-orange-soft); border-color: var(--st-orange-mid); }
.borem-mnav-ico { width: 20px; height: 20px; }
.borem-mnav-text { font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; line-height: 1; }

/* ── PDF / Tech day PDF ── */
.borem-tech-pdf-sidebar { width: 260px; flex-shrink: 0; border-left: 1px solid var(--st-border); overflow-y: auto; padding: 12px; background: var(--st-bg); }

/* ── Subtable ── */
.borem-subtitle { font-size: 11px; color: var(--st-text-muted); text-transform: uppercase; letter-spacing: .04em; }

/* ── Responsive table overrides for mobile ── */
@media (max-width: 700px) {
  .borem-table { display: block; overflow-x: auto; }
  .borem-grid2 { grid-template-columns: 1fr; }
  .borem-rule-editor-head { display: none; }
  .borem-rule-editor-row { grid-template-columns: 1fr; }
  .borem-rule-editor-row .borem-btn { width: 100%; }
  .borem-inline-actions, .borem-inline-actions-end { display: grid; grid-template-columns: 1fr; }
  .borem-inline-actions > .borem-btn, .borem-inline-actions-end > .borem-btn, .borem-field-action-end > .borem-btn { width: 100%; }
}

/* ── Responsive mobile labels for tables ── */
@media (max-width: 700px) {
  .borem-table thead { display: none; }
  .borem-table tbody tr { display: block; border: 1px solid var(--st-border); border-radius: var(--st-r); margin-bottom: 8px; padding: 6px 0; }
  .borem-table tbody td { display: flex; justify-content: space-between; align-items: flex-start; padding: 5px 12px; border-bottom: 1px solid rgba(224,228,232,.5); gap: 10px; }
  .borem-table tbody td:last-child { border-bottom: none; }
  .borem-table tbody td::before { content: attr(data-label); font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--st-text-muted); letter-spacing: .06em; white-space: nowrap; flex-shrink: 0; }

  #borem-schedule td:nth-child(1)::before{content:"Time"}
  #borem-schedule td:nth-child(3)::before{content:"Job"}
  #borem-schedule td:nth-child(4)::before{content:"Tech"}
  #borem-schedule td:nth-child(5)::before{content:"Location"}
  #borem-schedule td:nth-child(6)::before{content:"Done"}

  #borem-dispatch-table td:nth-child(1)::before{content:"Job"}
  #borem-dispatch-table td:nth-child(2)::before{content:"Status"}
  #borem-dispatch-table td:nth-child(3)::before{content:"Appointment"}
  #borem-dispatch-table td:nth-child(4)::before{content:"Tech"}
  #borem-dispatch-table td:nth-child(5)::before{content:"Location"}
  #borem-dispatch-table td:nth-child(6)::before{content:"Company"}

  #borem-def-table td:nth-child(1)::before{content:"ID"}
  #borem-def-table td:nth-child(2)::before{content:"Status"}
  #borem-def-table td:nth-child(3)::before{content:"Severity"}
  #borem-def-table td:nth-child(4)::before{content:"Location"}
  #borem-def-table td:nth-child(5)::before{content:"Asset"}
  #borem-def-table td:nth-child(6)::before{content:"Job"}

  #borem-wo-table td:nth-child(1)::before{content:"Job"}
  #borem-wo-table td:nth-child(2)::before{content:"Status"}
  #borem-wo-table td:nth-child(3)::before{content:"Customer"}
  #borem-wo-table td:nth-child(4)::before{content:"Location"}
  #borem-wo-table td:nth-child(5)::before{content:"Tech"}
  #borem-wo-table td:nth-child(6)::before{content:"Date"}

  #borem-quotes-table td:nth-child(1)::before{content:"Quote"}
  #borem-quotes-table td:nth-child(2)::before{content:"Customer"}
  #borem-quotes-table td:nth-child(3)::before{content:"Status"}
  #borem-quotes-table td:nth-child(4)::before{content:"Contract"}
  #borem-quotes-table td:nth-child(5)::before{content:"Work Order"}

  #borem-invoices-table td:nth-child(1)::before{content:"Invoice"}
  #borem-invoices-table td:nth-child(2)::before{content:"Customer"}
  #borem-invoices-table td:nth-child(3)::before{content:"Status"}
  #borem-invoices-table td:nth-child(4)::before{content:"Payment"}
  #borem-invoices-table td:nth-child(5)::before{content:"Balance"}
  #borem-invoices-table td:nth-child(6)::before{content:"Job"}

  #borem-users-table td:nth-child(1)::before{content:"Name"}
  #borem-users-table td:nth-child(2)::before{content:"Email"}
  #borem-users-table td:nth-child(3)::before{content:"Roles"}
  #borem-users-table td:nth-child(4)::before{content:"Company"}

  #borem-company-table td:nth-child(1)::before{content:"Company"}
  #borem-company-table td:nth-child(2)::before{content:"Address"}
  #borem-company-table td:nth-child(3)::before{content:"Contact"}
  #borem-company-table td:nth-child(4)::before{content:"Status"}

  #borem-contact-table td:nth-child(1)::before{content:"Contact"}
  #borem-contact-table td:nth-child(2)::before{content:"Role"}
  #borem-contact-table td:nth-child(3)::before{content:"Company"}
  #borem-contact-table td:nth-child(4)::before{content:"Location"}
  #borem-contact-table td:nth-child(5)::before{content:"Contact"}
}

/* ═══════════════════════════════════════════════════════════════════════════
   v3.18 — Drag-and-Drop Dispatch Board
   ═══════════════════════════════════════════════════════════════════════════ */

.borem-dispatch-card { overflow: hidden; }
.db-outer { min-width: 900px; }

.db-grid {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--st-border);
  border-radius: 6px;
  overflow: hidden;
  font-size: 12px;
}

.db-header-row {
  display: flex;
  background: var(--st-surface);
  border-bottom: 2px solid var(--st-border);
  position: sticky;
  top: 0;
  z-index: 3;
}

.db-corner {
  width: 110px;
  min-width: 110px;
  padding: 6px 8px;
  border-right: 1px solid var(--st-border);
  font-weight: 600;
  color: var(--st-muted);
  font-size: 11px;
}

.db-time-cell {
  flex: 1;
  padding: 6px 4px;
  text-align: center;
  font-size: 11px;
  color: var(--st-muted);
  border-right: 1px solid var(--st-border);
  min-width: 56px;
}

.db-tech-row {
  display: flex;
  border-bottom: 1px solid var(--st-border);
  min-height: 52px;
}
.db-tech-row:last-child { border-bottom: none; }

.db-tech-col {
  width: 110px;
  min-width: 110px;
  padding: 8px;
  border-right: 2px solid var(--st-border);
  display: flex;
  align-items: center;
  font-weight: 600;
  font-size: 12px;
  background: var(--st-surface);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.db-slots {
  flex: 1;
  position: relative;
  min-height: 52px;
  background: repeating-linear-gradient(
    90deg,
    transparent 0,
    transparent calc(100% / var(--db-slots, 28) - 1px),
    var(--st-border) calc(100% / var(--db-slots, 28) - 1px),
    var(--st-border) calc(100% / var(--db-slots, 28))
  );
}

.db-slots.db-drop-target { background-color: rgba(240,90,40,.07); }

.db-appointment {
  position: absolute;
  top: 4px;
  bottom: 4px;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: grab;
  user-select: none;
  background: var(--st-orange);
  color: #fff;
  border-left: 3px solid rgba(0,0,0,.2);
  box-shadow: 0 1px 3px rgba(0,0,0,.15);
  z-index: 2;
  transition: opacity .15s;
  min-width: 40px;
}
.db-appointment:hover  { opacity: .85; }
.db-appointment.db-dragging { opacity: .5; cursor: grabbing; }

.db-status-scheduled    { background: #3b82f6; }
.db-status-in-progress  { background: #f59e0b; }
.db-status-complete     { background: #10b981; }
.db-status-canceled     { background: var(--st-muted); opacity:.6; }
.db-status-new          { background: var(--st-orange); }

.borem-kpi-mini { display:flex;flex-direction:column;align-items:center;gap:2px; }
.borem-kpi-mini span { font-size:20px;font-weight:700;color:var(--st-text); }
.borem-kpi-mini label { font-size:11px;color:var(--st-muted);cursor:default; }

/* ═══════════════════════════════════════════════════════════════════════════
   v3.18 — Job Detail (ST-Style)
   ═══════════════════════════════════════════════════════════════════════════ */

.st-job-page { display:flex;flex-direction:column;gap:0; }

.st-job-header { padding:0; }
.st-job-header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  flex-wrap: wrap;
}
.st-job-header-actions { display:flex;gap:8px;flex-wrap:wrap;margin-top:4px; }

.st-job-body { align-items: flex-start; }

.st-job-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0;
}
.st-job-overview-meta-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--st-border);
}
.st-job-overview-meta-item:last-child { border-bottom: none; }
.st-job-overview-meta-item .item-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--st-muted);
  margin-bottom: 3px;
}
.st-job-overview-meta-item .item-value { font-size: 13px;font-weight:500;color:var(--st-text); }

.wo-appointment-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border: 1px solid var(--st-border);
  border-radius: 8px;
  margin-bottom: 8px;
  background: var(--st-bg);
  gap: 12px;
}
.wo-appointment-card:last-child { margin-bottom: 0; }
.wo-appt-left { display:flex;flex-direction:column;gap:3px;flex:1; }
.wo-appt-time { font-weight:600;font-size:14px; }
.wo-appt-tech { }
.wo-appt-actions { display:flex;gap:6px;align-items:center; }

.borem-back-link {
  font-size: 12px;
  color: var(--st-orange);
  text-decoration: none;
  font-weight: 500;
}
.borem-back-link:hover { text-decoration: underline; }

/* ═══════════════════════════════════════════════════════════════════════════
   v3.18 — Appointment Modal
   ═══════════════════════════════════════════════════════════════════════════ */

#wo-appt-modal { position: fixed; inset: 0; z-index: 9000; display:flex;align-items:center;justify-content:center; }

.borem-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.45);
}

.borem-modal-dialog {
  position: relative;
  z-index: 2;
  background: var(--st-card);
  border-radius: 10px;
  box-shadow: 0 8px 40px rgba(0,0,0,.25);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  z-index: 1;
}

.borem-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--st-border);
}
.borem-modal-head h3 { margin: 0; font-size: 16px; }
.borem-icon-btn { background:none;border:none;font-size:22px;cursor:pointer;color:var(--st-muted);line-height:1;padding:2px 6px; }
.borem-icon-btn:hover { color: var(--st-text); }
.borem-modal-body { padding: 16px 20px; }
.borem-modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--st-border);
}

/* ═══════════════════════════════════════════════════════════════════════════
   v3.18 — Action dropdown menu
   ═══════════════════════════════════════════════════════════════════════════ */

.borem-dropdown-menu {
  background: var(--st-card);
  border: 1px solid var(--st-border);
  border-radius: 8px;
  box-shadow: 0 6px 24px rgba(0,0,0,.15);
  min-width: 180px;
  overflow: hidden;
}

.borem-dropdown-item {
  display: block;
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 9px 16px;
  font-size: 13px;
  cursor: pointer;
  color: var(--st-text);
  border-bottom: 1px solid var(--st-border);
}
.borem-dropdown-item:last-child { border-bottom: none; }
.borem-dropdown-item:hover { background: var(--st-surface); color: var(--st-orange); }

/* ═══════════════════════════════════════════════════════════════════════════
   v3.18 — Reporting Charts
   ═══════════════════════════════════════════════════════════════════════════ */

.rpt-bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 180px;
  padding: 0 4px 0;
}

.rpt-bar-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  gap: 4px;
  cursor: default;
}

.rpt-bar {
  width: 100%;
  background: var(--st-orange);
  border-radius: 3px 3px 0 0;
  min-height: 4px;
  transition: opacity .2s;
}
.rpt-bar-wrap:hover .rpt-bar { opacity:.7; }
.rpt-bar-label { font-size: 11px; color: var(--st-muted); text-align:center; }

.rpt-hbar-chart { display:flex;flex-direction:column;gap:8px; }
.rpt-hbar-row { display:flex;align-items:center;gap:8px; }
.rpt-hbar-label { width:120px;font-size:12px;color:var(--st-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex-shrink:0; }
.rpt-hbar-track { flex:1;height:14px;background:var(--st-border);border-radius:4px;overflow:hidden; }
.rpt-hbar-fill { height:100%;background:var(--st-orange);border-radius:4px;transition:width .4s; }
.rpt-hbar-val { width:70px;text-align:right;font-size:12px;font-weight:600;flex-shrink:0; }

.rpt-aging-summary {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.rpt-aging-bucket {
  flex: 1;
  min-width: 100px;
  background: var(--st-surface);
  border: 1px solid var(--st-border);
  border-radius: 8px;
  padding: 12px;
  text-align: center;
}
.rpt-aging-bucket strong { display:block;font-size:13px;margin-bottom:4px; }
.rpt-aging-bucket span { font-size:16px;font-weight:700; }
.rpt-aging-bucket.orange { border-color:#f59e0b; }
.rpt-aging-bucket.orange span { color:#f59e0b; }
.rpt-aging-bucket.red { border-color:#ef4444; }
.rpt-aging-bucket.red span { color:#ef4444; }
.rpt-aging-bucket.dark-red { border-color:#991b1b;background:#fef2f2; }
.rpt-aging-bucket.dark-red span { color:#991b1b; }

.borem-grid2 { display:grid;grid-template-columns:1fr 1fr;gap:16px; }
.borem-kpi   { padding:16px;text-align:center; }
.borem-kpi .k { font-size:12px;color:var(--st-muted);margin-bottom:4px; }
.borem-kpi .v { font-size:22px;font-weight:700; }

/* ═══════════════════════════════════════════════════════════════════════════
   v3.18 — Inspection Forms
   ═══════════════════════════════════════════════════════════════════════════ */

.insp-sig-pad { display:flex;flex-direction:column;gap:6px; }
.borem-field-full { grid-column: 1 / -1; }

.st-accordion { border:1px solid var(--st-border);border-radius:8px;overflow:hidden; }
.st-accordion-header {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  cursor: pointer;
  background: var(--st-surface);
  user-select: none;
}
.st-accordion-header::-webkit-details-marker { display: none; }
.st-accordion[open] .st-accordion-caret { transform: rotate(180deg); }
.st-accordion-caret { transition: transform .2s; }
.st-accordion-title { font-weight: 600; font-size: 14px; }
.st-accordion-body { padding: 16px 18px; border-top: 1px solid var(--st-border); }

/* ═══════════════════════════════════════════════════════════════════════════
   v3.18 — Media grid for attachments
   ═══════════════════════════════════════════════════════════════════════════ */

.borem-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}
.borem-media-card {
  border: 1px solid var(--st-border);
  border-radius: 6px;
  overflow: hidden;
  background: var(--st-surface);
}
.borem-media-thumb img { width:100%;height:80px;object-fit:cover;display:block; }
.borem-media-fallback { width:100%;height:80px;display:flex;align-items:center;justify-content:center;font-size:14px;font-weight:700;color:var(--st-muted);background:var(--st-border); }
.borem-media-meta { padding:6px 8px; }
.borem-media-title { font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--st-text); }

/* ═══════════════════════════════════════════════════════════════════════════
   v3.18 — Utilities
   ═══════════════════════════════════════════════════════════════════════════ */

.text-danger { color: #ef4444 !important; }
/* .text-sm and .muted defined above — aliases resolved via --st-muted var */
.borem-btn-sm { padding: 4px 10px !important; font-size: 12px !important; }
.borem-field-group { display:flex;flex-direction:column;gap:4px; }
.borem-label { font-size:12px;font-weight:600;color:var(--st-text); }
.borem-space-top-md { margin-top: 16px; }


/* ═══════════════════════════════════════════════════════════════════════
   v3.19 — Global Search Dropdown
   ═══════════════════════════════════════════════════════════════════════ */

.borem-global-search { position: relative; }
.borem-global-search .borem-search-ico { position:absolute;left:10px;top:50%;transform:translateY(-50%);color:var(--st-muted);pointer-events:none;width:15px;height:15px; }
#borem-global-search { padding: 7px 10px 7px 32px; border:1px solid var(--st-border); border-radius:6px; background:var(--st-surface); color:var(--st-text); font-size:13px; outline:none; }
#borem-global-search:focus { border-color:var(--st-orange); }

.borem-search-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--st-card);
  border: 1px solid var(--st-border);
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0,0,0,.15);
  z-index: 9999;
  max-height: 400px;
  overflow-y: auto;
}

.gs-result {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--st-border);
  transition: background .1s;
}
.gs-result:last-child { border-bottom: none; }
.gs-result:hover { background: var(--st-surface); }
.gs-icon { font-size: 16px; flex-shrink: 0; }
.gs-text { flex: 1; min-width: 0; }
.gs-label { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gs-sub { font-size: 11px; color: var(--st-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gs-loading, .gs-empty { padding: 14px; text-align: center; color: var(--st-muted); font-size: 13px; }

/* ═══════════════════════════════════════════════════════════════════════
   v3.19 — Deficiency Status Pills
   ═══════════════════════════════════════════════════════════════════════ */

.def-stat-pill { display: inline-flex; align-items: center; }

/* ═══════════════════════════════════════════════════════════════════════
   v3.19 — Service History Timeline
   ═══════════════════════════════════════════════════════════════════════ */

.borem-timeline { position: relative; padding-left: 28px; }
.borem-timeline::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: var(--st-border);
}

.borem-timeline-item {
  position: relative;
  margin-bottom: 18px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.borem-timeline-dot {
  position: absolute;
  left: -22px;
  top: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
  border: 2px solid var(--st-card);
  box-shadow: 0 1px 3px rgba(0,0,0,.15);
}

.borem-timeline-content { flex: 1; padding-bottom: 4px; }
.borem-timeline-date    { font-size: 11px; color: var(--st-muted); margin-bottom: 2px; }
.borem-timeline-label   { font-size: 13px; font-weight: 600; color: var(--st-text); }
.borem-timeline-sub     { font-size: 12px; margin-top: 2px; }

/* ═══════════════════════════════════════════════════════════════════════
   v3.19 — Map Schedule
   ═══════════════════════════════════════════════════════════════════════ */

#borem-schedule-map {
  z-index: 0;
}
.leaflet-container { font-family: inherit; }

/* ═══════════════════════════════════════════════════════════════════════
   v3.19 — Mobile Responsiveness (375px → 768px)
   ═══════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .borem-app { flex-direction: column; }
  /* Mobile sidebar: shows only when .mobile-nav-open is set */
  .borem-sidebar { display: none !important; }
  /* Mobile overlay sidebar (shown when hamburger tapped) */
  .borem-mobile-menu-open .borem-sidebar {
    display: flex !important;
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 90;
    width: min(280px, 85vw) !important;
    overflow-y: auto; overflow-x: hidden;
    box-shadow: 4px 0 24px rgba(0,0,0,.18);
  }
  .borem-sidebar.sidebar-open { max-height: 100vh; overflow-y: auto; }
  .borem-sidebar-toggle { display: flex !important; }
  .borem-content { padding: 12px; }
  .borem-topbar { padding: 8px 12px; gap: 8px; }
  #borem-global-search { width: 160px; }
  .borem-grid2 { grid-template-columns: 1fr; }
  .st-job-body { grid-template-columns: 1fr; }
  .st-job-meta-grid { grid-template-columns: 1fr; }
  .borem-modal-dialog { max-width: calc(100vw - 24px); margin: 12px; }
  .db-outer { min-width: unset; overflow-x: auto; }
  .rpt-aging-summary { grid-template-columns: 1fr 1fr; }
  .borem-card-head { flex-wrap: wrap; gap: 8px; }
  .borem-filters { flex-wrap: wrap; }
  #dispatch-board-grid { font-size: 10px; }
  .borem-topbar-left h1 { font-size: 16px; }
  table.borem-table thead th, table.borem-table tbody td { padding: 8px 6px; font-size: 12px; }
  .wo-appointment-card { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  #borem-global-search { width: 120px; font-size: 12px; }
  .borem-btn { padding: 7px 12px; font-size: 12px; }
  .borem-modal-dialog { max-height: 95vh; }
  .borem-timeline { padding-left: 20px; }
  .borem-timeline::before { left: 7px; }
  .borem-timeline-dot { left: -16px; width: 16px; height: 16px; font-size: 9px; }
}

/* Tech Day — Mobile-first */
@media (max-width: 768px) {
  .borem-tech-day-shell { flex-direction: column; }
  .borem-tech-day-progress { width: 100%; border-right: none; border-bottom: 1px solid var(--st-border); }
  .borem-time-shell { flex-direction: column; }
  .borem-dispatch-card { overflow-x: auto; }
}

/* Inspection forms — single column on small screens */
@media (max-width: 600px) {
  .borem-grid2 .borem-field-group { grid-column: 1 / -1; }
  #insp-form-wrap .borem-grid2 { grid-template-columns: 1fr; }
}


/* ═══════════════════════════════════════════════════════════════════════
   v3.20 — Completion Signature Canvas
   ═══════════════════════════════════════════════════════════════════════ */

#completion-sig-canvas {
  display: block;
  width: 100%;
  height: 140px;
  cursor: crosshair;
  background: #fff;
  border-radius: 4px;
  touch-action: none;
  user-select: none;
}

/* ═══════════════════════════════════════════════════════════════════════
   v3.20 — Compliance Alerts
   ═══════════════════════════════════════════════════════════════════════ */

.compliance-alert-critical { color: #ef4444; font-weight: 700; }
.compliance-alert-warning  { color: #f59e0b; font-weight: 600; }

/* ═══════════════════════════════════════════════════════════════════════
   v3.20 — Labor Invoice Modal KPI grid
   ═══════════════════════════════════════════════════════════════════════ */

#labor-invoice-modal .borem-modal-dialog {
  max-height: 85vh;
  overflow-y: auto;
}


/* ═══════════════════════════════════════════════════════════════════════
   v3.21 — Project Management
   ═══════════════════════════════════════════════════════════════════════ */

.borem-grid4 { display:grid;grid-template-columns:repeat(4,1fr);gap:12px; }
@media(max-width:900px){ .borem-grid4 { grid-template-columns:repeat(2,1fr); } }
@media(max-width:480px){ .borem-grid4 { grid-template-columns:1fr; } }

/* ═══════════════════════════════════════════════════════════════════════
   v3.21 — Email Template Editor
   ═══════════════════════════════════════════════════════════════════════ */

.et-template-row:hover { background: var(--st-surface); }
.et-custom .et-custom-badge { color: var(--st-orange); }

/* ═══════════════════════════════════════════════════════════════════════
   v3.21 — Form Builder
   ═══════════════════════════════════════════════════════════════════════ */

#fb-editor-body .borem-grid2 { gap:10px; }

/* ═══════════════════════════════════════════════════════════════════════
   v3.21 — Contract Renewals urgency colors
   ═══════════════════════════════════════════════════════════════════════ */

.cr-urgent   { color: #ef4444; font-weight: 700; }
.cr-warning  { color: #f59e0b; font-weight: 600; }
.cr-ok       { color: #10b981; }


/* ═══════════════════════════════════════════════════════════════════════
   v3.21 — Project Management
   ═══════════════════════════════════════════════════════════════════════ */

.fb-field-row { transition: background .1s; }
.fb-field-row:hover { background: var(--st-surface); }

.po-item-row input { font-size: 12px; }

/* Renewal summary bar re-uses rpt-aging-summary */

/* Form builder editor panel scrollable */
#form-editor-body { max-height: calc(100vh - 200px); overflow-y: auto; }


/* ═══════════════════════════════════════════════════════════════════════
   v3.21 — Project Management
   ═══════════════════════════════════════════════════════════════════════ */

.proj-tab-nav {
  display: flex;
  border-bottom: 2px solid var(--st-border);
  padding: 0 4px;
  overflow-x: auto;
}
.proj-tab {
  padding: 10px 18px;
  border: none;
  background: none;
  color: var(--st-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
}
.proj-tab.active {
  color: var(--st-orange);
  border-bottom-color: var(--st-orange);
}
.proj-tab:hover { color: var(--st-text); }

.proj-kpi-card {
  background: var(--st-surface);
  border: 1px solid var(--st-border);
  border-radius: 8px;
  padding: 14px 16px;
}
.proj-kpi-label { font-size: 11px; color: var(--st-muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
.proj-kpi-value { font-size: 20px; font-weight: 800; }

.fb-section { transition: box-shadow .15s; }
.fb-section:hover { box-shadow: 0 2px 8px rgba(0,0,0,.08); }

.co-item-row input { font-size: 12px; }

/* ═══════════════════════════════════════════════════════════════════════
   v3.21 — Email Template Editor
   ═══════════════════════════════════════════════════════════════════════ */

#et-body {
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 12px;
  line-height: 1.6;
  tab-size: 2;
}
#et-merge-tags button {
  font-family: monospace;
  font-size: 11px;
  padding: 3px 7px;
}


/* ═══════════════════════════════════════════════════════════════════════
   PASS 2 — CRM Pipeline Kanban
   ═══════════════════════════════════════════════════════════════════════ */
.crm-kanban { display:flex; gap:12px; overflow-x:auto; padding-bottom:8px; align-items:flex-start; }
.crm-kanban-col { flex:0 0 230px; background:var(--st-card); border-radius:8px; overflow:hidden; box-shadow:0 1px 4px rgba(0,0,0,.06); }
.crm-col-head { padding:10px 12px; color:#fff; display:flex; justify-content:space-between; align-items:center; font-size:13px; font-weight:700; }
.crm-col-body { padding:6px; max-height:70vh; overflow-y:auto; }
.crm-card { background:var(--st-surface); border:1px solid var(--st-border); border-radius:6px; padding:10px 12px; margin-bottom:6px; cursor:pointer; transition:box-shadow .15s, transform .1s; }
.crm-card:hover { box-shadow:0 2px 8px rgba(0,0,0,.1); transform:translateY(-1px); }

/* ═══════════════════════════════════════════════════════════════════════
   PASS 2 — QR Scanner Modal
   ═══════════════════════════════════════════════════════════════════════ */
#qr-scanner-modal { z-index:9100; }
#qr-video { max-height:260px; }

/* ═══════════════════════════════════════════════════════════════════════
   PASS 2 — Refrigerant & Role Permission Tables
   ═══════════════════════════════════════════════════════════════════════ */
.role-cap-check { width:18px; height:18px; cursor:pointer; }

/* ════════════════════════════════════════════════════════════════════
   v3.23.1 — COMPREHENSIVE CSS AUDIT FIXES
   Screen-by-screen mobile + layout corrections
   ════════════════════════════════════════════════════════════════════ */

/* ── 1. Global box model & overflow guards ──────────────────────────── */
.borem-app * { box-sizing: border-box; }

/* Every card, table, grid must never exceed the viewport */
.borem-card,
.borem-card-body,
.borem-content,
.borem-grid2,
.borem-grid4,
.borem-grid {
  max-width: 100%;
  min-width: 0;
}

/* Tables inside cards always scroll horizontally rather than busting out */
.borem-card-body .borem-table,
.borem-card > .borem-table {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

/* ── 2. Topbar — mobile collapse ────────────────────────────────────── */
@media (max-width: 600px) {
  .borem-topbar { padding: 0 10px; gap: 6px; height: 48px; }
  /* Hide search on very small screens to prevent overflow */
  .borem-search { display: none; }
  .borem-page-title { font-size: 14px; }
  .borem-topbar-left { gap: 6px; }
}
@media (max-width: 979px) {
  /* Search expands to fill available space on tablet */
  .borem-search { flex: 1; min-width: 0; }
  .borem-search input { min-width: 0; width: 100%; }
}

/* ── 3. Sidebar — mobile no-clip ────────────────────────────────────── */
@media (max-width: 979px) {
  /* Mobile menu drawer — override the overflow:hidden that clips content */
  .borem-mobile-menu .borem-sidebar { overflow-y: auto; }
}

/* ── 4. Content area — padding on mobile ───────────────────────────── */
@media (max-width: 979px) {
  .borem-content { padding: 10px 10px 80px; }
}
@media (max-width: 480px) {
  .borem-content { padding: 8px 8px 80px; }
}

/* ── 5. Card heads — wrap filter bars on mobile ─────────────────────── */
.borem-card-head { flex-wrap: wrap; }
.borem-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
@media (max-width: 640px) {
  .borem-filters { width: 100%; }
  .borem-filters .borem-input,
  .borem-filters .borem-select { flex: 1; min-width: 120px; }
  .borem-filters .borem-btn { white-space: nowrap; }
}

/* ── 6. Grids — collapse breakpoints ────────────────────────────────── */
@media (max-width: 640px) {
  .borem-grid2 { grid-template-columns: 1fr !important; }
  .borem-grid4 { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 380px) {
  .borem-grid4 { grid-template-columns: 1fr !important; }
}

/* ── 7. KPI rows — scroll on mobile instead of wrapping badly ───────── */
.borem-kpi-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
@media (max-width: 600px) {
  .borem-kpi-row { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
  .borem-kpi-box { flex: 0 0 130px; }
}

/* ── 8. Modal dialogs — never wider than viewport ───────────────────── */
.borem-modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 1;
}
.borem-modal-dialog {
  position: relative;
  z-index: 2;
  max-width: min(600px, calc(100vw - 20px));
  width: 100%;
  margin: 0 auto;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
@media (max-width: 640px) {
  /* On small screens modals slide up from the bottom */
  .borem-modal-dialog {
    max-width: 100vw;
    max-height: 92vh;
    border-radius: 16px 16px 0 0;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0;
  }
}

/* ── 9. Work-order detail — action bar wraps ────────────────────────── */
#wo-action-bar,
.borem-wo-actions,
.wo-action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

/* ── 10. Dispatch board — horizontal scroll on all screens ──────────── */
#dispatch-board-grid,
.dispatch-board-grid {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}
@media (max-width: 979px) {
  #dispatch-board-grid { min-width: 0; font-size: 11px; }
  .borem-dispatch-card { min-width: 160px; }
}

/* ── 11. Schedule map — full height on mobile ───────────────────────── */
#sched-map-wrap {
  position: relative;
  width: 100%;
}
#sched-map {
  width: 100%;
  max-width: 100%;
}
@media (max-width: 979px) {
  #sched-map { height: 300px !important; }
  #sched-queue-table { font-size: 12px; }
}

/* ── 12. Inspection form — input rows stack on mobile ──────────────── */
@media (max-width: 600px) {
  .insp-row { grid-template-columns: 1fr !important; }
  .insp-field-group { min-width: 0; }
}

/* ── 13. Invoice / quote line items — scroll on mobile ─────────────── */
@media (max-width: 700px) {
  .borem-line-items-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .borem-invoice-totals { font-size: 13px; }
}

/* ── 14. Tech-day — stack panels on mobile ──────────────────────────── */
@media (max-width: 700px) {
  .borem-tech-day-main { padding: 14px; border-radius: 12px; }
  .borem-tech-day-steps { display: none; } /* replaced by bottom progress bar */
  .borem-time-actions { display: flex; flex-direction: column; gap: 8px; width: 100%; }
  .borem-time-actions .borem-btn { width: 100%; justify-content: center; }
}

/* ── 15. CRM Kanban — horizontal scroll on mobile ───────────────────── */
.crm-kanban {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  align-items: flex-start;
  padding-bottom: 12px;
}
@media (max-width: 700px) {
  .crm-kanban-col { flex: 0 0 200px; }
  .crm-col-body { max-height: 50vh; }
}

/* ── 16. Project performance bars — constrain width ────────────────── */
.proj-kpi-card { min-width: 0; }
.proj-kpi-value { font-size: clamp(14px, 4vw, 20px); }

/* ── 17. Parts / inventory — responsive table cells ────────────────── */
@media (max-width: 700px) {
  .borem-parts-table td:nth-child(n+4) { display: none; }
  .borem-parts-table td:nth-child(1)::before { content: "Part"; }
  .borem-parts-table td:nth-child(2)::before { content: "Warehouse"; }
  .borem-parts-table td:nth-child(3)::before { content: "Qty"; }
}

/* ── 18. Purchase orders — responsive ───────────────────────────────── */
@media (max-width: 700px) {
  #po-table th:nth-child(n+5),
  #po-table td:nth-child(n+5) { display: none; }
}

/* ── 19. Reporting dashboard — responsive charts ────────────────────── */
.rpt-revenue-chart,
.rpt-bar-chart { overflow-x: auto; max-width: 100%; }
@media (max-width: 700px) {
  .rpt-aging-summary { flex-direction: column; }
  .rpt-aging-bucket { width: 100%; }
  .borem-kpi-mini { min-width: 80px; font-size: 11px; }
}

/* ── 20. Form builder — field rows on mobile ────────────────────────── */
@media (max-width: 600px) {
  .fb-field-row { grid-template-columns: 1fr auto auto auto !important; }
  .fb-field-row select { display: none; } /* use tap-to-change pattern */
}

/* ── 21. Refrigerant log — table scroll on mobile ───────────────────── */
@media (max-width: 700px) {
  #ref-log-table th:nth-child(n+7),
  #ref-log-table td:nth-child(n+7) { display: none; }
}

/* ── 22. Role permissions matrix — horizontal scroll ────────────────── */
.borem-perm-matrix-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.borem-perm-matrix { min-width: 600px; }

/* ── 23. Back link ──────────────────────────────────────────────────── */
.borem-back-link {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 600;
  color: var(--st-text-muted);
  text-decoration: none !important;
  margin-bottom: 8px;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background .12s, color .12s;
}
.borem-back-link:hover { background: var(--st-bg); color: var(--st-orange); }

/* ── 24. Inline tag / badge overflow ────────────────────────────────── */
.st-badge { white-space: nowrap; }
.borem-tag-list { display: flex; flex-wrap: wrap; gap: 4px; }

/* ── 25. Input groups — never overflow ──────────────────────────────── */
.borem-input,
.borem-select,
.borem-textarea {
  max-width: 100%;
}

/* ── 26. Fix inline styles from JS using --st-card / --st-muted ─────── */
/* These are used in JS innerHTML strings as var(--st-card) / var(--st-muted)
   Both now resolve via :root definitions above, but adding explicit fallback
   classes for components that also add class-based styling */
.timeline-dot   { background: var(--st-surface); border: 2px solid var(--st-border); border-radius: 50%; }
.crm-card       { background: var(--st-surface); }
.crm-kanban-col { background: var(--st-card, var(--st-surface)); }
.proj-kpi-card  { background: var(--st-surface); border: 1px solid var(--st-border); }

/* ── 27. borem-kpi-mini — used in reports + CRM ────────────────────── */
.borem-kpi-mini {
  background: var(--st-surface);
  border: 1px solid var(--st-border);
  border-radius: 8px;
  padding: 10px 14px;
  min-width: 100px;
  text-align: center;
}
.borem-kpi-mini span { display: block; font-size: 22px; font-weight: 800; color: var(--st-orange); }
.borem-kpi-mini label { display: block; font-size: 11px; color: var(--st-text-muted); text-transform: uppercase; letter-spacing: .04em; margin-top: 2px; }

/* ── 28. Service opportunities table wrapping ───────────────────────── */
@media (max-width: 700px) {
  #service-opp-table th:nth-child(n+5),
  #service-opp-table td:nth-child(n+5) { display: none; }
}

/* ── 29. Global search results — text overflow ──────────────────────── */
.gs-label { max-width: 100%; }
.gs-sub { color: var(--st-text-muted); } /* was var(--st-muted) — now explicit */

/* ── 30. Fix topbar overflow on all mobile sizes ────────────────────── */
.borem-topbar {
  flex-wrap: nowrap;
  min-width: 0;
}
.borem-topbar-left,
.borem-top-actions {
  min-width: 0;
  flex-shrink: 1;
}
@media (max-width: 420px) {
  .borem-top-actions .borem-btn:not(:first-child) { display: none; }
}

/* ── 31. Footer safe area on iPhone ─────────────────────────────────── */
.borem-mobile-nav {
  padding-bottom: max(6px, env(safe-area-inset-bottom));
}
@media (max-width: 979px) {
  /* Extra bottom padding so last content isn't hidden behind mobile nav */
  .borem-content { padding-bottom: calc(68px + env(safe-area-inset-bottom) + 16px); }
}

/* ── 32. Tables — all instances get overflow protection ─────────────── */
.borem-table-wrap,
[style*="overflow-x: auto"] {
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

/* ── 33. Fix hardcoded wide elements in JS-rendered templates ────────── */
/* The JS templates create tables with no wrapper — this catches them */
/* Non-borem-table tables (e.g. inline JS rendered) get scroll */
.borem-card-body table:not(.borem-table):not(.borem-perm-matrix):not(.borem-guide-table) {
  max-width: 100%;
  overflow-x: auto;
  display: block;
}
/* Except preserve thead/tbody display for non-borem-table tables */
.borem-card-body table:not(.borem-table) thead { display: table-header-group; }
.borem-card-body table:not(.borem-table) tbody { display: table-row-group; }
.borem-card-body table:not(.borem-table) tfoot { display: table-footer-group; }

/* The catch-all above is too aggressive for .borem-table which has its own rules.
   Undo for borem-table children: */
.borem-card-body .borem-table thead { display: table-header-group; }
.borem-card-body .borem-table tbody { display: table-row-group; }

/* ── 34. Work-order tech-day photo row ───────────────────────────────── */
#wo-photo-row { flex-wrap: wrap; }

/* ── 35. Asset table on mobile ───────────────────────────────────────── */
@media (max-width: 700px) {
  .borem-tech-assets-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* ── 36. Offices table responsive ───────────────────────────────────── */
@media (max-width: 640px) {
  #offices-table th:nth-child(n+5),
  #offices-table td:nth-child(n+5) { display: none; }
}


/* ════════════════════════════════════════════════════════════════════
   v3.25 — Knowledge Base Styles
   ════════════════════════════════════════════════════════════════════ */

/* ── Article typography ────────────────────────────────────────────── */
.borem-kb-article-content {
  font-size: 14px;
  line-height: 1.75;
  color: var(--st-text);
}
.borem-kb-article-content h1 { font-size: 22px; font-weight: 800; margin: 0 0 16px; }
.borem-kb-article-content h2 { font-size: 18px; font-weight: 700; margin: 24px 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--st-border); }
.borem-kb-article-content h3 { font-size: 15px; font-weight: 700; margin: 20px 0 8px; color: var(--st-orange); }
.borem-kb-article-content p  { margin: 0 0 12px; }
.borem-kb-article-content ul,
.borem-kb-article-content ol  { padding-left: 20px; margin: 8px 0 12px; }
.borem-kb-article-content li  { margin-bottom: 6px; }
.borem-kb-article-content code {
  background: var(--st-surface);
  border: 1px solid var(--st-border);
  border-radius: 4px;
  padding: 2px 6px;
  font-family: monospace;
  font-size: 12px;
}
.borem-kb-article-content strong { font-weight: 700; }
.borem-kb-article-content em     { font-style: italic; }

/* ── KB tables ──────────────────────────────────────────────────────── */
.borem-kb-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 13px;
}
.borem-kb-table th {
  background: var(--st-dark, #1c2733);
  color: #fff;
  padding: 9px 12px;
  text-align: left;
  font-weight: 600;
}
.borem-kb-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--st-border);
  vertical-align: top;
}
.borem-kb-table tr:last-child td { border-bottom: none; }
.borem-kb-table tr:nth-child(even) td { background: var(--st-surface); }
.borem-kb-table td:first-child { font-weight: 600; }

/* ── Glossary definition list ───────────────────────────────────────── */
.borem-kb-glossary dt {
  font-weight: 700;
  font-size: 14px;
  color: var(--st-text);
  margin-top: 18px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--st-border);
}
.borem-kb-glossary dd {
  margin: 6px 0 12px 0;
  font-size: 13px;
  line-height: 1.65;
  color: #374151;
}

/* ── Category card hover ────────────────────────────────────────────── */
.kb-cat-item:hover { background: var(--st-bg) !important; }

/* ── Help panel article content — smaller scale ─────────────────────── */
#help-panel-body .borem-kb-article-content h2 { font-size: 14px; margin: 16px 0 8px; }
#help-panel-body .borem-kb-article-content h3 { font-size: 13px; margin: 12px 0 6px; }
#help-panel-body .borem-kb-table             { font-size: 12px; }
#help-panel-body .borem-kb-article-content p { font-size: 13px; }

/* ── Mobile responsiveness ──────────────────────────────────────────── */
@media (max-width: 700px) {
  #borem-help-center > div { flex-direction: column; }
  #kb-sidebar { width: 100% !important; }
  #borem-help-panel { width: 100vw !important; max-width: 100vw !important; }
  #borem-help-fab { bottom: 80px; right: 16px; width: 40px; height: 40px; font-size: 18px; }
}


/* ═══════════════════════════════════════════════════════════════════════
   v3.25.7 — Jobs frontend modal/off-canvas UX polish
   ═══════════════════════════════════════════════════════════════════════ */
.borem-nav-group summary,
.borem-nav-group summary::-webkit-details-marker,
.borem-nav-group-summary {
  display: inline-flex;
  align-items: center;
  width: 100%;
  gap: 4px;
}
.borem-nav-group-summary > .borem-nav-link {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}
.borem-nav-group-summary .borem-nav-caret {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
}

.borem-loc-page {
  position: relative;
  overflow: hidden;
  padding: 30px;
  border-radius: 1.5rem;
}
.borem-loc-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--st-border);
}
.borem-loc-page-head h2 {
  margin: 0 0 6px;
  font-size: clamp(22px, 3vw, 32px);
  letter-spacing: -.03em;
}
.borem-loc-page-head p {
  max-width: 780px;
  margin: 0;
  color: var(--st-text-muted);
  line-height: 1.55;
}
.borem-loc-page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.borem-wo-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
}
.borem-wo-toolbar .borem-loc-toolbar-links {
  margin-left: auto;
  display: inline-flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.borem-wo-filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}
.borem-wo-filter-toggle::before {
  content: "";
  width: 14px;
  height: 14px;
  display: inline-block;
  background: currentColor;
  clip-path: polygon(6% 12%, 94% 12%, 62% 50%, 62% 88%, 38% 88%, 38% 50%);
  opacity: .8;
}

#borem-wo-summary.borem-wo-summary,
.borem-wo-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 16px !important;
}
#borem-wo-summary.borem-wo-summary > div,
.borem-wo-summary > div {
  position: relative;
  padding: 16px 16px 15px;
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.78));
  border: 1px solid var(--st-border);
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(15,23,42,.06);
  overflow: hidden;
}
[data-borem-theme="dark"] #borem-wo-summary.borem-wo-summary > div,
[data-borem-theme="dark"] .borem-wo-summary > div {
  background: linear-gradient(180deg, rgba(31,41,55,.92), rgba(17,24,39,.78));
  box-shadow: 0 12px 30px rgba(0,0,0,.18);
}
#borem-wo-summary.borem-wo-summary > div::before,
.borem-wo-summary > div::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--st-orange);
  opacity: .85;
}
#borem-wo-summary.borem-wo-summary span,
.borem-wo-summary span {
  display: block;
  color: var(--st-text-muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .075em;
  margin-bottom: 7px;
}
#borem-wo-summary.borem-wo-summary strong,
.borem-wo-summary strong {
  display: block;
  font-size: 28px;
  line-height: 1;
  letter-spacing: -.04em;
  color: var(--st-text);
}

.borem-wo-filter-drawer {
  position: fixed;
  inset: 0;
  z-index: 9200;
  display: block;
  pointer-events: none;
  visibility: hidden;
}
.borem-wo-filter-drawer.is-open {
  pointer-events: auto;
  visibility: visible;
}
.borem-wo-filter-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .46);
  opacity: 0;
  transition: opacity .18s ease;
}
.borem-wo-filter-drawer.is-open .borem-wo-filter-backdrop { opacity: 1; }
.borem-wo-filter-sheet {
  position: absolute;
  top: 0;
  right: 0;
  width: min(520px, calc(100vw - 24px));
  height: 100%;
  background: var(--st-surface);
  border-left: 1px solid var(--st-border);
  box-shadow: -24px 0 50px rgba(15,23,42,.22);
  transform: translateX(104%);
  transition: transform .22s ease;
  display: flex;
  flex-direction: column;
}
.borem-wo-filter-drawer.is-open .borem-wo-filter-sheet { transform: translateX(0); }
.borem-wo-filter-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--st-border);
}
.borem-wo-filter-head h3 {
  margin: 2px 0 0;
  font-size: 20px;
  letter-spacing: -.02em;
}
.borem-wo-filter-sheet .borem-loc-filter-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 13px;
  padding: 18px 22px 24px;
  overflow-y: auto;
}
.borem-wo-filter-sheet label {
  display: block;
  margin: 0 0 6px;
  color: var(--st-text-muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .065em;
}
.borem-wo-filter-sheet input,
.borem-wo-filter-sheet select {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border-radius: 12px;
  border: 1px solid var(--st-border);
  background: var(--st-bg);
  color: var(--st-text);
}
.borem-wo-filter-sheet input:focus,
.borem-wo-filter-sheet select:focus {
  outline: none;
  border-color: var(--st-orange);
  box-shadow: 0 0 0 3px rgba(240,90,40,.12);
}
.borem-wo-filter-sheet .borem-inline-actions-end {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  padding: 14px 0 0;
  background: linear-gradient(180deg, transparent, var(--st-surface) 24%);
}
.borem-wo-filter-open { overflow: hidden; }

#borem-wo-table {
  border: 1px solid var(--st-border);
  border-radius: 16px;
  overflow: hidden;
  background: var(--st-surface);
  box-shadow: 0 14px 30px rgba(15,23,42,.06);
}
#borem-wo-table th {
  background: color-mix(in srgb, var(--st-bg) 78%, var(--st-surface));
  border-bottom: 1px solid var(--st-border);
  padding: 12px 14px;
}
#borem-wo-table td {
  padding: 14px;
  border-bottom: 1px solid rgba(148,163,184,.18);
}
#borem-wo-table tbody tr:last-child td { border-bottom: 0; }
#borem-wo-table tbody tr {
  transition: background .15s ease, transform .15s ease;
}
#borem-wo-table tbody tr:hover {
  background: color-mix(in srgb, var(--st-orange-soft) 72%, transparent);
}
#borem-wo-table .borem-data-link,
#borem-wo-table .borem-job-link {
  color: var(--st-blue-link);
  font-weight: 650;
  text-decoration: none;
}
#borem-wo-table .borem-data-link:hover,
#borem-wo-table .borem-job-link:hover {
  text-decoration: underline;
}
#borem-wo-table .borem-loc-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  white-space: nowrap;
}

@media (max-width: 1100px) {
  #borem-wo-summary.borem-wo-summary,
  .borem-wo-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .borem-loc-page-head,
  .borem-wo-toolbar { flex-direction: column; align-items: stretch; }
  .borem-wo-toolbar .borem-loc-toolbar-links { margin-left: 0; justify-content: flex-start; }
  #borem-wo-summary.borem-wo-summary,
  .borem-wo-summary { grid-template-columns: 1fr; }
  .borem-wo-filter-sheet { width: 100%; }
}

@media (max-width: 700px) {
  #borem-wo-table td:nth-child(1)::before{content:"Job"}
  #borem-wo-table td:nth-child(2)::before{content:"Status"}
  #borem-wo-table td:nth-child(3)::before{content:"Due By"}
  #borem-wo-table td:nth-child(4)::before{content:"Appointment"}
  #borem-wo-table td:nth-child(5)::before{content:"Technician"}
  #borem-wo-table td:nth-child(6)::before{content:"Service Line"}
  #borem-wo-table td:nth-child(7)::before{content:"Location"}
  #borem-wo-table td:nth-child(8)::before{content:"Bill To"}
  #borem-wo-table td:nth-child(9)::before{content:"Owner"}
}

/* ============================================================
   v3.25.9 — ServiceTrade-inspired dashboard/job detail polish
   ============================================================ */
:root {
  --borem-app-bg: #eef3f8;
  --borem-panel-radius: 16px;
  --borem-panel-shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 10px 24px rgba(15, 23, 42, .05);
}
.borem-app {
  background: var(--borem-app-bg);
}
.borem-main {
  background: var(--borem-app-bg);
}
.borem-topbar {
  background: var(--st-surface);
  border-bottom: 1px solid #dce5ef;
  box-shadow: 0 1px 0 rgba(15,23,42,.03);
}
.borem-page-title {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -.02em;
  color: #0f172a;
}
.borem-content {
  padding: 18px 24px 32px;
}
.borem-card {
  border-color: #d7e0ea;
  border-radius: var(--borem-panel-radius);
  box-shadow: var(--borem-panel-shadow);
  background: #fff;
}
.borem-card-head {
  border-bottom-color: #e6edf5;
  padding: 16px 18px 12px;
}
.borem-card-head h2,
.borem-card-head h3 {
  color: #0f2d4e;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -.01em;
}
.borem-card-body {
  padding: 16px 18px 18px;
}
.borem-btn,
.borem-icon-btn,
.borem-input,
.borem-select,
.borem-filters input,
.borem-filters select {
  border-color: #ccdae8;
  border-radius: 8px;
}
.borem-btn.primary,
.st-badge.primary {
  background: var(--borem-app-accent, var(--st-orange));
  border-color: var(--borem-app-accent, var(--st-orange));
}
.borem-btn:not(.primary):hover,
.borem-icon-btn:hover {
  border-color: var(--borem-app-accent, var(--st-orange));
  color: var(--borem-app-accent, var(--st-orange));
  background: var(--st-orange-soft);
}
.borem-table th {
  background: #f7f9fc;
  color: #64748b;
  border-bottom-color: #dbe5ef;
  font-size: 11px;
}
.borem-table td {
  border-bottom-color: #e7edf4;
  color: #24364a;
}
.borem-table tbody tr:hover {
  background: rgba(88,166,255,.07);
}
.borem-data-link,
.borem-link,
.borem-app a {
  color: var(--borem-app-accent, #1269b0);
}

/* Homepage dashboard shell */
.borem-home-shell {
  margin-bottom: 16px;
}
.borem-home-notice {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--borem-app-accent, #0b67a7);
  color: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .12);
}
.borem-home-notice-icon {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.55);
  font-weight: 800;
  flex: 0 0 24px;
}
.borem-home-notice strong {
  display: block;
  font-size: 13px;
  font-weight: 800;
}
.borem-home-notice span:not(.borem-home-notice-icon) {
  display: block;
  font-size: 12px;
  opacity: .92;
}
.borem-home-notice-close {
  margin-left: auto;
  width: 24px;
  height: 24px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 18px;
  line-height: 1;
}
.borem-home-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}
.borem-home-toolbar select {
  max-width: 170px;
  min-height: 32px;
  background: #fff;
}
.borem-home-grid {
  grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
  gap: 18px;
}
.borem-home-grid .borem-card[data-widget="schedule"] {
  grid-column: 1 / 2;
}
.borem-home-grid .borem-card[data-widget="deficiencies"] {
  grid-column: 2 / 3;
}
.borem-home-grid .borem-kpi {
  min-height: 88px;
}
.borem-kpi .k {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}
.borem-kpi .v {
  color: #0b365f;
  font-weight: 900;
}
.borem-donut circle.fg,
.borem-legend .dot,
#borem-wo-summary.borem-wo-summary > div::before,
.borem-wo-summary > div::before {
  background: var(--borem-app-accent, var(--st-orange));
  stroke: var(--borem-app-accent, var(--st-orange));
}
@media (max-width: 1060px) {
  .borem-home-grid { grid-template-columns: 1fr; }
  .borem-home-grid .borem-card[data-widget="schedule"],
  .borem-home-grid .borem-card[data-widget="deficiencies"] { grid-column: auto; }
}

/* Job detail: vertical, accordion-driven, with right action rail */
#wo-detail-page {
  position: relative;
  padding-right: 68px;
}
#wo-detail-page > div.st-job-body.borem-grid2.borem-grid2-top {
  display: block !important;
  gap: 0 !important;
}
#wo-detail-page > div.st-job-body.borem-grid2.borem-grid2-top > div {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  width: 100%;
}
#wo-detail-page .st-job-header {
  border-radius: var(--borem-panel-radius);
  border: 1px solid #d7e0ea;
  box-shadow: var(--borem-panel-shadow);
  margin-bottom: 14px !important;
}
#wo-detail-page .borem-card.borem-wo-accordion {
  overflow: hidden;
  margin-bottom: 0;
}
#wo-detail-page .borem-wo-accordion > .borem-card-head {
  cursor: pointer;
  user-select: none;
  min-height: 54px;
  padding: 14px 18px;
}
#wo-detail-page .borem-wo-accordion > .borem-card-head:hover {
  background: #f8fbff;
}
#wo-detail-page .borem-accordion-caret {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-left: auto;
  border-radius: 8px;
  color: #7c93ac;
  transition: transform .16s ease, background .16s ease, color .16s ease;
}
#wo-detail-page .borem-wo-accordion.is-open .borem-accordion-caret {
  transform: rotate(180deg);
  color: var(--borem-app-accent, var(--st-orange));
  background: var(--st-orange-soft);
}
#wo-detail-page .borem-wo-accordion > .borem-card-body[hidden] {
  display: none !important;
}
.borem-wo-sticky-actions {
  position: fixed;
  right: 18px;
  top: 112px;
  z-index: 110;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px;
  border: 1px solid #d7e0ea;
  border-radius: 14px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 10px 28px rgba(15,23,42,.14);
  backdrop-filter: blur(12px);
}
.borem-wo-sticky-actions button {
  width: 78px;
  min-height: 34px;
  border: 1px solid #ccdae8;
  border-radius: 10px;
  background: #f8fbff;
  color: #33516f;
  font-size: 12px;
  font-weight: 800;
}
.borem-wo-sticky-actions button:hover {
  color: #fff;
  background: var(--borem-app-accent, var(--st-orange));
  border-color: var(--borem-app-accent, var(--st-orange));
}
.borem-wo-sticky-actions button.danger:hover {
  background: #ef4444;
  border-color: #ef4444;
}
.borem-record-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.borem-record-dialog {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100vw - 48px));
  height: min(820px, calc(100vh - 48px));
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, .34);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.borem-record-dialog iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--borem-app-bg);
}
.borem-alert-danger {
  color: #991b1b;
  border-color: #fecaca;
  background: #fef2f2;
}
@media (max-width: 980px) {
  #wo-detail-page { padding-right: 0; }
  .borem-wo-sticky-actions {
    position: sticky;
    top: 8px;
    right: auto;
    flex-direction: row;
    overflow-x: auto;
    margin-bottom: 12px;
  }
  .borem-wo-sticky-actions button { flex: 1 0 auto; width: auto; }
}
[data-borem-theme="dark"] {
  --borem-app-bg: #0f1720;
}
[data-borem-theme="dark"] .borem-card,
[data-borem-theme="dark"] .borem-topbar,
[data-borem-theme="dark"] .borem-record-dialog,
[data-borem-theme="dark"] .borem-wo-sticky-actions {
  background: var(--st-surface);
  border-color: var(--st-border);
}
[data-borem-theme="dark"] .borem-page-title,
[data-borem-theme="dark"] .borem-card-head h2,
[data-borem-theme="dark"] .borem-card-head h3,
[data-borem-theme="dark"] .borem-kpi .v {
  color: var(--st-text);
}
[data-borem-theme="dark"] #wo-detail-page .borem-wo-accordion > .borem-card-head:hover,
[data-borem-theme="dark"] .borem-wo-sticky-actions button {
  background: rgba(255,255,255,.04);
}


/* v3.25.11 — glass preloader, focused record modals, and Job Detail polish */
.borem-preloader {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: grid;
  place-items: center;
  background: rgba(2, 6, 12, .75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: opacity .22s ease, visibility .22s ease;
}
.borem-preloader.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.borem-preloader-glass {
  width: 112px;
  height: 112px;
  display: grid;
  place-items: center;
  border-radius: 28px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.22);
  box-shadow: 0 24px 80px rgba(0,0,0,.42), inset 0 1px 0 rgba(255,255,255,.18);
}
.borem-preloader-glass img { max-width: 76px; max-height: 76px; object-fit: contain; animation: boremPreloaderPulse 1.15s ease-in-out infinite; }
@keyframes boremPreloaderPulse { 0%,100%{transform:scale(1);opacity:.86} 50%{transform:scale(1.06);opacity:1} }
.borem-app-modal .borem-sidebar,
.borem-app-modal .borem-topbar,
.borem-app-modal .borem-mobile-menu-shell,
.borem-app-modal .borem-sidebar-toggle-wrap { display: none !important; }
.borem-app-modal .borem-main { margin-left: 0 !important; width: 100% !important; min-height: 100vh; }
.borem-app-modal .borem-content { padding: 18px !important; }
.borem-app-modal #wo-detail-page { padding-right: 0 !important; }
.borem-record-modal .borem-modal-backdrop { z-index: 1 !important; }
.borem-record-dialog { z-index: 2 !important; }

#wo-detail-page .borem-wo-detail-hero {
  padding: 26px 30px 24px !important;
  border-radius: 22px !important;
  min-height: 168px;
  background: #fff;
}
#wo-detail-page .borem-wo-detail-hero .st-job-header-top { align-items: flex-start; }
.borem-wo-hero-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: #15803d;
  font-size: 13px;
  font-weight: 800;
}
.borem-wo-hero-status-dot { width: 8px; height: 8px; border-radius: 99px; background: currentColor; }
#wo-detail-page #wo-page-title { font-size: 20px !important; color: #24415f; margin: 0 0 10px !important; }
#wo-detail-page #wo-action-bar .borem-btn,
#wo-detail-page #wo-photo-row .borem-btn { border-radius: 8px; min-height: 28px; padding: 5px 10px; }
.borem-wo-sticky-actions {
  right: 18px;
  top: 96px;
  width: 58px;
  gap: 0;
  padding: 10px 0;
  align-items: center;
  border-radius: 18px;
  background: rgba(255,255,255,.88);
}
.borem-wo-due-card {
  position: absolute;
  right: 72px;
  top: 0;
  width: 112px;
  min-height: 72px;
  padding: 12px 14px;
  border: 1px solid #e5edf6;
  border-radius: 18px;
  background: rgba(255,255,255,.95);
  box-shadow: 0 10px 28px rgba(15,23,42,.08);
}
.borem-wo-due-card span { display:block; color: var(--borem-app-accent, #1769aa); font-size: 12px; font-weight: 900; margin-bottom: 5px; }
.borem-wo-due-card strong { display:block; color: #24415f; font-size: 15px; line-height: 1.25; }
.borem-wo-sticky-actions button {
  width: 42px !important;
  height: 42px;
  min-height: 42px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #7d9ac0;
  box-shadow: none;
  padding: 0;
  margin: 1px 0;
}
.borem-wo-sticky-actions button span { display: block; font-size: 20px; line-height: 42px; }
.borem-wo-sticky-actions button em { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
.borem-wo-sticky-actions button:hover { background: #eef6ff; color: var(--borem-app-accent, #1769aa); border-color: transparent; }
.borem-wo-sticky-actions button.danger:hover { color: #ef4444; background:#fff1f2; }
.borem-map-card { display:flex; align-items:center; justify-content:space-between; gap:14px; border:1px solid #dbe6f2; border-radius:14px; padding:14px; background:#f8fbff; }
.borem-comment-list { display:grid; gap:10px; }
.borem-comment-card { border:1px solid #dbe6f2; border-radius:12px; padding:12px 14px; background:#fbfdff; }
.borem-comment-card span { display:block; font-size:12px; font-weight:900; color:#607d9b; margin-bottom:5px; }
.borem-comment-card p { margin:0; color:#24415f; white-space:pre-wrap; }
@media (max-width: 980px) {
  .borem-wo-due-card { position: static; width: auto; min-height: 0; margin-right: 8px; }
  .borem-wo-sticky-actions { width:auto; align-items:center; padding:8px; }
}

/* v3.25.15 — Bulk import status modal */
#borem-import-status-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
#borem-import-status-modal .borem-import-status-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 12, 24, .72);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  z-index: 1 !important;
}
#borem-import-status-modal .borem-import-status-dialog {
  position: relative;
  z-index: 2 !important;
  width: min(760px, 96vw);
  max-height: min(720px, 92vh);
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 28px 80px rgba(2, 8, 23, .34);
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,250,252,.96));
}
.borem-import-status-head {
  padding: 22px 24px 18px !important;
  border-bottom: 1px solid rgba(148,163,184,.22) !important;
  background:
    radial-gradient(circle at top left, color-mix(in srgb, var(--st-accent, #2563eb) 18%, transparent), transparent 36%),
    linear-gradient(135deg, rgba(255,255,255,.9), rgba(248,250,252,.86));
}
.borem-import-kicker {
  color: var(--st-accent, #2563eb);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.borem-import-status-head h3 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.03em;
}
.borem-import-status-body {
  padding: 22px 24px !important;
}
.borem-import-step-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.borem-import-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}
.borem-import-step.is-active {
  color: #fff;
  background: var(--st-accent, #2563eb);
  box-shadow: 0 10px 24px color-mix(in srgb, var(--st-accent, #2563eb) 22%, transparent);
}
.borem-import-step.is-done {
  color: #065f46;
  background: #d1fae5;
}
.borem-import-progress-shell {
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
  box-shadow: inset 0 1px 2px rgba(15,23,42,.08);
  margin-bottom: 18px;
}
.borem-import-progress-bar {
  height: 100%;
  min-width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--st-accent, #2563eb), color-mix(in srgb, var(--st-accent, #2563eb) 62%, #22c55e));
  transition: width .25s ease;
}
.borem-import-progress-bar.is-indeterminate {
  width: 35% !important;
  animation: boremImportIndeterminate 1.05s ease-in-out infinite;
}
@keyframes boremImportIndeterminate {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}
.borem-import-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.borem-import-status-grid > div {
  padding: 12px;
  border: 1px solid rgba(148,163,184,.22);
  border-radius: 14px;
  background: #fff;
}
.borem-import-status-grid span {
  display: block;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 5px;
}
.borem-import-status-grid strong {
  display: block;
  color: #0f172a;
  font-size: 18px;
  line-height: 1;
}
.borem-import-message {
  padding: 12px 14px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--st-accent, #2563eb) 8%, #fff);
  color: #334155;
  font-size: 13px;
  font-weight: 650;
}
.borem-import-errors {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid #fecaca;
  border-radius: 14px;
  background: #fef2f2;
  color: #991b1b;
  max-height: 160px;
  overflow: auto;
  font-size: 12px;
}
.borem-import-errors ul,
.borem-import-inline-result ul {
  margin: 8px 0 0 18px;
  padding: 0;
}
.borem-import-status-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px 24px !important;
  border-top: 1px solid rgba(148,163,184,.22);
  background: rgba(248,250,252,.92);
}
.borem-import-inline-result {
  padding: 14px 16px;
  border-radius: 14px;
  margin-bottom: 8px;
  border: 1px solid rgba(148,163,184,.22);
  background: #eff6ff;
}
.borem-import-inline-result.is-done {
  background: #d1fae5;
  border-color: #a7f3d0;
}
@media (max-width: 720px) {
  #borem-import-status-modal { padding: 12px; align-items: flex-end; }
  #borem-import-status-modal .borem-import-status-dialog { width: 100%; border-radius: 22px 22px 0 0; }
  .borem-import-status-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ============================================================
   v3.25.17 — App table integration + company detail polish
   ============================================================ */
.borem-card {
  padding: 30px;
}
.borem-card > .borem-card-head:first-child {
  margin: -30px -30px 0;
  padding: 20px 30px 14px;
}
.borem-card > .borem-card-body {
  margin: 0 -30px -30px;
  padding: 24px 30px 30px;
}
@media (max-width: 780px) {
  .borem-card { padding: 10px; }
  .borem-card > .borem-card-head:first-child {
    margin: -10px -10px 0;
    padding: 12px 10px 10px;
  }
  .borem-card > .borem-card-body {
    margin: 0 -10px -10px;
    padding: 12px 10px 10px;
  }
}
.borem-table-wrap,
.borem-card-body .borem-table-wrap {
  width: 100%;
  max-width: 100%;
  border: 1px solid #e3ebf4;
  border-radius: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}
@media (min-width: 781px) {
  .borem-card-body .borem-table,
  .borem-card > .borem-table,
  table.borem-table {
    display: table !important;
    width: 100% !important;
    max-width: 100% !important;
    border-collapse: separate;
    border-spacing: 0;
  }
}
.borem-table {
  width: 100% !important;
  min-width: 100%;
  background: transparent;
}
.borem-table th,
.borem-table td {
  border-color: #edf2f7;
}
.borem-table th {
  background: #f8fbfe;
  color: #53677f;
}
.borem-table td {
  background: #fff;
}
.borem-table tbody tr:last-child td {
  border-bottom: 0;
}
.borem-table tbody tr:hover td {
  background: rgba(18,105,176,.045);
}
.borem-card-body > table.borem-table,
.borem-card > table.borem-table {
  border: 1px solid #e3ebf4;
  border-radius: 12px;
  overflow: hidden;
}
.borem-wo-due-card {
  width: 150px !important;
}
.borem-wo-due-card strong {
  white-space: nowrap;
}

/* Company detail accordions */
.borem-location-detail-page .borem-loc-detail-section.borem-company-accordion {
  overflow: hidden;
  border: 1px solid #dce6f1;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
  margin-bottom: 12px;
}
.borem-location-detail-page .borem-company-accordion > .borem-loc-detail-section-head {
  cursor: pointer;
  user-select: none;
  min-height: 54px;
  padding: 16px 18px;
  border-bottom: 1px solid #e7eef6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.borem-location-detail-page .borem-company-accordion > .borem-loc-detail-section-head:hover {
  background: #f8fbff;
}
.borem-location-detail-page .borem-company-accordion > .borem-loc-detail-section-head h3 {
  margin: 0;
}
.borem-location-detail-page .borem-company-accordion > .borem-loc-detail-section-head p {
  margin: 4px 0 0;
}
.borem-location-detail-page .borem-company-accordion .borem-company-accordion-caret {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 8px;
  color: #7c93ac;
  transition: transform .16s ease, background .16s ease, color .16s ease;
}
.borem-location-detail-page .borem-company-accordion.is-open .borem-company-accordion-caret {
  transform: rotate(180deg);
  color: var(--borem-app-accent, #1269b0);
  background: rgba(18,105,176,.08);
}
.borem-location-detail-page .borem-company-accordion > :not(.borem-loc-detail-section-head) {
  padding: 18px;
}
.borem-location-detail-page .borem-company-accordion > [hidden] {
  display: none !important;
}
.borem-location-detail-page .borem-company-accordion .borem-table-wrap,
.borem-location-detail-page .borem-company-accordion .borem-list {
  margin-top: 0;
}
@media (max-width: 780px) {
  .borem-location-detail-page .borem-company-accordion > .borem-loc-detail-section-head { padding: 12px; }
  .borem-location-detail-page .borem-company-accordion > :not(.borem-loc-detail-section-head) { padding: 12px; }
}
.borem-location-detail-page .borem-company-accordion > .borem-company-accordion-body {
  padding: 18px;
}
.borem-location-detail-page .borem-company-accordion > .borem-company-accordion-body[hidden] {
  display: none !important;
}
@media (max-width: 780px) {
  .borem-location-detail-page .borem-company-accordion > .borem-company-accordion-body { padding: 12px; }
}

/* v3.25.18: app-wide table/filter refinements */
.borem-card-body {
  max-width: -webkit-fill-available;
}
.borem-table-wrap,
.borem-card-body .borem-table-wrap,
.borem-card-body > table.borem-table,
.borem-card > table.borem-table,
table.borem-table,
.borem-table {
  border: 0 !important;
}
.borem-table-wrap,
.borem-card-body .borem-table-wrap {
  box-shadow: none !important;
}
.borem-contact-filter-row {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 12px !important;
  align-items: end;
  width: 100%;
}
.borem-contact-filter-row .borem-loc-filter-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
@media (max-width: 980px) {
  .borem-contact-filter-row {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
@media (max-width: 640px) {
  .borem-contact-filter-row {
    grid-template-columns: 1fr !important;
  }
  .borem-contact-filter-row .borem-loc-filter-actions {
    justify-content: stretch;
  }
  .borem-contact-filter-row .borem-loc-filter-actions .borem-btn {
    flex: 1 1 auto;
  }
}

/* v3.25.20: clearer label/value detail grids and destructive table actions */
.borem-meta-grid > div,
.borem-loc-meta-grid > div,
.borem-loc-rollup-grid > div,
.borem-loc-profile-grid > div,
#asset-meta > div,
#assetext-meta > div,
#assetext-services > div,
#assetext-related > div,
#borem-contract-details > div,
#borem-contract-summary > div {
  gap: 6px;
}
.borem-meta-grid > div > span,
.borem-loc-meta-grid > div > span,
.borem-loc-rollup-grid > div > span,
.borem-loc-profile-grid > div > span,
#asset-meta > div > span,
#assetext-meta > div > span,
#assetext-services > div > span,
#assetext-related > div > span,
#borem-contract-details > div > span,
#borem-contract-summary > div > span {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}
.borem-meta-grid > div > span::after,
.borem-loc-meta-grid > div > span::after,
.borem-loc-rollup-grid > div > span::after,
.borem-loc-profile-grid > div > span::after,
#asset-meta > div > span::after,
#assetext-meta > div > span::after,
#assetext-services > div > span::after,
#assetext-related > div > span::after,
#borem-contract-details > div > span::after,
#borem-contract-summary > div > span::after {
  content: ':';
}
.borem-table-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
}
.borem-btn.borem-btn-danger {
  border-color: rgba(185, 28, 28, 0.28);
  color: #b91c1c;
  background: rgba(254, 226, 226, 0.74);
}
.borem-btn.borem-btn-danger:hover {
  border-color: rgba(185, 28, 28, 0.48);
  background: rgba(254, 202, 202, 0.86);
}

/* v3.25.25: global borem table utilities */
.borem-table-count {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--st-text-muted, #64748b);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.borem-table th .borem-table-sort {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  text-transform: inherit;
  letter-spacing: inherit;
  cursor: pointer;
}
.borem-table th .borem-table-sort:hover,
.borem-table th .borem-table-sort:focus-visible {
  color: var(--borem-app-primary, var(--primary, #1269b0));
  outline: none;
}
.borem-table-sort-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.borem-table-sort-icon {
  opacity: .55;
  font-size: 12px;
  line-height: 1;
  margin-left: auto;
}
.borem-table th.is-asc .borem-table-sort-icon,
.borem-table th.is-desc .borem-table-sort-icon {
  opacity: 1;
  color: var(--borem-app-primary, var(--primary, #1269b0));
}
.borem-table th.is-asc .borem-table-sort-icon::before { content: '↑'; }
.borem-table th.is-desc .borem-table-sort-icon::before { content: '↓'; }
.borem-table th.is-asc .borem-table-sort-icon,
.borem-table th.is-desc .borem-table-sort-icon { font-size: 0; }
.borem-table th.is-asc .borem-table-sort-icon::before,
.borem-table th.is-desc .borem-table-sort-icon::before { font-size: 12px; }
@media (max-width: 720px) {
  .borem-table-count { justify-content: flex-start; margin: 0 0 10px; }
}

/* v3.25.26: client-presentation polish for tables, exports, and action feedback */
.borem-table-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,.94), rgba(248,250,252,.92));
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}
.borem-table-tools .borem-table-count {
  margin: 0;
  justify-content: flex-start;
  white-space: nowrap;
}
.borem-table-tool-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}
.borem-table-search {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: min(280px, 42vw);
  margin: 0;
  color: var(--st-text-muted, #64748b);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.borem-table-search input {
  width: 100%;
  min-width: 0;
  height: 34px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 999px;
  padding: 0 12px;
  background: #fff;
  color: var(--st-text, #0f172a);
  font-size: 13px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.borem-table-search input:focus {
  border-color: var(--borem-app-primary, var(--primary, #1269b0));
  box-shadow: 0 0 0 3px rgba(18, 105, 176, .12);
}
.borem-table-export[disabled] { opacity: .55; cursor: not-allowed; }
#borem-toast-host {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 10050;
  display: grid;
  gap: 10px;
  width: min(390px, calc(100vw - 28px));
  pointer-events: none;
}
.borem-toast {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px 12px;
  border: 1px solid rgba(148, 163, 184, .25);
  border-radius: 16px;
  background: rgba(15, 23, 42, .94);
  color: #fff;
  box-shadow: 0 20px 50px rgba(15, 23, 42, .22);
  transform: translateY(10px);
  opacity: 0;
  transition: transform .18s ease, opacity .18s ease;
  pointer-events: auto;
}
.borem-toast.is-visible { transform: translateY(0); opacity: 1; }
.borem-toast-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--borem-app-primary, var(--primary, #1269b0));
}
.borem-toast-success .borem-toast-dot { background: #22c55e; }
.borem-toast-danger .borem-toast-dot { background: #ef4444; }
.borem-toast-copy { min-width: 0; font-size: 13px; font-weight: 650; line-height: 1.35; }
.borem-toast-close {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  color: #fff;
  cursor: pointer;
  font-size: 17px;
  line-height: 1;
}
.borem-toast-close:hover { background: rgba(255,255,255,.20); }
@media (max-width: 720px) {
  .borem-table-tools { align-items: stretch; flex-direction: column; }
  .borem-table-tool-actions { justify-content: stretch; flex-wrap: wrap; }
  .borem-table-search { min-width: 100%; flex: 1 1 100%; }
  .borem-table-export { flex: 1 1 auto; }
  #borem-toast-host { right: 14px; bottom: 14px; }
}

/* ═══════════════════════════════════════════════════════════════════════
   v3.26.0 — Client Presentation Release Polish
   ═══════════════════════════════════════════════════════════════════════ */
.borem-release-badge{display:inline-flex;align-items:center;gap:6px;margin-left:10px;padding:5px 9px;border-radius:999px;background:var(--st-orange-soft);color:var(--st-orange);font-size:11px;font-weight:800;letter-spacing:.02em;text-transform:uppercase;white-space:nowrap}
.borem-command-pipeline{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px;margin:0 0 14px;padding:12px;background:linear-gradient(180deg,var(--st-card),var(--st-surface));border:1px solid var(--st-border);border-radius:14px;box-shadow:0 1px 2px rgba(15,23,42,.04)}
.borem-pipeline-step{display:flex;align-items:center;gap:8px;justify-content:center;min-height:44px;border:1px solid var(--st-border);border-radius:11px;background:var(--st-card);color:var(--st-text);font-size:12px;font-weight:700;cursor:pointer;transition:transform .12s ease,box-shadow .12s ease,border-color .12s ease,background .12s ease}
.borem-pipeline-step span{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:999px;background:var(--st-bg);color:var(--st-muted);font-size:11px;font-weight:900}
.borem-pipeline-step:hover{transform:translateY(-1px);border-color:var(--st-orange);box-shadow:0 8px 18px rgba(15,23,42,.08)}
.borem-pipeline-step.is-done{background:rgba(16,185,129,.08);border-color:rgba(16,185,129,.24)}
.borem-pipeline-step.is-done span{background:#10b981;color:white}
.borem-pipeline-step.is-current{background:var(--st-orange-soft);border-color:var(--st-orange);color:var(--st-orange)}
.borem-pipeline-step.is-current span{background:var(--st-orange);color:white}
.borem-command-activity{margin-top:14px}
.borem-command-chips{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}
.borem-command-chips span{display:flex;flex-direction:column;gap:4px;padding:12px;border-radius:12px;background:var(--st-bg);border:1px solid var(--st-border);font-size:12px;color:var(--st-muted);text-align:center}
.borem-command-chips strong{font-size:22px;line-height:1;color:var(--st-text)}
.borem-import-preflight{margin:12px 0;padding:12px 14px;border-radius:12px;background:var(--st-orange-soft);border:1px solid var(--st-orange-mid);font-size:12px;color:var(--st-text)}
.borem-import-preflight strong{display:block;margin-bottom:4px;color:var(--st-orange);font-size:13px}
.borem-import-preflight ul{margin:7px 0 0 18px;padding:0}.borem-import-preflight li{margin:3px 0}.borem-preflight-ok{margin-top:4px;color:#047857;font-weight:700}
.borem-empty-state{padding:32px;text-align:center;border:1px dashed var(--st-border);border-radius:14px;background:var(--st-bg)}.borem-empty-state h3{margin:0 0 6px}.borem-empty-state p{margin:0;color:var(--st-muted)}
.borem-search-dropdown{min-width:340px}.gs-result{position:relative}.gs-result:after{content:'Open';opacity:0;font-size:10px;font-weight:800;color:var(--st-orange);text-transform:uppercase;letter-spacing:.06em}.gs-result:hover:after{opacity:1}
@media (max-width:900px){.borem-command-pipeline{grid-template-columns:repeat(2,minmax(0,1fr))}.borem-command-chips{grid-template-columns:repeat(2,minmax(0,1fr))}.borem-release-badge{display:none}.borem-search-dropdown{min-width:280px}}

/* ═══════════════════════════════════════════════════════════════════════
   v3.26.1 — My Company, roles, and Service Line modal polish
   ═══════════════════════════════════════════════════════════════════════ */
.borem-account-page{display:flex;flex-direction:column;gap:14px}.borem-account-hero{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:22px;background:linear-gradient(135deg,var(--st-card),var(--st-surface))}.borem-account-hero-main h2{margin:4px 0 6px;font-size:28px;letter-spacing:-.03em}.borem-kicker{display:inline-flex;align-items:center;border-radius:999px;padding:4px 9px;background:var(--st-orange-soft);color:var(--st-orange);font-weight:850;font-size:11px;letter-spacing:.08em;text-transform:uppercase}.borem-account-hero-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.borem-account-grid{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:14px;align-items:start}.borem-account-profile-card .borem-card-body{padding:18px}.borem-account-savebar{justify-content:space-between;border-top:1px solid var(--st-border);background:var(--st-bg);border-radius:0 0 14px 14px}.borem-account-side{display:flex;flex-direction:column;gap:14px}.borem-account-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.borem-account-stats div{border:1px solid var(--st-border);border-radius:12px;background:var(--st-bg);padding:12px;text-align:center}.borem-account-stats strong{display:block;font-size:22px;line-height:1;color:var(--st-text)}.borem-account-stats span{display:block;margin-top:4px;color:var(--st-text-muted);font-size:12px;font-weight:650}.borem-account-links{display:flex;flex-direction:column;gap:6px}.borem-account-links a{display:flex;justify-content:space-between;align-items:center;border:1px solid var(--st-border);border-radius:11px;padding:10px 12px;text-decoration:none;color:var(--st-text);font-weight:700;background:var(--st-bg)}.borem-account-links a:hover{border-color:var(--st-orange);background:var(--st-orange-soft);color:var(--st-orange)}.borem-readiness-meter{height:9px;border-radius:999px;background:var(--st-bg);border:1px solid var(--st-border);overflow:hidden;margin-bottom:8px}.borem-readiness-meter span{display:block;height:100%;background:var(--st-orange);border-radius:999px;transition:width .2s ease}.borem-readiness-list{display:flex;flex-direction:column;gap:6px}.borem-readiness-list div{display:flex;gap:8px;align-items:center;font-size:13px;font-weight:650;color:var(--st-text-muted)}.borem-readiness-list div span{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;border-radius:999px;background:var(--st-bg);border:1px solid var(--st-border);font-size:11px}.borem-readiness-list div.is-done{color:#047857}.borem-readiness-list div.is-done span{background:#10b981;color:#fff;border-color:#10b981}.borem-role-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;border-bottom:1px solid var(--st-border)}.borem-error-state{border-color:rgba(239,68,68,.25);background:rgba(239,68,68,.05)}.borem-service-line-modal .borem-modal-dialog{width:min(760px,calc(100vw - 28px));max-height:92vh;overflow:auto}.borem-service-line-form label,.borem-account-profile-card label{font-size:12px;font-weight:800;color:var(--st-text-muted);margin-bottom:5px;display:block}.borem-release-badge{text-transform:none;letter-spacing:0;font-size:12px;padding:4px 8px}
@media (max-width: 1000px){.borem-account-grid{grid-template-columns:1fr}.borem-account-side{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.borem-account-side .borem-card:last-child{grid-column:1/-1}}
@media (max-width: 720px){.borem-account-hero{align-items:flex-start;flex-direction:column}.borem-account-hero-main h2{font-size:23px}.borem-account-side{display:flex}.borem-account-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.borem-role-row{align-items:flex-start;flex-direction:column}.borem-role-row .borem-btn{width:100%}}

/* v3.26.2 — location workflow, history, and tech mobile polish */
.borem-inline-check { display:flex; align-items:center; gap:8px; margin-top:8px; font-size:13px; color:var(--st-text); }
.borem-inline-check input { width:auto; }
.borem-inline-help { padding:10px 12px; border:1px solid var(--st-orange-mid); background:var(--st-orange-soft); border-radius:12px; font-size:13px; color:var(--st-text); }
.borem-btn-contact { border-color:var(--st-orange-mid); background:var(--st-orange-soft); color:var(--st-orange); font-weight:800; }
.borem-contact-popover { z-index:100000; display:grid; place-items:center; padding:18px; }
.borem-contact-popover-card { width:min(420px, calc(100vw - 32px)); padding:22px; border-radius:22px; }
.borem-contact-pop { display:grid; gap:12px; }
.borem-contact-pop h3 { margin:0; font-size:22px; letter-spacing:-.02em; }
.borem-contact-pop div { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 0; border-bottom:1px solid var(--st-border); }
.borem-contact-pop div:last-child { border-bottom:0; }
.borem-contact-pop span { color:var(--st-text-muted); font-weight:700; }
.borem-contact-pop strong { text-align:right; overflow-wrap:anywhere; }
.borem-timeline-filter { display:flex; flex-wrap:wrap; gap:8px; margin:0 0 12px; }
.borem-timeline-category { display:inline-flex; margin-left:6px; padding:2px 7px; border-radius:999px; background:var(--st-bg); color:var(--st-text-muted); font-size:10px; text-transform:uppercase; letter-spacing:.05em; }
.borem-timeline-changes { margin-top:8px; padding:8px 10px; border:1px solid var(--st-border); border-radius:12px; background:var(--st-bg); font-size:12px; }
.borem-timeline-changes summary { cursor:pointer; font-weight:800; color:var(--st-text); }
.borem-timeline-changes div { margin-top:6px; display:flex; gap:6px; flex-wrap:wrap; }
.borem-timeline-changes em { color:var(--st-text-muted); font-style:normal; text-decoration:line-through; }

@media (max-width: 900px) {
  .borem-tech-day-card { padding:10px !important; overflow:hidden; }
  .borem-tech-day-shell { min-height:auto; width:100%; max-width:100%; gap:10px; display:grid; }
  .borem-tech-day-progress { max-width:100%; border:0; overflow:hidden; }
  .borem-tech-day-main { max-width:100%; min-height:auto; padding:18px; border-radius:18px; box-sizing:border-box; overflow:hidden; }
  .borem-tech-day-hero { min-height:auto; gap:12px; }
  .borem-tech-day-prompt h3 { font-size:clamp(28px, 7vw, 42px); line-height:1.02; }
  .borem-tech-day-actions#techday-primary-actions .borem-btn { width:100%; justify-content:center; min-height:54px; }
  .borem-tech-day-utility .borem-btn, .borem-tech-day-job .borem-btn { width:100%; justify-content:center; }
}
@media (max-width: 520px) {
  .borem-tech-day-card { margin-left:-4px; margin-right:-4px; }
  .borem-tech-day-main { padding:14px; border-radius:16px; }
  .borem-tech-day-banner { width:100%; justify-content:center; }
  .borem-tech-day-actions { width:100%; }
  .borem-loc-page-actions { width:100%; justify-content:stretch; display:grid; grid-template-columns:1fr; }
  .borem-loc-page-actions .borem-btn { width:100%; justify-content:center; }
}
#locd-title + .borem-btn-contact { margin-top:8px; justify-self:start; }

/* v3.26.3 — Location create company and address autocomplete polish */
.borem-results-create {
  border-top: 1px solid rgba(15, 23, 42, .08) !important;
  background: linear-gradient(180deg, rgba(37,99,235,.06), rgba(37,99,235,.02)) !important;
  color: var(--borem-app-primary, #2563eb) !important;
}
.borem-results-create strong { display:inline-flex; align-items:center; gap:6px; }
.borem-results-empty { padding: 9px 11px; }
.borem-create-company-panel {
  border: 1px solid rgba(37,99,235,.16);
  border-radius: 18px;
  padding: 16px;
  background: linear-gradient(180deg, rgba(37,99,235,.05), rgba(255,255,255,.96));
  box-shadow: 0 12px 32px rgba(15,23,42,.06);
}
.borem-create-company-panel-head {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  margin-bottom:14px;
}
.borem-create-company-panel-head strong { display:block; font-size:15px; color:var(--st-text, #0f172a); }
.borem-create-company-panel-head span { display:block; margin-top:2px; font-size:12px; color:var(--st-muted, #64748b); }
.borem-existing-company-snapshot { grid-column: 1 / -1; }
.borem-google-address[data-borem-google-unavailable="1"] {
  background-image: linear-gradient(90deg, rgba(250,204,21,.10), rgba(250,204,21,0));
}
.pac-container { z-index: 2147483647 !important; border-radius: 12px; box-shadow: 0 18px 48px rgba(15,23,42,.16); border: 1px solid rgba(15,23,42,.08); }
@media (max-width: 720px) {
  .borem-create-company-panel { padding: 12px; border-radius: 14px; }
  .borem-create-company-panel-head { flex-direction:column; }
  .borem-create-company-panel-head .borem-btn { width:100%; justify-content:center; }
}

.borem-google-address-note {
  display:none;
  margin:6px 0 0;
  font-size:12px;
  line-height:1.35;
  color:var(--st-muted, #64748b);
}
.borem-google-address[data-borem-google-unavailable="1"] + .borem-google-address-note,
.borem-google-address-note:not([hidden]) {
  display:block;
}

/* ================================================================
   v3.26.6 — Mobile viewport containment and true table scrolling
   ================================================================ */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}
.borem-app,
.borem-main,
.borem-content,
.borem-card,
.borem-card-body,
.borem-topbar,
.borem-mobile-nav,
.borem-mobile-menu-sheet {
  box-sizing: border-box;
  max-width: 100%;
  min-width: 0;
}
.borem-main,
.borem-content,
.borem-card-body {
  overflow-x: clip;
}
@supports not (overflow-x: clip) {
  .borem-main,
  .borem-content,
  .borem-card-body { overflow-x: hidden; }
}

@media (max-width: 979px) {
  .borem-topbar {
    width: 100%;
    max-width: 100vw;
    min-height: 52px;
    height: auto;
    padding: 8px 10px;
    gap: 8px;
    overflow: hidden;
  }
  .borem-topbar-left {
    flex: 1 1 auto;
    min-width: 0;
  }
  .borem-page-title {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .borem-top-actions {
    flex: 0 1 auto;
    min-width: 0;
    max-width: 62vw;
    justify-content: flex-end;
    overflow: hidden;
  }
  .borem-global-search,
  #borem-global-search-wrap {
    flex: 1 1 160px;
    min-width: 0;
    max-width: min(280px, 42vw);
  }
  #borem-global-search {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }
  .borem-top-actions .borem-btn {
    padding-inline: 9px;
    max-width: 96px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}
@media (max-width: 640px) {
  .borem-top-actions { max-width: 48vw; }
  .borem-global-search,
  #borem-global-search-wrap { max-width: 34vw; }
  .borem-top-actions #borem-edit-widgets,
  .borem-top-actions a[href*="page=borem-tools"] { display: none !important; }
}
@media (max-width: 480px) {
  .borem-topbar { padding-inline: 8px; }
  .borem-top-actions { gap: 6px; max-width: 104px; }
  .borem-global-search,
  #borem-global-search-wrap { display: none !important; }
}

@media (max-width: 979px) {
  .borem-mobile-nav {
    width: 100%;
    max-width: 100vw;
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    gap: 2px;
    padding: 5px 6px calc(5px + env(safe-area-inset-bottom));
    overflow: hidden;
  }
  .borem-mnav-item {
    min-width: 0;
    min-height: 48px;
    padding: 4px 2px;
    gap: 3px;
    overflow: hidden;
  }
  .borem-mnav-ico,
  .borem-mnav-ico .borem-ico {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
  }
  .borem-mnav-text {
    max-width: 100%;
    font-size: clamp(8px, 2.35vw, 10px);
    line-height: 1.05;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}
@media (max-width: 360px) {
  .borem-mnav-text { display: none; }
  .borem-mnav-item { min-height: 44px; }
  .borem-main { padding-bottom: 58px; }
}

/* Tables are the only mobile elements allowed to scroll horizontally. Keep
   headers and body aligned by preserving native table layout on all sizes. */
.borem-table-wrap,
.borem-card-body .borem-table-wrap,
.borem-card > .borem-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto !important;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}
@media (max-width: 700px) {
  .borem-table,
  table.borem-table,
  .borem-card-body .borem-table,
  .borem-card > .borem-table {
    display: table !important;
    width: max-content !important;
    min-width: 100% !important;
    max-width: none !important;
    table-layout: auto;
    overflow: visible !important;
    border-collapse: separate;
    border-spacing: 0;
  }
  .borem-table thead,
  .borem-card-body .borem-table thead,
  #borem-loc-table > thead {
    display: table-header-group !important;
  }
  .borem-table tbody,
  .borem-card-body .borem-table tbody,
  #borem-loc-table > tbody {
    display: table-row-group !important;
  }
  .borem-table tr,
  .borem-table tbody tr,
  #borem-loc-table > tbody > tr {
    display: table-row !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
  }
  .borem-table th,
  .borem-table td,
  .borem-table tbody td,
  #borem-loc-table > tbody > tr > td {
    display: table-cell !important;
    padding: 9px 10px !important;
    white-space: nowrap;
    vertical-align: middle;
    border-bottom: 1px solid rgba(224,228,232,.7);
  }
  .borem-table td::before,
  .borem-table tbody td::before,
  #borem-loc-table > tbody > tr > td::before {
    content: none !important;
    display: none !important;
  }
  .borem-table td a,
  .borem-table td strong,
  .borem-table td span {
    max-width: 280px;
  }
  #borem-loc-table td:nth-child(1),
  #borem-loc-table th:nth-child(1) { min-width: 190px; }
  #borem-loc-table td:nth-child(2),
  #borem-loc-table th:nth-child(2) { min-width: 220px; }
  #borem-loc-table td:nth-child(3),
  #borem-loc-table th:nth-child(3) { min-width: 190px; }
  #borem-loc-table td:nth-child(4),
  #borem-loc-table th:nth-child(4) { min-width: 120px; }
}

/* ================================================================
   v3.26.7 — Mobile menu theme polish and My Day compact field layout
   ================================================================ */
.borem-mobile-menu-sheet {
  padding-top: 0 !important;
  padding-left: 12px;
  padding-right: 12px;
}
.borem-mobile-menu-head {
  background: var(--st-surface, #fff) !important;
  color: var(--st-text, #1c2733);
  margin: 0 -12px 12px !important;
  padding: max(12px, env(safe-area-inset-top)) 12px 12px !important;
  border-bottom: 1px solid var(--st-border, #e0e4e8);
  box-shadow: 0 1px 0 rgba(15, 23, 42, .04);
}
[data-borem-theme="dark"] .borem-mobile-menu-head {
  background: var(--st-surface, #16202b) !important;
  color: var(--st-text, #e8edf2);
  border-bottom-color: var(--st-border, #2b3a49);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .32);
}

@media (max-width: 979px) {
  .borem-tech-day-card,
  .borem-card.borem-tech-day-card {
    width: 100% !important;
    max-width: 100% !important;
    margin-inline: 0 !important;
    padding: 6px !important;
    border-radius: 14px !important;
  }
  .borem-tech-day-shell {
    width: 100% !important;
    max-width: 100% !important;
    gap: 8px !important;
    padding: 0 !important;
  }
  .borem-tech-day-progress {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .borem-tech-day-main {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 10px !important;
    border-radius: 14px !important;
    min-height: auto !important;
  }
  .borem-tech-day-hero,
  .borem-tech-day-section,
  .borem-tech-day-job,
  .borem-tech-day-log,
  .borem-tech-day-note,
  .borem-tech-day-jobs,
  .borem-tech-day-utility {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin-inline: 0 !important;
  }
  .borem-tech-day-hero { gap: 8px !important; }
  .borem-tech-day-prompt { gap: 6px !important; }
  .borem-tech-day-prompt h3 {
    font-size: clamp(24px, 7vw, 34px) !important;
    line-height: 1.04 !important;
  }
  .borem-tech-day-prompt p {
    font-size: 13px !important;
    line-height: 1.4 !important;
  }
  .borem-tech-day-actions,
  .borem-tech-day-actions#techday-primary-actions {
    width: 100% !important;
    gap: 7px !important;
  }
  .borem-tech-day-actions#techday-primary-actions .borem-btn {
    width: 100% !important;
    min-height: 48px !important;
    padding-inline: 12px !important;
    border-radius: 12px !important;
  }
}
@media (max-width: 520px) {
  .borem-content:has(.borem-tech-day-shell),
  .borem-card-body:has(.borem-tech-day-shell) {
    padding-left: 6px !important;
    padding-right: 6px !important;
  }
  .borem-tech-day-card,
  .borem-card.borem-tech-day-card {
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 4px !important;
    border-radius: 12px !important;
  }
  .borem-tech-day-main {
    padding: 8px !important;
    border-radius: 12px !important;
    box-shadow: none !important;
  }
  .borem-tech-day-banner {
    padding: 5px 8px !important;
    font-size: 11px !important;
  }
}

/* v3.26.9 — guided location creation + Command Center */
.borem-loc-create-grid{gap:18px}
.borem-loc-step{position:relative;border:1px solid var(--st-border);background:var(--st-card);border-radius:18px;padding:18px;box-shadow:0 12px 32px rgba(15,23,42,.06)}
.borem-loc-step-head{display:flex;align-items:flex-start;gap:12px;margin-bottom:16px;padding-bottom:12px;border-bottom:1px solid var(--st-border)}
.borem-loc-step-head h4{margin:0 0 4px;font-size:17px;line-height:1.2}
.borem-loc-step-head p{margin:0;color:var(--st-muted);font-size:13px;line-height:1.35}
.borem-loc-step-badge{display:inline-grid;place-items:center;flex:0 0 34px;width:34px;height:34px;border-radius:999px;background:var(--st-orange-soft);color:var(--st-orange);font-weight:800;border:1px solid var(--st-orange-mid)}
.borem-command-center{min-height:calc(100vh - 120px);display:flex;flex-direction:column;align-items:center;gap:22px;padding:clamp(24px,6vh,72px) 18px 36px;background:radial-gradient(circle at 50% 0%,var(--st-orange-soft),transparent 38%)}
.borem-command-hero{text-align:center;width:min(900px,100%);margin-top:clamp(12px,5vh,48px)}
.borem-command-kicker{text-transform:uppercase;letter-spacing:.14em;font-size:12px;font-weight:800;color:var(--st-orange);margin-bottom:8px}
.borem-command-hero h2{font-size:clamp(32px,5vw,56px);line-height:1.02;margin:0 0 10px;color:var(--st-text)}
.borem-command-hero p{margin:0 auto 22px;max-width:680px;color:var(--st-muted);font-size:clamp(15px,2vw,18px);line-height:1.45}
.borem-command-search-wrap{position:relative;width:min(760px,100%);margin:0 auto;background:var(--st-card);border:1px solid var(--st-border);box-shadow:0 22px 55px rgba(15,23,42,.14);border-radius:22px;display:flex;align-items:center;gap:10px;padding:0 18px}
.borem-command-search-wrap .borem-search-ico{width:22px;height:22px;color:var(--st-muted);flex:0 0 auto}
#borem-command-search{width:100%;border:0!important;outline:0!important;background:transparent!important;box-shadow:none!important;font-size:18px;min-height:64px;color:var(--st-text)}
.borem-command-results{left:0;right:0;top:calc(100% + 10px);width:auto!important;text-align:left;z-index:60}
.borem-command-actions{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:14px;width:min(1120px,100%)}
.borem-command-logo{display:block;width:auto;max-width:150px;max-height:80px;object-fit:contain;margin:0 auto 16px}
.borem-command-card{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:8px;text-decoration:none!important;color:var(--st-text);background:var(--st-card);border:1px solid var(--st-border);border-radius:18px;padding:20px 16px;min-height:142px;box-shadow:0 10px 28px rgba(15,23,42,.06);transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease}
.borem-command-card:hover,.borem-command-card:focus,.borem-command-card:active{text-decoration:none!important;transform:translateY(-2px);box-shadow:0 16px 36px rgba(15,23,42,.10);border-color:var(--st-orange-mid)}
.borem-command-card span{font-size:28px;line-height:1}.borem-command-card strong{font-size:15px;line-height:1.25}.borem-command-card small{color:var(--st-muted);line-height:1.35;max-width:150px}
.borem-command-widget-panel{width:min(1120px,100%);background:var(--st-card);border:1px solid var(--st-border);border-radius:20px;padding:18px;box-shadow:0 10px 26px rgba(15,23,42,.05)}
.borem-command-widget-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:14px}.borem-command-widget-head h3{margin:0;font-size:18px}
.borem-command-widget-config{display:flex;gap:12px;flex-wrap:wrap;background:var(--st-surface);border:1px solid var(--st-border);border-radius:14px;padding:10px;margin-bottom:14px}.borem-command-widget-config label{display:flex;align-items:center;gap:7px;font-weight:700;font-size:13px;color:var(--st-text)}
.borem-command-widgets{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.borem-command-widget{border:1px dashed var(--st-border);border-radius:16px;padding:15px;background:var(--st-surface)}.borem-command-widget strong{display:block;margin-bottom:7px}.borem-command-widget p{margin:0 0 6px}.borem-command-widget small{color:var(--st-muted)}
@media (max-width:1000px){.borem-command-actions{grid-template-columns:repeat(3,minmax(0,1fr))}.borem-command-widgets{grid-template-columns:1fr}}
@media (max-width:640px){.borem-command-center{padding:18px 10px 28px;min-height:calc(100vh - 84px)}.borem-command-hero{margin-top:18px}.borem-command-search-wrap{border-radius:16px;padding:0 12px}#borem-command-search{min-height:54px;font-size:15px}.borem-command-actions{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.borem-command-card{padding:13px;border-radius:14px}.borem-command-widget-panel{padding:12px;border-radius:16px}.borem-command-widget-head{align-items:flex-start;flex-direction:column}.borem-loc-step{padding:12px;border-radius:14px}.borem-loc-step-head{gap:10px}.borem-loc-step-badge{width:30px;height:30px;flex-basis:30px}}

/* v3.26.10 — Command Center workspace widget layout + modal workflow polish */
.borem-command-analytics-widgets{margin-top:16px;width:100%}
.borem-command-analytics-widgets .borem-home-grid{width:100%;margin-top:0}
.borem-command-modal .borem-record-dialog{width:min(1180px,calc(100vw - 32px));height:min(880px,calc(100vh - 32px));max-height:calc(100vh - 32px)}
.borem-command-modal iframe{min-height:0}
@media (max-width:720px){
  .borem-command-modal .borem-record-dialog{width:100vw;height:100vh;max-height:100vh;border-radius:0}
  .borem-command-modal .borem-modal-head{padding:10px 12px;gap:8px}
  .borem-command-modal .borem-modal-head h3{font-size:16px}
  .borem-command-analytics-widgets{margin-top:12px}
}


/* v3.26.11 — Command Center card/modal refinement */
.borem-command-modal .borem-modal-head{display:flex;align-items:center;justify-content:space-between}
.borem-command-modal .borem-modal-actions{display:flex;align-items:center;gap:8px}
.borem-command-modal .borem-icon-btn{text-decoration:none!important}
.borem-command-modal.is-expanded .borem-record-dialog{width:100vw!important;height:100vh!important;max-height:100vh!important;border-radius:0!important}
.borem-command-modal.is-expanded iframe{height:calc(100vh - 58px)!important}
@media (max-width:640px){.borem-command-logo{max-width:120px;max-height:64px;margin-bottom:12px}.borem-command-card{min-height:118px;padding:14px 10px}.borem-command-card small{max-width:130px}.borem-command-modal .borem-modal-actions{gap:6px}.borem-command-modal .borem-btn-sm{padding:7px 9px;font-size:12px}.borem-command-modal.is-expanded iframe{height:calc(100vh - 52px)!important}}

/* v3.27 guided workflows */
.borem-location-create-backdrop{position:fixed;inset:0;background:rgba(15,23,42,.55);z-index:9998;backdrop-filter:blur(3px)}
.borem-location-create-modal{position:fixed!important;z-index:9999;inset:24px;max-width:1120px;margin:auto;overflow:auto;background:var(--borem-card-bg,#fff);border-radius:24px;box-shadow:0 24px 80px rgba(15,23,42,.32);padding:24px!important}
.borem-location-create-modal[hidden],.borem-location-create-backdrop[hidden]{display:none!important}
body.borem-location-modal-open{overflow:hidden}.borem-loc-create-grid{gap:16px}.borem-loc-step{border:1px solid rgba(148,163,184,.32);border-radius:18px;background:rgba(255,255,255,.72)}
.borem-loc-step-head{align-items:flex-start}.borem-loc-step-badge{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:999px;background:var(--st-orange,#2563eb);color:#fff;font-weight:800;flex:0 0 32px}.borem-inline-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.borem-extra-contacts{display:grid;gap:12px;margin-top:12px}.borem-extra-contact-card{border:1px dashed rgba(148,163,184,.6);border-radius:16px;padding:14px;background:rgba(248,250,252,.86)}.borem-extra-contact-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}.borem-alert-warning{padding:12px 14px;border-radius:14px;background:#fff7ed;color:#9a3412;border:1px solid #fed7aa}.borem-location-success{position:fixed;inset:0;z-index:10000;background:rgba(15,23,42,.55);display:grid;place-items:center;padding:20px}.borem-location-success[hidden]{display:none!important}.borem-location-success-card{max-width:560px;width:min(560px,100%);background:var(--borem-card-bg,#fff);border-radius:24px;padding:28px;box-shadow:0 24px 80px rgba(15,23,42,.32)}.borem-success-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}.borem-job-create-simple{max-width:920px;background:rgba(248,250,252,.85);border:1px solid rgba(148,163,184,.28);border-radius:20px;padding:18px}.borem-service-extra{border:1px solid rgba(148,163,184,.32);border-radius:16px;padding:14px;background:#fff}.borem-radio-row{display:flex;gap:16px;flex-wrap:wrap}.borem-schedule-preference{background:rgba(59,130,246,.08);border:1px solid rgba(59,130,246,.18);border-radius:14px;padding:12px}.borem-unscheduled-panel{position:fixed;right:0;top:0;height:100vh;width:max(30vw,360px);max-width:94vw;background:var(--borem-card-bg,#fff);z-index:10020;box-shadow:-24px 0 60px rgba(15,23,42,.25);display:flex;flex-direction:column;border-left:1px solid rgba(148,163,184,.32)}.borem-unscheduled-head{display:flex;align-items:center;justify-content:space-between;padding:18px;border-bottom:1px solid rgba(148,163,184,.25)}.borem-unscheduled-head strong{display:block;font-size:18px}.borem-unscheduled-head span{display:block;color:var(--borem-muted,#64748b);font-size:13px}.borem-unscheduled-list{overflow:auto;padding:12px;display:grid;gap:10px}.borem-unscheduled-job{display:block;text-decoration:none!important;color:inherit!important;border:1px solid rgba(148,163,184,.28);border-radius:14px;padding:12px;background:rgba(248,250,252,.72)}.borem-unscheduled-job strong,.borem-unscheduled-job span{display:block}.borem-unscheduled-job span{font-size:12px;color:var(--borem-muted,#64748b);margin-top:3px}.borem-unscheduled-job p{margin:6px 0 0;font-size:13px;color:var(--borem-muted,#64748b)}
[data-borem-theme="dark"] .borem-location-create-modal,[data-borem-theme="dark"] .borem-location-success-card,[data-borem-theme="dark"] .borem-unscheduled-panel{background:#111827;color:#f8fafc}[data-borem-theme="dark"] .borem-loc-step,[data-borem-theme="dark"] .borem-extra-contact-card,[data-borem-theme="dark"] .borem-job-create-simple,[data-borem-theme="dark"] .borem-service-extra,[data-borem-theme="dark"] .borem-unscheduled-job{background:#0f172a;border-color:rgba(148,163,184,.28)}
@media(max-width:700px){.borem-location-create-modal{inset:0;border-radius:0;padding:14px!important}.borem-success-actions{grid-template-columns:1fr}.borem-unscheduled-panel{width:100vw;max-width:100vw}.borem-job-create-simple{padding:12px}.borem-loc-step{padding:12px}}

/* v3.27.1 — Job Detail scheduling UX polish */
#wo-detail-page .st-job-header-actions{align-items:center!important;justify-content:flex-end!important;}
#wo-detail-page #wo-action-bar .borem-btn.primary{box-shadow:0 10px 22px rgba(45,127,249,.18);}
#wo-detail-page #wo-photo-row{justify-content:flex-end;margin-top:10px!important;}
#wo-detail-page .st-job-meta-grid{grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:18px 24px;}
#wo-detail-page .st-job-overview-meta-item .item-label{text-transform:uppercase;letter-spacing:.045em;font-size:11px;color:var(--st-text-muted);font-weight:800;}
#wo-detail-page .st-job-overview-meta-item .item-value{font-size:14px;line-height:1.45;color:var(--st-text);}
#wo-appointments-body .wo-appointment-card{border:1px solid var(--st-border);border-radius:16px;padding:14px;display:flex;align-items:center;justify-content:space-between;gap:12px;background:var(--st-surface);box-shadow:0 8px 18px rgba(15,23,42,.04);}
#wo-appointments-body .wo-appointment-card + .wo-appointment-card{margin-top:10px;}
#wo-appointments-body .wo-appt-time{font-weight:750;color:var(--st-text);margin-top:4px;}
.borem-appointment-modal-v3271 .borem-modal-dialog,.borem-job-edit-modal-v3271 .borem-modal-dialog{max-width:min(760px,calc(100vw - 24px));width:100%;}
.borem-job-edit-modal-v3271 .borem-modal-dialog-wide{max-width:min(900px,calc(100vw - 24px));}
.borem-job-edit-modal-v3271 label,.borem-appointment-modal-v3271 label{font-weight:700;font-size:12px;color:var(--st-text);display:block;margin-bottom:6px;}
.borem-job-edit-modal-v3271 .borem-modal-body{gap:14px;}
@media (max-width:720px){
  #wo-detail-page .st-job-header-top{gap:14px;}
  #wo-detail-page .st-job-header-actions,#wo-detail-page #wo-photo-row{justify-content:flex-start!important;width:100%;}
  #wo-detail-page .st-job-meta-grid{grid-template-columns:1fr;gap:12px;}
  #wo-appointments-body .wo-appointment-card{align-items:flex-start;flex-direction:column;}
  #wo-appointments-body .wo-appt-actions{width:100%;display:flex;gap:8px;}
  #wo-appointments-body .wo-appt-actions .borem-btn{flex:1;}
}

/* v3.27.3 — Job create modal and focused Job Detail cleanup */
.borem-command-activity{display:none!important}
#borem-wo-create-backdrop{position:fixed;inset:0;z-index:10040;background:rgba(15,23,42,.52);backdrop-filter:blur(2px)}
#borem-wo-create-panel.borem-wo-create-modal{position:fixed;z-index:10041;inset:clamp(16px,4vh,42px) auto auto 50%;transform:translateX(-50%);width:min(960px,calc(100vw - 28px));max-height:calc(100vh - 32px);overflow:auto;background:var(--borem-card-bg,#fff);border:1px solid rgba(148,163,184,.28);border-radius:24px;box-shadow:0 28px 90px rgba(15,23,42,.35);padding:22px}
#borem-wo-create-panel.borem-wo-create-modal h3{margin:0 44px 16px 0;font-size:22px;font-weight:800;color:var(--borem-text,#0f172a)}
#borem-wo-create-panel.borem-wo-create-modal .borem-job-create-simple{max-width:none;background:transparent;border:0;border-radius:0;padding:0}
.borem-wo-create-close{position:absolute;right:16px;top:14px;z-index:2}
body.borem-wo-create-open{overflow:hidden}
@media(max-width:720px){#borem-wo-create-panel.borem-wo-create-modal{inset:8px auto auto 50%;width:calc(100vw - 16px);max-height:calc(100vh - 16px);border-radius:18px;padding:16px}.borem-success-actions{grid-template-columns:1fr}}
[data-borem-theme="dark"] #borem-wo-create-panel.borem-wo-create-modal{background:#111827;color:#f8fafc;border-color:rgba(148,163,184,.28)}

/* v3.27.8 service intake + asset deficiency polish */
.borem-service-repeater-row{border:1px solid var(--borem-border,#dbe3ef);border-radius:14px;padding:14px;margin:10px 0;background:var(--borem-surface,#fff)}
.borem-service-row-head{display:grid;grid-template-columns:1fr auto;gap:12px;align-items:end;margin-bottom:12px}
.borem-service-extra h4{margin:0 0 10px;font-size:15px}
.borem-radio-row{display:flex;gap:12px;flex-wrap:wrap;margin:8px 0 12px}
.borem-alert-warning .borem-check-inline{font-weight:600;color:inherit}
.st-badge.soft-danger{background:#fee2e2;color:#991b1b;border-color:#fecaca}
@media(max-width:720px){.borem-service-row-head{grid-template-columns:1fr}.borem-radio-row{gap:8px}}

/* v3.27.10 — simplified technician asset completion flow */
.borem-tech-asset-punchlist td:first-child,
.borem-tech-asset-punchlist th:first-child{width:92px;text-align:center;font-weight:900;font-size:18px}
.borem-tech-asset-punchlist tr.is-complete{opacity:.68;background:rgba(16,185,129,.08)}
.borem-tech-asset-wizard{display:grid;gap:14px}
.borem-tech-asset-wizard label{display:grid;gap:8px;font-weight:800}
.borem-tech-asset-wizard input,.borem-tech-asset-wizard select{width:100%;min-height:46px;border:1px solid var(--st-border,#dbe3ef);border-radius:12px;padding:10px 12px;background:#fff;color:inherit}
.borem-signature-canvas{width:100%;min-height:140px;border:2px solid var(--st-border,#dbe3ef);border-radius:14px;background:#fff;touch-action:none;display:block}
.borem-tech-work-card .borem-field-full{display:grid;gap:8px;margin-bottom:12px;font-weight:800}
.borem-tech-work-card .borem-field-full input{min-height:44px;border:1px solid var(--st-border,#dbe3ef);border-radius:12px;padding:10px 12px}

/* v3.27.11 — DOT check upload workflow */
.borem-tech-dot-form {
  width: 100%;
  max-width: 520px;
  padding: 12px;
  margin: 0 0 10px;
  border: 1px solid var(--st-border, #e5e7eb);
  border-radius: 14px;
  background: var(--st-surface, #fff);
}
.borem-tech-dot-form label { display: grid; gap: 8px; font-weight: 700; }
.borem-tech-dot-form input[type="file"] { width: 100%; }

/* v3.27.14 — Technician My Day Step 4 simplification */
.borem-tech-day-banner[hidden]{display:none!important}
.borem-tech-day-main[data-techday-stage="job-brief"] #techday-primary-actions{
  justify-content:center;
  width:100%;
  margin-top:10px;
}
.borem-tech-day-main[data-techday-stage="job-brief"] #techday-primary-actions .borem-btn.primary{
  min-width:min(320px,100%);
  min-height:56px;
  border-radius:999px;
  font-size:17px;
  font-weight:900;
  box-shadow:0 16px 36px rgba(37,99,235,.22);
}
.borem-tech-step4-head{align-items:flex-start;gap:14px}
.borem-tech-step4-head h4{margin:0 0 6px;font-size:clamp(20px,3vw,28px);line-height:1.1}
.borem-tech-step4-subline{font-weight:800;color:var(--st-muted,#64748b);font-size:13px}
.borem-tech-step4-card{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(260px,.75fr);gap:14px;border:1px solid var(--st-border,#dbe3ef);border-radius:18px;background:var(--st-surface,#f8fafc);padding:16px;margin:12px 0}
.borem-tech-step4-primary span,.borem-tech-step4-facts span{display:block;text-transform:uppercase;letter-spacing:.06em;font-size:11px;font-weight:900;color:var(--st-muted,#64748b);margin-bottom:3px}
.borem-tech-step4-primary strong{display:block;font-size:19px;line-height:1.2;color:var(--st-text,#0f172a)}
.borem-tech-step4-primary p{margin:7px 0 0;color:var(--st-muted,#64748b);line-height:1.45}
.borem-tech-step4-facts{display:grid;grid-template-columns:1fr;gap:10px}
.borem-tech-step4-facts div{border:1px solid rgba(148,163,184,.28);border-radius:13px;background:var(--st-card,#fff);padding:10px 12px}
.borem-tech-step4-facts strong{display:block;color:var(--st-text,#0f172a);font-size:14px;line-height:1.25}
.borem-tech-step4-actions{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px!important;width:100%;margin-top:14px}
.borem-tech-step4-actions .borem-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;text-align:center;min-height:46px;white-space:normal;line-height:1.15}
.borem-tech-step4-actions .borem-btn span{font-size:16px;line-height:1}
@media(max-width:820px){
  .borem-tech-step4-card{grid-template-columns:1fr;padding:14px}
  .borem-tech-step4-actions{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:520px){
  .borem-tech-step4-actions{grid-template-columns:1fr}
  .borem-tech-day-main[data-techday-stage="job-brief"] #techday-primary-actions .borem-btn.primary{width:100%}
}

/* v3.27.15 — Technician My Day Step 5 En Route simplification */
.borem-tech-day-main[data-techday-stage="enroute"] #techday-primary-actions{
  justify-content:center;
  width:100%;
  margin-top:12px;
}
.borem-tech-day-main[data-techday-stage="enroute"] #techday-primary-actions .borem-btn.primary{
  min-width:min(340px,100%);
  min-height:58px;
  border-radius:999px;
  font-size:17px;
  font-weight:900;
  box-shadow:0 16px 36px rgba(37,99,235,.22);
}
.borem-tech-day-main[data-techday-stage="enroute"] #techday-prompt-title,
.borem-tech-day-main[data-techday-stage="enroute"] #techday-prompt-body{
  text-align:center;
}
.borem-tech-step5-head h4{margin-top:2px}
.borem-tech-step5-card{align-items:stretch}
.borem-tech-step5-facts div:first-child{
  border-color:rgba(37,99,235,.25);
  background:linear-gradient(180deg,rgba(37,99,235,.08),rgba(255,255,255,.86));
}
.borem-tech-eta{font-size:18px!important;color:var(--st-text,#0f172a)}
.borem-tech-eta.is-loading{color:var(--st-muted,#64748b)}
.borem-tech-eta.is-ready{color:var(--st-orange,#f05a28)}
@media(max-width:520px){
  .borem-tech-day-main[data-techday-stage="enroute"] #techday-primary-actions .borem-btn.primary{width:100%}
}

/* v3.27.16 — Technician My Day Step 5/6 focused field screens */
.borem-tech-day-main[data-techday-stage="onsite"] #techday-primary-actions{
  justify-content:center;
  width:100%;
  margin-top:12px;
}
.borem-tech-day-main[data-techday-stage="onsite"] #techday-primary-actions .borem-btn.primary{
  min-width:min(340px,100%);
  min-height:58px;
  border-radius:999px;
  font-size:17px;
  font-weight:900;
  box-shadow:0 16px 36px rgba(37,99,235,.22);
}
.borem-tech-day-main[data-techday-stage="onsite"] #techday-prompt-title,
.borem-tech-day-main[data-techday-stage="onsite"] #techday-prompt-body{
  text-align:center;
}
.borem-tech-appointment-special{
  border-left:4px solid var(--st-orange,#f05a28);
  background:rgba(240,90,40,.06);
}
.borem-tech-appointment-special h5{
  color:var(--st-text,#0f172a);
}
@media(max-width:520px){
  .borem-tech-day-main[data-techday-stage="onsite"] #techday-primary-actions .borem-btn.primary{width:100%}
}

/* v3.27.18 — asset edit upload guard + My Day work modal/tab polish */
#techday-modal-root[hidden]{display:none!important}
#techday-modal-root{position:fixed;inset:0;z-index:10090;display:grid;place-items:center;padding:18px}
.borem-tech-modal-backdrop{position:fixed;inset:0;background:rgba(15,23,42,.58);backdrop-filter:blur(3px)}
.borem-tech-modal-sheet{position:relative;z-index:1;width:min(760px,calc(100vw - 24px));max-height:calc(100vh - 28px);overflow:auto;background:var(--borem-card-bg,#fff);border:1px solid rgba(148,163,184,.32);border-radius:24px;box-shadow:0 28px 90px rgba(15,23,42,.34);color:var(--borem-text,#0f172a)}
.borem-tech-modal-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:18px 20px;border-bottom:1px solid rgba(148,163,184,.25)}
.borem-tech-modal-head h3{margin:2px 0 0;font-size:20px;line-height:1.2}.borem-tech-modal-body{padding:20px}.borem-tech-modal-open{overflow:hidden}
.borem-tech-work-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-top:14px}
.borem-tech-work-tab{min-height:74px;border:1px solid var(--st-border,#dbe3ef);border-radius:18px;background:var(--st-surface,#fff);display:grid;place-items:center;gap:3px;padding:10px;font-weight:850;box-shadow:0 8px 20px rgba(15,23,42,.045)}
.borem-tech-work-tab .borem-tech-work-tab-icon{font-size:22px;line-height:1}.borem-tech-work-tab strong{font-size:12px;color:var(--st-text-muted,#64748b)}
.borem-tech-work-tab.is-active{border-color:var(--st-orange,#2563eb);box-shadow:0 12px 26px rgba(37,99,235,.14);background:rgba(37,99,235,.08)}
.borem-tech-work-details .borem-tech-step4-facts{grid-template-columns:repeat(auto-fit,minmax(180px,1fr));width:100%}
@media(max-width:720px){#techday-modal-root{padding:8px}.borem-tech-modal-sheet{width:calc(100vw - 16px);max-height:calc(100vh - 16px);border-radius:18px}.borem-tech-work-tabs{grid-template-columns:repeat(2,minmax(0,1fr))}.borem-tech-work-tab{min-height:66px}}
[data-borem-theme="dark"] .borem-tech-modal-sheet,[data-borem-theme="dark"] .borem-tech-work-tab{background:#111827;color:#f8fafc;border-color:rgba(148,163,184,.28)}

/* v3.27.19 — profile menu, managed job tags, multi-select fields, and reminder minimization */
.borem-profile-menu{position:relative;display:inline-flex;align-items:center}
.borem-profile-dropdown{position:absolute;right:0;top:calc(100% + 10px);z-index:10150;min-width:190px;padding:8px;background:var(--borem-card-bg,#fff);border:1px solid var(--st-border,#e2e8f0);border-radius:14px;box-shadow:0 18px 50px rgba(15,23,42,.18)}
.borem-profile-dropdown[hidden]{display:none!important}
.borem-profile-dropdown a{display:flex;align-items:center;min-height:40px;padding:9px 11px;border-radius:10px;color:var(--st-text,#0f172a)!important;text-decoration:none!important;font-weight:700;font-size:13px}
.borem-profile-dropdown a:hover{background:rgba(148,163,184,.14)}
.borem-profile-dropdown .borem-profile-logout{color:#b42318!important;border-top:1px solid var(--st-border,#e2e8f0);margin-top:5px;padding-top:11px}
.borem-service-extra select[multiple]{min-height:126px;padding:8px;background-image:none}
.borem-job-tags{margin-top:14px;padding-top:14px;border-top:1px solid var(--st-border,#e2e8f0);display:grid;gap:8px}
.borem-tag-pills{display:flex;flex-wrap:wrap;gap:7px;min-height:28px;align-items:center}
.borem-job-tag-pill{display:inline-flex;align-items:center;min-height:28px;padding:5px 10px;border-radius:999px;background:rgba(37,99,235,.10);border:1px solid rgba(37,99,235,.18);font-size:12px;font-weight:800;color:var(--st-text,#0f172a)}
.borem-job-tags-editor{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.borem-job-tags-editor input{flex:1 1 280px;min-width:0}
.borem-unscheduled-content{display:flex;flex:1;min-height:0;flex-direction:column}
.borem-unscheduled-controls{display:flex;align-items:center;gap:6px}
.borem-unscheduled-panel.is-minimized{top:auto;bottom:18px;height:auto;width:min(360px,calc(100vw - 24px));border:1px solid rgba(148,163,184,.32);border-radius:16px;overflow:hidden;right:18px}
.borem-unscheduled-panel.is-minimized .borem-unscheduled-content{display:none}
.borem-unscheduled-panel.is-minimized .borem-unscheduled-head{border-bottom:0;padding:12px 14px}
[data-borem-theme="dark"] .borem-profile-dropdown{background:#111827;color:#f8fafc;border-color:rgba(148,163,184,.28)}
[data-borem-theme="dark"] .borem-profile-dropdown a,[data-borem-theme="dark"] .borem-job-tag-pill{color:#f8fafc!important}
@media(max-width:700px){.borem-job-tags-editor{align-items:stretch}.borem-job-tags-editor input,.borem-job-tags-editor button{width:100%}.borem-unscheduled-panel.is-minimized{right:12px;bottom:12px}}
.borem-profile-menu .borem-topbar-avatar{border:0;padding:0;cursor:pointer;font-family:inherit}

/* v3.27.20 — dropdown multiselect, quarter-hour scheduling, Jobs list, and Job Details visual refresh */
.borem-multiselect-source[hidden],.borem-quarter-source[hidden]{display:none!important}
.borem-dropdown-multiselect{position:relative;width:100%}
.borem-dropdown-multiselect-toggle{width:100%;min-height:44px;display:flex;align-items:center;justify-content:space-between;gap:10px;text-align:left;border:1px solid var(--st-border,#d8e0eb);border-radius:10px;background:var(--st-card,#fff);color:var(--st-text,#18324d);padding:9px 12px;font:inherit;cursor:pointer}
.borem-dropdown-multiselect-toggle span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--st-muted,#6b7f95)}
.borem-dropdown-multiselect-toggle.has-value span{color:var(--st-text,#18324d);font-weight:700}
.borem-dropdown-multiselect.is-open .borem-dropdown-multiselect-toggle{border-color:#2f7fd3;box-shadow:0 0 0 3px rgba(47,127,211,.12)}
.borem-dropdown-multiselect-menu{position:absolute;z-index:10180;left:0;right:0;top:calc(100% + 6px);padding:8px;background:var(--st-card,#fff);border:1px solid var(--st-border,#d8e0eb);border-radius:12px;box-shadow:0 18px 45px rgba(15,41,67,.18)}
.borem-dropdown-multiselect-menu[hidden]{display:none!important}
.borem-dropdown-multiselect-options{max-height:250px;overflow:auto;display:grid;gap:2px}
.borem-dropdown-multiselect-options label{display:flex!important;align-items:center;gap:9px;padding:8px 9px;border-radius:8px;cursor:pointer;font-weight:650!important;color:var(--st-text,#18324d)}
.borem-dropdown-multiselect-options label:hover{background:#f0f6fd}
.borem-dropdown-multiselect-options input{width:16px!important;height:16px!important;min-height:0!important;margin:0!important;flex:0 0 auto}
.borem-dropdown-multiselect-clear{width:100%;margin-top:7px;padding:8px 10px;border:0;border-top:1px solid var(--st-border,#d8e0eb);background:transparent;color:#1769aa;font-weight:800;cursor:pointer;text-align:left}
.borem-quarter-picker{display:grid;grid-template-columns:minmax(150px,1fr) minmax(150px,1fr);gap:8px;width:100%}
.borem-quarter-picker.is-time{grid-template-columns:1fr}
.borem-quarter-picker input,.borem-quarter-picker select{width:100%;min-height:44px;border:1px solid var(--st-border,#d8e0eb);border-radius:10px;background:var(--st-card,#fff);color:var(--st-text,#18324d);padding:9px 11px;font:inherit}
@media(max-width:520px){.borem-quarter-picker{grid-template-columns:1fr}}

/* Jobs list modeled after the supplied reference table. */
#borem-wo-table{min-width:1360px;border-collapse:separate;border-spacing:0;background:#fff}
#borem-wo-table thead th{height:48px;padding:0 14px;background:#f8fafc;border-top:1px solid #e5ebf2;border-bottom:1px solid #e5ebf2;color:#7790aa;font-size:10px;font-weight:850;text-transform:uppercase;letter-spacing:.055em;white-space:nowrap}
#borem-wo-table tbody td{padding:15px 14px;border-bottom:1px solid #e8edf3;color:#27445f;font-size:12px;vertical-align:middle;background:#fff}
#borem-wo-table tbody tr:hover td{background:#fbfdff}
#borem-wo-table th:first-child,#borem-wo-table td:first-child{padding-left:16px}
#borem-wo-table .borem-st-job-cell{display:grid;gap:4px;text-decoration:none!important;min-width:220px}
#borem-wo-table .borem-st-job-cell strong{font-size:12px;color:#1170c7;font-weight:800}
#borem-wo-table .borem-st-job-cell span{font-size:12px;color:#1170c7;font-weight:750;white-space:normal}
.borem-st-status{display:inline-flex;align-items:center;gap:9px;text-decoration:none!important;color:#b76500!important;font-weight:800;white-space:nowrap}
.borem-st-status i{width:7px;height:7px;border-radius:50%;background:#d88900;flex:0 0 7px}
.borem-st-status.is-active,.borem-st-status.is-complete,.borem-st-status.is-completed{color:#078c40!important}.borem-st-status.is-active i,.borem-st-status.is-complete i,.borem-st-status.is-completed i{background:#0aa04f}
.borem-st-status.is-inactive,.borem-st-status.is-canceled{color:#b42318!important}.borem-st-status.is-inactive i,.borem-st-status.is-canceled i{background:#dc2626}
.borem-st-substatus{color:#6d8195;white-space:nowrap}
.borem-st-job-type{display:inline-flex;align-items:center;justify-content:center;min-height:22px;padding:3px 10px;border-radius:999px;background:#c9f8e5;color:#088c65;font-size:11px;font-weight:850;white-space:nowrap}
.borem-st-job-type.is-service-call{background:#cbefff;color:#0074a8}.borem-st-job-type.is-repair{background:#d8facd;color:#19851f}.borem-st-job-type.is-emergency{background:#fee2e2;color:#b42318}.borem-st-job-type.is-installation,.borem-st-job-type.is-project{background:#e8ddff;color:#6941c6}
.borem-st-money{font-variant-numeric:tabular-nums;white-space:nowrap}.borem-st-company{font-weight:750!important;color:#1170c7!important;white-space:nowrap}.borem-st-date-range{display:grid;gap:2px;white-space:nowrap}.borem-st-date{white-space:nowrap}.borem-st-scheduled{display:inline-flex;align-items:center;gap:7px;color:#385a78!important;text-decoration:none!important;white-space:nowrap}.borem-st-scheduled>span{font-size:15px}
.borem-st-table-footer{display:flex;align-items:center;justify-content:space-between;min-height:48px;padding:11px 18px;background:#fff;border-top:0;color:#6e8499;font-size:12px}
.borem-loc-table-wrap:has(#borem-wo-table){border:1px solid #e2e8ef;border-radius:12px;overflow:auto;background:#fff;box-shadow:0 3px 12px rgba(34,67,101,.04)}

/* Job Details modeled after the supplied jobdeets reference. */
#wo-detail-page{gap:8px;background:#f4f8fb;margin:-18px;padding:0 18px 28px;min-height:100vh}
#wo-detail-page .borem-st-job-toolbar{border:0;border-radius:0;margin:0 -18px!important;padding:16px 44px 10px;background:#fff;box-shadow:0 1px 0 #e6edf4}
#wo-detail-page .borem-st-job-toolbar .st-job-header-top{align-items:center}
#wo-detail-page .borem-st-job-toolbar .st-job-kicker{display:none}
#wo-detail-page #wo-page-title{font-size:20px!important;margin:0 10px 0 0!important;display:inline-block;color:#132a42}
#wo-detail-page #wo-status-badge{display:inline-flex;vertical-align:middle;margin-left:4px;border-radius:5px;padding:5px 12px;font-size:11px;font-weight:850}
.borem-st-substatus-pill{display:inline-flex;align-items:center;min-height:28px;padding:4px 13px;background:#e5f0fd;color:#245b90;border-radius:5px;font-size:11px;font-weight:800}
#wo-detail-page .st-job-header-actions{margin-left:auto!important}
.borem-st-manage-job,.borem-st-actions-btn{min-height:36px;border-radius:6px!important;padding:8px 16px!important;font-size:12px!important;font-weight:800!important}
.borem-st-job-nav{display:flex;align-items:center;gap:20px;margin:0 -18px 8px;padding:0 44px 12px;background:#fff;border-bottom:1px solid #e4ebf2}
.borem-st-job-nav button{border:0;background:transparent;color:#4a6680;font:inherit;font-size:12px;font-weight:700;padding:5px 0;cursor:pointer}
.borem-st-overview-card,.borem-st-appointments-card{width:100%;border:1px solid #cfdeec!important;border-radius:14px!important;box-shadow:0 3px 12px rgba(31,73,112,.05)!important;overflow:hidden}
.borem-st-overview-card>.borem-card-body{padding:20px 22px!important}
.borem-st-overview-top{display:grid;grid-template-columns:minmax(260px,1fr) minmax(220px,.8fr) auto;gap:24px;align-items:start}
.borem-st-overview-identity{display:grid;grid-template-columns:auto 1fr;align-items:center;column-gap:8px;row-gap:8px}.borem-st-service-dot{width:8px;height:8px;border-radius:50%;background:#08a24a}.borem-st-overview-identity>strong{font-size:12px;color:#0a8d3b}.borem-st-overview-identity h2{grid-column:1/-1;margin:5px 0 0;font-size:18px;color:#27445f}.borem-st-overview-links{grid-column:1/-1;display:flex;gap:10px;flex-wrap:wrap}.borem-st-overview-links span{display:inline-flex;align-items:center;min-height:27px;padding:4px 9px;border-radius:5px;background:#e7f2ff;color:#1769aa;font-size:11px;font-weight:800}
.borem-st-overview-address{align-self:center;text-align:center;color:#425c73;font-size:12px;font-weight:650}
.borem-st-metrics{display:grid;grid-template-columns:repeat(3,minmax(130px,1fr));gap:12px}.borem-st-metrics>div{min-width:135px;padding:12px 14px;border:1px solid #edf1f5;border-radius:16px;background:#fff;box-shadow:0 4px 13px rgba(35,67,98,.05)}.borem-st-metrics span,.borem-st-metrics strong,.borem-st-metrics small{display:block}.borem-st-metrics span{color:#1769aa;font-size:12px;font-weight:850}.borem-st-metrics strong{margin-top:5px;color:#0e4f83;font-size:18px}.borem-st-metrics small{margin-top:3px;color:#b36100;font-size:11px;font-weight:750}
#wo-detail-page .borem-job-tags{border:0!important;margin:12px 0 8px!important;padding:0!important}.borem-job-tag-pill{border:0!important;border-radius:5px!important;background:#0f6cad!important;color:#fff!important;min-height:24px!important;padding:3px 7px!important;text-transform:uppercase;font-size:10px!important;gap:7px;cursor:pointer}.borem-job-tag-pill b{font-size:12px}.borem-job-tag-add{width:24px;height:24px;padding:0;border:0;border-radius:50%;background:#deebf8;color:#4581ba;font-size:20px;line-height:1;cursor:pointer}.borem-job-tags-editor[hidden]{display:none!important}
.borem-st-job-information{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px;margin-top:16px;padding:22px;border:1px solid #d3e0ec;border-radius:8px}.borem-st-info-column{display:grid;align-content:start;gap:18px}.borem-st-info-row{display:grid;gap:4px;color:#344f67}.borem-st-info-row>span{font-size:12px;font-weight:850}.borem-st-info-row strong{font-size:13px;font-weight:650}.borem-st-info-row small{display:block;font-size:12px;line-height:1.45;color:#334e66}.borem-st-info-row a{color:#1170c7!important;text-decoration:none!important}
#wo-detail-page #wo-description{min-height:90px;padding:8px 0 0;color:#3f5870;line-height:1.75}
#wo-detail-page .borem-st-appointments-card>.borem-card-head{padding:15px 20px;background:#fff;border-bottom:0}.borem-st-appt-count{margin-left:auto;order:2;display:inline-flex;align-items:center;min-height:30px;padding:5px 12px;border-radius:999px;background:#e4effb;color:#1769aa;font-size:11px;font-weight:850}.borem-st-appointments-card>.borem-card-head>.borem-btn{order:3}.borem-st-appointments-card>.borem-card-body{padding:8px 20px 20px}
#wo-detail-page>.st-job-body{margin-top:4px}
@media(max-width:1180px){.borem-st-overview-top{grid-template-columns:1fr 1fr}.borem-st-metrics{grid-column:1/-1}.borem-st-job-information{grid-template-columns:1fr 1fr}}
@media(max-width:760px){#wo-detail-page{margin:-12px;padding:0 10px 24px}#wo-detail-page .borem-st-job-toolbar{margin:0 -10px!important;padding:14px}.borem-st-job-nav{margin:0 -10px;padding:0 14px 10px;overflow:auto}.borem-st-overview-top,.borem-st-job-information{grid-template-columns:1fr}.borem-st-overview-address{text-align:left}.borem-st-metrics{grid-template-columns:1fr}.borem-st-overview-card>.borem-card-body{padding:15px!important}}
[data-borem-theme="dark"] .borem-dropdown-multiselect-toggle,[data-borem-theme="dark"] .borem-dropdown-multiselect-menu,[data-borem-theme="dark"] .borem-quarter-picker input,[data-borem-theme="dark"] .borem-quarter-picker select,[data-borem-theme="dark"] #borem-wo-table,[data-borem-theme="dark"] #borem-wo-table tbody td,[data-borem-theme="dark"] .borem-st-table-footer,[data-borem-theme="dark"] .borem-st-metrics>div{background:#111827;color:#f8fafc;border-color:rgba(148,163,184,.28)}


/* v3.27.20 final fidelity and pagination refinements */
#borem-wo-table thead th:not(:first-child)::after{content:"◆";display:inline-block;margin-left:9px;color:#a8b8c9;font-size:6px;transform:rotate(45deg);vertical-align:2px}
.borem-st-pagination{display:flex;align-items:center;gap:2px;margin-left:auto}
.borem-st-page{min-width:31px;height:31px;padding:0 8px;border:1px solid transparent;border-radius:5px;background:#fff;color:#0e5f9f;font:inherit;font-size:12px;font-weight:750;cursor:pointer}
.borem-st-page:hover:not(:disabled){background:#eef5fc}.borem-st-page.is-current{background:#0f69aa;color:#fff}.borem-st-page:disabled{opacity:.35;cursor:not-allowed}.borem-st-page-arrow{background:#edf4fb}.borem-st-page-gap{padding:0 4px;color:#6e8499}
#wo-detail-page .borem-st-title-block{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
#wo-detail-page .borem-st-title-block>div:last-child{display:flex!important;align-items:center!important;gap:9px!important;flex-wrap:wrap!important}
#wo-detail-page .borem-st-title-block #wo-page-title{flex:0 1 auto}
.borem-st-status.is-in-progress{color:#1769aa!important}.borem-st-status.is-in-progress i{background:#2f7fd3}
.borem-st-status.is-scheduled{color:#7a5a00!important}.borem-st-status.is-scheduled i{background:#d8a300}
@media(max-width:700px){.borem-st-table-footer{align-items:flex-start;gap:10px;flex-direction:column}.borem-st-pagination{margin-left:0;max-width:100%;overflow:auto}}

/* ================================================================
   v3.27.21 — WordPress theme isolation hardening
   ================================================================ */
.borem-app.borem-app.borem-app.borem-app.borem-app[data-borem-ui-isolated="true"] :where(button, input, select, textarea, optgroup, option),
.borem-ui-root.borem-ui-root.borem-ui-root.borem-ui-root.borem-ui-root :where(button, input, select, textarea, optgroup, option) {
  box-sizing: border-box !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
  font-style: normal !important;
  letter-spacing: normal !important;
  text-indent: 0 !important;
  text-shadow: none !important;
  text-transform: none !important;
}

.borem-app.borem-app.borem-app.borem-app.borem-app[data-borem-ui-isolated="true"] :where(button, [role="button"]),
.borem-ui-root.borem-ui-root.borem-ui-root.borem-ui-root.borem-ui-root :where(button, [role="button"]) {
  -webkit-appearance: none !important;
  appearance: none !important;
  background-image: none !important;
  text-decoration: none !important;
}

.borem-app.borem-app.borem-app.borem-app.borem-app[data-borem-ui-isolated="true"] :where(
  input:not([type]),
  input[type="text"], input[type="search"], input[type="email"], input[type="url"], input[type="tel"],
  input[type="password"], input[type="number"], input[type="date"], input[type="time"],
  input[type="datetime-local"], input[type="month"], input[type="week"],
  select, textarea
),
.borem-ui-root.borem-ui-root.borem-ui-root.borem-ui-root.borem-ui-root :where(
  input:not([type]),
  input[type="text"], input[type="search"], input[type="email"], input[type="url"], input[type="tel"],
  input[type="password"], input[type="number"], input[type="date"], input[type="time"],
  input[type="datetime-local"], input[type="month"], input[type="week"],
  select, textarea
) {
  border-style: solid !important;
  border-color: var(--st-border-md, #ccd7e3) !important;
  background-color: var(--st-surface, #fff) !important;
  color: var(--st-text, #1c2733) !important;
  -webkit-text-fill-color: var(--st-text, #1c2733) !important;
}

.borem-app.borem-app.borem-app.borem-app.borem-app[data-borem-ui-isolated="true"] :where(input, select, textarea):focus,
.borem-ui-root.borem-ui-root.borem-ui-root.borem-ui-root.borem-ui-root :where(input, select, textarea):focus {
  border-color: var(--borem-app-accent, var(--st-orange, #f05a28)) !important;
  outline: 0 !important;
}

.borem-app.borem-app.borem-app.borem-app.borem-app[data-borem-ui-isolated="true"] :where(select option, select optgroup),
.borem-ui-root.borem-ui-root.borem-ui-root.borem-ui-root.borem-ui-root :where(select option, select optgroup) {
  background: var(--st-surface, #fff) !important;
  color: var(--st-text, #1c2733) !important;
  -webkit-text-fill-color: var(--st-text, #1c2733) !important;
}

.borem-app.borem-app.borem-app.borem-app.borem-app[data-borem-ui-isolated="true"] :where(select option:checked),
.borem-ui-root.borem-ui-root.borem-ui-root.borem-ui-root.borem-ui-root :where(select option:checked) {
  background: linear-gradient(#dcecff, #dcecff) !important;
  color: #0f4f83 !important;
  -webkit-text-fill-color: #0f4f83 !important;
}

.borem-app.borem-app.borem-app.borem-app.borem-app[data-borem-ui-isolated="true"] .borem-btn,
.borem-ui-root.borem-ui-root.borem-ui-root.borem-ui-root.borem-ui-root .borem-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  border: 1px solid var(--st-border, #e0e4e8) !important;
  border-radius: var(--st-r-sm, 6px) !important;
  background: var(--st-surface, #fff) !important;
  color: var(--st-text, #1c2733) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  line-height: 1.35 !important;
  white-space: nowrap !important;
}

.borem-app.borem-app.borem-app.borem-app.borem-app[data-borem-ui-isolated="true"] .borem-btn.primary,
.borem-ui-root.borem-ui-root.borem-ui-root.borem-ui-root.borem-ui-root .borem-btn.primary {
  border-color: var(--borem-app-accent, var(--st-orange, #f05a28)) !important;
  background: var(--borem-app-accent, var(--st-orange, #f05a28)) !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

.borem-app.borem-app.borem-app.borem-app.borem-app[data-borem-ui-isolated="true"] .borem-btn.borem-btn-danger,
.borem-ui-root.borem-ui-root.borem-ui-root.borem-ui-root.borem-ui-root .borem-btn.borem-btn-danger {
  border-color: rgba(185, 28, 28, .28) !important;
  background: rgba(254, 226, 226, .74) !important;
  color: #b91c1c !important;
  -webkit-text-fill-color: #b91c1c !important;
}

.borem-app.borem-app.borem-app.borem-app.borem-app[data-borem-ui-isolated="true"] .borem-icon-btn,
.borem-ui-root.borem-ui-root.borem-ui-root.borem-ui-root.borem-ui-root .borem-icon-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 1px solid var(--st-border, #e0e4e8) !important;
  border-radius: var(--st-r-sm, 6px) !important;
  background: var(--st-surface, #fff) !important;
  color: var(--st-text-muted, #6b7a8d) !important;
  line-height: 1 !important;
}

.borem-app.borem-app.borem-app.borem-app.borem-app[data-borem-ui-isolated="true"] :where(table, thead, tbody, tfoot, tr, th, td),
.borem-ui-root.borem-ui-root.borem-ui-root.borem-ui-root.borem-ui-root :where(table, thead, tbody, tfoot, tr, th, td) {
  font-family: inherit !important;
  text-transform: none;
}

.borem-app.borem-app.borem-app.borem-app.borem-app[data-borem-ui-isolated="true"] :where(label, legend),
.borem-ui-root.borem-ui-root.borem-ui-root.borem-ui-root.borem-ui-root :where(label, legend) {
  font-family: inherit !important;
  font-style: normal !important;
  text-shadow: none !important;
}

[data-borem-theme="dark"].borem-app.borem-app.borem-app.borem-app.borem-app[data-borem-ui-isolated="true"] :where(
  input:not([type]), input[type="text"], input[type="search"], input[type="email"], input[type="url"],
  input[type="tel"], input[type="password"], input[type="number"], input[type="date"], input[type="time"],
  input[type="datetime-local"], input[type="month"], input[type="week"], select, textarea
),
[data-borem-theme="dark"] .borem-ui-root.borem-ui-root.borem-ui-root.borem-ui-root.borem-ui-root :where(
  input:not([type]), input[type="text"], input[type="search"], input[type="email"], input[type="url"],
  input[type="tel"], input[type="password"], input[type="number"], input[type="date"], input[type="time"],
  input[type="datetime-local"], input[type="month"], input[type="week"], select, textarea
) {
  border-color: var(--st-border-md, #3d5063) !important;
  background-color: var(--st-surface, #16202b) !important;
  color: var(--st-text, #e8edf2) !important;
  -webkit-text-fill-color: var(--st-text, #e8edf2) !important;
}

[data-borem-theme="dark"].borem-app.borem-app.borem-app.borem-app.borem-app[data-borem-ui-isolated="true"] :where(select option, select optgroup),
[data-borem-theme="dark"] .borem-ui-root.borem-ui-root.borem-ui-root.borem-ui-root.borem-ui-root :where(select option, select optgroup) {
  background: var(--st-surface, #16202b) !important;
  color: var(--st-text, #e8edf2) !important;
  -webkit-text-fill-color: var(--st-text, #e8edf2) !important;
}

.borem-app.borem-app.borem-app.borem-app.borem-app[data-borem-ui-isolated="true"] .borem-btn:not(.primary):not(.borem-btn-danger):hover,
.borem-ui-root.borem-ui-root.borem-ui-root.borem-ui-root.borem-ui-root .borem-btn:not(.primary):not(.borem-btn-danger):hover {
  border-color: var(--borem-app-accent, var(--st-orange, #f05a28)) !important;
  background: var(--st-orange-soft, #fff3ef) !important;
  color: var(--borem-app-accent, var(--st-orange, #f05a28)) !important;
  -webkit-text-fill-color: var(--borem-app-accent, var(--st-orange, #f05a28)) !important;
}

.borem-app.borem-app.borem-app.borem-app.borem-app[data-borem-ui-isolated="true"] .borem-btn.primary:hover,
.borem-ui-root.borem-ui-root.borem-ui-root.borem-ui-root.borem-ui-root .borem-btn.primary:hover {
  border-color: #d94e20 !important;
  background: #d94e20 !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

.borem-app.borem-app.borem-app.borem-app.borem-app[data-borem-ui-isolated="true"] .borem-btn-contact,
.borem-ui-root.borem-ui-root.borem-ui-root.borem-ui-root.borem-ui-root .borem-btn-contact {
  border-color: var(--st-orange-mid, #fde0d5) !important;
  background: var(--st-orange-soft, #fff3ef) !important;
  color: var(--st-orange, #f05a28) !important;
  -webkit-text-fill-color: var(--st-orange, #f05a28) !important;
  font-weight: 800 !important;
}

.borem-app.borem-app.borem-app.borem-app.borem-app[data-borem-ui-isolated="true"] .borem-btn.borem-btn-danger:hover,
.borem-ui-root.borem-ui-root.borem-ui-root.borem-ui-root.borem-ui-root .borem-btn.borem-btn-danger:hover {
  border-color: rgba(185, 28, 28, .48) !important;
  background: rgba(254, 202, 202, .86) !important;
  color: #991b1b !important;
  -webkit-text-fill-color: #991b1b !important;
}

.borem-app.borem-app.borem-app.borem-app.borem-app[data-borem-ui-isolated="true"] .borem-icon-btn:hover,
.borem-ui-root.borem-ui-root.borem-ui-root.borem-ui-root.borem-ui-root .borem-icon-btn:hover {
  border-color: var(--st-border-md, #ccd2d8) !important;
  background: var(--st-bg, #f4f6f8) !important;
  color: var(--st-text, #1c2733) !important;
}

/* Complete native-control and content shield against high-specificity theme rules. */
.borem-app.borem-app.borem-app.borem-app.borem-app[data-borem-ui-isolated="true"] :where(
  input:not([type]),
  input[type="text"], input[type="search"], input[type="email"], input[type="url"], input[type="tel"],
  input[type="password"], input[type="number"], input[type="date"], input[type="time"],
  input[type="datetime-local"], input[type="month"], input[type="week"],
  select, textarea
),
.borem-ui-root.borem-ui-root.borem-ui-root.borem-ui-root.borem-ui-root :where(
  input:not([type]),
  input[type="text"], input[type="search"], input[type="email"], input[type="url"], input[type="tel"],
  input[type="password"], input[type="number"], input[type="date"], input[type="time"],
  input[type="datetime-local"], input[type="month"], input[type="week"],
  select, textarea
) {
  min-height: 38px !important;
  padding: 8px 10px !important;
  border-width: 1px !important;
  border-radius: 8px !important;
  line-height: 1.35 !important;
  box-shadow: none !important;
}

.borem-app.borem-app.borem-app.borem-app.borem-app[data-borem-ui-isolated="true"] textarea,
.borem-ui-root.borem-ui-root.borem-ui-root.borem-ui-root.borem-ui-root textarea {
  min-height: 82px !important;
  resize: vertical !important;
}

.borem-app.borem-app.borem-app.borem-app.borem-app[data-borem-ui-isolated="true"] :where(input, select, textarea):focus,
.borem-ui-root.borem-ui-root.borem-ui-root.borem-ui-root.borem-ui-root :where(input, select, textarea):focus {
  box-shadow: 0 0 0 3px rgba(240, 90, 40, .12) !important;
}

.borem-app.borem-app.borem-app.borem-app.borem-app[data-borem-ui-isolated="true"] :where(label, legend),
.borem-ui-root.borem-ui-root.borem-ui-root.borem-ui-root.borem-ui-root :where(label, legend) {
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  color: var(--st-text-muted, #6b7a8d) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 1.35 !important;
  letter-spacing: normal !important;
  text-transform: none !important;
}

.borem-app.borem-app.borem-app.borem-app.borem-app[data-borem-ui-isolated="true"] .borem-label,
.borem-ui-root.borem-ui-root.borem-ui-root.borem-ui-root.borem-ui-root .borem-label {
  color: var(--st-text-muted, #6b7a8d) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  letter-spacing: .05em !important;
  text-transform: uppercase !important;
}

.borem-app.borem-app.borem-app.borem-app.borem-app[data-borem-ui-isolated="true"] .borem-btn,
.borem-ui-root.borem-ui-root.borem-ui-root.borem-ui-root.borem-ui-root .borem-btn {
  min-height: 32px !important;
  padding: 6px 12px !important;
  border-width: 1px !important;
  border-style: solid !important;
  border-radius: var(--st-r-sm, 6px) !important;
}

.borem-app.borem-app.borem-app.borem-app.borem-app[data-borem-ui-isolated="true"] .borem-btn-sm,
.borem-ui-root.borem-ui-root.borem-ui-root.borem-ui-root.borem-ui-root .borem-btn-sm {
  min-height: 28px !important;
  padding: 4px 9px !important;
  font-size: 12px !important;
}

.borem-app.borem-app.borem-app.borem-app.borem-app[data-borem-ui-isolated="true"] .borem-icon-btn,
.borem-ui-root.borem-ui-root.borem-ui-root.borem-ui-root.borem-ui-root .borem-icon-btn {
  width: 32px !important;
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 !important;
}

.borem-app.borem-app.borem-app.borem-app.borem-app[data-borem-ui-isolated="true"] .borem-dropdown-multiselect-toggle,
.borem-ui-root.borem-ui-root.borem-ui-root.borem-ui-root.borem-ui-root .borem-dropdown-multiselect-toggle {
  width: 100% !important;
  min-height: 44px !important;
  padding: 9px 12px !important;
  border-width: 1px !important;
  border-style: solid !important;
  border-radius: 10px !important;
  background: var(--st-card, #fff) !important;
  color: var(--st-text, #18324d) !important;
  text-align: left !important;
}

.borem-app.borem-app.borem-app.borem-app.borem-app[data-borem-ui-isolated="true"] .borem-dropdown-multiselect-clear,
.borem-ui-root.borem-ui-root.borem-ui-root.borem-ui-root.borem-ui-root .borem-dropdown-multiselect-clear {
  width: 100% !important;
  min-height: 0 !important;
  margin-top: 7px !important;
  padding: 8px 10px !important;
  border: 0 !important;
  border-top: 1px solid var(--st-border, #d8e0eb) !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #1769aa !important;
  text-align: left !important;
}

.borem-app.borem-app.borem-app.borem-app.borem-app[data-borem-ui-isolated="true"] .borem-quarter-picker :where(input, select),
.borem-ui-root.borem-ui-root.borem-ui-root.borem-ui-root.borem-ui-root .borem-quarter-picker :where(input, select) {
  width: 100% !important;
  min-height: 44px !important;
  padding: 9px 11px !important;
  border-width: 1px !important;
  border-radius: 10px !important;
}

.borem-app.borem-app.borem-app.borem-app.borem-app[data-borem-ui-isolated="true"] .borem-filters :where(input, select),
.borem-ui-root.borem-ui-root.borem-ui-root.borem-ui-root.borem-ui-root .borem-filters :where(input, select) {
  min-height: 30px !important;
  padding: 5px 8px !important;
  border-radius: var(--st-r-sm, 6px) !important;
  font-size: 13px !important;
}

.borem-app.borem-app.borem-app.borem-app.borem-app[data-borem-ui-isolated="true"] .borem-table th,
.borem-ui-root.borem-ui-root.borem-ui-root.borem-ui-root.borem-ui-root .borem-table th {
  padding: 9px 12px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--st-border, #e0e4e8) !important;
  background: var(--st-bg, #f4f6f8) !important;
  color: var(--st-text-muted, #6b7a8d) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  letter-spacing: .06em !important;
  text-align: left !important;
  text-transform: uppercase !important;
  vertical-align: middle !important;
}

.borem-app.borem-app.borem-app.borem-app.borem-app[data-borem-ui-isolated="true"] .borem-table td,
.borem-ui-root.borem-ui-root.borem-ui-root.borem-ui-root.borem-ui-root .borem-table td {
  padding: 10px 12px !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(224, 228, 232, .7) !important;
  background: transparent !important;
  color: var(--st-text, #1c2733) !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  line-height: 1.45 !important;
  letter-spacing: normal !important;
  text-align: left !important;
  text-transform: none !important;
  vertical-align: middle !important;
}

/* Preserve the dedicated Jobs table presentation after the generic table shield. */
.borem-app.borem-app.borem-app.borem-app.borem-app[data-borem-ui-isolated="true"] #borem-wo-table thead th {
  height: 48px !important;
  padding: 0 14px !important;
  border-top: 1px solid #e5ebf2 !important;
  border-bottom: 1px solid #e5ebf2 !important;
  background: #f8fafc !important;
  color: #7790aa !important;
  font-size: 10px !important;
  font-weight: 850 !important;
  letter-spacing: .055em !important;
  text-transform: uppercase !important;
}

.borem-app.borem-app.borem-app.borem-app.borem-app[data-borem-ui-isolated="true"] #borem-wo-table tbody td {
  padding: 15px 14px !important;
  border-bottom: 1px solid #e8edf3 !important;
  background: #fff !important;
  color: #27445f !important;
  font-size: 12px !important;
  vertical-align: middle !important;
}

.borem-app.borem-app.borem-app.borem-app.borem-app[data-borem-ui-isolated="true"] .borem-st-page,
.borem-ui-root.borem-ui-root.borem-ui-root.borem-ui-root.borem-ui-root .borem-st-page {
  min-width: 31px !important;
  width: auto !important;
  height: 31px !important;
  min-height: 31px !important;
  padding: 0 8px !important;
  border: 1px solid transparent !important;
  border-radius: 5px !important;
  background: #fff !important;
  color: #0e5f9f !important;
  font-size: 12px !important;
  font-weight: 750 !important;
  line-height: 1 !important;
}

.borem-app.borem-app.borem-app.borem-app.borem-app[data-borem-ui-isolated="true"] .borem-st-page.is-current,
.borem-ui-root.borem-ui-root.borem-ui-root.borem-ui-root.borem-ui-root .borem-st-page.is-current {
  background: #0f69aa !important;
  color: #fff !important;
}

.borem-app.borem-app.borem-app.borem-app.borem-app[data-borem-ui-isolated="true"] .borem-topbar-avatar,
.borem-ui-root.borem-ui-root.borem-ui-root.borem-ui-root.borem-ui-root .borem-topbar-avatar {
  width: 34px !important;
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: var(--st-orange, #f05a28) !important;
  color: #fff !important;
}

.borem-app.borem-app.borem-app.borem-app.borem-app[data-borem-ui-isolated="true"] .borem-nav-link,
.borem-ui-root.borem-ui-root.borem-ui-root.borem-ui-root.borem-ui-root .borem-nav-link {
  min-height: 0 !important;
  padding: 7px 10px !important;
  border: 0 !important;
  border-radius: var(--st-r-sm, 6px) !important;
  background: transparent !important;
  color: var(--st-text, #1c2733) !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  line-height: 1.35 !important;
  text-align: left !important;
}
