/* ── IECertify CRM – Custom Styles ───────────────────────── */

/* ── Wider page on large screens ──────────────────────────────
   Bootstrap caps .container at 1320px, leaving big left/right margins on
   wide monitors. Widen it to ~85% of the viewport (never narrower than the
   default 1320px) so the whitespace is roughly halved. Applies to every
   page — navbar, content, and footer all use .container. Tune the 85vw to
   taste (higher = wider, less margin). */
@media (min-width: 1400px) {
  .container { max-width: max(1320px, 85vw); }
}

/* ── 433A sub-row: seamless attachment to parent lead row ── */
.has-433a-sub > td { border-bottom: 0 !important; }
.sub-433a-row > td { border-top: 0 !important; }

/* ── Iframe embed mode: hide chrome, remove excess spacing ── */
html.iframe-embed nav.navbar,
html.iframe-embed footer,
html.iframe-embed #page-loading { display: none !important; }
html.iframe-embed body { background: transparent; }
html.iframe-embed main.container { margin-top: 0 !important; }

:root {
  --ie-blue: #0d6efd;
  --ie-blue-dark: #0a58ca;
  /* Bootstrap's default borders/dividers (#dee2e6) read as washed-out. Darken
     them app-wide so cards, list dividers, tab lines and inputs are legible. */
  --bs-border-color: #c2cad5;
  --bs-border-color-translucent: rgba(0, 0, 0, 0.16);
}

body {
  background-color: #f8f9fb;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ── Navbar ── */
.navbar-brand {
  font-size: 1.3rem;
  letter-spacing: 0.02em;
}

/* ── BIC banner: collapsible "other owners" groups ── */
.bic-owner-head { cursor: pointer; }
.bic-owner-head .bic-chevron { transition: transform .15s ease; font-size: .75rem; }
.bic-owner-head[aria-expanded="true"] .bic-chevron { transform: rotate(90deg); }

/* ── Cards ── */
.card {
  border-radius: 0.75rem;
  border: 1px solid #cbd2dc;
}

/* Most cards use `border-0 shadow-sm`, leaving them held only by a faint
   shadow. Give even those a crisp hairline so they don't wash out. */
.card.border-0 {
  border: 1px solid #cbd2dc !important;
}

/* A little more shadow depth so cards read as raised, not flat. */
.shadow-sm {
  box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.10) !important;
}

.card-header {
  border-radius: 0.75rem 0.75rem 0 0 !important;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.85rem 1.25rem;
}

/* ── Service selection cards ── */
.service-card {
  display: block;
  border: 2px solid #dee2e6;
  border-radius: 0.75rem;
  padding: 1rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
  height: 100%;
  text-align: center;
  background: #fff;
}

.service-card:hover {
  border-color: var(--ie-blue);
  background-color: #f0f6ff;
}

/* Remove hover state on touch devices to prevent sticky highlight after scroll */
@media (hover: none) {
  .service-card:hover {
    border-color: #dee2e6;
    background-color: #fff;
  }
}

.service-card.selected {
  border-color: var(--ie-blue);
  background-color: #e8f0fe;
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
}

.service-card i {
  color: var(--ie-blue);
}

/* ── Dashboard table ── */
.table th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6c757d;
  background-color: #f8f9fa;
}

.table > :not(caption) > * > * {
  padding: 0.85rem 0.75rem;
}

/* ── Badge overrides ── */
.badge {
  font-weight: 500;
  font-size: 0.78rem;
  padding: 0.35em 0.75em;
}

/* ── Confirmation icon bounce ── */
.confirmation-icon {
  animation: pop-in 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

@keyframes pop-in {
  0%   { transform: scale(0.4); opacity: 0; }
  100% { transform: scale(1);   opacity: 1; }
}

/* ── Footer ── */
footer {
  background-color: #fff;
}

/* ── Form focus glow ── */
.form-control:focus,
.form-select:focus {
  border-color: var(--ie-blue);
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

/* ── dl styling in detail view ── */
dt {
  font-weight: 600;
  color: #495057;
  padding-top: 0.25rem;
}

dd {
  padding-top: 0.25rem;
  margin-bottom: 0.75rem;
}

/* ── File upload drop zone ── */
.upload-dropzone {
  display: block;
  border: 2px dashed #ced4da;
  border-radius: 0.75rem;
  padding: 2rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
  background: #fff;
  color: #495057;
}

.upload-dropzone:hover,
.upload-dropzone--active {
  border-color: var(--ie-blue);
  background-color: #f0f6ff;
}

.upload-dropzone--active {
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
}

/* ── Pipeline status badge sizes ── */
.badge.fs-6 { font-size: 0.9rem !important; letter-spacing: 0.01em; }

/* ── Ball in Court badge ── */
.bg-bic { background-color: #f97316 !important; color: #fff !important; }

/* ── Ball in Court age pill ──
   Days since the BIC last CHANGED. Thresholds match shared/activity.py
   (STALE_BIC_DAYS = 3 amber, OVERDUE_BIC_DAYS = 7 red). */
.bic-age {
  display: inline-block;
  font-size: .7rem;
  font-weight: 600;
  line-height: 1.1;
  padding: .12rem .35rem;
  border-radius: .35rem;
  white-space: nowrap;
  vertical-align: baseline;
}
.bic-age-fresh   { background: rgba(0, 0, 0, .06); color: #6b7280; }
.bic-age-stale   { background: #fef3c7; color: #92400e; }
.bic-age-overdue { background: #fee2e2; color: #991b1b; }

/* On the orange BIC badge/button the neutral grey pill washes out — lift it. */
.bg-bic .bic-age-fresh { background: rgba(255, 255, 255, .3); color: #fff; }

/* ── HQ role badge ── */
.bg-purple { background-color: #7c3aed !important; color: #fff !important; }

/* ── Scroll-anchor offset (clears the sticky navbar ~56px + breathing room) ── */
#project-setup-card,
#scheduling-date-card,
#scheduling-payer-card,
#admin-dropzone,
#tab-bid,
#tab-info,
#tab-invoice,
#tab-documents,
#tab-scheduling,
#edit-project-number,
#edit-contact,
#edit-address,
#edit-service,
#edit-special-instructions,
#edit-client,
#edit-payer {
  scroll-margin-top: 80px;
}

/* ── Scheduling (purple) color system ── */
:root { --ie-scheduling: #7c3aed; }
.bg-scheduling         { background-color: #7c3aed !important; color: #fff !important; }
.bg-scheduling-subtle  { background-color: #ede9fe !important; }
.text-scheduling       { color: #7c3aed !important; }
.border-scheduling-subtle { border-color: #c4b5fd !important; }
.action-panel-scheduling  { background: #f5f3ff; border-left-color: #7c3aed; }
.btn-scheduling {
  background-color: #7c3aed; color: #fff; border-color: #7c3aed;
}
.btn-scheduling:hover, .btn-scheduling:focus {
  background-color: #6d28d9; color: #fff; border-color: #6d28d9;
}
.btn-outline-scheduling {
  color: #7c3aed; border-color: #7c3aed;
}
.btn-outline-scheduling:hover {
  background-color: #7c3aed; color: #fff;
}

/* ── Contract Docs custom color (amber) ── */
:root { --ie-contract: #d97706; }
.bg-contract-docs         { background-color: #d97706 !important; color: #fff !important; }
.bg-contract-docs-subtle  { background-color: #fef3c7 !important; }
.text-contract-docs       { color: #d97706 !important; }
.border-contract-docs-subtle { border-color: #fcd34d !important; }
.btn-contract-docs {
  background-color: #d97706; color: #fff; border-color: #d97706;
}
.btn-contract-docs:hover, .btn-contract-docs:focus {
  background-color: #b45309; color: #fff; border-color: #b45309;
}
.btn-outline-contract-docs {
  color: #d97706; border-color: #d97706; background-color: transparent;
}
.btn-outline-contract-docs:hover {
  background-color: #d97706; color: #fff; border-color: #d97706;
}

/* ── Status color palette (shared across tabs, badges, and action panels) ── */
:root {
  --st-new-bg:            #f8f9fa;  --st-new-accent:          #6c757d;  --st-new-text:          #343a40;
  --st-bid-bg:            #eff6ff;  --st-bid-accent:          #0d6efd;  --st-bid-text:          #084298;
  --st-accepted-bg:       #e8f5e9;  --st-accepted-accent:     #2e7d32;  --st-accepted-text:     #1b5e20;
  --st-scheduling-bg:     #f5f3ff;  --st-scheduling-accent:   #7c3aed;  --st-scheduling-text:   #5b21b6;
  --st-contract-docs-bg:  #fffbeb;  --st-contract-docs-accent:#d97706;  --st-contract-docs-text:#92400e;
  --st-active-bg:         #e8f7fb;  --st-active-accent:       #0dcaf0;  --st-active-text:       #055160;
  --st-completed-bg:      #d4edda;  --st-completed-accent:    #198754;  --st-completed-text:    #0f5132;
  --st-declined-bg:       #fff5f5;  --st-declined-accent:     #dc3545;  --st-declined-text:     #842029;
}

/* ── Action panels ── */
.action-panel { border-radius:.75rem; border-left-width:5px; border-left-style:solid; }
.action-panel-new           { background: var(--st-new-bg);           border-left-color: var(--st-new-accent); }
.action-panel-bid-prepared  { background: var(--st-bid-bg);           border-left-color: var(--st-bid-accent); }
.action-panel-accepted      { background: var(--st-accepted-bg);      border-left-color: var(--st-accepted-accent); }
.action-panel-scheduling    { background: var(--st-scheduling-bg);    border-left-color: var(--st-scheduling-accent); }
.action-panel-contract-docs { background: var(--st-contract-docs-bg); border-left-color: var(--st-contract-docs-accent); }
.action-panel-active        { background: var(--st-active-bg);        border-left-color: var(--st-active-accent); }
.action-panel-completed     { background: var(--st-completed-bg);     border-left-color: var(--st-completed-accent); }
.action-panel-declined      { background: var(--st-declined-bg);      border-left-color: var(--st-declined-accent); }

/* ── Nav tabs ── */
.nav-tabs {
  border-bottom: 2px solid #adb5bd;
  gap: 2px;
}

.nav-tabs .nav-link {
  color: #495057;
  border: 1px solid transparent;
  border-bottom: none;
  font-weight: 500;
  padding: 0.55rem 1rem;
  border-radius: 0.5rem 0.5rem 0 0;
  transition: background-color 0.1s ease, color 0.1s ease;
}

.nav-tabs .nav-link:not(.active):not([disabled]) {
  border-color: #adb5bd #adb5bd transparent;
}

.nav-tabs .nav-link:hover:not(.active):not([disabled]) {
  color: #212529;
  background-color: #e9ecef;
  border-color: #868e96 #868e96 transparent;
}

/* Default active tab */
.nav-tabs .nav-link.active {
  color: #212529;
  background-color: #ced4da;
  border-color: #adb5bd #adb5bd #ced4da;
  border-top: 3px solid #0d6efd;
  font-weight: 600;
  box-shadow: 0 -3px 8px rgba(13,110,253,0.18), 2px 0 0 #adb5bd, -2px 0 0 #adb5bd;
}

.nav-tabs .nav-link.disabled {
  color: #adb5bd;
}

/* ── Status-tab highlight system ────────────────────────────────────────────
   Each .tabs-status-* class sets CSS vars on the <ul>.
   Only the tab button(s) with .tab-status-highlight consume those vars —
   so the status color shows only on the relevant tab, not all active tabs.
   Other active tabs fall back to the default grey defined above.           */
.tabs-status-new             { --th-bg: var(--st-new-bg);           --th-active-bg: #dee2e6; --th-text: var(--st-new-text);           --th-border: var(--st-new-accent); }
.tabs-status-bid             { --th-bg: var(--st-bid-bg);           --th-active-bg: #bfdbfe; --th-text: var(--st-bid-text);           --th-border: var(--st-bid-accent); }
.tabs-status-project-setup   { --th-bg: var(--st-accepted-bg);      --th-active-bg: #a7f3d0; --th-text: var(--st-accepted-text);      --th-border: var(--st-accepted-accent); }
.tabs-status-soft-scheduling { --th-bg: var(--st-scheduling-bg);    --th-active-bg: #ddd6fe; --th-text: var(--st-scheduling-text);    --th-border: var(--st-scheduling-accent); }
.tabs-status-contract-docs   { --th-bg: var(--st-contract-docs-bg); --th-active-bg: #fde68a; --th-text: var(--st-contract-docs-text); --th-border: var(--st-contract-docs-accent); }
.tabs-status-active          { --th-bg: var(--st-active-bg);        --th-active-bg: #a5f3fc; --th-text: var(--st-active-text);        --th-border: var(--st-active-accent); }
.tabs-status-completed       { --th-bg: var(--st-completed-bg);     --th-active-bg: #a3cfbb; --th-text: var(--st-completed-text);     --th-border: var(--st-completed-accent); }
.tabs-status-declined        { --th-bg: var(--st-declined-bg);      --th-active-bg: #fecaca; --th-text: var(--st-declined-text);      --th-border: var(--st-declined-accent); }

/* Status-highlighted tab — always shows the status color (idle) */
.nav-tabs .nav-link.tab-status-highlight {
  background-color: var(--th-bg, #f8f9fa);
  color: var(--th-text, #343a40);
  border-color: var(--th-border, #6c757d) var(--th-border, #6c757d) transparent;
  font-weight: 600;
}
/* Highlighted tab when active (selected) — darker shade */
.nav-tabs .nav-link.tab-status-highlight.active {
  background-color: var(--th-active-bg, #ced4da);
  border-color: var(--th-border, #6c757d) var(--th-border, #6c757d) var(--th-active-bg, #ced4da);
  border-top: 3px solid var(--th-border, #6c757d);
  color: var(--th-text, #343a40);
  box-shadow: 0 -3px 8px rgba(0,0,0,0.15), 2px 0 0 var(--th-border, #6c757d), -2px 0 0 var(--th-border, #6c757d);
}
/* Highlighted tab on hover (not yet active) — preview the darker shade */
.nav-tabs .nav-link.tab-status-highlight:hover:not(.active) {
  background-color: var(--th-active-bg, #e9ecef);
  border-color: var(--th-border, #868e96) var(--th-border, #868e96) transparent;
  color: var(--th-text, #212529);
}
/* Striped pattern for New status */
.tabs-status-new .nav-link.tab-status-highlight,
.tabs-status-new .nav-link.tab-status-highlight:hover:not(.active) {
  background:
    repeating-linear-gradient(45deg, transparent, transparent 5px, rgba(108,117,125,0.2) 5px, rgba(108,117,125,0.2) 10px)
    var(--st-new-bg);
}
.tabs-status-new .nav-link.tab-status-highlight.active {
  background:
    repeating-linear-gradient(45deg, transparent, transparent 5px, rgba(108,117,125,0.35) 5px, rgba(108,117,125,0.35) 10px)
    #dee2e6;
  border-color: var(--st-new-accent) var(--st-new-accent) #dee2e6;
  border-top: 3px solid var(--st-new-accent);
  box-shadow: 0 -3px 8px rgba(0,0,0,0.15), 2px 0 0 var(--st-new-accent), -2px 0 0 var(--st-new-accent);
}

/* ── Dashboard table: status row tints ── */
/* Bootstrap 5 applies bg via --bs-table-bg on <td>, so we override that variable on <tr> */
.row-status-new           { --bs-table-bg: var(--st-new-bg);           --bs-table-hover-bg: #eef0f1; }
.row-status-bid-prepared  { --bs-table-bg: var(--st-bid-bg);           --bs-table-hover-bg: #dbeafe; }
.row-status-accepted      { --bs-table-bg: var(--st-accepted-bg);      --bs-table-hover-bg: #d0ebd0; }
.row-status-scheduling      { --bs-table-bg: var(--st-scheduling-bg);    --bs-table-hover-bg: #ede0ff; }
.row-status-soft-scheduling { --bs-table-bg: var(--st-scheduling-bg);    --bs-table-hover-bg: #ede0ff; }
.row-status-contract-docs { --bs-table-bg: var(--st-contract-docs-bg); --bs-table-hover-bg: #fde68a; }
.row-status-active        { --bs-table-bg: var(--st-active-bg);        --bs-table-hover-bg: #cceef5; }
.row-status-completed     { --bs-table-bg: var(--st-completed-bg);     --bs-table-hover-bg: #b8dfc9; }
.row-status-declined      { --bs-table-bg: var(--st-declined-bg);      --bs-table-hover-bg: #ffe4e4; }

/* ── Cell-level link affordance — for email/phone links inside a clickable row,
      where the row's cursor:pointer would otherwise disguise that the
      individual links are clickable. Underline + darker color on hover. ── */
.cell-link {
  position: relative;
  z-index: 1;
}
.cell-link:hover,
.cell-link:focus {
  text-decoration: underline !important;
  color: #0d6efd !important;
}

/* ── Document thumbnail in detail view ── */
.doc-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 0.4rem;
  border: 1px solid #dee2e6;
}

.doc-thumb-placeholder {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f9fa;
  border-radius: 0.4rem;
  border: 1px solid #dee2e6;
  font-size: 1.6rem;
  color: #6c757d;
}

/* ── Document cards (lead page Documents tab + Intake card) ──
   The media box is a FIXED-HEIGHT slot so a grid of mixed portrait and
   landscape thumbnails lines up. object-fit:cover crops rather than
   letterboxes -- at 300px the thumbnail is already a preview, not the
   document, and a consistent grid reads faster than a faithful aspect ratio. */
.doc-card {
  transition: box-shadow .12s ease, transform .12s ease;
}
.doc-card:hover {
  box-shadow: 0 .4rem .9rem rgba(0, 0, 0, .10) !important;
  transform: translateY(-1px);
}
.doc-card-media {
  display: block;
  height: 110px;
  background: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
  border-radius: .35rem .35rem 0 0;
  overflow: hidden;
}
.doc-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.doc-card-media-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  color: #6c757d;
  text-decoration: none;
}
.doc-card-name {
  font-size: .75rem;
  line-height: 1.25;
  /* Two lines then ellipsis: a UUID-ish email transcript name would otherwise
     push every card in the row taller than the one beside it. */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

/* ── Loading overlay (8-bit runner) ──────────────────────── */
#page-loading {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 10000;
  display: none;
}
#page-loading.active { display: block; }

/* Top progress bar */
#loading-bar {
  position: absolute;
  top: 0; left: 0;
  height: 4px;
  background: #4ade80;
  animation: load-bar 1.4s ease-in-out infinite;
}
@keyframes load-bar {
  0%   { left: 0;    width: 0;   }
  40%  { left: 0;    width: 60%; }
  100% { left: 100%; width: 0;   }
}

/* Loading label */
#loading-label {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.7;
}

/* ── Sunflowers sprouting all over (loading overlay) ───────────────────── */
#sunflower-field {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.sunflower {
  position: absolute;
  transform-origin: bottom center;
  /* Grow once with a springy overshoot, then HOLD (fill: both) — flowers stay. */
  animation: sf-grow 3.4s cubic-bezier(0.34, 1.4, 0.5, 1) both;
  will-change: transform, opacity;
}

/* Flower head: a brown seeded centre inside a ring of yellow petals */
.sf-head {
  display: block;
  width: calc(42px * var(--sf-size, 1));
  height: calc(42px * var(--sf-size, 1));
  margin: 0 auto -6px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, #5c3a1e 0 29%, #7a4f28 29% 33%, rgba(0, 0, 0, 0) 34%),
    repeating-conic-gradient(#ffcf3f 0deg 22deg, rgba(0, 0, 0, 0) 22deg 30deg);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

/* Stem with two little leaves */
.sf-stem {
  display: block;
  width: calc(6px * var(--sf-size, 1));
  height: calc(115px * var(--sf-size, 1));
  margin: 0 auto;
  background: linear-gradient(#4c9a2a, #3a7d1f);
  border-radius: 3px;
  position: relative;
}
.sf-stem::before,
.sf-stem::after {
  content: "";
  position: absolute;
  top: 42%;
  width: calc(16px * var(--sf-size, 1));
  height: calc(9px * var(--sf-size, 1));
  background: #57ab2e;
}
.sf-stem::before { left: 90%;  border-radius: 0 70% 0 70%; transform: rotate(-6deg); }
.sf-stem::after  { right: 90%; border-radius: 70% 0 70% 0; transform: rotate(6deg); }

/* Rapid sprout: shoot up with a little overshoot, sway, then fade so a fresh
   one can pop up somewhere else. Staggered per-flower delays (set inline) make
   them appear all over. */
@keyframes sf-grow {
  0%   { transform: scaleY(0) scaleX(0.55); opacity: 0; }
  55%  { opacity: 1; }
  100% { transform: scaleY(1) scaleX(1);    opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .sunflower { animation: none; }
}

/* Success flash near Sync button */
.sync-success-badge {
  animation: fade-out-badge 3s ease forwards;
}
@keyframes fade-out-badge {
  0%   { opacity: 1; }
  70%  { opacity: 1; }
  100% { opacity: 0; }
}

/* ── Wide tooltip variant ── */
.tooltip-wide .tooltip-inner {
  max-width: 340px;
  text-align: left;
}

/* ── Checkboxes / radio buttons — darker border ── */
.form-check-input {
  border-color: #6c757d;
}

/* ── Placeholder tab panes ───────────────────────────────── */
.border-dashed {
  border: 2px dashed #dee2e6 !important;
}

/* ── Special Instructions card header ─────────────────────── */
.bg-special-instructions {
  background-color: #b7410e;
}
.text-special-instructions {
  color: #b7410e;
}

/* ── Mobile responsiveness ───────────────────────────────────── */

/* Scrollable tab strip on mobile */
@media (max-width: 767.98px) {
  .nav-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 1px; /* prevent bottom border from clipping */
  }
  .nav-tabs::-webkit-scrollbar { display: none; }
  .nav-tabs .nav-item { flex-shrink: 0; }
  .nav-tabs .nav-link {
    white-space: nowrap;
    padding: 0.45rem 0.65rem;
    font-size: 0.8rem;
  }
  /* Icons-only on phone: hide text labels, keep icons + badges */
  .nav-tabs .tab-label { display: none; }
}

/* Scrollable filter bar on mobile */
@media (max-width: 767.98px) {
  .filter-scroll {
    flex-wrap: nowrap !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
  }
  .filter-scroll::-webkit-scrollbar { display: none; }
  .filter-scroll > * { flex-shrink: 0; }
}



/* UX Analytics deep-link highlight pulse */
@keyframes ux-highlight-pulse {
  0%   { outline: 3px solid #f97316; outline-offset: 3px; box-shadow: 0 0 0 0 rgba(249,115,22,0.6); }
  50%  { outline: 3px solid #f97316; outline-offset: 3px; box-shadow: 0 0 0 8px rgba(249,115,22,0); }
  100% { outline: 3px solid #f97316; outline-offset: 3px; box-shadow: 0 0 0 0 rgba(249,115,22,0); }
}
.ux-highlight {
  animation: ux-highlight-pulse 1s ease 4;
  border-radius: 4px;
  position: relative;
  z-index: 1;
}

/* ── Map inspector labels ─────────────────────────────── */
.inspector-map-label {
  background: rgba(255,255,255,.85);
  padding: 1px 5px;
  border-radius: 3px;
  border: 1px solid #ccc;
  white-space: nowrap;
}
.inspector-map-label-clear {
  background: transparent;
  padding: 0;
  white-space: nowrap;
  text-shadow: 1px 1px 2px rgba(255,255,255,.9), -1px -1px 2px rgba(255,255,255,.9), 0 0 4px rgba(255,255,255,.8);
}

/* ── 433A Portal mobile tweaks ─────────────────────────── */
@media (max-width: 576px) {
  .portal-upload-row { flex-direction: column !important; gap: .5rem !important; }
  .portal-upload-row input[type="file"] { max-width: 100% !important; }
}
