/* FieldBase Live Session Inspector - Rev 1.6.8.4.66 */
:root { color-scheme: dark; }
body.live-session-page { margin: 0; min-height: 100vh; background: radial-gradient(circle at top, rgba(37,99,235,.18), transparent 40%), #07111f; color: #eaf2ff; font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.live-shell { width: min(1440px, calc(100% - 32px)); margin: 0 auto; padding: 28px 0 48px; }
.live-hero { display: flex; gap: 18px; justify-content: space-between; align-items: flex-start; padding: 22px; border: 1px solid rgba(148,163,184,.24); border-radius: 24px; background: linear-gradient(135deg, rgba(15,23,42,.96), rgba(15,23,42,.72)); box-shadow: 0 22px 70px rgba(0,0,0,.32); }
.live-back { color: #9ec5ff; text-decoration: none; font-weight: 800; }
.live-kicker { margin: 14px 0 6px; color: #60a5fa; text-transform: uppercase; letter-spacing: .14em; font-size: .76rem; font-weight: 900; }
.live-hero h1 { margin: 0; font-size: clamp(2rem, 4vw, 3.6rem); line-height: 1; }
.live-hero p { max-width: 820px; color: #b7c7dc; line-height: 1.55; }
.live-badge { padding: 10px 14px; border-radius: 999px; background: rgba(34,197,94,.14); border: 1px solid rgba(34,197,94,.34); color: #bbf7d0; white-space: nowrap; font-weight: 800; }
.live-denied { margin: 40px auto; max-width: 640px; padding: 24px; border-radius: 18px; border: 1px solid rgba(248,113,113,.35); background: rgba(127,29,29,.3); color: #fee2e2; text-align: center; }
.live-summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin: 18px 0; }
.live-stat { padding: 16px; border-radius: 18px; border: 1px solid rgba(148,163,184,.22); background: rgba(15,23,42,.78); }
.live-stat span { display: block; color: #9fb1c9; font-size: .82rem; }
.live-stat strong { display: block; margin-top: 6px; font-size: 1.8rem; }
.live-toolbar { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; margin: 18px 0; }
.live-toolbar input, .live-toolbar select, .live-toolbar button, .live-card select, .live-card button, .live-card textarea { border: 1px solid rgba(148,163,184,.28); background: rgba(15,23,42,.9); color: #eaf2ff; border-radius: 14px; padding: 11px 12px; font: inherit; }
.live-toolbar button, .live-card button { cursor: pointer; font-weight: 900; background: linear-gradient(135deg, #2563eb, #06b6d4); border: 0; color: white; box-shadow: 0 10px 24px rgba(37,99,235,.25); }
.live-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 14px; }
.live-card { border: 1px solid rgba(148,163,184,.24); border-radius: 22px; background: rgba(15,23,42,.86); box-shadow: 0 18px 45px rgba(0,0,0,.25); overflow: hidden; }
.live-card-head { display: flex; justify-content: space-between; gap: 12px; padding: 16px; border-bottom: 1px solid rgba(148,163,184,.14); }
.live-card h2 { margin: 0 0 4px; font-size: 1.05rem; }
.live-meta { color: #9fb1c9; font-size: .82rem; line-height: 1.5; word-break: break-word; }
.live-status { align-self: flex-start; padding: 6px 10px; border-radius: 999px; font-weight: 900; font-size: .75rem; }
.live-status.online { background: rgba(34,197,94,.16); color: #bbf7d0; border: 1px solid rgba(34,197,94,.35); }
.live-status.idle { background: rgba(250,204,21,.14); color: #fef08a; border: 1px solid rgba(250,204,21,.3); }
.live-status.offline { background: rgba(148,163,184,.12); color: #cbd5e1; border: 1px solid rgba(148,163,184,.25); }
.live-card-body { padding: 16px; }
.live-row { display: grid; grid-template-columns: 132px 1fr; gap: 10px; padding: 6px 0; color: #dbeafe; }
.live-row span:first-child { color: #93a4bb; }
.live-monitor-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.live-monitor-controls textarea { grid-column: 1 / -1; min-height: 64px; resize: vertical; }
.live-off-note { border: 1px dashed rgba(148,163,184,.32); border-radius: 16px; padding: 12px; color: #a9b8cc; background: rgba(2,6,23,.35); }
.live-timeline { margin-top: 14px; max-height: 260px; overflow: auto; padding-right: 4px; }
.live-event { padding: 10px 0; border-top: 1px solid rgba(148,163,184,.12); }
.live-event strong { display: block; font-size: .9rem; }
.live-event span { color: #9fb1c9; font-size: .78rem; }
.live-error { color: #fecaca; }
.live-warning { margin-top: 10px; padding: 10px 12px; border-radius: 14px; background: rgba(234,179,8,.12); border: 1px solid rgba(234,179,8,.24); color: #fef3c7; }
@media (max-width: 760px) { .live-shell { width: min(100% - 20px, 1440px); padding-top: 16px; } .live-hero { display: block; } .live-badge { display: inline-block; margin-top: 12px; } .live-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); } .live-toolbar { grid-template-columns: 1fr; } .live-grid { grid-template-columns: 1fr; } .live-row { grid-template-columns: 1fr; gap: 2px; } }

/* Rev 1.6.8.4.66 hard-gate and diagnostics polish */
html[data-live-inspector-locked="true"] #liveInspectorShell { display: none !important; }
.live-denied { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at top, rgba(37,99,235,.18), transparent 42%), #07111f; color: #eaf2ff; }
.live-denied[hidden] { display: none !important; }
.live-denied-card { max-width: 560px; border: 1px solid rgba(248,113,113,.42); border-radius: 24px; padding: 28px; background: rgba(15,23,42,.94); box-shadow: 0 24px 80px rgba(0,0,0,.38); }
.live-denied-card strong { display: block; font-size: 1.4rem; margin-bottom: 10px; color: #fecaca; }
.live-denied-card p { color: #cbd5e1; line-height: 1.55; }
.live-denied-card a { display: inline-flex; margin-top: 14px; color: #dbeafe; background: rgba(37,99,235,.28); border: 1px solid rgba(147,197,253,.34); border-radius: 999px; padding: 10px 14px; text-decoration: none; font-weight: 800; }
.live-diagnostic-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.live-diagnostic-grid .live-row { margin: 0; }
@media (max-width: 760px) { .live-diagnostic-grid { grid-template-columns: 1fr; } }

/* Rev 1.6.8.4.66 analytics dashboard */
.live-analytics { margin: 18px 0; padding: 18px; border: 1px solid rgba(148,163,184,.24); border-radius: 24px; background: rgba(15,23,42,.82); box-shadow: 0 18px 45px rgba(0,0,0,.22); }
.live-analytics-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 14px; }
.live-analytics-head h2 { margin: 0; font-size: clamp(1.35rem, 2.4vw, 2.1rem); }
.live-analytics-head p { margin: 8px 0 0; color: #9fb1c9; line-height: 1.45; }
.live-analytics-range { border: 1px solid rgba(96,165,250,.3); background: rgba(37,99,235,.16); color: #bfdbfe; border-radius: 999px; padding: 9px 12px; font-size: .82rem; font-weight: 900; white-space: nowrap; }
.live-analytics-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 14px 0; }
.live-analytics-stats div { padding: 14px; border-radius: 16px; background: rgba(2,6,23,.38); border: 1px solid rgba(148,163,184,.18); }
.live-analytics-stats span { display: block; color: #93a4bb; font-size: .78rem; }
.live-analytics-stats strong { display: block; margin-top: 6px; font-size: 1.45rem; }
.live-analytics-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.live-chart-card { border: 1px solid rgba(148,163,184,.18); border-radius: 18px; padding: 14px; background: rgba(2,6,23,.34); min-width: 0; }
.live-chart-card h3 { margin: 0 0 12px; font-size: 1rem; color: #dbeafe; }
.live-bars { display: grid; gap: 9px; }
.live-bar-row { display: grid; grid-template-columns: 118px 1fr 52px; gap: 10px; align-items: center; font-size: .82rem; }
.live-bar-row > span { color: #cbd5e1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-bar-row > strong { color: #e0f2fe; text-align: right; }
.live-bar-track { height: 12px; border-radius: 999px; background: rgba(148,163,184,.16); overflow: hidden; }
.live-bar-track i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #2563eb, #06b6d4); box-shadow: 0 0 20px rgba(14,165,233,.28); }
.live-line-chart { position: relative; min-height: 220px; color: #60a5fa; }
.live-line-svg { width: 100%; height: 150px; display: block; color: #38bdf8; background: linear-gradient(to top, rgba(148,163,184,.08), transparent); border-radius: 14px; border: 1px solid rgba(148,163,184,.12); }
.live-line-labels { display: grid; grid-template-columns: repeat(auto-fit, minmax(74px, 1fr)); gap: 6px; margin-top: 10px; color: #93a4bb; font-size: .72rem; }
.live-line-labels span { border: 1px solid rgba(148,163,184,.14); border-radius: 10px; padding: 6px; background: rgba(15,23,42,.55); }
.live-line-labels b { display: block; color: #dbeafe; font-size: .75rem; }
.live-user-timeline-card { margin-top: 12px; }
.live-user-timelines { display: grid; gap: 8px; }
.live-user-timeline-row { display: grid; grid-template-columns: minmax(180px, 260px) 1fr; gap: 12px; align-items: center; padding: 10px; border-radius: 14px; background: rgba(15,23,42,.55); border: 1px solid rgba(148,163,184,.12); }
.live-user-label strong { display: block; color: #eaf2ff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-user-label span { display: block; color: #93a4bb; font-size: .78rem; margin-top: 3px; }
.live-user-segments { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.live-user-segments span { display: inline-flex; gap: 6px; align-items: center; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 7px 9px; border-radius: 999px; background: rgba(37,99,235,.16); color: #dbeafe; border: 1px solid rgba(96,165,250,.23); font-size: .8rem; }
.live-user-segments em { color: #93c5fd; font-style: normal; font-weight: 900; }
@media (max-width: 920px) { .live-analytics-head { display: block; } .live-analytics-range { display: inline-block; margin-top: 12px; } .live-analytics-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .live-analytics-grid { grid-template-columns: 1fr; } .live-user-timeline-row { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .live-analytics-stats { grid-template-columns: 1fr; } .live-bar-row { grid-template-columns: 90px 1fr 48px; } }

/* Rev 1.6.8.4.66 analytics filters + collapsible cards */
.live-analytics-controls { display: grid; grid-template-columns: minmax(180px, 1.2fr) minmax(150px, .8fr) minmax(150px, .8fr) auto; gap: 10px; align-items: end; margin: 14px 0; }
.live-analytics-controls label { display: grid; gap: 6px; color: #9fb1c9; font-size: .78rem; font-weight: 800; }
.live-analytics-controls select { min-height: 42px; border-radius: 14px; border: 1px solid rgba(148,163,184,.24); background: rgba(2,6,23,.62); color: #eaf2ff; padding: 9px 10px; outline: none; }
.live-analytics-controls select[multiple] { min-height: 104px; }
.live-card-tools { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.live-card-tools button, .live-collapse-btn { border: 1px solid rgba(96,165,250,.32); background: rgba(37,99,235,.18); color: #dbeafe; border-radius: 999px; padding: 9px 12px; cursor: pointer; font-weight: 900; }
.live-head-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.live-card.is-collapsed { opacity: .94; }
.live-card.is-collapsed .live-card-head { border-bottom: 0; }
.live-line-legend { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.live-line-legend span { display: inline-flex; align-items: center; gap: 6px; border: 1px solid rgba(148,163,184,.16); background: rgba(15,23,42,.55); color: #dbeafe; border-radius: 999px; padding: 6px 9px; font-size: .75rem; }
.live-line-legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; box-shadow: 0 0 12px currentColor; }
@media (max-width: 980px) { .live-analytics-controls { grid-template-columns: 1fr 1fr; } .live-card-tools { justify-content: flex-start; } }
@media (max-width: 560px) { .live-analytics-controls { grid-template-columns: 1fr; } .live-head-actions { justify-content: flex-start; } }

/* Rev 1.6.8.4.66 retention + period summaries */
.live-retention { margin: 18px 0; padding: 18px; border: 1px solid rgba(148,163,184,.24); border-radius: 24px; background: rgba(15,23,42,.84); box-shadow: 0 18px 45px rgba(0,0,0,.22); }
.live-retention-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 14px; }
.live-retention-head h2 { margin: 0; font-size: clamp(1.3rem, 2.4vw, 2rem); }
.live-retention-head p { margin: 8px 0 0; color: #9fb1c9; line-height: 1.45; max-width: 820px; }
.live-retention-warning { border: 1px solid rgba(245,158,11,.35); background: rgba(245,158,11,.14); color: #fde68a; border-radius: 999px; padding: 9px 12px; font-size: .8rem; font-weight: 900; white-space: nowrap; }
.live-retention-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 14px 0; }
.live-retention-stats div { padding: 14px; border-radius: 16px; background: rgba(2,6,23,.38); border: 1px solid rgba(148,163,184,.18); }
.live-retention-stats span { display: block; color: #93a4bb; font-size: .78rem; }
.live-retention-stats strong { display: block; margin-top: 6px; font-size: 1rem; word-break: break-word; }
.live-retention-controls { display: grid; grid-template-columns: minmax(160px,.8fr) minmax(220px,1.1fr) auto auto auto; gap: 10px; align-items: end; margin: 14px 0; }
.live-retention-controls label { display: grid; gap: 6px; color: #9fb1c9; font-size: .78rem; font-weight: 800; }
.live-retention-controls select, .live-retention-controls input { min-height: 42px; border-radius: 14px; border: 1px solid rgba(148,163,184,.24); background: rgba(2,6,23,.62); color: #eaf2ff; padding: 9px 10px; outline: none; }
.live-retention-controls button { border: 1px solid rgba(96,165,250,.32); background: linear-gradient(135deg, rgba(37,99,235,.85), rgba(6,182,212,.85)); color: #fff; border-radius: 14px; padding: 11px 13px; cursor: pointer; font-weight: 900; min-height: 42px; }
.live-retention-controls button.danger { background: linear-gradient(135deg, rgba(185,28,28,.9), rgba(244,63,94,.82)); border-color: rgba(248,113,113,.34); }
.live-retention-note { margin: 10px 0 14px; padding: 11px 12px; border: 1px dashed rgba(148,163,184,.28); border-radius: 14px; background: rgba(2,6,23,.32); color: #cbd5e1; font-size: .86rem; line-height: 1.45; }
.live-summary-list { display: grid; gap: 9px; }
.live-summary-snapshot { display: grid; grid-template-columns: minmax(220px, 1fr) auto; gap: 12px; align-items: center; padding: 12px; border-radius: 16px; border: 1px solid rgba(148,163,184,.16); background: rgba(2,6,23,.34); }
.live-summary-snapshot strong { display: block; color: #eaf2ff; }
.live-summary-snapshot span { color: #9fb1c9; font-size: .78rem; }
.live-summary-mini { display: flex; flex-wrap: wrap; gap: 7px; justify-content: flex-end; }
.live-summary-mini span { border: 1px solid rgba(96,165,250,.22); background: rgba(37,99,235,.12); color: #dbeafe; border-radius: 999px; padding: 6px 9px; font-weight: 800; }
@media (max-width: 1100px) { .live-retention-controls { grid-template-columns: 1fr 1fr; } .live-retention-controls button { width: 100%; } }
@media (max-width: 760px) { .live-retention-head { display: block; } .live-retention-warning { display: inline-block; margin-top: 12px; } .live-retention-stats { grid-template-columns: repeat(2, minmax(0,1fr)); } .live-summary-snapshot { grid-template-columns: 1fr; } .live-summary-mini { justify-content: flex-start; } }
@media (max-width: 520px) { .live-retention-stats, .live-retention-controls { grid-template-columns: 1fr; } }

/* Patch 1.6.8.4.79: stable vertical inspector card stack to prevent live-session cards from jumping side-to-side. */
.live-grid {
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
}
.live-card {
  width: 100% !important;
}
.live-card-head {
  align-items: flex-start;
}
@media (min-width: 900px) {
  .live-card-body {
    max-width: 100%;
  }
}

/* Patch 1.6.8.4.81 - diagnostic support opt-in state */
.live-consent-led {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  padding: 7px 10px;
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(15, 23, 42, 0.62);
}
.live-consent-led::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 12px currentColor;
}
.live-consent-led.approved,
.live-consent-text.approved { color: #4ade80; }
.live-consent-led.override,
.live-consent-text.override { color: #facc15; }
.live-consent-led.blocked,
.live-consent-text.blocked { color: #fb7185; }
.live-monitor-controls button[disabled] {
  opacity: 0.42;
  cursor: not-allowed;
  filter: grayscale(0.4);
}
.live-monitor-controls button[data-override] {
  border-color: rgba(250, 204, 21, 0.36);
  background: rgba(250, 204, 21, 0.12);
  color: #fde68a;
}
