/* ============================================================
   BY BANKS — Control Center hero preview
   Production stylesheet · extracted from preview file verbatim
   ============================================================
   Source:       control-center-preview.html
   Component:    /private/construction/includes/hero-preview.php
   Namespace:    .bbcc-*
   ============================================================ */

/* ============================================================
   BY BANKS — CONTROL CENTER
   Construction landing hero dashboard · preview v0.1
   16 April 2026
   ============================================================
   Namespace: .bbcc-*
   Will be extracted into a PHP include and dropped into the
   construction landing hero. Self-contained; no external deps.
   ============================================================ */



/* ============================================================
   CONTROL CENTER TOKENS
   ============================================================ */
.bbcc-frame {
  /* SLATE */
  --slate-900: #0F1418;
  --slate-850: #171D24;
  --slate-800: #1F2630;
  --slate-700: #2A323D;
  --slate-600: #36404C;
  --slate-500: #4A5563;
  --slate-400: #6B7480;
  --slate-300: #9098A3;
  --slate-200: #C2C7CE;
  --slate-100: #E2E5E9;

  /* PARCHMENT */
  --parchment-300: #E8DEBE;
  --parchment-200: #EDE5C8;
  --parchment-100: #F2EBD8;
  --parchment-50:  #F7F2E4;
  --parchment-25:  #FBF7EC;

  /* LEDGER GREEN */
  --ledger-900: #1A2A18;
  --ledger-800: #2A4226;
  --ledger-700: #3A5A36;
  --ledger-600: #4F6F4A;
  --ledger-500: #688A60;
  --ledger-400: #8AAA82;
  --ledger-300: #A8C0A2;
  --ledger-200: #C8DAC3;
  --ledger-100: #DCE8D8;
  --ledger-50:  #EEF4EB;

  /* BRONZE (SealedWorks only) */
  --bronze-900: #4A341C;
  --bronze-800: #785432;
  --bronze-700: #926740;
  --bronze-600: #A8794A;
  --bronze-500: #B88B5D;
  --bronze-300: #D6B98E;
  --bronze-100: #EFE2CC;
  --bronze-50:  #F7EEDD;

  /* SIGNAL */
  --signal-amber: #C68B2E;
  --signal-amber-bg: #F5E8CC;
  --signal-rust: #A84A2E;
  --signal-rust-bg: #F4E2D8;

  /* RULES */
  --rule-strong: rgba(31, 38, 48, 0.18);
  --rule-medium: rgba(31, 38, 48, 0.11);
  --rule-soft:   rgba(31, 38, 48, 0.06);
  --rule-chrome: rgba(242, 235, 216, 0.08);
  --rule-chrome-soft: rgba(242, 235, 216, 0.04);

  /* TYPOGRAPHY */
  --font-display: 'Marcellus', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}


/* ============================================================
   FRAME
   ============================================================ */
.bbcc-frame {
  font-family: var(--font-body);
  color: var(--slate-800);
  background: var(--parchment-100);
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  border-radius: 14px;
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04),
    /* Reduced + sharpened depth stack — matches phones for cross-preview consistency */
    0 24px 40px rgba(0, 0, 0, 0.35),
    0 10px 18px rgba(0, 0, 0, 0.25),
    0 4px 8px rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(0, 0, 0, 0.4);
  font-size: 14px;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  min-height: 760px;
  max-height: 820px;
}


/* ============================================================
   BROWSER CHROME
   ============================================================ */
.bbcc-chrome {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 10px 14px;
  background: var(--slate-900);
  border-bottom: 1px solid rgba(0, 0, 0, 0.5);
}
.bbcc-chrome__left {
  grid-column: 1;
  display: flex;
  align-items: center;
  gap: 18px;
}
.bbcc-chrome__dots {
  display: flex;
  gap: 7px;
}
.bbcc-chrome__dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--slate-700);
  border: 1px solid rgba(0, 0, 0, 0.3);
}
.bbcc-chrome__dot:nth-child(1) { background: #E15C4C; }
.bbcc-chrome__dot:nth-child(2) { background: #E0B04C; }
.bbcc-chrome__dot:nth-child(3) { background: #5CA96B; }
.bbcc-chrome__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
.bbcc-chrome__logo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}
.bbcc-chrome__brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.bbcc-chrome__wordmark {
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1;
  color: var(--parchment-100);
  letter-spacing: 0.005em;
  white-space: nowrap;
}
.bbcc-chrome__sep {
  width: 1px; height: 14px;
  background: rgba(242, 235, 216, 0.15);
}
.bbcc-chrome__search {
  grid-column: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(242, 235, 216, 0.1);
  border: 1px solid rgba(242, 235, 216, 0.15);
  border-radius: 7px;
  padding: 7px 12px;
  max-width: 380px;
  justify-self: center;
  width: 100%;
  color: rgba(242, 235, 216, 0.65);
  font-size: 12.5px;
}
.bbcc-chrome__search svg {
  width: 12px; height: 12px;
  flex-shrink: 0;
  opacity: 0.6;
}
.bbcc-chrome__search-kbd {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 1px 6px;
  border: 1px solid rgba(242, 235, 216, 0.1);
  border-radius: 3px;
  color: rgba(242, 235, 216, 0.4);
}
.bbcc-chrome__right {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 14px;
}
.bbcc-chrome__status {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(242, 235, 216, 0.55);
}
.bbcc-pulse {
  position: relative;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ledger-400);
  box-shadow: 0 0 0 0 rgba(138, 170, 130, 0.6);
  animation: bbcc-pulse 2.2s ease-out infinite;
}
@keyframes bbcc-pulse {
  0%   { box-shadow: 0 0 0 0   rgba(138, 170, 130, 0.7); }
  70%  { box-shadow: 0 0 0 8px rgba(138, 170, 130, 0); }
  100% { box-shadow: 0 0 0 0   rgba(138, 170, 130, 0); }
}
.bbcc-chrome__avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ledger-600), var(--ledger-800));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 11px;
  color: var(--parchment-100);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
}


/* ============================================================
   BODY — 3 column grid
   ============================================================ */
.bbcc-body {
  flex: 1;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) 300px;
  min-height: 0;
  overflow: hidden;
  background: var(--parchment-100);
}


/* ============================================================
   SIDEBAR
   ============================================================ */
.bbcc-side {
  background: var(--slate-850);
  color: var(--parchment-100);
  border-right: 1px solid rgba(0, 0, 0, 0.45);
  padding: 18px 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow-y: auto;
  min-height: 0;
}
.bbcc-side::-webkit-scrollbar { width: 4px; height: 4px; }
.bbcc-side::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 2px; }
.bbcc-side::-webkit-scrollbar-track { background: transparent; }
.bbcc-side { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.12) transparent; }

.bbcc-side__group { display: flex; flex-direction: column; gap: 2px; }
.bbcc-side__label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(242, 235, 216, 0.4);
  padding: 0 10px 6px;
}
.bbcc-side__item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 13px;
  color: rgba(242, 235, 216, 0.78);
  transition: background 0.15s, color 0.15s;
  position: relative;
}
@media (hover: hover) {
  .bbcc-side__item:hover {
    background: rgba(242, 235, 216, 0.04);
    color: var(--parchment-100);
  }
  .bbcc-side__item--bronze:hover {
    background: rgba(168, 121, 74, 0.1);
    color: var(--bronze-100);
  }
}
.bbcc-side__item svg {
  width: 15px; height: 15px;
  flex-shrink: 0;
  opacity: 0.7;
}
.bbcc-side__item--active {
  background: rgba(138, 170, 130, 0.12);
  color: var(--parchment-100);
  box-shadow: inset 2px 0 0 var(--ledger-400);
}
.bbcc-side__item--active svg { opacity: 1; color: var(--ledger-300); }
.bbcc-side__item--bronze {
  color: var(--bronze-300);
}
.bbcc-side__item--bronze svg { color: var(--bronze-500); opacity: 0.9; }
.bbcc-side__badge {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 3px;
  background: rgba(168, 121, 74, 0.18);
  color: var(--bronze-300);
  letter-spacing: 0.05em;
}
.bbcc-side__chevron {
  margin-left: auto;
  width: 12px; height: 12px;
  flex-shrink: 0;
  opacity: 0.35;
  color: var(--parchment-100);
}

.bbcc-side__divider { border-top: 1px solid rgba(255,255,255,0.06); margin: 4px 0; }

.bbcc-side__support {
  margin-top: auto;
  background: linear-gradient(145deg, rgba(74, 110, 66, 0.22), rgba(58, 90, 54, 0.12));
  border: 1px solid rgba(168, 192, 162, 0.2);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.bbcc-side__support-title {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--ledger-100);
}
.bbcc-side__support-text {
  font-size: 11.5px;
  color: rgba(242, 235, 216, 0.6);
  line-height: 1.4;
  margin-bottom: 6px;
}
.bbcc-side__support-btn {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 5px;
  background: var(--ledger-600);
  color: var(--parchment-100);
  border: 0;
  text-align: center;
  cursor: pointer;
  transition: background 0.15s;
}
.bbcc-side__support-btn:hover { background: var(--ledger-500); }

.bbcc-side__logout {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  font-size: 12.5px;
  color: rgba(242, 235, 216, 0.5);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.bbcc-side__logout:hover { color: rgba(242, 235, 216, 0.8); background: rgba(242, 235, 216, 0.03); }
.bbcc-side__logout svg { width: 14px; height: 14px; opacity: 0.6; }


/* ============================================================
   MAIN AREA
   ============================================================ */
.bbcc-main {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  position: relative;
  background: var(--parchment-100);
  background-image:
    radial-gradient(ellipse 70% 50% at 50% 0%, var(--parchment-50) 0%, transparent 70%);
}
.bbcc-main__scroll {
  flex: 1;
  overflow-y: auto;
  padding: 18px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 0;
}
.bbcc-main__scroll::-webkit-scrollbar { width: 6px; }
.bbcc-main__scroll::-webkit-scrollbar-thumb { background: var(--rule-medium); border-radius: 3px; }
.bbcc-main__scroll::-webkit-scrollbar-track { background: transparent; }


/* Breadcrumbs */
.bbcc-crumb {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--slate-500);
  display: flex;
  align-items: center;
  gap: 8px;
}
.bbcc-crumb__sep { opacity: 0.4; }
.bbcc-crumb__current { color: var(--slate-800); }


/* Page title */
.bbcc-pagehead {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
}
.bbcc-pagehead__title {
  font-family: var(--font-display);
  font-size: 30px;
  line-height: 1.05;
  letter-spacing: -0.015em;
  color: var(--slate-900);
  margin: 0;
}
.bbcc-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 100px;
  background: var(--ledger-100);
  color: var(--ledger-800);
  border: 1px solid var(--ledger-200);
}
.bbcc-tag__dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ledger-600);
  animation: bbcc-pulse-soft 2.4s ease-out infinite;
}
@keyframes bbcc-pulse-soft {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}


/* KPI tiles */
.bbcc-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.bbcc-kpi {
  background: var(--parchment-25);
  border: 1px solid var(--rule-medium);
  border-radius: 10px;
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  overflow: hidden;
}
.bbcc-kpi__label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--slate-500);
}
.bbcc-kpi__value {
  font-family: var(--font-display);
  font-size: 26px;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--slate-900);
}
.bbcc-kpi__value .bbcc-kpi__value-unit {
  font-size: 15px;
  color: var(--slate-500);
  margin-right: 3px;
}
.bbcc-kpi__meta {
  font-size: 11.5px;
  color: var(--slate-500);
  display: flex;
  align-items: center;
  gap: 5px;
}
.bbcc-kpi__meta--up { color: var(--ledger-700); }
.bbcc-kpi__meta--amber { color: var(--signal-amber); }
.bbcc-kpi__spark {
  position: absolute;
  bottom: 0; right: 0;
  width: 50%;
  height: 24px;
  opacity: 0.5;
  pointer-events: none;
}


/* Main body rows */
.bbcc-row {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 14px;
  align-items: stretch;
}

/* Card base */
.bbcc-card {
  background: var(--parchment-25);
  border: 1px solid var(--rule-medium);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.bbcc-card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.bbcc-card__title {
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--slate-900);
  margin: 0;
  letter-spacing: -0.005em;
}
.bbcc-card__meta {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--slate-500);
}


/* Tender Pipeline */
.bbcc-pipeline__cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.bbcc-pipeline__col {
  background: var(--parchment-50);
  border: 1px solid var(--rule-soft);
  border-radius: 8px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.bbcc-pipeline__col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2px 6px;
  border-bottom: 1px solid var(--rule-soft);
}
.bbcc-pipeline__col-name {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--slate-700);
}
.bbcc-pipeline__col-count {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--slate-500);
  background: var(--parchment-200);
  padding: 1px 6px;
  border-radius: 3px;
}
.bbcc-bid {
  background: var(--parchment-25);
  border: 1px solid var(--rule-medium);
  border-radius: 6px;
  padding: 8px 9px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  transition: border-color 0.15s, transform 0.15s;
}
@media (hover: hover) {
  .bbcc-bid:hover { border-color: var(--slate-400); transform: translateY(-1px); }
}
.bbcc-bid__client {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--slate-500);
}
.bbcc-bid__name {
  font-size: 12px;
  font-weight: 500;
  color: var(--slate-900);
  line-height: 1.25;
}
.bbcc-bid__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
  margin-top: 2px;
}
.bbcc-bid__value {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--slate-800);
  background: var(--parchment-200);
  padding: 2px 7px;
  border-radius: 100px;
  white-space: nowrap;
}
.bbcc-bid__due {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 500;
  color: var(--slate-500);
  background: var(--parchment-100);
  border: 1px solid var(--rule-medium);
  padding: 1px 7px;
  border-radius: 100px;
  white-space: nowrap;
}
.bbcc-bid__due--urgent {
  color: var(--signal-rust);
  font-weight: 600;
  background: var(--signal-rust-bg);
  border-color: #E8C8BC;
}


/* Project Health */
.bbcc-health__list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.bbcc-health__row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px dashed var(--rule-soft);
}
.bbcc-health__row:last-child { border-bottom: 0; }
.bbcc-health__name {
  font-size: 12px;
  color: var(--slate-800);
  font-weight: 500;
  line-height: 1.3;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bbcc-health__dots {
  display: flex;
  gap: 4px;
}
.bbcc-hdot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ledger-400);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08);
}
.bbcc-hdot--amber { background: var(--signal-amber); }
.bbcc-hdot--rust  { background: var(--signal-rust); }

.bbcc-hpill {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 100px;
  background: var(--ledger-100);
  color: var(--ledger-800);
  border: 1px solid var(--ledger-200);
  white-space: nowrap;
}
.bbcc-hpill--watch {
  background: var(--signal-amber-bg);
  color: var(--signal-amber);
  border-color: #E8D3A3;
}
.bbcc-hpill--critical {
  background: var(--signal-rust-bg);
  color: var(--signal-rust);
  border-color: #E8C8BC;
}


/* Compliance ring */
.bbcc-ring-card { flex-direction: row; align-items: center; gap: 16px; }
.bbcc-ring-card__body { flex: 1; min-width: 0; }
.bbcc-ring {
  flex-shrink: 0;
  width: 96px; height: 96px;
  position: relative;
}
.bbcc-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.bbcc-ring__track {
  fill: none;
  stroke: var(--rule-medium);
  stroke-width: 8;
}
.bbcc-ring__fill {
  fill: none;
  stroke: var(--ledger-600);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 251.33;
  stroke-dashoffset: 15.08; /* 94% */
  transition: stroke-dashoffset 1.2s ease-out;
}
.bbcc-ring__label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--slate-900);
  letter-spacing: -0.01em;
}
.bbcc-ring-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.bbcc-ring-list__item {
  display: grid;
  grid-template-columns: 12px 1fr auto;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--slate-700);
}
.bbcc-ring-list__item::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ledger-500);
}
.bbcc-ring-list__item--amber::before { background: var(--signal-amber); }
.bbcc-ring-list__item--rust::before { background: var(--signal-rust); }
.bbcc-ring-list__value {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--slate-900);
}

/* Right stack */
.bbcc-rstack { display: flex; flex-direction: column; gap: 14px; min-width: 0; }


/* Mini widgets strip */
.bbcc-mini {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.bbcc-mini__card {
  background: var(--parchment-25);
  border: 1px solid var(--rule-medium);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  min-width: 0;
}
.bbcc-mini__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.bbcc-mini__title {
  font-family: var(--font-display);
  font-size: 13.5px;
  color: var(--slate-900);
}
.bbcc-mini__tag {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 100px;
  background: var(--ledger-100);
  color: var(--ledger-800);
  white-space: nowrap;
}
.bbcc-mini__tag--bronze {
  background: var(--bronze-100);
  color: var(--bronze-800);
}
.bbcc-mini__tag--amber {
  background: var(--signal-amber-bg);
  color: var(--signal-amber);
}
.bbcc-mini__stats {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.bbcc-mini__stat {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--slate-600);
  gap: 8px;
}
.bbcc-mini__stat-val {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--slate-900);
}
.bbcc-mini__card--bronze {
  border-color: var(--bronze-100);
}
.bbcc-mini__card--bronze .bbcc-mini__title { color: var(--bronze-900); }
.bbcc-mini__card--bronze .bbcc-mini__stat-val { color: var(--bronze-800); }


/* ============================================================
   MAIN FOOTER (sticky within main column)
   ============================================================ */
.bbcc-foot {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 10px 22px;
  background: var(--slate-900);
  color: var(--parchment-100);
  border-top: 1px solid rgba(0, 0, 0, 0.5);
}
.bbcc-foot__left {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(242, 235, 216, 0.65);
  white-space: nowrap;
}
.bbcc-foot__left .bbcc-pulse { box-shadow: 0 0 0 0 rgba(138, 170, 130, 0.6); }

.bbcc-foot__bar {
  position: relative;
  height: 4px;
  background: rgba(242, 235, 216, 0.06);
  border-radius: 2px;
  overflow: hidden;
}
.bbcc-foot__bar::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(138, 170, 130, 0.2) 20%,
    rgba(168, 192, 162, 0.55) 50%,
    rgba(138, 170, 130, 0.2) 80%,
    transparent 100%);
  background-size: 50% 100%;
  background-repeat: no-repeat;
  animation: bbcc-scan 3.2s linear infinite;
}
@keyframes bbcc-scan {
  0%   { background-position: -50% 0; }
  100% { background-position: 150% 0; }
}

.bbcc-foot__pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  background: var(--slate-700);
  border: 1px solid var(--rule-chrome);
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--parchment-100);
  overflow: hidden;
}
.bbcc-foot__pill::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(100deg,
    transparent 0%,
    rgba(216, 175, 122, 0.35) 50%,
    transparent 100%);
  animation: bbcc-shine 4.5s ease-in-out infinite;
}
@keyframes bbcc-shine {
  0%   { left: -100%; }
  55%  { left: 100%; }
  100% { left: 100%; }
}
.bbcc-foot__pill-b {
  width: 16px; height: 16px;
  border-radius: 4px;
  background: linear-gradient(140deg, var(--ledger-500), var(--ledger-800));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 10px;
  color: var(--parchment-100);
  line-height: 1;
  letter-spacing: 0;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1);
}


/* ============================================================
   ACTIVITY RAIL
   ============================================================ */
.bbcc-rail {
  background: var(--parchment-50);
  border-left: 1px solid var(--rule-medium);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.bbcc-rail__head {
  flex-shrink: 0;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--rule-medium);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.bbcc-rail__title {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--slate-900);
}
.bbcc-rail__filter {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--slate-500);
  padding: 2px 7px;
  border: 1px solid var(--rule-medium);
  border-radius: 100px;
  background: var(--parchment-100);
}
.bbcc-rail__list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 0 14px;
  min-height: 0;
}
.bbcc-rail__list::-webkit-scrollbar { width: 5px; }
.bbcc-rail__list::-webkit-scrollbar-thumb { background: var(--rule-medium); border-radius: 2px; }

.bbcc-rail__item {
  display: grid;
  grid-template-columns: 10px 1fr;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--rule-soft);
  position: relative;
}
.bbcc-rail__item:last-child { border-bottom: 0; }
.bbcc-rail__dot {
  margin-top: 6px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--ledger-500);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.1);
}
.bbcc-rail__item--bronze .bbcc-rail__dot { background: var(--bronze-600); }
.bbcc-rail__item--amber  .bbcc-rail__dot { background: var(--signal-amber); }
.bbcc-rail__item--rust   .bbcc-rail__dot { background: var(--signal-rust); }
.bbcc-rail__item--slate  .bbcc-rail__dot { background: var(--slate-500); }

.bbcc-rail__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--slate-500);
  margin-bottom: 3px;
}
.bbcc-rail__mod {
  font-weight: 600;
  color: var(--slate-700);
}
.bbcc-rail__item--bronze .bbcc-rail__mod { color: var(--bronze-700); }

.bbcc-rail__text {
  font-size: 12px;
  color: var(--slate-800);
  line-height: 1.4;
}
.bbcc-rail__text strong {
  font-weight: 600;
  color: var(--slate-900);
}


/* ============================================================
   MOBILE-ONLY COMPONENTS
   Hidden by default; revealed in ≤639px media query below.
   ============================================================ */
.bbcc-mobile-only { display: none; }

/* Urgent bids — vertical list replacement for kanban pipeline */
.bbcc-ubids { display: flex; flex-direction: column; gap: 8px; }
.bbcc-ubid {
  background: var(--parchment-25);
  border: 1px solid var(--rule-medium);
  border-radius: 8px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 10px;
  align-items: start;
}
.bbcc-ubid__stage {
  grid-row: 1 / 3;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--slate-500);
  background: var(--parchment-200);
  border-radius: 5px;
  padding: 0 8px;
  min-width: 52px;
}
.bbcc-ubid__stage--submit {
  background: var(--signal-rust-bg);
  color: var(--signal-rust);
}
.bbcc-ubid__body { min-width: 0; }
.bbcc-ubid__client {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--slate-500);
  margin-bottom: 2px;
}
.bbcc-ubid__name {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--slate-900);
  line-height: 1.3;
}
.bbcc-ubid__foot {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 4px;
}

/* Mobile activity strip */
.bbcc-mact__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.bbcc-mact__head-right {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--slate-500);
}
.bbcc-mact__list { display: flex; flex-direction: column; }
.bbcc-mact__item {
  display: grid;
  grid-template-columns: 8px auto 1fr;
  gap: 9px;
  padding: 8px 0;
  border-top: 1px solid var(--rule-soft);
  align-items: start;
}
.bbcc-mact__item:first-child { border-top: 0; padding-top: 4px; }
.bbcc-mact__item:last-child { padding-bottom: 0; }
.bbcc-mact__dot {
  margin-top: 6px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ledger-500);
}
.bbcc-mact__item--bronze .bbcc-mact__dot { background: var(--bronze-600); }
.bbcc-mact__item--amber  .bbcc-mact__dot { background: var(--signal-amber); }
.bbcc-mact__time {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--slate-500);
  margin-top: 1px;
  white-space: nowrap;
}
.bbcc-mact__text {
  font-size: 12px;
  color: var(--slate-800);
  line-height: 1.35;
  min-width: 0;
}
.bbcc-mact__text strong { font-weight: 600; color: var(--slate-900); }


/* iOS status bar (mobile only) — hidden by default */
.bbcc-statusbar { display: none; }


/* Device footer — inline card at end of scroll (mobile/tablet only).
   Replaces the pinned footer when the frame is rendered as a device. */
.bbcc-device-foot { display: none; }


/* ============================================================
   RESPONSIVE
   ============================================================
   Breakpoints:
   - ≥1440px  XL desktop  default (3-col, 240/1fr/300)
   - 1200-1439px  L desktop  compressed gaps
   - 1024-1199px  laptop    hide rail (first to drop)
   -  820-1023px  tablet LS compact layout
   -  640- 819px  tablet PT 1-col, icon sidebar, compacted
   -  ≤ 639px     mobile    1-col stack, KPIs 2×2
   ============================================================ */

@media (max-width: 1439px) {
  /* FIRST: hide activity rail — gives main maximum breathing room */
  .bbcc-body { grid-template-columns: 220px minmax(0, 1fr); }
  .bbcc-rail { display: none; }
  .bbcc-pagehead__title { font-size: 26px; }
  .bbcc-kpi__value { font-size: 23px; }
}

@media (max-width: 1199px) {
  /* Standard laptop — full sidebar stays · main column stacks to fit */
  .bbcc-frame {
    min-height: 640px;
    height: 780px;
    max-height: min(820px, calc(100vh - 60px));
  }
  .bbcc-main__scroll { padding: 16px 18px 18px; }
  .bbcc-foot { padding: 10px 18px; }

  /* Stack pipeline + health vertically — main column too narrow for side-by-side */
  .bbcc-row { grid-template-columns: 1fr; }

  /* KPIs 2×2 — more readable than 4-col at this constrained width */
  .bbcc-kpis { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1023px) {
  /* ================================================================
     iPAD DEVICE FRAME (tablet)
     Frame gets bezel, rounded corners, home indicator bar.
     Internal scroll inside fixed-height device screen.
     ================================================================ */
  .bbcc-frame {
    max-width: 580px;
    margin: 0 auto;
    height: 760px;
    max-height: calc(100vh - 60px);
    min-height: 600px;
    border: 12px solid #0a0a0a;
    border-radius: 32px;
    /* Gradient bg matches content vertically — eliminates corner fringe artifact
       where chrome's dark met frame's parchment bg at the rounded clip */
    background: linear-gradient(to bottom,
      var(--slate-900) 0,
      var(--slate-900) 50px,
      var(--parchment-100) 50px);
    box-shadow:
      /* Outer rim — defines device edge against any dark background */
      0 0 0 1px rgba(255, 255, 255, 0.15),
      /* Depth */
      0 30px 60px -15px rgba(0, 0, 0, 0.7),
      0 50px 100px -30px rgba(0, 0, 0, 0.9);
    position: relative;
  }
  /* Home indicator bar (iOS-style) */
  .bbcc-frame::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.35);
    pointer-events: none;
    z-index: 10;
  }

  /* Internal scroll chain */
  .bbcc-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
  }
  .bbcc-main { flex: 1; min-height: 0; }
  .bbcc-main__scroll {
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    padding: 14px 16px 24px;
    gap: 14px;
  }

  /* Pinned footer doesn't belong inside a device — hide it */
  .bbcc-foot { display: none; }

  /* Inline device footer — appears at end of scroll as a dark card */
  .bbcc-device-foot {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--slate-900);
    color: rgba(242, 235, 216, 0.6);
    border-radius: 10px;
    font-family: var(--font-mono);
    font-size: 9.5px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }
  .bbcc-device-foot__sync { flex: 1; min-width: 0; }
  .bbcc-device-foot__brand {
    padding: 3px 9px;
    border-radius: 100px;
    background: var(--slate-700);
    color: var(--parchment-100);
    font-size: 8.5px;
    letter-spacing: 0.12em;
    white-space: nowrap;
  }

  /* Sidebar → horizontal top nav · pipeline horizontal-scrolls */
  .bbcc-side {
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 8px 10px;
    gap: 4px;
    border-right: 0;
    border-bottom: 1px solid rgba(0,0,0,0.45);
    flex-shrink: 0;
  }
  .bbcc-side__group { flex-direction: row; gap: 2px; }
  .bbcc-side__group:nth-of-type(2)::before,
  .bbcc-side__group:nth-of-type(3)::before {
    content: '';
    display: block;
    width: 1px;
    background: rgba(255,255,255,0.08);
    margin: 4px 6px;
    flex-shrink: 0;
  }
  .bbcc-side__label,
  .bbcc-side__badge,
  .bbcc-side__chevron,
  .bbcc-side__support,
  .bbcc-side__logout { display: none; }
  .bbcc-side__item-label {
    display: inline;
    font-size: 11.5px;
  }
  .bbcc-side__item {
    padding: 7px 10px;
    white-space: nowrap;
    gap: 7px;
    justify-content: flex-start;
  }
  .bbcc-side__item svg { width: 13px; height: 13px; }
  .bbcc-side__item--active { box-shadow: none; background: rgba(138, 170, 130, 0.15); }

  /* Mini widgets → 1 col */
  .bbcc-mini { grid-template-columns: 1fr; }

  /* Pipeline kanban → horizontal scroll */
  .bbcc-pipeline__cols {
    grid-template-columns: 220px 220px 220px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
    scrollbar-color: var(--rule-medium) transparent;
  }
  .bbcc-pipeline__cols::-webkit-scrollbar { height: 4px; }
  .bbcc-pipeline__cols::-webkit-scrollbar-track { background: transparent; }
  .bbcc-pipeline__cols::-webkit-scrollbar-thumb { background: var(--rule-medium); border-radius: 2px; }

  /* Compliance ring card → stacked */
  .bbcc-ring-card { flex-direction: column; align-items: flex-start; }
  .bbcc-ring { align-self: center; }

  /* Chrome compact — no traffic lights on device · no search on iPad */
  .bbcc-chrome { gap: 10px; padding: 9px 12px; }
  .bbcc-chrome__dots { display: none; }
  .bbcc-chrome__search { display: none; }
}

@media (max-width: 639px) {
  /* ================================================================
     iPHONE DEVICE FRAME — overrides iPad frame from ≤1023
     ================================================================ */
  .bbcc-frame {
    max-width: 340px;
    height: 640px;
    max-height: calc(100vh - 40px);
    min-height: 560px;
    border: 8px solid #0a0a0a;
    border-radius: 44px;
    background: linear-gradient(to bottom,
      var(--slate-900) 0,
      var(--slate-900) 78px,
      var(--parchment-100) 78px);
    box-shadow:
      /* Outer rim — defines device edge against any dark background */
      0 0 0 1px rgba(255, 255, 255, 0.15),
      /* Reduced + sharpened depth stack — matches Field & Resident iPhone mobile spec */
      0 24px 40px rgba(0, 0, 0, 0.35),
      0 10px 18px rgba(0, 0, 0, 0.25),
      0 4px 8px rgba(0, 0, 0, 0.18);
  }
  /* Dynamic Island (centred on top, inside the empty chrome middle) */
  .bbcc-frame::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 94px;
    height: 24px;
    border-radius: 14px;
    background: #000;
    box-shadow:
      inset 0 0 0 1px rgba(255, 255, 255, 0.08),
      0 1px 2px rgba(0, 0, 0, 0.6);
    z-index: 20;
    pointer-events: none;
  }
  /* Tighten home indicator for phone */
  .bbcc-frame::after {
    width: 100px;
    height: 4px;
    bottom: 6px;
  }

  /* iOS status bar — flanks the Dynamic Island */
  .bbcc-statusbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: absolute;
    top: 9px;
    left: 22px;
    right: 22px;
    height: 22px;
    z-index: 25;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    color: var(--parchment-100);
    pointer-events: none;
  }
  .bbcc-statusbar__time {
    letter-spacing: -0.01em;
    line-height: 1;
  }
  .bbcc-statusbar__indicators {
    display: inline-flex;
    align-items: center;
    gap: 5px;
  }
  .bbcc-statusbar__icon { display: block; }

  /* ---- Mobile hero rewrite ---- */

  .bbcc-pagehead__title { font-size: 22px; }

  /* Sidebar kept visible (horizontal scrolling nav inherited from ≤1023) */

  /* Remove search from mobile header (user request) */
  .bbcc-chrome__search { display: none; }

  /* Chrome gets extra top padding to sit below the Dynamic Island */
  .bbcc-chrome { padding: 42px 14px 9px; }

  /* Desktop-only blocks */
  .bbcc-hide-mobile { display: none !important; }

  /* Reveal mobile-only blocks */
  .bbcc-mobile-only { display: flex; }

  /* Row no longer relevant — stack is linear */
  .bbcc-row { grid-template-columns: 1fr; display: flex; flex-direction: column; }
  .bbcc-rstack { gap: 12px; }

  /* Truncate health matrix to top 4 rows (includes Critical + Watch) */
  .bbcc-health__row:nth-child(n+5) { display: none; }

  /* Compact KPIs */
  .bbcc-kpis { gap: 8px; grid-template-columns: repeat(2, 1fr); }
  .bbcc-kpi { padding: 12px 12px 13px; }
  .bbcc-kpi__value { font-size: 20px; }

  /* Compact cards & scroll · extra pad-bottom for home indicator breathing room */
  .bbcc-main__scroll { padding: 12px 12px 24px; gap: 12px; }
  .bbcc-card { padding: 12px 13px; }

  /* Compliance ring — smaller on mobile */
  .bbcc-ring { width: 76px; height: 76px; }
  .bbcc-ring__label { font-size: 18px; }

  /* Device footer — compacter on phone */
  .bbcc-device-foot { padding: 9px 12px; font-size: 9px; }
  .bbcc-device-foot__count { display: none; }

  /* Chrome compact · Live status hidden on mobile (kept on iPad/desktop) */
  .bbcc-chrome__status { display: none; }

  /* Abbreviate breadcrumbs — 'PORTFOLIO › OVERVIEW' fits cleanly on phones */
  .bbcc-crumb__hide-sm { display: none; }
}

/* ============================================================
   ULTRA-NARROW SAFETY NET (< iPhone SE width)
   Tightens cards so nothing clips at 320px / foldable outer screens
   ============================================================ */
@media (max-width: 360px) {
  /* KPIs stack to 1 column — 2×2 was cramping values at this width */
  .bbcc-kpis { grid-template-columns: 1fr; gap: 8px; }
  .bbcc-kpi { padding: 12px 14px; }
  .bbcc-kpi__value { font-size: 22px; }

  /* Dynamic Island shrunk to feel proportionate on narrow devices */
  .bbcc-frame::before {
    width: 76px;
    height: 20px;
    top: 9px;
  }
  /* Status bar tightens with narrower side padding + smaller type */
  .bbcc-statusbar {
    top: 10px;
    left: 16px;
    right: 16px;
    font-size: 12px;
    height: 20px;
  }

  /* Cards stay compact */
  .bbcc-card { padding: 11px 12px; }
  .bbcc-ubid { padding: 9px 10px; }
  .bbcc-ubid__stage { min-width: 44px; padding: 0 6px; }
  .bbcc-main__scroll { padding: 10px 10px 22px; gap: 10px; }
}

@media (max-width: 420px) {
  .bbcc-pagehead__title { font-size: 20px; }
  .bbcc-health__row { grid-template-columns: 1fr auto; }
  .bbcc-health__dots { display: none; }
  /* Drop the event count portion of the sync line — keeps pill + sync from colliding */
  .bbcc-foot__left-count { display: none; }
  /* Drop Pricing stage bid to save vertical space */
  .bbcc-ubid--drop-420 { display: none; }
}


/* ============================================================
   REDUCED MOTION · accessibility
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .bbcc-pulse,
  .bbcc-tag__dot,
  .bbcc-foot__bar::before,
  .bbcc-foot__pill::before {
    animation: none !important;
  }
  .bbcc-pulse { box-shadow: 0 0 0 4px rgba(138, 170, 130, 0.25); }
  .bbcc-ring__fill { transition: none !important; }
}
