:root {
  --c-good: #22a559;
  --c-planned: #f5d90a;
  --c-unplanned: #ff8c00;
  --c-speedloss: #e63946;
  --c-wasterework: #8e44ad;
  --c-unexplained: #a6a6a6;
  --c-notoccupied: #565656;
  --ink: #1c2733;
  --muted: #6b7787;
  --border: #dfe4ea;
  --bg: #f4f6f8;
  /* Brand blue, matched to the Nova logo's script wordmark. */
  --accent: #1a4b96;
  --accent-dark: #123a78;
  --accent-light: #4fa8d8;
  --brand-green: #3d9a2a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(120deg, var(--accent-dark), var(--accent) 55%, var(--accent-light));
  color: white;
  padding: 10px 24px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.12);
}
.topbar .brand a {
  display: flex; align-items: center; gap: 10px;
  color: white; text-decoration: none;
}
.logo-full { display: block; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2)); }
.logo-full-header { width: 130px; height: auto; }
.logo-full-hero { width: 260px; height: auto; margin: 0 auto; }
.logo-sub {
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  border-left: 1px solid rgba(255,255,255,0.35);
  padding-left: 10px;
  letter-spacing: .02em;
}
.topbar nav {
  display: flex;
  align-items: flex-start;
}
.topbar nav a {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  color: white; margin-left: 20px; text-decoration: none; font-size: 0.85rem;
  padding: 6px 10px; border-radius: 6px; transition: background .15s ease;
}
.topbar nav a svg { opacity: 0.95; }
.topbar nav a:hover { background: rgba(255,255,255,0.15); text-decoration: none; }
.topbar nav a:hover svg { opacity: 1; }

.content { padding: 24px; max-width: 1200px; margin: 0 auto; }

.role-select-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; width: 100%; }
@media (max-width: 700px) {
  .role-select-grid { grid-template-columns: 1fr; }
}
.role-card {
  display: block;
  text-decoration: none;
  color: white;
  border-radius: 16px;
  padding: 40px 28px;
  text-align: center;
  box-shadow: 0 12px 40px rgba(13, 39, 30, 0.12), 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: transform 0.15s, box-shadow 0.15s;
}
.role-card:hover { transform: translateY(-3px); box-shadow: 0 16px 48px rgba(13, 39, 30, 0.18); }
.role-card.operator { background: linear-gradient(135deg, var(--accent-dark), var(--accent)); }
.role-card.admin { background: linear-gradient(135deg, #263544, #4b5b6b); }
.role-card .login-icon { width: 64px; height: 64px; margin: 0 auto 18px; }
.role-card h2 { margin: 0 0 10px; font-size: 1.5rem; color: white; }
.role-card p { margin: 0; font-size: 0.9rem; opacity: 0.9; line-height: 1.5; color: white; }

.panel { background: white; border: 1px solid var(--border); border-radius: 10px; padding: 20px; margin-bottom: 20px; }
.panel h2, .panel h3 { margin-top: 0; }

.field-row { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 12px; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 160px; flex: 1; }
.field label { font-size: 0.8rem; color: var(--muted); font-weight: 600; }
.field input, .field select, .field textarea {
  padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px; font-size: 0.95rem;
}

button, .btn {
  background: var(--accent); color: white; border: none; border-radius: 6px;
  padding: 9px 16px; font-size: 0.9rem; cursor: pointer;
}
button.secondary, .btn.secondary { background: #4b5b6b; }
button.danger, .btn.danger { background: #c0392b; }
button:hover { opacity: 0.9; }

/* Action buttons inside a table row (Edit/History/Delete/Active, etc.) -- always laid out
   in one horizontal line, compact enough that a 3-4 button + checkbox group fits cleanly
   in a table cell instead of wrapping onto separate lines. */
.row-actions {
  display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; white-space: nowrap;
}
.row-actions button, .row-actions .btn {
  padding: 6px 12px; font-size: 0.82rem; white-space: nowrap;
}
.row-actions label {
  display: inline-flex; align-items: center; gap: 3px; font-size: 0.82rem; white-space: nowrap;
}

table { width: 100%; border-collapse: collapse; margin-top: 10px; }
table th, table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
table th { background: #eef1f4; }

#tbl-vs-target { table-layout: fixed; }
#tbl-vs-target td { white-space: nowrap; }
#tbl-vs-target th:first-child, #tbl-vs-target td:first-child { width: 110px; white-space: nowrap; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 0.75rem; font-weight: 700; color: white; }
.badge.planned { background: var(--c-planned); color: #4a4400; }
.badge.unplanned { background: var(--c-unplanned); }
.badge.speed_loss { background: var(--c-speedloss); }
.badge.waste_rework { background: var(--c-wasterework); }

.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.kpi-card { background: white; border: 1px solid var(--border); border-radius: 10px; padding: 16px; text-align: center; }
.kpi-card .label { font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.kpi-card .value { font-size: 1.9rem; font-weight: 700; margin: 6px 0 2px; }
.kpi-card .expected { font-size: 0.75rem; color: var(--muted); }
.kpi-card.good .value { color: var(--c-good); }
.kpi-card.planned .value { color: #a68b00; }
.kpi-card.unplanned .value { color: var(--c-unplanned); }
.kpi-card.speed_loss .value { color: var(--c-speedloss); }
.kpi-card.waste_rework .value { color: var(--c-wasterework); }

.metrics-row .kpi-card {
  transition: box-shadow .15s ease, transform .15s ease;
  position: relative;
}
.metrics-row .kpi-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,0.08); transform: translateY(-2px); }

.profile-photo-wrap {
  position: relative; width: 150px; height: 150px; border-radius: 50%;
  overflow: hidden; flex: 0 0 auto; box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}
.profile-photo-fallback {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--accent-dark), var(--accent));
  color: white; font-size: 2.4rem; font-weight: 700;
}
.profile-photo { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }

.stat-card {
  background: white; border: 1px solid var(--border); border-radius: 10px;
  padding: 16px; text-align: center; transition: box-shadow .15s ease, transform .15s ease;
}
.stat-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,0.08); transform: translateY(-2px); }
.stat-card .stat-value { font-size: 1.7rem; font-weight: 700; color: var(--accent); margin-bottom: 6px; }
.stat-card .stat-label { font-size: 0.8rem; color: var(--muted); line-height: 1.4; }

.skills-row { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-top: 14px; }
.skill-badge {
  background: white; border: 1px solid var(--border); border-radius: 10px;
  padding: 14px 20px; text-align: center; min-width: 120px;
  transition: box-shadow .15s ease, transform .15s ease;
}
.skill-badge:hover { box-shadow: 0 4px 14px rgba(0,0,0,0.08); transform: translateY(-2px); }
.skill-badge .skill-label { font-size: 0.82rem; font-weight: 600; color: var(--ink); margin-top: 4px; }
.kpi-icon { font-size: 1.35rem; line-height: 1; margin-bottom: 6px; }
.kpi-progress { height: 7px; background: #eef1f4; border-radius: 4px; margin: 8px 0 8px; overflow: hidden; }
.kpi-progress-fill { height: 100%; border-radius: 4px; transition: width .4s ease; }
.kpi-progress-fill.good { background: var(--c-good); }
.kpi-progress-fill.waste_rework { background: var(--c-wasterework); }
.kpi-card#card-minorstops.good .kpi-icon { filter: grayscale(0); }
.kpi-card#card-minorstops.good .value { color: var(--c-good); }

.waterfall-bar { display: flex; flex-direction: column; height: 320px; width: 90px; border-radius: 6px; overflow: hidden; border: 1px solid var(--border); }
.waterfall-legend { display: flex; gap: 14px; flex-wrap: wrap; margin: 10px 0 20px; font-size: 0.85rem; }
.legend-swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: middle; }

.events-list { margin-top: 10px; }
.event-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.event-row .meta { font-size: 0.85rem; color: var(--muted); }

/* ---------------------------------------------------------------- Formula reference
   A collapsible, out-of-the-way home for every KPI equation, so the working screens
   above stay clean while the full definitions are always one click away. */
.formula-ref {
  background: white; border: 1px solid var(--border); border-radius: 10px;
  padding: 6px 20px; margin-bottom: 20px;
}
.formula-ref summary {
  cursor: pointer; padding: 12px 0; font-weight: 700; color: var(--accent);
  list-style: none; display: flex; align-items: center; gap: 8px; user-select: none;
}
.formula-ref summary::-webkit-details-marker { display: none; }
.formula-ref summary::before { content: "▸"; font-size: 0.8em; transition: transform .15s; }
.formula-ref[open] summary::before { transform: rotate(90deg); }
.formula-ref[open] summary { border-bottom: 1px solid var(--border); }
.formula-cats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px; padding: 18px 0;
}
.formula-cat { background: var(--bg); border-radius: 8px; padding: 14px 16px; }
.formula-cat h4 { margin: 0 0 10px; font-size: 0.85rem; color: var(--ink); text-transform: uppercase; letter-spacing: .03em; }
.formula-item { display: flex; flex-direction: column; gap: 2px; padding: 7px 0; border-bottom: 1px dashed var(--border); }
.formula-item:last-child { border-bottom: none; }
.formula-item .fname { font-size: 0.85rem; font-weight: 600; }
.formula-item code {
  font-family: "Courier New", monospace; font-size: 0.78rem; color: var(--accent);
  background: white; border: 1px solid var(--border); border-radius: 4px;
  padding: 2px 6px; width: fit-content;
}
.formula-item .fnote { font-size: 0.72rem; color: var(--muted); font-style: italic; }
.fnote-inline { font-size: 0.7rem; color: var(--muted); text-transform: none; font-weight: 400; letter-spacing: normal; }

.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }

.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.4); display: none;
  align-items: center; justify-content: center; z-index: 50;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: white; border-radius: 10px; padding: 24px; width: 480px; max-width: 92vw; max-height: 86vh; overflow-y: auto;
}
.modal h3 { margin-top: 0; }

.subtle { color: var(--muted); font-size: 0.85rem; }
.event-tips { list-style: none; padding-left: 0; margin: 8px 0 14px; }
.event-tips li {
  font-size: 0.85rem; font-weight: 600; color: var(--accent);
  background: #e8f1fb; border-left: 3px solid var(--accent);
  padding: 6px 10px; border-radius: 4px; margin-bottom: 6px;
}
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.kpi-grid-7 { grid-template-columns: repeat(7, 1fr); }
@media (max-width: 1100px) {
  .kpi-grid-7 { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 900px) {
  .two-col { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .home-grid { grid-template-columns: 1fr; }
}
.tag-input-hint { font-size: 0.75rem; color: var(--muted); }

.radio-row { display: flex; flex-wrap: wrap; gap: 8px; }
.radio-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px;
  border: 1px solid var(--border); border-radius: 20px; font-size: 0.85rem; cursor: pointer;
  background: #f8f9fb; user-select: none; transition: background .12s, border-color .12s, color .12s;
}
.radio-chip:hover { border-color: var(--accent); }
.radio-chip input { margin: 0; width: auto; accent-color: var(--accent); }
.radio-chip.checked { background: var(--accent); color: white; border-color: var(--accent); }
.radio-chip.checked input { accent-color: white; }
.radio-chip.disabled { opacity: 0.4; cursor: not-allowed; }

.filters-panel { padding: 24px; box-shadow: 0 4px 16px rgba(13, 39, 30, 0.05); }
.filters-panel h2 { margin-bottom: 18px; font-size: 1.15rem; }

.field-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.line-picker-actions { font-weight: 400; white-space: nowrap; }
.line-picker-actions button {
  background: none; border: none; padding: 0; margin: 0; color: var(--accent);
  font-size: 0.75rem; font-weight: 600; cursor: pointer;
}
.line-picker-actions button:hover { text-decoration: underline; }
.line-picker-actions .dot-sep { color: var(--border); margin: 0 6px; }

.line-picker {
  display: flex; flex-wrap: nowrap; gap: 8px;
  border: 1px solid var(--border); border-radius: 8px; background: #f8f9fb;
  padding: 10px; overflow-x: auto; overflow-y: hidden;
}
.line-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px;
  border: 1px solid var(--border); border-radius: 20px; font-size: 0.85rem; cursor: pointer;
  background: white; user-select: none; transition: background .12s, border-color .12s, color .12s;
  flex: 0 0 auto; white-space: nowrap;
}
.line-chip:hover { border-color: var(--accent); }
.line-chip input { margin: 0; width: auto; accent-color: var(--accent); }
.line-chip:has(input:checked) { background: var(--accent); color: white; border-color: var(--accent); }
.line-chip:has(input:checked) input { accent-color: white; }

.status-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }
.status-dot.green { background: var(--c-good); }
.status-dot.red { background: #d64545; }
.status-dot.na { background: #b9c0c8; }
.status-badge { font-size: 0.78rem; padding: 2px 8px; border-radius: 12px; font-weight: 600; }
.status-badge.green { background: #e4f6ec; color: #0d6b4f; }
.status-badge.red { background: #fbe6e6; color: #a8342a; }
.status-badge.na { background: #eef1f4; color: var(--muted); }

.admin-tabs {
  display: flex; gap: 4px; flex-wrap: wrap;
  margin-bottom: 20px; border-bottom: 2px solid var(--border);
}
.admin-tab-btn {
  background: none; color: var(--muted); border: none; border-radius: 0;
  padding: 10px 16px; font-size: 0.9rem; cursor: pointer;
  border-bottom: 3px solid transparent; margin-bottom: -2px;
}
.admin-tab-btn:hover { color: var(--ink); opacity: 1; }
.admin-tab-btn.active { color: var(--accent); font-weight: 700; border-bottom-color: var(--accent); }
.admin-tab-panel { display: none; }
.admin-tab-panel.active { display: block; }

/* ---------------------------------------------------------------- Login screens */
.login-wrap {
  min-height: 68vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.login-card {
  width: 100%;
  max-width: 420px;
  background: white;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 12px 40px rgba(13, 39, 30, 0.12), 0 2px 8px rgba(0, 0, 0, 0.05);
}
.login-card-header {
  padding: 34px 32px 26px;
  text-align: center;
  color: white;
}
.login-card-header.operator { background: linear-gradient(135deg, var(--accent-dark), var(--accent)); }
.login-card-header.admin { background: linear-gradient(135deg, #263544, #4b5b6b); }
.login-icon {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
}
.login-card-header h1 {
  margin: 0 0 6px;
  font-size: 1.35rem;
  font-weight: 700;
}
.login-card-header p {
  margin: 0;
  font-size: 0.85rem;
  opacity: 0.88;
  line-height: 1.4;
}
.login-card-body { padding: 28px 32px 30px; }
.login-field { margin-bottom: 16px; }
.login-field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.login-field input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.login-field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(13, 107, 79, 0.12);
}
.login-submit {
  width: 100%;
  padding: 13px;
  font-size: 0.98rem;
  font-weight: 700;
  border-radius: 8px;
  margin-top: 4px;
  letter-spacing: 0.02em;
}
.login-error {
  background: #fbe6e6;
  color: #a8342a;
  padding: 11px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 18px;
  border: 1px solid #f3c9c9;
  display: flex;
  align-items: center;
  gap: 8px;
}
.login-hint {
  background: var(--bg);
  color: var(--muted);
  padding: 11px 14px;
  border-radius: 8px;
  font-size: 0.8rem;
  margin-top: 18px;
  text-align: center;
  line-height: 1.5;
}
.login-hint code {
  background: white;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
}
.login-footer-link {
  text-align: center;
  margin-top: 18px;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ---------------------------------------------------------------- Training page (and Dashboard tabs, below) */
.training-tabs, .dash-tabs {
  display: flex; gap: 4px; flex-wrap: wrap;
  margin-bottom: 20px; border-bottom: 2px solid var(--border);
}
.training-tab-btn, .dash-tab-btn {
  background: none; color: var(--muted); border: none; border-radius: 0;
  padding: 12px 20px; font-size: 0.95rem; font-weight: 600; cursor: pointer;
  border-bottom: 3px solid transparent; margin-bottom: -2px;
}
.training-tab-btn:hover, .dash-tab-btn:hover { color: var(--ink); opacity: 1; }
.training-tab-btn.active, .dash-tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.training-tab-panel, .dash-tab-panel { display: none; }
.training-tab-panel.active, .dash-tab-panel.active { display: block; }

/* ---------------------------------------------------------------- AI Focus tab (Reports & Dashboard) */
.focus-item {
  border: 1px solid var(--border); border-left-width: 5px; border-radius: 8px;
  padding: 14px 18px; margin-bottom: 14px; background: white;
}
.focus-item.severity-high { border-left-color: #d64545; }
.focus-item.severity-medium { border-left-color: #ff8c00; }
.focus-item.severity-low { border-left-color: var(--c-good); }
.focus-item-head {
  display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  margin-bottom: 8px;
}
.focus-item-title { font-weight: 700; font-size: 1.02rem; color: var(--ink); }
.focus-item-metric { font-size: 0.88rem; color: var(--muted); white-space: nowrap; }
.focus-badge {
  display: inline-block; font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.03em; padding: 2px 8px; border-radius: 10px; margin-right: 8px;
}
.focus-badge.severity-high { background: #fbe6e6; color: #a8342a; }
.focus-badge.severity-medium { background: #fff2e0; color: #b3600a; }
.focus-badge.severity-low { background: #e7f6ed; color: #157a41; }
.focus-reason { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.focus-reason:first-of-type { border-top: none; margin-top: 4px; padding-top: 4px; }
.focus-reason-head { font-weight: 600; font-size: 0.9rem; color: var(--ink); }
.focus-reason-pattern { font-size: 0.82rem; color: var(--muted); margin: 2px 0 6px; }
.focus-reason ul { margin: 0; padding-left: 20px; font-size: 0.85rem; color: var(--ink); }
.focus-reason ul li { margin-bottom: 3px; }

.training-step {
  display: flex; gap: 16px; align-items: flex-start; margin-bottom: 28px;
}
.training-step-badge {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent); color: white; font-weight: 700; font-size: 1rem;
  display: flex; align-items: center; justify-content: center; margin-top: 2px;
}
.training-step-body { flex: 1; min-width: 0; }
.training-step-body h4 { margin: 0 0 6px; font-size: 1.05rem; }
.training-step-body p { margin: 0 0 12px; color: var(--muted); font-size: 0.92rem; line-height: 1.5; }

/* A "screenshot frame" mockup: fake browser chrome + real app CSS classes inside,
   so the preview matches the live app exactly without needing an actual screen capture. */
.screenshot-frame {
  border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
  box-shadow: 0 4px 18px rgba(13, 39, 30, 0.08); background: white;
}
.screenshot-toolbar {
  display: flex; align-items: center; gap: 10px;
  background: #e9edf2; padding: 8px 12px; border-bottom: 1px solid var(--border);
}
.screenshot-dots { display: flex; gap: 5px; }
.screenshot-dots span { width: 9px; height: 9px; border-radius: 50%; background: #c3ccd4; }
.screenshot-url {
  background: white; border: 1px solid var(--border); border-radius: 12px;
  padding: 3px 12px; font-size: 0.72rem; color: var(--muted); font-family: "Courier New", monospace;
}
.screenshot-body { padding: 18px; background: var(--bg); }
.screenshot-body .panel:last-child { margin-bottom: 0; }

.training-callout {
  background: #e8f1fb; border-left: 3px solid var(--accent); border-radius: 6px;
  padding: 12px 16px; margin: 14px 0; font-size: 0.88rem; color: var(--ink);
}
.training-callout strong { color: var(--accent); }
.training-callout.warn { background: #fbe6e6; border-left-color: #a8342a; }
.training-callout.warn strong { color: #a8342a; }
.training-callout.good { background: #e7f6ed; border-left-color: var(--c-good); }
.training-callout.good strong { color: var(--c-good); }

/* Implementation Plan tab: architecture diagram + rollout timeline chips */
.impl-arch-row {
  display: flex; align-items: center; gap: 16px; margin: 16px 0; flex-wrap: wrap;
}
.impl-arch-box {
  flex: 1; min-width: 180px; border: 1px solid var(--border); border-radius: 8px;
  padding: 14px 16px; background: var(--bg); text-align: center;
}
.impl-arch-box.highlight { border: 2px solid var(--accent); background: #e8f1fb; }
.impl-arch-title { font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.impl-arch-sub { font-size: 0.82rem; color: var(--muted); }
.impl-arch-arrow { font-size: 1.6rem; color: var(--muted); flex: 0 0 auto; }

.impl-timeline { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.impl-timeline-step {
  flex: 1; min-width: 130px; text-align: center; padding: 10px 8px; border-radius: 6px;
  font-size: 0.82rem; font-weight: 600; color: white;
}
.impl-timeline-step.s1 { background: var(--accent); }
.impl-timeline-step.s2 { background: var(--accent-light); }
.impl-timeline-step.s3 { background: var(--c-good); }

.training-mistakes { list-style: none; padding: 0; margin: 0; }
.training-mistakes li {
  padding: 10px 14px; border-radius: 6px; background: #fbe6e6; border-left: 3px solid #a8342a;
  font-size: 0.88rem; margin-bottom: 8px;
}
.training-mistakes li strong { color: #a8342a; }

/* "Line Total" summary row in the Stoppages by Line & Machine table -- carries the
   line's real Speed Loss/Waste & Rework totals (calculated at the run level, not
   attributable to any one machine), so it needs to visually stand apart from the
   individual machine rows above it. */
tr.line-total-row { background: #eef1f4; font-weight: 700; }
tr.line-total-row td:first-child { border-left: 3px solid var(--accent); }

/* ---------------------------------------------------------------- Reports & Dashboard
   "Executive" density pass (2026-07-15): tighter spacing, muted corporate palette used
   as accents only, and section eyebrows to group related panels -- scoped to the
   dashboard's Overview tab only (.dash-tab-panel), so Admin/Training/other pages that
   reuse .panel/.kpi-card/.kpi-grid are completely unaffected. */
.dash-tab-panel .panel { padding: 16px 18px; margin-bottom: 14px; }
.dash-tab-panel .panel h2, .dash-tab-panel .panel h3 {
  font-size: 0.95rem; text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted); font-weight: 700; margin-bottom: 12px;
  padding-bottom: 10px; border-bottom: 1px solid var(--border);
}
.dash-tab-panel .panel h2 span.subtle, .dash-tab-panel .panel h3 span.subtle {
  text-transform: none; letter-spacing: normal; font-weight: 400;
}
.dash-tab-panel .kpi-grid { gap: 10px; }
.dash-tab-panel .kpi-card { padding: 12px 10px; border-top: 3px solid var(--border); border-radius: 6px; }
.dash-tab-panel .kpi-card.good { border-top-color: var(--c-good); }
.dash-tab-panel .kpi-card.planned { border-top-color: var(--c-planned); }
.dash-tab-panel .kpi-card.unplanned { border-top-color: var(--c-unplanned); }
.dash-tab-panel .kpi-card.speed_loss { border-top-color: var(--c-speedloss); }
.dash-tab-panel .kpi-card.waste_rework { border-top-color: var(--c-wasterework); }
.dash-tab-panel .kpi-card .value { font-size: 1.6rem; margin: 4px 0 1px; }
.dash-tab-panel .kpi-card .label { font-size: 0.7rem; }
.dash-tab-panel .two-col { gap: 14px; }
.dash-tab-panel .subtle { font-size: 0.78rem; margin-top: 6px; line-height: 1.4; }
.dash-tab-panel table th, .dash-tab-panel table td { padding: 6px 9px; font-size: 0.85rem; }

/* Section eyebrow -- a small uppercase label grouping a row of panels under one
   heading (Performance, Reliability & Capacity, Loss Analysis, Operational Detail),
   giving the page a structured "executive report" feel instead of a flat stack of
   equally-weighted panels. */
.dash-section-heading {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  color: var(--accent); margin: 22px 0 8px; padding-top: 4px;
}
.dash-section-heading:first-child { margin-top: 0; }
