/* ── LIVE STATUS BAR — sits between header and cards strip ── */
#dash-live-status-bar {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 5px 20px;
  font-family: 'Montserrat', sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .04em;
  flex-shrink: 0;
  border-bottom: 1px solid;
  transition: background .2s, border-color .2s
}

#dash-live-status-bar.gl-pending {
  display: flex;
  background: #fffbeb;
  border-color: rgba(251, 191, 36, .45);
  color: #92400e
}

#dash-live-status-bar.gl-live {
  display: flex;
  background: #f0fdf4;
  border-color: rgba(134, 239, 172, .55);
  color: #166534
}

#dash-live-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0
}

#dash-live-status-bar.gl-pending #dash-live-status-dot {
  background: #f59e0b
}

#dash-live-status-bar.gl-live #dash-live-status-dot {
  background: #22c55e;
  animation: goLivePulse .85s ease-in-out infinite alternate
}

#dash-live-status-text {
  flex: 1
}

#dash-live-cancel-btn {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 9px;
  background: none;
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 2px 9px;
  cursor: pointer;
  color: inherit;
  opacity: .7;
  letter-spacing: .05em;
  transition: opacity .15s
}

#dash-live-cancel-btn:hover {
  opacity: 1
}

/* Sources panel overlay (mirrors Vit Dashboard's `srcModal`) */
#dash-src-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 1500;
  pointer-events: none
}

#dash-src-modal.open {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start
}

#dash-src-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .18);
  pointer-events: auto
}

#dash-src-panel {
  position: relative;
  width: min(96vw, 420px);
  max-height: 80vh;
  margin: 60px 20px 0 0;
  background: #fff;
  border: 1px solid rgba(30, 30, 40, .12);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .18);
  overflow-y: auto;
  padding: 18px 20px;
  pointer-events: auto
}

#dash-src-panel h4 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: rgba(30, 30, 40, .55);
  margin-bottom: 10px
}

#dash-src-panel .src-close {
  position: absolute;
  top: 8px;
  right: 10px;
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: rgba(30, 30, 40, .45);
  line-height: 1;
  padding: 2px 6px
}

#dash-src-panel .src-close:hover {
  color: #1a1a22
}

#dash-src-body {
  font-family: var(--font-ui);
  font-size: 13px;
  color: #1a1a22;
  line-height: 1.7
}

#dash-src-body :where(b, strong) {
  font-weight: 700
}

#dash-src-body :where(ul, ol) {
  padding-left: 20px;
  margin: 4px 0
}

#dash-src-body li {
  margin: 2px 0
}

#dash-src-body p {
  margin: 0 0 6px
}

#dash-src-empty {
  font-style: italic;
  color: rgba(30, 30, 40, .42);
  font-size: 12px;
  padding: 14px 0;
  text-align: center
}

/* Cards strip — TOP horizontal row */
#dcp {
  background: var(--bg-warm);
  border-bottom: 1px solid var(--bg-sand);
  display: flex;
  flex-direction: row;
  align-items: stretch;
  flex-shrink: 0;
  overflow: hidden;
  min-height: 108px
}



#dcp-scroll {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  padding: 5px 6px
}

#dcp-empty {
  font-size: 10px;
  color: rgba(30, 30, 40, .4);
  text-align: center;
  padding: 0 20px;
  line-height: 1.6;
  white-space: nowrap;
  align-self: center
}

.dfc {
  background: var(--bg-cool);
  border: 1px solid var(--bg-sand);
  border-radius: var(--radius-card);
  cursor: pointer
}

.dfc:hover {
  border-color: rgba(30, 30, 40, .3);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .05)
}

.dfc.dash-active {
  border-color: #1a1a22;
  box-shadow: 0 3px 12px rgba(0, 0, 0, .1)
}

.dfc.geo-dfc {
  border-color: #1a4f8a44;
  background: #f0f5fc
}

.dfc-hdr {
  padding: 8px 10px 6px;
  border-bottom: 1px solid #e2ddd6;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 4px;
  flex-shrink: 0
}

.dfc-title {
  font-family: var(--font-display);
  font-size: 12px;
  color: #1a1a22;
  line-height: 1.2
}

.dfc-sub {
  font-size: 8px;
  color: #888;
  margin-top: 1px;
  font-family: var(--font-ui)
}

.dfc-geo {
  font-size: 7px;
  background: #1a4f8a;
  color: #fff;
  padding: 1px 4px;
  border-radius: 3px;
  font-weight: 600;
  flex-shrink: 0;
  margin-top: 1px
}

.dfc-nohl {
  padding: 6px 10px;
  font-size: 9px;
  color: #aaa;
  font-family: var(--font-ui)
}

/* face slider in dash — horizontal card */
.dfc-slider {
  padding: 4px 4px;
  flex: 1
}

.dfc-sl-inner {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 100%
}

.dfc-slides {
  display: flex;
  gap: 3px;
  flex: 1;
  justify-content: center;
  align-items: stretch
}

.dfc-slide {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column
}

.dfc-sl-prev,
.dfc-sl-next {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 15px;
  color: #aaa;
  padding: 0 2px;
  line-height: 1;
  flex-shrink: 0
}

.dfc-sl-prev:hover,
.dfc-sl-next:hover {
  color: #1a1a22
}

.dfc-val-card {
  background: #f7f4ef;
  border: 1px solid #e2ddd6;
  border-radius: 6px;
  padding: 6px 8px;
  text-align: center;
  transition: border-color .15s;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center
}

.dfc-val-card.kde-able {
  cursor: pointer
}

.dfc-val-card.kde-able:hover {
  border-color: #1a4f8a
}

.dfc-val-card.kde-on {
  border-color: #1a4f8a;
  background: #e8f0fa
}

.dfc-val-num {
  font-family: var(--font-display);
  font-size: 17px;
  line-height: 1
}

.dfc-val-lbl {
  font-size: 8px;
  color: #888;
  margin-top: 2px;
  font-family: var(--font-ui)
}

.dfc-sl-idx {
  text-align: center;
  font-size: 8px;
  color: #aaa;
  padding-bottom: 1px
}

.dfc-kde {
  padding: 4px 6px;
  background: #eef3fb;
  border-top: 1px solid #1a4f8a22;
  font-size: 8px
}

.dfc-kde-row {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-bottom: 1px
}

.dfc-kde-row label {
  color: #4a4a4a;
  min-width: 18px;
  font-size: 7px;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-weight: 600
}

.dfc-kde-row input[type=range] {
  flex: 1;
  accent-color: #1a4f8a;
  height: 3px
}

.dfc-kde-row .dfc-kv {
  min-width: 24px;
  text-align: right;
  font-weight: 700;
  color: #1a4f8a;
  font-size: 8px
}

.dfc-kde-badge {
  font-size: 7px;
  color: #1a4f8a;
  font-weight: 700;
  text-align: center;
  margin-top: 1px
}

/* Map section */
#dash-map-section {
  flex: 1;
  display: flex;
  overflow: hidden;
  min-width: 0
}

#dsb {
  width: clamp(180px, 16vw, 240px);
  background: var(--bg-warm);
  border-right: 1px solid var(--bg-sand);
  display: flex;
  flex-direction: column;
  flex-shrink: 0
}

#dsb-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 11px;
  display: flex;
  flex-direction: column;
  gap: 9px
}

#dsb-foot {
  padding: 9px 11px;
  border-top: 1px solid rgba(30, 30, 40, .09)
}

#dsb-foot.off {
  opacity: .35;
  pointer-events: none
}

#dmap {
  flex: 1;
  position: relative;
  background: #f4f1e8
}

#drp {
  width: 0;
  background: var(--bg-warm);
  border-left: none;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: relative;
  transition: width .3s, border-left .3s;
  overflow: hidden;
}

#drp.dart-open {
  border-left: 1px solid var(--bg-sand);
}

#drpInner {
  width: clamp(360px, 32vw, 480px);
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden
}

#drp-head {
  padding: 11px 11px 8px;
  border-bottom: 1px solid rgba(30, 30, 40, .09);
  flex-shrink: 0
}

#drp-head h2 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: rgba(30, 30, 40, .42)
}

#drp-pinned {
  flex-shrink: 0;
  padding: 9px 11px 0;
  display: none
}

#drp-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 9px 11px 11px;
  display: flex;
  flex-direction: column;
  gap: 7px
}

/* dash cards */
#s-dash .dcard {
  background: var(--bg-cool);
  border-radius: var(--radius-card);
  padding: 11px 13px;
  border: 1px solid var(--bg-sand)
}

#s-dash .dcard h3 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: rgba(30, 30, 40, .42);
  margin-bottom: 9px
}

#s-dash .ddim {
  opacity: .35;
  pointer-events: none
}

#s-dash .dbtnP {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 10px;
  background: var(--brand-mid);
  color: #fff;
  border: none;
  border-radius: var(--btn-capsule);
  padding: 8px 14px;
  cursor: pointer;
  width: 100%;
  transition: opacity .2s;
  box-shadow: 0 2px 8px rgba(6, 74, 207, .2)
}

#s-dash .dbtnP:hover {
  opacity: .85
}

#s-dash .dbtnS {
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  font-size: 10px;
  background: transparent;
  color: #1a1a22;
  border: 1.5px solid rgba(30, 30, 40, .14);
  border-radius: 999px;
  padding: 7px 14px;
  cursor: pointer;
  width: 100%;
  transition: all .18s
}

#s-dash .dbtnS:hover {
  border-color: rgba(30, 30, 40, .3);
  background: rgba(30, 30, 40, .04)
}

#s-dash label {
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  font-size: 10px;
  color: rgba(30, 30, 40, .62);
  display: block;
  margin-bottom: 4px
}

#s-dash select {
  width: 100%;
  padding: 6px 9px;
  background: rgba(30, 30, 40, .04);
  border: 1px solid rgba(30, 30, 40, .14);
  border-radius: 7px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  font-size: 10px;
  color: #1a1a22;
  cursor: pointer;
  outline: none
}

#s-dash input[type=range] {
  width: 100%;
  accent-color: #1a1a22;
  cursor: pointer;
  height: 3px
}

#dchip {
  display: none;
  background: rgba(30, 30, 40, .04);
  border: 1px solid rgba(30, 30, 40, .09);
  border-radius: 7px;
  padding: 5px 9px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  font-size: 10px;
  color: #1a1a22;
  align-items: center;
  gap: 6px
}

#dchip span {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

#dchip button {
  background: none;
  border: none;
  color: rgba(30, 30, 40, .42);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0 2px
}

#dchip button:hover {
  color: #1a1a22
}

.dlgBar {
  height: 9px;
  border-radius: 5px;
  margin-bottom: 7px;
  background: linear-gradient(to right, #d7191c, #e85b3b, #f99d59, #fec980, #ffedaa, #ecf7b9, #c7e8ad, #9dd3a6, #64abb0, #2b83ba)
}

.dlgItem {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
  font-size: 10px;
  color: rgba(30, 30, 40, .62)
}

.dlgSw {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0
}

.dslRow {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px
}

.dslLbl {
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  font-size: 10px;
  color: rgba(30, 30, 40, .42)
}

.dslVal {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 10px;
  font-weight: 600;
  color: #1a1a22;
  min-width: 44px;
  text-align: right
}

.dstGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px
}

.dstBox {
  background: rgba(30, 30, 40, .04);
  border-radius: 7px;
  padding: 7px;
  text-align: center;
  border: 1px solid rgba(30, 30, 40, .09)
}

.dstVal {
  font-family: 'Zilla Slab', Georgia, serif;
  font-weight: 700;
  font-size: 15px;
  color: #1a1a22;
  line-height: 1
}

.dstLbl {
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  font-size: 9px;
  color: rgba(30, 30, 40, .42);
  margin-top: 2px
}

.dvb {
  padding: 9px 0;
  border-bottom: 1px solid rgba(30, 30, 40, .09)
}

.dvb:last-child {
  border-bottom: none;
  padding-bottom: 0
}

.dvbN {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 10px;
  color: #1a1a22;
  margin-bottom: 1px
}

.dvbS {
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  font-size: 10px;
  color: rgba(30, 30, 40, .42);
  font-style: italic;
  margin-bottom: 4px
}

.dvbD {
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  font-size: 10px;
  color: rgba(30, 30, 40, .62);
  line-height: 1.5;
  margin-bottom: 6px
}

.dckRow {
  display: flex;
  flex-direction: column;
  gap: 3px
}

.dckItem {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 2px 0
}

.dckItem input[type=checkbox] {
  appearance: none;
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  border: 1.5px solid;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  transition: background .15s
}

.dckItem input[type=checkbox]:checked::after {
  content: '';
  position: absolute;
  left: 2px;
  top: 0;
  width: 4px;
  height: 8px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg)
}

.dckItem .dckDot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex-shrink: 0
}

.dckItem .dckText {
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  font-size: 10px;
  color: #1a1a22
}

.dck-vl {
  border-color: #3288bd !important;
  background: #3288bd22
}

.dck-vl:checked {
  background: #3288bd !important
}

.dck-l {
  border-color: #99d594 !important;
  background: #99d59422
}

.dck-l:checked {
  background: #99d594 !important
}

.dck-m {
  border-color: #c8c860 !important;
  background: #c8c86022
}

.dck-m:checked {
  background: #ffffbf !important
}

.dck-m:checked::after {
  border-color: #666 !important
}

.dck-h {
  border-color: #fc8d59 !important;
  background: #fc8d5922
}

.dck-h:checked {
  background: #fc8d59 !important
}

.dck-vh {
  border-color: #d53e4f !important;
  background: #d53e4f22
}

.dck-vh:checked {
  background: #d53e4f !important
}
