/* QMS-specific components */

.eval-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 1.25rem;
  align-items: start;
}
@media (max-width: 900px) {
  .eval-layout { grid-template-columns: 1fr; }
}

.score-preview {
  position: sticky;
  top: calc(var(--topbar-height) + 1.5rem);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
}
.score-preview .label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.score-preview .score {
  font-size: 2.75rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}
.score-preview .result {
  margin-top: 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  transition: opacity 0.3s var(--ease-out);
}

.score-progress-wrap {
  height: 4px;
  background: var(--border);
  border-radius: 4px;
  margin: 0.75rem 0 0.35rem;
  overflow: hidden;
}
.score-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  border-radius: 4px;
  transition: width 0.45s var(--ease-out);
}
.score-progress-text {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.report-lead-wrap {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}

.report-lead-wrap.hidden { display: none; }

.report-lead-wrap .btn {
  width: 100%;
  justify-content: center;
}

.lead-report-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
@media (max-width: 640px) {
  .lead-report-form .form-row { grid-template-columns: 1fr; }
}

.lead-report-form .form-group { margin-bottom: 0.65rem; }

/* Shareable lead report — gray tones matched to previous orange lightness */
.lead-report-card {
  background: #ffffff;
  color: #1f2937;
  border-radius: 16px;
  overflow: hidden;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  text-align: left;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  border: 1px solid #e5e7eb;
  max-width: 760px;
  width: 100%;
}

.lead-report-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  padding: 1.45rem 1.5rem 1.3rem;
  background:
    radial-gradient(ellipse at 100% 0%, rgba(255, 255, 255, 0.18), transparent 55%),
    /* was #ff5e00 / #ff7a2e / #c2410c → same lightness grays */
    linear-gradient(135deg, #808080 0%, #969696 45%, #666666 100%);
  color: #fff;
}

.lead-report-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.22);
  margin-bottom: 0.45rem;
}

.lead-report-hero h4 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.lead-report-hero p {
  margin: 0.4rem 0 0;
  font-size: 0.88rem;
  opacity: 0.92;
}

.lead-report-hero-meta {
  text-align: right;
  flex-shrink: 0;
}

.lead-report-hero-did {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
}

.lead-report-hero-date {
  margin-top: 0.4rem;
  font-size: 0.88rem;
  opacity: 0.9;
}

.lead-report-body {
  padding: 1.3rem 1.45rem 1.4rem;
  background:
    linear-gradient(#ffffff, #ffffff) padding-box,
    /* was #fff7ed warm cream → same-lightness gray */
    linear-gradient(180deg, #f7f7f7, #ffffff 40%) border-box;
}

.lead-report-section-label {
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  /* was #9a3412 */
  color: #575757;
  margin: 0.95rem 0 0.55rem;
}

.lead-report-section-label:first-child { margin-top: 0; }

.lead-report-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

.lead-report-info-item {
  /* was #fff7ed / #ffedd5 */
  background: #f7f7f7;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
}

.lead-report-info-label {
  font-size: 0.74rem;
  font-weight: 700;
  /* was #c2410c */
  color: #666666;
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.lead-report-info-label i {
  width: 0.9rem;
  opacity: 0.85;
}

.lead-report-info-value {
  font-size: 1.02rem;
  font-weight: 700;
  color: #111827;
  word-break: break-word;
}

.lead-report-link-box {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  padding: 0.85rem 0.95rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: #334155;
  word-break: break-all;
  line-height: 1.45;
}

.lead-report-compliance {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.lead-report-chip {
  border-radius: 12px;
  padding: 0.65rem 0.7rem;
  text-align: center;
  border: 1px solid transparent;
}

.lead-report-chip.is-pass {
  background: linear-gradient(180deg, #ecfdf5, #f0fdf4);
  border-color: #86efac;
}

.lead-report-chip.is-fail {
  background: linear-gradient(180deg, #fef2f2, #fee2e2);
  border-color: #fca5a5;
}

.lead-report-chip-key {
  display: block;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.lead-report-chip.is-pass .lead-report-chip-key { color: #047857; }
.lead-report-chip.is-fail .lead-report-chip-key { color: #b91c1c; }

.lead-report-chip-val {
  display: block;
  font-size: 1.05rem;
  font-weight: 800;
  word-break: break-word;
}

.lead-report-chip.is-pass .lead-report-chip-val { color: #065f46; }
.lead-report-chip.is-fail .lead-report-chip-val { color: #991b1b; }

.lead-report-chip-status {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
}

.lead-report-chip.is-pass .lead-report-chip-status {
  background: #16a34a;
  color: #ffffff;
}

.lead-report-chip.is-fail .lead-report-chip-status {
  background: #dc2626;
  color: #ffffff;
}

.lead-report-remarks {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #fecaca;
  box-shadow: 0 6px 18px rgba(239, 68, 68, 0.12);
}

.lead-report-remarks-title {
  background: linear-gradient(90deg, #dc2626, #ef4444);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.45rem 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.lead-report-remarks-text {
  background: #fef2f2;
  color: #7f1d1d;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
  padding: 0.95rem 1rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.lead-report-foot {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 1.25rem;
  background: #111827;
  color: #d1d5db;
  font-size: 0.72rem;
  font-weight: 600;
}

.lead-report-preview-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 1rem 0 0.5rem;
}

@media (max-width: 520px) {
  .lead-report-info-grid,
  .lead-report-compliance { grid-template-columns: 1fr; }
  .lead-report-hero { flex-direction: column; align-items: flex-start; }
  .lead-report-hero-meta { text-align: left; }
}

.question-block {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem;
  margin-bottom: 0.75rem;
  background: var(--bg-input);
  transition: border-color var(--transition);
}
.question-block:hover { border-color: var(--border); }
.question-block.critical {
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.04);
}
.question-block .q-title { font-weight: 600; margin-bottom: 0.25rem; font-size: 0.9rem; }
.question-block .q-cat { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 0; }
.q-top-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.q-pin-btn {
  flex-shrink: 0;
  color: var(--text-muted);
  padding: 0.2rem 0.4rem;
  min-width: 2rem;
}
.q-pin-btn:hover { color: var(--accent); }
.q-pin-btn.is-pinned {
  color: var(--accent);
  background: var(--accent-muted, rgba(255, 94, 0, 0.12));
}
.question-block.pinned {
  border-color: rgba(255, 94, 0, 0.35);
}
.scorecard-q-header {
  gap: 0.75rem;
}
.scorecard-archive-check {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
  margin: 0;
}
.scorecard-archive-check input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--accent);
  cursor: pointer;
}
.scorecard-archive-wrap {
  margin-top: 0.75rem;
  border-top: 1px dashed var(--border);
  padding-top: 0.75rem;
}
.scorecard-archive-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-secondary);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}
.scorecard-archive-toggle:hover {
  border-color: var(--accent);
  color: var(--text-primary);
}
.scorecard-archive-wrap.is-expanded .archive-chevron {
  transform: rotate(180deg);
}
.archive-chevron {
  margin-left: auto;
  transition: transform 0.2s ease;
  font-size: 0.75rem;
}
.scorecard-archive-list {
  margin-top: 0.65rem;
}
.question-block.is-archived {
  opacity: 0.88;
}
.question-block.is-archived .q-title {
  font-size: 0.85rem;
}

.answer-btns { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.answer-btns button {
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  padding: 0.45rem 1rem;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: inherit;
  transition: all var(--transition);
}
.answer-btns button:hover { border-color: var(--accent); color: var(--text-primary); }
.answer-btns button.selected-yes,
.answer-btns button.selected-no,
.answer-btns button.selected-na {
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}
.answer-btns button.selected-yes { background: var(--success-muted); border-color: var(--success); color: var(--success); }
.answer-btns button.selected-no { background: var(--danger-muted); border-color: var(--danger); color: var(--danger); }
.answer-btns button.selected-na { background: rgba(161, 161, 170, 0.1); border-color: var(--text-muted); color: var(--text-muted); }

.comment-tpl-picker {
  position: relative;
  margin-bottom: 0.4rem;
}
.comment-tpl-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.4rem;
  align-items: center;
}
.comment-tpl-select,
.comment-tpl-search {
  font-size: 0.85rem;
  padding: 0.35rem 0.6rem;
  min-height: auto;
  background: var(--bg-input);
  color: var(--text-primary);
  border-color: var(--border);
}
.comment-tpl-search::placeholder {
  color: var(--text-muted);
}
.comment-tpl-results {
  position: absolute;
  z-index: 40;
  left: 0;
  right: 0;
  max-height: 220px;
  overflow-y: auto;
  margin-top: 2px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  color: var(--text-primary);
}
.comment-tpl-hit {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.5rem 0.65rem;
  border: none;
  border-bottom: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  color: var(--text-primary);
}
.comment-tpl-hit:last-child { border-bottom: none; }
.comment-tpl-hit:hover { background: var(--bg-card-hover); }
.comment-tpl-hit .text-muted,
.comment-tpl-preview { color: var(--text-muted); }
.comment-tpl-preview { display: block; margin-top: 2px; line-height: 1.3; }
.comment-tpl-empty {
  padding: 0.5rem 0.65rem;
  color: var(--text-muted);
}
@media (max-width: 640px) {
  .comment-tpl-toolbar { grid-template-columns: 1fr; }
}
.comment-row .form-group { min-width: 0; }

.question-block.q-missing {
  outline: 2px solid var(--danger);
  outline-offset: 2px;
  border-radius: 10px;
}

.penalty-panel {
  margin-top: 0.75rem;
  padding: 0.75rem 0.9rem;
  border-radius: 8px;
  background: rgba(220, 53, 69, 0.06);
  border: 1px solid rgba(220, 53, 69, 0.22);
}
.penalty-panel.hidden { display: none; }
.penalty-prompt {
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.35rem;
}
.penalty-matrix-hint {
  font-size: 0.8rem;
  margin-bottom: 0.55rem;
}
.penalty-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.penalty-selected {
  color: var(--text);
  font-weight: 500;
}

/* Dashboard period / campaign filters — full-width arranged pills */
.dash-filters {
  display: grid;
  grid-template-columns: 1fr minmax(180px, 240px);
  gap: 1rem 1.25rem;
  align-items: end;
}
.dash-filters-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.45rem;
}
.period-pills {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.4rem;
  width: 100%;
}
.period-pill {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.period-pill:hover {
  border-color: var(--accent);
  color: var(--text-primary);
}
.period-pill.active {
  background: var(--accent-muted);
  border-color: var(--accent);
  color: var(--accent);
}
.dash-custom-range {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 0.75rem;
  margin-top: 0.85rem;
  align-items: end;
}
.dash-custom-apply { align-self: end; }
@media (max-width: 900px) {
  .dash-filters { grid-template-columns: 1fr; }
  .period-pills { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .period-pills { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-custom-range { grid-template-columns: 1fr; }
}

/* Duplicates lists — cap height and scroll instead of growing the card */
.dup-table-scroll {
  max-height: 320px;
  overflow-y: auto;
}
.dup-table-scroll table { margin: 0; }
.dup-table-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--bg-card, var(--bg-input));
}

/* Report Access matrix — sticky Report column + sticky role headers */
.report-access-scroll {
  max-height: 70vh;
  overflow: auto;
}
.report-access-scroll table {
  margin: 0;
  border-collapse: separate;
  border-spacing: 0;
}
.report-access-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--bg-input);
  box-shadow: 0 1px 0 var(--border-light);
  vertical-align: bottom;
  text-align: center;
  min-width: 72px;
  font-size: 0.72rem;
  line-height: 1.25;
  white-space: normal;
}
.report-access-scroll thead th.ra-col-report {
  left: 0;
  z-index: 4;
  text-align: left;
  min-width: 220px;
  white-space: nowrap;
}
.report-access-scroll tbody td.ra-col-report {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--bg-card);
  font-weight: 500;
  white-space: nowrap;
}
.report-access-scroll tbody tr:nth-child(even) td.ra-col-report {
  background: var(--bg-input);
}

/* QA Hourly Numbers heatmap */
.qa-hourly-table {
  border-collapse: collapse;
}
.qa-hourly-table th,
.qa-hourly-table td {
  border: 1px solid #000;
}
[data-theme="dark"] .qa-hourly-table th,
[data-theme="dark"] .qa-hourly-table td {
  border-color: #d4d4d8;
}
[data-theme="light"] .qa-hourly-table th,
[data-theme="light"] .qa-hourly-table td {
  border-color: #000;
}
.qa-hourly-table .qa-hourly-cell {
  min-width: 3.25rem;
  padding: 0.55rem 0.4rem;
}
.qa-hourly-table tfoot tr.qa-hourly-footer td,
.qa-hourly-table .qa-hourly-footer-cell {
  font-weight: 700;
  text-align: center;
  background: color-mix(in srgb, var(--accent, #f59e0b) 18%, var(--bg-card, #111));
  border-top: 2px solid var(--accent, #f59e0b);
}
[data-theme="light"] .qa-hourly-table tfoot tr.qa-hourly-footer td,
[data-theme="light"] .qa-hourly-table .qa-hourly-footer-cell {
  background: color-mix(in srgb, var(--accent, #ea580c) 12%, #fff);
}
.qa-hourly-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  padding: 0 2px;
  font-size: 0.75rem;
}
.qa-hourly-legend-label {
  color: var(--text-muted);
  margin-right: 0.25rem;
}
.qa-hourly-swatch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.4rem;
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  border: 1px solid #000;
  font-weight: 600;
}
[data-theme="dark"] .qa-hourly-swatch {
  border-color: #d4d4d8;
}

/* Sold Leads by DID — full-width centered tile wrap */
.did-sold-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 0.75rem;
  width: 100%;
}
.did-sold-card {
  flex: 0 1 140px;
  min-width: 120px;
  max-width: 180px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 0.75rem;
  text-align: center;
  transition: border-color var(--transition);
}
.did-sold-card:hover { border-color: var(--accent); }
.did-approved-card:hover { border-color: var(--success, #22c55e); }
.did-approved-card .did-sold-code { color: var(--success, #22c55e); }
.did-conversion-card:hover { border-color: var(--success, #22c55e); }
.did-conversion-card .did-sold-code { color: var(--success, #22c55e); }
.did-conversion-card .did-sold-count { color: var(--success, #22c55e); }
.did-sold-code {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.02em;
  margin-bottom: 0.35rem;
}
.did-sold-count {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
}
.did-sold-label {
  margin-top: 0.25rem;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
.did-sold-sub {
  margin-top: 0.35rem;
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.3;
}
.did-sold-eq {
  font-size: 1.35rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.did-eq-op {
  margin: 0 0.15em;
  color: var(--text-muted);
  font-weight: 600;
}
.did-eq-part {
  white-space: nowrap;
}

.notification-item {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border-light);
}
.notification-item:last-child { border-bottom: none; }
.notification-item.read { opacity: 0.55; }
.notification-item strong { color: var(--accent); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; }
.notification-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.45rem;
}
.notification-details {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.notification-row {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.4;
}
.notification-key {
  color: var(--text-muted);
  font-weight: 500;
}
.notification-val {
  color: var(--text-primary);
  word-break: break-word;
}
.notification-message {
  font-size: 0.875rem;
  color: var(--text-secondary);
  white-space: pre-wrap;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
}
.checkbox-label:hover { color: var(--text-primary); }

.link-accent { color: var(--accent); font-weight: 500; }
.link-accent:hover { color: var(--accent-hover); }

/* Audit log */
.audit-table td { vertical-align: top; }
.audit-when { font-weight: 600; color: var(--text-primary); }
.audit-user { font-weight: 500; }
.audit-entity { color: var(--text-secondary); }
.badge-audit {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}
.badge-audit i { font-size: 0.7rem; opacity: 0.9; }
.badge-audit-success { background: var(--success-muted); color: var(--success); }
.badge-audit-warn { background: var(--warning-muted); color: var(--warning); }
.badge-audit-danger { background: var(--danger-muted); color: var(--danger); }
.badge-audit-info { background: var(--accent-muted); color: var(--accent); }
.badge-audit-muted { background: rgba(161, 161, 170, 0.15); color: var(--text-muted); }

/* —— Training Module —— */
.training-hero {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
}
.training-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.training-resp-list {
  margin: 0.5rem 0 0;
  padding-left: 1.15rem;
}
.training-resp-list li { margin-bottom: 0.35rem; }
.training-module {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 42%);
  gap: 1.25rem;
  align-items: start;
}
@media (max-width: 960px) {
  .training-module { grid-template-columns: 1fr; }
}
.training-module-shot {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-input);
}
.training-module-shot img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 320px;
  object-fit: cover;
  object-position: top left;
}
.training-module-shot .shot-cap {
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}
.training-steps {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
}
.training-steps li { margin-bottom: 0.4rem; }
.training-tips {
  margin-top: 0.75rem;
  padding: 0.75rem 0.9rem;
  border-left: 3px solid var(--accent);
  background: var(--bg-input);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
}
.training-progress {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.training-progress-bar {
  flex: 1;
  min-width: 140px;
  height: 8px;
  background: var(--bg-input);
  border-radius: 99px;
  overflow: hidden;
}
.training-progress-bar > span {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 99px;
  transition: width 0.25s ease;
}
.training-role-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}
.training-role-tabs .btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.training-check {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}
.training-check input { accent-color: var(--accent); }

/* Today's Summary consolidated report */
#reportResults .lead-report-section-label {
  color: var(--text-secondary);
}

.today-summary-header h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.today-summary-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.65rem;
  margin-top: 0.35rem;
}

.today-summary-kpi {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
}

.today-summary-kpi .label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.today-summary-kpi .value {
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 0.2rem;
  color: var(--text-primary);
}

.today-summary-kpi.pass .value { color: var(--success); }
.today-summary-kpi.warn .value { color: var(--danger); }

.today-summary-approval-group {
  margin-bottom: 1rem;
}

.today-summary-approval-heading {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 0.45rem;
}

.today-summary-approval-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.55rem;
}

.today-summary-approval-card {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.6rem 0.7rem;
}

.today-summary-approval-card.total {
  border-color: color-mix(in srgb, var(--accent) 50%, var(--border));
  background: color-mix(in srgb, var(--accent) 10%, var(--bg-input));
}

.today-summary-approval-card.total .value {
  color: var(--accent);
}

.today-summary-approval-card.tl .value { color: #60a5fa; }
.today-summary-approval-card.mgr .value { color: #a78bfa; }
.today-summary-approval-card.pending .value { color: var(--warning); }

[data-theme="light"] .today-summary-approval-card.tl .value { color: #2563eb; }
[data-theme="light"] .today-summary-approval-card.mgr .value { color: #7c3aed; }

.today-summary-approval-card .label {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.today-summary-approval-card .value {
  font-size: 1.35rem;
  font-weight: 700;
  margin-top: 0.15rem;
  color: var(--text-primary);
}
