/* ============================================================================
   ISABI Systems - Shareholder Daily Operations Cockpit (css/daily_ops.css)
   One-Page Interactive 4-Domain Board · Strict Transaction-Date Basis
   Yesterday's After-Hours Bridge · Discrete Slide-Over Day Records Drawer
   ============================================================================ */

/* Hide multi-period range & Rep/Tx basis switch in topbar on Daily Operations
   so global Reporting Date filters never create visual contradiction */
body.is-daily-ops-view .period-basis-row {
  display: none !important;
}

.dops-scope-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid rgba(35, 86, 168, 0.34);
  white-space: nowrap;
  flex-shrink: 0;
}

.dops-scope-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--chart-navy, #2356A8);
  flex-shrink: 0;
}

:root[data-theme="dark"] .dops-scope-pill {
  border-color: rgba(91, 156, 240, 0.42);
}

/* ==================== ONE-PAGE DESKTOP VIEWPORT LOCK ==================== */
@media (min-width: 1024px) and (min-height: 660px) {
  body.is-daily-ops-view .workspace {
    overflow: hidden !important;
    display: flex;
    flex-direction: column;
    padding: 7px 14px 9px !important;
  }

  body.is-daily-ops-view .dops-stage {
    flex: 1 1 0;
    min-height: 0;
    height: 100%;
    overflow: hidden;
  }
}

.dops-stage {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

/* ==================== BAND 1: COMMAND & DAY BAR ==================== */
.dops-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px 10px;
  flex-wrap: wrap;
  padding: 6px 11px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.dops-bar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.dops-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.dops-page-title {
  font-family: "Archivo", sans-serif;
  font-stretch: 112%;
  font-size: 14.8px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin: 0;
  white-space: nowrap;
}

.dops-active-date-lbl {
  font-family: "Archivo", sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--chart-navy, #2356A8);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.dops-basis-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7.5px;
  border-radius: 999px;
  font-size: 10.2px;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--line);
  white-space: nowrap;
}

.dops-basis-tag .ic {
  font-size: 11px;
  color: var(--brass);
}

.dops-bar-controls {
  display: flex;
  align-items: center;
  gap: 5.5px;
  flex-wrap: wrap;
}

.dops-day-nav {
  display: inline-flex;
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  padding: 1.5px;
  gap: 2px;
}

.dops-step-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 25px;
  height: 25px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  transition: background 0.14s, color 0.14s;
}

.dops-step-btn:hover:not(:disabled) {
  background: var(--brass-tint);
  color: var(--brass-strong, var(--brass));
}

.dops-step-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.dops-date-input {
  height: 25px;
  border: 0;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  padding: 0 7px;
  font-size: 11.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  outline: none;
  min-width: 114px;
}

.dops-date-input:focus {
  background: var(--brass-tint);
}

.dops-quick-pills {
  display: inline-flex;
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 1.5px;
  gap: 1.5px;
}

.dops-qpill {
  height: 24px;
  padding: 0 8px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.14s, color 0.14s, box-shadow 0.14s;
}

.dops-qpill:hover {
  color: var(--ink);
  background: rgba(15, 30, 56, 0.04);
}

:root[data-theme="dark"] .dops-qpill:hover {
  background: rgba(255, 255, 255, 0.06);
}

.dops-qpill.active {
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(15, 30, 56, 0.09);
}

/* Signature Yesterday's After-Hours Toggle Button */
.dops-afterhours-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 9px;
  border-radius: 7px;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11.1px;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.dops-afterhours-btn .ic {
  font-size: 12.5px;
  color: var(--muted);
}

.dops-afterhours-btn:hover {
  border-color: var(--brass);
  color: var(--ink);
}

.dops-afterhours-btn.active {
  background: var(--brass-tint);
  border-color: var(--brass);
  color: var(--ink);
  font-weight: 700;
}

.dops-afterhours-btn.active .ic {
  color: var(--brass-strong, var(--brass));
}

.dops-ah-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px 5.5px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: var(--surface);
  color: var(--muted);
  border: 1px solid var(--line);
}

.dops-afterhours-btn.active .dops-ah-count.has-items {
  background: var(--brass);
  color: #0B1730;
  border-color: transparent;
}

/* Discrete Slide-Over Day Records Trigger Button */
.dops-records-trigger {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 9.5px;
  border-radius: 7px;
  border: 1px solid rgba(35, 86, 168, 0.30);
  background: rgba(35, 86, 168, 0.06);
  color: var(--ink);
  font-size: 11.1px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  transition: background 0.14s, border-color 0.14s, transform 0.12s;
}

.dops-records-trigger .ic {
  font-size: 12.5px;
  color: var(--chart-navy, #2356A8);
}

.dops-records-trigger:hover {
  background: rgba(35, 86, 168, 0.12);
  border-color: var(--chart-navy, #2356A8);
}

.dops-records-trigger-cnt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5px 5.5px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--chart-navy, #2356A8);
}

:root[data-theme="dark"] .dops-records-trigger {
  border-color: rgba(91, 156, 240, 0.36);
  background: rgba(91, 156, 240, 0.10);
}

:root[data-theme="dark"] .dops-records-trigger .ic,
:root[data-theme="dark"] .dops-records-trigger-cnt {
  color: #7BB4F7;
}

/* ==================== BAND 2: 6-PILLAR EXECUTIVE SCORECARD ==================== */
.dops-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 7px;
  flex-shrink: 0;
}

.dops-kpi {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2.5px;
  padding: 7.5px 10px 6.5px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 2.5px solid var(--chart-navy, #2356A8);
  border-radius: 9px;
  box-shadow: var(--shadow-sm);
  min-width: 0;
  cursor: pointer;
  transition: border-color 0.14s, box-shadow 0.14s;
}

.dops-kpi:hover {
  box-shadow: var(--shadow-md);
}

.dops-kpi.accent-sales  { border-top-color: var(--chart-navy, #2356A8); }
.dops-kpi.accent-raw    { border-top-color: var(--chart-brass, #C0892F); }
.dops-kpi.accent-profit { border-top-color: var(--chart-good, #1F7A4C); }
.dops-kpi.accent-profit.is-neg { border-top-color: var(--chart-crit, #C8333B); }
.dops-kpi.accent-cash   { border-top-color: var(--teal, #1E9E8A); }
.dops-kpi.accent-deals  { border-top-color: #6B5CE7; }
.dops-kpi.accent-plant  { border-top-color: var(--chart-steel, #4A90D9); }

.dops-kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  min-width: 0;
}

.dops-kpi-lbl {
  font-size: 10.1px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dops-kpi-delta {
  font-size: 9.6px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  padding: 1px 5px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}

.dops-kpi-delta.good    { background: var(--good-bg); color: var(--good); }
.dops-kpi-delta.warn    { background: var(--warn-bg); color: var(--warn); }
.dops-kpi-delta.crit    { background: var(--crit-bg); color: var(--crit); }
.dops-kpi-delta.brass   { background: var(--brass-tint); color: var(--brass-strong, var(--brass)); }
.dops-kpi-delta.neutral { background: var(--m-chip); color: var(--muted); }

:root[data-theme="dark"] .dops-kpi-delta.brass { color: var(--brass); }

.dops-kpi-val-row {
  display: flex;
  align-items: baseline;
  gap: 5px;
  min-width: 0;
}

.dops-kpi-val {
  font-family: "Archivo", sans-serif;
  font-stretch: 112%;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.12;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.dops-kpi-val.good { color: var(--good); }
.dops-kpi-val.crit { color: var(--crit); }

.dops-kpi-unit {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dops-kpi-sub {
  font-size: 10.4px;
  font-weight: 500;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dops-kpi-sub b {
  color: var(--ink);
  font-weight: 600;
}

.dops-kpi-ah {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--brass-strong, var(--brass));
  font-weight: 700;
}

:root[data-theme="dark"] .dops-kpi-ah {
  color: var(--brass);
}

/* ==================== BAND 3: INTERACTIVE 2x2 EXECUTIVE STORY MATRIX ==================== */
.dops-bento-grid {
  flex: 1 1 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.dops-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.dops-card-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 5.5px 10px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  flex-shrink: 0;
  min-width: 0;
}

.dops-card-title-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.dops-card-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 5px;
  font-size: 12px;
  flex-shrink: 0;
}

.dops-card-ico.navy   { background: rgba(35, 86, 168, 0.11); color: var(--chart-navy, #2356A8); }
.dops-card-ico.deals  { background: rgba(107, 92, 231, 0.12); color: #6B5CE7; }
.dops-card-ico.teal   { background: rgba(30, 158, 138, 0.12); color: var(--teal, #1E9E8A); }
.dops-card-ico.steel  { background: rgba(74, 144, 217, 0.13); color: var(--chart-steel, #4A90D9); }

:root[data-theme="dark"] .dops-card-ico.deals { color: #9F94F8; }

.dops-card-title {
  font-family: "Archivo", sans-serif;
  font-size: 12.2px;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dops-card-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.dops-seg {
  display: inline-flex;
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1.5px;
  gap: 1px;
}

.dops-seg-btn {
  height: 21px;
  padding: 0 6.5px;
  border: 0;
  border-radius: 4.5px;
  background: transparent;
  color: var(--muted);
  font-size: 10.4px;
  font-weight: 600;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  transition: background 0.13s, color 0.13s;
}

.dops-seg-btn:hover {
  color: var(--ink);
}

.dops-seg-btn.active {
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(15, 30, 56, 0.08);
}

.dops-seg-btn.has-alert {
  color: var(--brass-strong, var(--brass));
}

:root[data-theme="dark"] .dops-seg-btn.has-alert {
  color: var(--brass);
}

.dops-disc-link {
  display: inline-flex;
  align-items: center;
  gap: 3.5px;
  height: 22px;
  padding: 0 6.5px;
  border-radius: 5px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 10.1px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  transition: border-color 0.13s, color 0.13s, background 0.13s;
}

.dops-disc-link:hover {
  border-color: var(--brass);
  color: var(--ink);
  background: var(--brass-tint);
}

.dops-card-body {
  flex: 1 1 0;
  min-height: 0;
  padding: 7px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.dops-card-body.no-pad {
  padding: 0;
}

/* ==================== QUADRANT 1: PULSE CHART & TOP MIX ==================== */
.dops-pulse-wrap {
  width: 100%;
  height: 102px;
  flex-shrink: 0;
  position: relative;
}

.dops-pulse-wrap.is-tall {
  height: 122px;
}

.dops-pulse-wrap svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.dops-bar-group {
  cursor: pointer;
}

.dops-bar-group:hover rect.dops-hover-bg {
  opacity: 1;
}

.dops-q1-bottom {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 4px;
  padding-top: 5px;
  border-top: 1px solid var(--line);
}

.dops-top-bars {
  display: flex;
  flex-direction: column;
  gap: 3.5px;
}

.dops-hbar-row {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) 88px minmax(0, 0.95fr);
  align-items: center;
  gap: 7px;
  font-size: 11px;
  padding: 2px 4px;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.12s;
}

.dops-hbar-row:hover {
  background: var(--surface-2);
}

.dops-hbar-name {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
  color: var(--ink);
}

.dops-hbar-meta {
  font-size: 10.2px;
  color: var(--muted);
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.dops-hbar-val {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.dops-chip-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  flex-wrap: wrap;
}

.dops-micro-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10.1px;
  font-weight: 600;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.12s, color 0.12s;
}

.dops-micro-pill b {
  color: var(--ink);
}

.dops-micro-pill:hover {
  border-color: var(--brass);
  color: var(--ink);
}

/* ==================== QUADRANT 2: AGREEMENTS, PRICING & GOVERNANCE ==================== */
.dops-stat-strip-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5.5px;
  flex-shrink: 0;
}

.dops-stat-box {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 6.5px;
  padding: 4.5px 7px;
  min-width: 0;
  cursor: pointer;
  transition: border-color 0.13s, background 0.13s;
}

.dops-stat-box:hover {
  border-color: var(--brass);
}

.dops-stat-box.tone-brass {
  background: var(--brass-tint);
  border-color: var(--brass-border);
}

.dops-stat-box.tone-crit {
  background: var(--crit-bg);
  border-color: rgba(200, 51, 59, 0.28);
}

.dops-stat-box.tone-good {
  background: var(--good-bg);
  border-color: rgba(31, 122, 76, 0.24);
}

.dops-stat-box small {
  display: block;
  font-size: 9.6px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dops-stat-box b {
  display: block;
  font-size: 11.8px;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dops-stat-box.tone-crit b { color: var(--crit); }
.dops-stat-box.tone-good b { color: var(--good); }

.dops-event-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 1 0;
  min-height: 0;
}

.dops-event-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 6.5px;
  border: 1px solid var(--line);
  background: var(--surface);
  min-width: 0;
  cursor: pointer;
  transition: border-color 0.13s, background 0.13s;
}

.dops-event-item:hover {
  border-color: var(--brass);
  background: var(--brass-tint);
}

.dops-event-item.is-new-rule {
  background: rgba(107, 92, 231, 0.05);
  border-color: rgba(107, 92, 231, 0.26);
}

:root[data-theme="dark"] .dops-event-item.is-new-rule {
  background: rgba(159, 148, 248, 0.08);
  border-color: rgba(159, 148, 248, 0.30);
}

.dops-event-item.is-alert-item {
  background: var(--crit-bg);
  border-color: rgba(200, 51, 59, 0.26);
}

.dops-event-left {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1 1 0;
}

.dops-event-txt {
  font-size: 11.1px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.dops-event-txt span {
  color: var(--muted);
  font-weight: 500;
}

.dops-event-right {
  font-size: 11.2px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  white-space: nowrap;
  flex-shrink: 0;
}

.dops-event-right.good { color: var(--good); }
.dops-event-right.crit { color: var(--crit); }
.dops-event-right.brass { color: var(--brass-strong, var(--brass)); }
:root[data-theme="dark"] .dops-event-right.brass { color: var(--brass); }

/* ==================== QUADRANT 3: TREASURY, EXTERNAL, FX & LOANS ==================== */
.dops-cash-bar-box {
  display: flex;
  flex-direction: column;
  gap: 3.5px;
  flex-shrink: 0;
}

.dops-cash-bar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 10.6px;
  font-variant-numeric: tabular-nums;
}

/* Unified single-seam dual-flow bar (zero gap/detached pill per PWA.md §3.13) */
.dops-dual-track {
  display: flex;
  width: 100%;
  height: 6.5px;
  border-radius: 999px;
  background: var(--m-chip);
  overflow: hidden;
  gap: 0;
}

.dops-dual-seg {
  height: 100%;
}

.dops-dual-seg.inflow  { background: var(--chart-good, #1F7A4C); }
.dops-dual-seg.outflow { background: var(--chart-amber, #C96A22); }
.dops-dual-seg.navy    { background: var(--chart-navy, #2356A8); }
.dops-dual-seg.steel   { background: var(--chart-steel, #4A90D9); }
.dops-dual-seg.crit    { background: var(--chart-crit, #C8333B); }

.dops-lanes-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  flex: 1 1 0;
  min-height: 0;
}

.dops-lane-col {
  display: flex;
  flex-direction: column;
  gap: 3.5px;
  min-width: 0;
}

.dops-lane-hdr {
  font-size: 9.7px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2px;
}

.dops-lane-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 4px 7px;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  min-width: 0;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
}

.dops-lane-item:hover {
  border-color: var(--brass);
  background: var(--brass-tint);
}

.dops-lane-item.is-ext-active {
  border-color: rgba(30, 158, 138, 0.34);
  background: rgba(30, 158, 138, 0.06);
}

.dops-lane-lbl {
  min-width: 0;
  overflow: hidden;
}

.dops-lane-lbl strong {
  display: block;
  font-size: 10.7px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dops-lane-lbl small {
  display: block;
  font-size: 9.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dops-lane-amt {
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  flex-shrink: 0;
  color: var(--ink);
}

.dops-lane-amt.in  { color: var(--good); }
.dops-lane-amt.out { color: var(--ink); }
.dops-lane-amt.zero { color: var(--muted); font-weight: 500; }

.dops-fx-loan-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  flex-shrink: 0;
  padding-top: 4px;
  border-top: 1px solid var(--line);
}

.dops-spot-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 4.5px 8px;
  border-radius: 6.5px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  min-width: 0;
  cursor: pointer;
  transition: border-color 0.13s, background 0.13s;
}

.dops-spot-pill:hover {
  border-color: var(--brass);
}

.dops-spot-pill.active-fx {
  background: rgba(35, 86, 168, 0.07);
  border-color: rgba(35, 86, 168, 0.30);
}

.dops-spot-pill.active-loan {
  background: var(--brass-tint);
  border-color: var(--brass-border);
}

.dops-spot-left {
  display: flex;
  align-items: center;
  gap: 5.5px;
  min-width: 0;
}

.dops-spot-left .ic {
  font-size: 13px;
  color: var(--chart-navy, #2356A8);
  flex-shrink: 0;
}

.dops-spot-pill.active-loan .dops-spot-left .ic {
  color: var(--brass-strong, var(--brass));
}

.dops-spot-copy {
  min-width: 0;
}

.dops-spot-copy small {
  display: block;
  font-size: 9.4px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
  white-space: nowrap;
}

.dops-spot-copy b {
  display: block;
  font-size: 10.8px;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==================== QUADRANT 4: PLANT, WAREHOUSE, FLEET & TEAM ==================== */
.dops-plant-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  flex: 1 1 0;
  min-height: 0;
}

.dops-plant-tile {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 3px;
  padding: 6px 8.5px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  min-width: 0;
  cursor: pointer;
  transition: border-color 0.13s, background 0.13s;
}

.dops-plant-tile:hover {
  border-color: var(--brass);
  background: var(--surface);
}

.dops-pt-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
}

.dops-pt-lbl {
  display: inline-flex;
  align-items: center;
  gap: 4.5px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dops-pt-lbl .ic {
  font-size: 12px;
  color: var(--chart-steel, #4A90D9);
}

.dops-pt-main {
  font-family: "Archivo", sans-serif;
  font-size: 13.4px;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dops-pt-sub {
  font-size: 10.2px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dops-pt-sub b {
  color: var(--ink);
  font-weight: 600;
}

.dops-digest-bar {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  padding-top: 4px;
  border-top: 1px solid var(--line);
  flex-shrink: 0;
}

.dops-dpill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7.5px;
  border-radius: 999px;
  font-size: 10.2px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink);
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.13s, background 0.13s;
}

.dops-dpill:hover {
  border-color: var(--brass);
}

.dops-dpill.ah {
  background: var(--brass-tint);
  border-color: var(--brass-border);
}

.dops-dpill.ah .ic {
  color: var(--brass-strong, var(--brass));
}

.dops-dpill.good {
  background: var(--good-bg);
  border-color: rgba(28, 140, 70, 0.25);
  color: var(--good);
  cursor: default;
}

.dops-dpill.warn {
  background: var(--warn-bg);
  border-color: rgba(224, 122, 31, 0.28);
  color: var(--warn);
}

.dops-dpill.crit {
  background: var(--crit-bg);
  border-color: rgba(200, 51, 59, 0.28);
  color: var(--crit);
}

/* ==================== COMPACT TABLES INSIDE SUB-LENSES & DRAWER ==================== */
.dops-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 11.4px;
  font-variant-numeric: tabular-nums;
}

.dops-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 9.8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 5px 8px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.dops-table thead th.r,
.dops-table tbody td.r,
.dops-table tfoot td.r {
  text-align: right;
}

.dops-table tbody td {
  padding: 4.5px 8px;
  border-bottom: 1px solid var(--m-grid, var(--line));
  color: var(--ink);
  vertical-align: middle;
}

.dops-table tbody tr:last-child td {
  border-bottom: 0;
}

.dops-table tbody tr.rrow,
.dops-table tbody tr.dops-click-row {
  cursor: pointer;
  transition: background 0.12s;
}

.dops-table tbody tr.rrow:hover td,
.dops-table tbody tr.dops-click-row:hover td {
  background: var(--brass-tint);
}

.dops-table tbody tr.is-afterhours-row td {
  background: rgba(192, 137, 47, 0.055);
}

:root[data-theme="dark"] .dops-table tbody tr.is-afterhours-row td {
  background: rgba(217, 165, 74, 0.075);
}

.dops-table tbody tr.is-afterhours-row:hover td {
  background: var(--brass-tint);
}

.dops-table tfoot td {
  position: sticky;
  bottom: 0;
  z-index: 2;
  background: var(--surface-2);
  border-top: 1.5px solid var(--line-strong);
  box-shadow: 0 4px 0 var(--surface-2);
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap !important;
}

/* Domain Type & After-Hours Badges */
.dops-kind {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1.5px 5.5px;
  border-radius: 4px;
  font-size: 9.7px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

.dops-kind.sales { background: rgba(35, 86, 168, 0.11); color: var(--chart-navy, #2356A8); }
.dops-kind.raw   { background: var(--brass-tint); color: var(--brass-strong, var(--brass)); }
.dops-kind.rule  { background: rgba(107, 92, 231, 0.13); color: #6B5CE7; }
.dops-kind.ext   { background: rgba(30, 158, 138, 0.13); color: var(--teal, #1E9E8A); }
.dops-kind.fx    { background: rgba(74, 144, 217, 0.14); color: var(--chart-steel, #4A90D9); }
.dops-kind.loan  { background: rgba(192, 137, 47, 0.15); color: var(--brass-strong, var(--brass)); }
.dops-kind.exp   { background: rgba(201, 106, 34, 0.12); color: var(--chart-amber, #C96A22); }
.dops-kind.cash  { background: var(--good-bg); color: var(--good); }
.dops-kind.pay   { background: rgba(122, 136, 155, 0.15); color: var(--muted); }
.dops-kind.fuel  { background: var(--steel-tint); color: var(--steel); }
.dops-kind.maint { background: var(--warn-bg); color: var(--warn); }
.dops-kind.crit  { background: var(--crit-bg); color: var(--crit); }
.dops-kind.team  { background: rgba(31, 122, 76, 0.12); color: var(--good); }

:root[data-theme="dark"] .dops-kind.raw,
:root[data-theme="dark"] .dops-kind.loan { color: var(--brass); }
:root[data-theme="dark"] .dops-kind.rule { color: #9F94F8; }

.dops-ah-badge,
.dops-ot-badge,
.dops-pend-badge {
  display: inline-flex;
  align-items: center;
  gap: 2.5px;
  padding: 1px 5px;
  border-radius: 999px;
  font-size: 9.4px;
  font-weight: 700;
  background: var(--brass-tint);
  border: 1px solid var(--brass-border);
  color: var(--brass-strong, var(--brass));
  white-space: nowrap;
  margin-right: 4px;
  vertical-align: middle;
}

.dops-ot-badge,
.dops-pend-badge {
  background: var(--warn-bg);
  border-color: rgba(201, 106, 34, 0.36);
  color: var(--warn);
}

:root[data-theme="dark"] .dops-ah-badge {
  color: var(--brass);
}

:root[data-theme="dark"] .dops-ot-badge,
:root[data-theme="dark"] .dops-pend-badge {
  color: #F6AD55;
  border-color: rgba(246, 173, 85, 0.38);
}

.dops-trunc {
  max-width: 185px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Progress proportion bar (single chromatic fill, 0 seam) */
.dops-bar-inline {
  display: flex;
  align-items: center;
  gap: 5.5px;
}

.dops-bar-track {
  width: 44px;
  height: 5px;
  border-radius: 999px;
  background: var(--m-chip);
  overflow: hidden;
  flex-shrink: 0;
}

.dops-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--chart-navy, #2356A8);
}

.dops-bar-fill.brass { background: var(--chart-brass, #C0892F); }
.dops-bar-fill.good  { background: var(--chart-good, #1F7A4C); }
.dops-bar-fill.teal  { background: var(--teal, #1E9E8A); }

.dops-empty {
  padding: 16px 12px;
  text-align: center;
  color: var(--muted);
  font-size: 11.4px;
}

/* ==================== DISCRETE SLIDE-OVER DAY RECORDS DRAWER ==================== */
/* Sits at z-index 135: above topbar/rail (48), below 360 Record Inspector (.modal-backdrop 150) */
.dops-drawer-layer {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  z-index: 135;
  display: none !important;
}

.dops-drawer-layer.is-open {
  display: flex !important;
  justify-content: flex-end;
}

.dops-drawer-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: rgba(11, 23, 48, 0.36);
  backdrop-filter: blur(2px);
}

.dops-drawer-panel {
  position: relative;
  z-index: 1;
  width: min(700px, 95vw);
  height: 100%;
  background: var(--surface);
  border-left: 1px solid var(--line-strong);
  box-shadow: -12px 0 34px rgba(11, 23, 48, 0.22);
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.dops-drawer-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  flex-shrink: 0;
}

.dops-drawer-title {
  font-family: "Archivo", sans-serif;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}

.dops-drawer-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 1px;
}

.dops-drawer-close {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dops-drawer-close:hover {
  border-color: var(--brass);
  background: var(--brass-tint);
}

.dops-drawer-tools {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 8px 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.dops-drawer-search {
  width: 100%;
  height: 31px;
  padding: 0 10px;
  border-radius: 7px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  outline: none;
  box-sizing: border-box;
}

.dops-drawer-search:focus {
  border-color: var(--chart-navy, #2356A8);
}

.dops-drawer-chips {
  display: flex;
  align-items: center;
  gap: 4.5px;
  flex-wrap: wrap;
}

.dops-dchip {
  height: 23px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  transition: background 0.13s, border-color 0.13s, color 0.13s;
}

.dops-dchip:hover {
  color: var(--ink);
  border-color: var(--brass);
}

.dops-dchip.active {
  background: var(--brass);
  border-color: var(--brass);
  color: #0B1730;
  font-weight: 700;
}

.dops-dchip.is-ah-tab.has-ah:not(.active) {
  background: var(--brass-tint);
  border-color: var(--brass-border);
  color: var(--brass-strong, var(--brass));
}

:root[data-theme="dark"] .dops-dchip.is-ah-tab.has-ah:not(.active) {
  color: var(--brass);
}

.dops-drawer-scroll {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

@media (min-width: 640px) {
  .dops-stream-tbl {
    table-layout: fixed;
    width: 100%;
  }
  .dops-stream-tbl .dops-trunc {
    max-width: none;
  }
}

.dops-stream-tbl tbody td,
.dops-stream-tbl thead th,
.dops-stream-tbl tfoot td {
  padding: 5.5px 8px;
}

.dops-ref-cell,
.dops-type-cell,
.dops-vol-cell,
.dops-amt-cell {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dops-time-tag {
  color: var(--muted);
  font-size: 9.5px;
  margin-left: 3px;
}

#dailyOpsStage .row-void-btn,
#dailyOpsStage .row-sel-dot {
  display: none !important;
}

.dops-stream-foot-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  overflow: hidden;
}

/* ==================== COMPACT HEIGHT TUNING (1366x768 LAPTOPS) ==================== */
@media (min-width: 1024px) and (max-height: 800px) {
  body.is-daily-ops-view .workspace {
    padding: 5px 12px 7px !important;
  }
  .dops-stage { gap: 5.5px; }
  .dops-bar { padding: 4.5px 9px; }
  .dops-kpis { gap: 5.5px; }
  .dops-kpi { padding: 5.5px 8.5px 5px; gap: 1.5px; }
  .dops-kpi-val { font-size: 16.5px; }
  .dops-kpi-lbl { font-size: 9.6px; }
  .dops-kpi-sub, .dops-kpi-unit { font-size: 9.9px; }
  .dops-bento-grid { gap: 6.5px; }
  .dops-card-hd { padding: 4.5px 9px; }
  .dops-card-body { padding: 5.5px 9px; gap: 4.5px; }
  .dops-pulse-wrap { height: 84px; }
  .dops-pulse-wrap.is-tall { height: 104px; }
  .dops-hbar-row { padding: 1.5px 3px; font-size: 10.5px; }
  .dops-stat-box { padding: 3.5px 6px; }
  .dops-stat-box b { font-size: 11px; }
  .dops-event-item { padding: 3.5px 7px; }
  .dops-lane-item { padding: 3px 6.5px; }
  .dops-spot-pill { padding: 3.5px 7px; }
  .dops-plant-tile { padding: 4.5px 7.5px; gap: 2px; }
  .dops-pt-main { font-size: 12.4px; }
  .dops-table thead th,
  .dops-table tbody td,
  .dops-table tfoot td { padding: 4px 7px; }
}

/* ==================== TABLET & MOBILE RESPONSIVE FLOW ==================== */
@media (max-width: 1180px) and (min-width: 1024px) {
  .dops-kpi-val { font-size: 16px; }
  .dops-basis-tag span.dops-basis-long { display: none; }
}

@media (max-width: 1023px) {
  .dops-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .dops-bento-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
  }
  .dops-card-body {
    max-height: 320px;
  }
}

@media (max-width: 768px) {
  .dops-date-input,
  .dops-drawer-search {
    font-size: 16px !important;
  }
  .dops-date-input {
    min-width: 0;
    width: 138px;
  }
  .dops-bar {
    padding: 7px 9px;
  }
  .dops-bar-controls {
    width: 100%;
    justify-content: space-between;
  }
  .dops-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dops-stat-strip-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dops-lanes-grid,
  .dops-fx-loan-strip,
  .dops-plant-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .dops-card-hd {
    flex-wrap: wrap;
  }
  .dops-drawer-panel {
    width: 100vw;
    border-left: 0;
  }
  .dops-trunc {
    max-width: 135px;
  }
}
