/* ============================================================
   DMG OPS — ops.css
   Dark industrial theme
   ============================================================ */

/* ── RESET & BASE ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Brand palette */
  --bg-deep:      #040C12;
  --bg-dark:      #071828;
  --bg-mid:       #0D1B2A;
  --bg-panel:     #111C28;
  --bg-card:      #162030;
  --border:       #1E3A4A;
  --border-light: #2C4A5A;

  --orange:       #E87722;
  --orange-lt:    #F5A623;
  --teal:         #1ABC9C;
  --blue:         #2471A3;
  --blue-lt:      #5DADE2;
  --red:          #E74C3C;
  --green:        #2ECC71;
  --purple:       #9B59B6;

  --text-primary:   #F5F6F8;
  --text-secondary: #B0BEC5;
  --text-muted:     #78909C;

  --sidebar-w: 220px;
  --topnav-h:  56px;

  --radius:   6px;
  --radius-lg: 10px;
  --shadow:   0 2px 12px rgba(0,0,0,0.4);
  --transition: 0.18s ease;
}

html, body {
  height: 100%;
  font-family: 'Arial', sans-serif;
  font-size: 14px;
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.5;
}

a { color: var(--blue-lt); text-decoration: none; }
a:hover { color: var(--orange); }

/* ── SCROLLBAR ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }

/* ── TOP NAV ─────────────────────────────────────────────── */
.topnav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--topnav-h);
  background: var(--bg-mid);
  border-bottom: 2px solid var(--orange);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 16px;
  z-index: 1000;
  box-shadow: var(--shadow);
}

.topnav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 16px;
  color: var(--text-primary);
  letter-spacing: 0.04em;
}

.topnav-brand .brand-tag {
  background: var(--orange);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 3px;
  letter-spacing: 0.06em;
}

.topnav-spacer { flex: 1; }

.topnav-tenant {
  font-size: 12px;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 4px 12px;
  border-radius: var(--radius);
  background: var(--bg-panel);
}

.topnav-tenant span {
  color: var(--orange);
  font-weight: 700;
}

/* Bob icon in top-right */
.bob-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-dark);
  border: 2px solid var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: border-color var(--transition);
}

.bob-icon:hover { border-color: var(--orange); }

.bob-icon .bob-pulse {
  width: 8px; height: 8px;
  background: var(--teal);
  border-radius: 50%;
  position: absolute;
  top: -2px; right: -2px;
  border: 2px solid var(--bg-mid);
}

.bob-icon svg, .bob-icon span { font-size: 16px; }

/* ── LAYOUT SHELL ────────────────────────────────────────── */
.app-shell {
  display: flex;
  padding-top: var(--topnav-h);
  min-height: 100vh;
}

/* ── SIDEBAR ─────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  min-height: calc(100vh - var(--topnav-h));
  background: var(--bg-panel);
  border-right: 1px solid var(--border);
  padding: 20px 0;
  position: fixed;
  top: var(--topnav-h);
  left: 0;
  bottom: 0;
  overflow-y: auto;
  z-index: 900;
}

.sidebar-section {
  padding: 0 12px 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 16px;
}

.sidebar-section:first-child { margin-top: 0; }

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: all var(--transition);
  border-left: 3px solid transparent;
  text-decoration: none;
}

.sidebar-link:hover {
  background: var(--bg-card);
  color: var(--text-primary);
  border-left-color: var(--border-light);
}

.sidebar-link.active {
  background: var(--bg-card);
  color: var(--orange);
  border-left-color: var(--orange);
  font-weight: 600;
}

.sidebar-link .nav-icon {
  width: 18px;
  text-align: center;
  font-size: 14px;
  opacity: 0.8;
}

.sidebar-link.active .nav-icon { opacity: 1; }

/* ── MAIN CONTENT ────────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 28px 32px;
  min-height: calc(100vh - var(--topnav-h));
  background: var(--bg-deep);
}

/* ── PAGE HEADER ─────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.page-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

.page-subtitle {
  font-size: 13px;
  color: var(--text-muted);
}

/* ── WIDGET GRID ─────────────────────────────────────────── */
.widget-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.widget-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 28px;
}

.widget-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}

/* ── WIDGET CARDS ────────────────────────────────────────── */
.widget {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow);
  transition: border-color var(--transition);
}

.widget:hover { border-color: var(--border-light); }

.widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.widget-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.widget-badge {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 3px;
  font-weight: 600;
}

.badge-orange  { background: rgba(232,119,34,0.18); color: var(--orange); }
.badge-teal    { background: rgba(26,188,156,0.15); color: var(--teal); }
.badge-blue    { background: rgba(36,113,163,0.2);  color: var(--blue-lt); }
.badge-red     { background: rgba(231,76,60,0.18);  color: var(--red); }
.badge-green   { background: rgba(46,204,113,0.15); color: var(--green); }

.widget-value {
  font-size: 36px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 6px;
}

.widget-unit {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 400;
  margin-left: 4px;
}

.widget-label {
  font-size: 12px;
  color: var(--text-muted);
}

.widget-label .positive { color: var(--teal); }
.widget-label .negative { color: var(--red); }
.widget-label .neutral  { color: var(--text-secondary); }

/* Accent left border variant */
.widget-orange { border-left: 3px solid var(--orange); }
.widget-teal   { border-left: 3px solid var(--teal); }
.widget-blue   { border-left: 3px solid var(--blue); }
.widget-red    { border-left: 3px solid var(--red); }
.widget-green  { border-left: 3px solid var(--green); }

/* Placeholder skeleton */
.widget-placeholder {
  height: 80px;
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-mid) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.8s infinite;
  border-radius: var(--radius);
  margin-top: 8px;
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── TABLES ──────────────────────────────────────────────── */
.ops-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.ops-table th {
  text-align: left;
  padding: 10px 14px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
}

.ops-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  vertical-align: middle;
}

.ops-table tr:last-child td { border-bottom: none; }

.ops-table tr:hover td {
  background: var(--bg-card);
  color: var(--text-primary);
}

/* ── STATUS PILLS ────────────────────────────────────────── */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
}

.status-pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.status-active   { background: rgba(26,188,156,0.12); color: var(--teal); }
.status-pending  { background: rgba(245,166,35,0.12); color: var(--orange-lt); }
.status-done     { background: rgba(46,204,113,0.12); color: var(--green); }
.status-blocked  { background: rgba(231,76,60,0.12);  color: var(--red); }
.status-draft    { background: rgba(131,149,167,0.12); color: var(--text-secondary); }

/* ── BUTTONS ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-primary {
  background: var(--orange);
  color: white;
  border-color: var(--orange);
}
.btn-primary:hover { background: var(--orange-lt); border-color: var(--orange-lt); }

.btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border-light);
}
.btn-secondary:hover { background: var(--bg-card); color: var(--text-primary); }

.btn-danger {
  background: transparent;
  color: var(--red);
  border-color: var(--red);
}
.btn-danger:hover { background: rgba(231,76,60,0.1); }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: transparent;
  padding: 6px 10px;
  font-size: 12px;
}
.btn-ghost:hover { color: var(--text-primary); background: var(--bg-card); }

.btn-sm { padding: 5px 12px; font-size: 12px; }

/* ── FORMS ───────────────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.form-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
}

.form-input, .form-select, .form-textarea {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 13px;
  padding: 9px 12px;
  outline: none;
  transition: border-color var(--transition);
  font-family: inherit;
  width: 100%;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 2px rgba(232,119,34,0.15);
}

.form-input::placeholder { color: var(--text-muted); }
.form-select option { background: var(--bg-panel); }

/* ── LOGIN PAGE ──────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-deep);
  padding: 20px;
}

.login-box {
  width: 100%;
  max-width: 400px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-top: 3px solid var(--orange);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

.login-logo {
  margin-bottom: 8px;
}

.login-logo .brand-name {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.04em;
}

.login-logo .brand-sub {
  font-size: 12px;
  color: var(--orange);
  font-weight: 600;
  letter-spacing: 0.08em;
}

.login-heading {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 28px;
  margin-top: 4px;
}

.login-btn {
  width: 100%;
  justify-content: center;
  padding: 11px;
  font-size: 14px;
  margin-top: 4px;
}

.login-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 11px;
  color: var(--text-muted);
}

/* ── BOB PANEL ───────────────────────────────────────────── */
.bob-panel {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 480px;
  height: 600px;
  min-width: 320px;
  min-height: 300px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-top: 2px solid var(--blue);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 40px rgba(0,0,0,0.6);
  z-index: 2000;
  display: none;
  flex-direction: column;
  overflow: hidden;
  /* Resize handle */
  resize: both;
}

.bob-panel.open { display: flex; }

/* Draggable header cursor */
.bob-panel-header {
  cursor: grab;
}
.bob-panel-header:active {
  cursor: grabbing;
}

/* Expand / collapse toggle */
.bob-expand {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 3px;
  transition: color var(--transition);
  line-height: 1;
}
.bob-expand:hover { color: var(--text-primary); }

/* Fullscreen mode */
.bob-panel.bob-fullscreen {
  top: 60px !important;
  left: 220px !important;
  right: 24px !important;
  bottom: 24px !important;
  width: auto !important;
  height: auto !important;
  resize: none;
}

.bob-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-mid);
  border-bottom: 1px solid var(--border);
}

.bob-panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 13px;
  color: var(--blue-lt);
}

.bob-status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--teal);
}

.bob-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.bob-msg-from {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.bob-msg.bob  .bob-msg-from { color: var(--blue-lt); }
.bob-msg.user .bob-msg-from { color: var(--orange); }
.bob-msg.user { align-items: flex-end; }

.bob-msg-text {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 12px;
  font-size: 12px;
  color: var(--text-secondary);
  max-width: 90%;
  line-height: 1.5;
}

.bob-msg.bob  .bob-msg-text { border-left: 2px solid var(--blue); }
.bob-msg.user .bob-msg-text { border-right: 2px solid var(--orange); }

.bob-input-row {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--bg-mid);
}

.bob-input {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 12px;
  padding: 8px 10px;
  outline: none;
  font-family: inherit;
}

.bob-input:focus { border-color: var(--blue); }
.bob-input::placeholder { color: var(--text-muted); }

/* ── BOB TENANT BADGE ───────────────────────────────────── */
.bob-tenant-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(26,188,156,0.15);
  color: var(--teal);
  border: 1px solid rgba(26,188,156,0.3);
  letter-spacing: 0.04em;
  white-space: nowrap;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bob-tenant-badge.root {
  background: rgba(232,119,34,0.15);
  color: var(--orange);
  border-color: rgba(232,119,34,0.3);
}

/* ── BOB TENANT SWITCHER ─────────────────────────────────── */
.bob-tenant-switcher {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 11px;
  padding: 3px 8px;
  outline: none;
  cursor: pointer;
  font-family: inherit;
  max-width: 150px;
}
.bob-tenant-switcher:focus { border-color: var(--blue); }
.bob-tenant-switcher option { background: var(--bg-panel); }

/* ── BOB CONTEXT INSPECTOR ───────────────────────────────── */
.bob-context-bar {
  padding: 4px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-mid);
  display: flex;
  align-items: center;
  gap: 8px;
}

.bob-context-toggle {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 0;
  transition: color var(--transition);
}
.bob-context-toggle:hover { color: var(--teal); }

.bob-context-pre {
  display: none;
  padding: 10px 16px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  font-family: monospace;
  font-size: 10px;
  color: var(--text-secondary);
  max-height: 180px;
  overflow-y: auto;
  white-space: pre;
  line-height: 1.5;
}

/* ── BOB ISOLATION BADGE ─────────────────────────────────── */
.bob-isolation-ok  { color: var(--teal);   font-weight: 700; }
.bob-isolation-err { color: var(--red);    font-weight: 700; }

/* ── BOB VOICE CONTROLS ────────────────────────────────── */
#bobMicBtn {
  transition: all 0.15s;
}
#bobMicBtn:hover {
  border-color: var(--teal) !important;
  color: var(--teal) !important;
}
#bobMicBtn.bob-mic-active {
  border-color: var(--red) !important;
  color: var(--red) !important;
  box-shadow: 0 0 0 3px rgba(231,76,60,0.2);
  animation: bob-mic-pulse 1s infinite;
}
#bobMicBtn.bob-mic-standby {
  border-color: var(--teal) !important;
  color: var(--teal) !important;
  box-shadow: 0 0 0 3px rgba(26,188,156,0.2);
}
#bobMuteBtn:hover {
  border-color: var(--orange) !important;
  color: var(--orange) !important;
}
#bobMuteBtn.bob-muted {
  border-color: var(--text-muted) !important;
  color: var(--text-muted) !important;
  opacity: 0.6;
}

@keyframes bob-mic-pulse {
  0%   { box-shadow: 0 0 0 3px rgba(231,76,60,0.3); }
  50%  { box-shadow: 0 0 0 6px rgba(231,76,60,0.1); }
  100% { box-shadow: 0 0 0 3px rgba(231,76,60,0.3); }
}

.task-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.task-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  transition: all var(--transition);
  cursor: pointer;
}

.task-item:hover { border-color: var(--border-light); background: var(--bg-card); }
.task-item.done  { opacity: 0.5; }
.task-item.done .task-title { text-decoration: line-through; color: var(--text-muted); }

.task-check {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition);
  font-size: 10px;
}

.task-item.done .task-check {
  background: var(--teal);
  border-color: var(--teal);
  color: white;
}

.task-body { flex: 1; min-width: 0; }

.task-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-meta {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  gap: 12px;
}

.task-meta span::before {
  content: '';
  display: inline-block;
  width: 1px;
  height: 10px;
  background: var(--border);
  margin-right: 12px;
  vertical-align: middle;
}

.task-meta span:first-child::before { display: none; }

/* ── PLACEHOLDER PAGES ───────────────────────────────────── */
.placeholder-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  text-align: center;
  gap: 16px;
  color: var(--text-muted);
}

.placeholder-page .placeholder-icon {
  font-size: 48px;
  opacity: 0.3;
}

.placeholder-page .placeholder-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-secondary);
}

.placeholder-page .placeholder-sub {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 320px;
}

/* ── DIVIDERS & MISC ─────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 20px 0;
}

.section-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.actions-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.actions-row-right {
  margin-left: auto;
  display: flex;
  gap: 8px;
}

/* ── MODAL ───────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  padding: 20px;
}

.modal-overlay.hidden { display: none; }

.modal {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-top: 2px solid var(--orange);
  border-radius: var(--radius-lg);
  padding: 28px 28px 24px;
  width: 100%;
  max-width: 460px;
  box-shadow: 0 12px 48px rgba(0,0,0,0.6);
}

.modal-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 20px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }
  .sidebar { transform: translateX(-220px); width: 220px; }
  .sidebar.open { transform: translateX(0); }
  .widget-grid-2, .widget-grid-3 { grid-template-columns: 1fr; }
}

/* ── STATS BAR (shared across Jobs, Governance, etc.) ─────── */
.stats-bar {
  display: flex;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 24px;
}
.stat-cell {
  flex: 1;
  padding: 16px 20px;
  border-right: 1px solid var(--border);
  text-align: center;
}
.stat-cell:last-child { border-right: none; }
.stat-val { font-size: 28px; font-weight: 700; color: var(--text-primary); line-height: 1; margin-bottom: 4px; }
.stat-lbl { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }

/* ── FORM UTILITIES ──────────────────────────────────────── */
.form-row   { display: grid; grid-template-columns: 1fr 1fr;     gap: 14px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }

.form-select {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 13px;
  padding: 9px 12px;
  outline: none;
  transition: border-color var(--transition);
  font-family: inherit;
  width: 100%;
  cursor: pointer;
}
.form-select:focus { border-color: var(--orange); box-shadow: 0 0 0 2px rgba(232,119,34,0.15); }
.form-select option { background: var(--bg-panel); }

textarea.form-input {
  resize: vertical;
  min-height: 70px;
  line-height: 1.5;
}

/* ── PAGE HEADER actions-row-right ───────────────────────── */
.page-header { flex-wrap: wrap; }
.page-header .actions-row-right { margin-left: auto; display: flex; gap: 8px; align-items: center; }

/* ── STATS BAR ───────────────────────────────────────────── */
.stats-bar {
  display: flex;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 24px;
}
.stat-cell {
  flex: 1;
  padding: 16px 20px;
  border-right: 1px solid var(--border);
  text-align: center;
}
.stat-cell:last-child { border-right: none; }
.stat-val {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 4px;
}
.stat-lbl {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
