/* Candidate 28: screen-only Dashboard and shared New/Edit Task presentation.
   No global tokens, role visibility, chart data, or print rules are changed. */
@media screen {
  #tab-dashboard,
  #taskDialog {
    --qc-navy: #142d43;
    --qc-red: #be352b;
    --qc-surface: #f4f6f8;
    --qc-line: #dfe5eb;
    --qc-muted: #64748b;
    --qc-focus: #376785;
    color: var(--qc-navy);
  }

  #tab-dashboard {
    background: linear-gradient(145deg, #f4f6f8 0%, #f8fafb 65%, #f1f5f8 100%);
    border-radius: 16px;
    padding: clamp(14px, 2vw, 26px);
  }
  #tab-dashboard .page-head {
    gap: 18px;
    margin: 0 0 20px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }
  #tab-dashboard .page-head-copy { min-width: 0; }
  #tab-dashboard .page-head h2 {
    margin: 5px 0 8px;
    color: var(--qc-navy);
    font-family: inherit;
    font-size: clamp(24px, 2.5vw, 32px);
    font-weight: 700;
    letter-spacing: -.035em;
    line-height: 1.2;
  }
  #tab-dashboard .page-head p,
  #tab-dashboard .section-heading > p {
    color: var(--qc-muted);
    font-size: 13px;
    line-height: 1.6;
  }
  #tab-dashboard .page-label,
  #tab-dashboard .eyebrow {
    color: var(--qc-muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .1em;
  }
  #tab-dashboard .page-label { color: var(--qc-red); }
  #tab-dashboard .page-head-actions { gap: 8px; flex-wrap: wrap; }
  #tab-dashboard .button,
  #taskDialog .button {
    min-height: 42px;
    border-radius: 8px;
    padding: 10px 15px;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.4;
    box-shadow: none;
    transition: background-color .15s, border-color .15s;
  }
  #tab-dashboard .button:hover,
  #taskDialog .button:hover { transform: none; }
  #tab-dashboard .button.neutral,
  #taskDialog .button.neutral {
    border: 1px solid #cdd7e1;
    background: #fff;
    color: var(--qc-navy);
  }
  #tab-dashboard .button.neutral:hover:not(:disabled),
  #taskDialog .button.neutral:hover:not(:disabled) { background: #edf2f6; }
  #tab-dashboard .button.primary,
  #taskDialog .button.primary {
    border-color: var(--qc-red);
    background: var(--qc-red);
    color: #fff;
  }
  #tab-dashboard .button.primary:hover:not(:disabled),
  #taskDialog .button.primary:hover:not(:disabled) {
    border-color: #a32c24;
    background: #a32c24;
  }
  #tab-dashboard :is(button, a):focus-visible,
  #taskDialog :is(button, summary):focus-visible {
    outline: 3px solid var(--qc-focus);
    outline-offset: 3px;
  }

  #tab-dashboard .operations-command-strip {
    gap: 16px;
    padding: 13px 16px;
    margin: 0 0 18px;
    border: 1px solid #d4e0e9;
    border-left: 3px solid #3d627d;
    border-radius: 10px;
    background: #eaf0f5;
    color: var(--qc-navy);
    box-shadow: none;
    flex-wrap: wrap;
  }
  #tab-dashboard .command-strip-title { min-width: 0; gap: 10px; }
  #tab-dashboard .command-strip-title strong { color: var(--qc-navy); font-size: 13px; }
  #tab-dashboard .command-strip-icon {
    background: #fff;
    color: #365d79;
    border-radius: 8px;
    box-shadow: none;
  }
  #tab-dashboard .command-strip-metrics { gap: 16px; flex-wrap: wrap; }
  #tab-dashboard .command-strip-metrics span { color: #53667b; font-size: 11px; }
  #tab-dashboard .command-strip-metrics strong { color: var(--qc-navy); font-variant-numeric: tabular-nums; }
  /* Dashboard hydration replaces the initial command-strip children. */
  #tab-dashboard .operations-command-title { min-width: 0; gap: 10px; }
  #tab-dashboard .operations-command-title h2 {
    color: var(--qc-navy);
    font-family: inherit;
    font-size: 13px;
    line-height: 1.5;
  }
  #tab-dashboard .operations-command-title small,
  #tab-dashboard .operations-command-stats small { color: #53667b; opacity: 1; }
  #tab-dashboard .operations-command-icon {
    background: #fff;
    color: #365d79;
    border-color: #cdd8e2;
    border-radius: 8px;
    box-shadow: none;
  }
  #tab-dashboard .operations-command-stats { flex-wrap: wrap; }
  #tab-dashboard .operations-command-stats > span { border-color: #cdd8e2; }
  #tab-dashboard .operations-command-stats :is(b, i) { color: var(--qc-navy); }
  #tab-dashboard .operations-command-stats .is-alert :is(b, i) { color: #a32c24; }

  #tab-dashboard .executive-kpis {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 18px;
  }
  #tab-dashboard .executive-kpi {
    min-width: 0;
    min-height: 110px;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--qc-line);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 3px 12px rgb(20 45 67 / 3%);
  }
  #tab-dashboard .executive-kpi::before { content: none; }
  #tab-dashboard .executive-kpi:not(.hidden) {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-content: start;
    align-items: center;
    gap: 8px 10px;
  }
  #tab-dashboard .kpi-icon {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    color: #41627b;
    background: #edf2f6;
    box-shadow: none;
  }
  #tab-dashboard .kpi .kpi-copy { display: contents !important; }
  #tab-dashboard .kpi-label { color: var(--qc-muted); font-size: 10px; letter-spacing: .055em; line-height: 1.5; }
  #tab-dashboard .kpi strong {
    color: var(--qc-navy);
    font-family: inherit;
    grid-column: 1 / -1;
    font-size: clamp(16px, 1.4vw, 22px);
    line-height: 1.3;
    letter-spacing: -.035em;
    font-variant-numeric: tabular-nums;
    white-space: normal;
    overflow-wrap: normal;
    word-break: normal;
  }
  #tab-dashboard .executive-kpi.green .kpi-icon { color: #27694a; background: #eaf5ee; }
  #tab-dashboard .executive-kpi.green strong { color: #27694a; }
  #tab-dashboard .executive-kpi.amber .kpi-icon { color: #815618; background: #fff5e1; }
  #tab-dashboard .executive-kpi.amber strong { color: #815618; }

  #tab-dashboard .executive-chart-grid,
  #tab-dashboard .executive-supporting-grid,
  #tab-dashboard .dashboard-meeting-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas: none;
    gap: 16px;
  }
  /* Override the earlier 12-column layout's per-article nth-child spans. */
  #tab-dashboard > .executive-chart-grid > article.panel:nth-child(n),
  #tab-dashboard .executive-supporting-grid > article.panel:nth-child(n) {
    grid-column: auto;
    grid-row: auto;
    width: auto;
    max-width: none;
  }
  #tab-dashboard .panel {
    min-width: 0;
    border: 1px solid var(--qc-line);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 3px 14px rgb(20 45 67 / 3%);
  }
  #tab-dashboard .chart-panel,
  #tab-dashboard .executive-supporting .panel { padding: 18px; }
  #tab-dashboard .panel-title { gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
  #tab-dashboard .panel-title h2,
  #tab-dashboard .section-heading h2 {
    margin: 4px 0 0;
    color: var(--qc-navy);
    font-family: inherit;
    font-size: 17px;
    font-weight: 650;
    letter-spacing: -.02em;
    line-height: 1.4;
  }
  #tab-dashboard .panel-note { color: var(--qc-muted); font-size: 11px; }
  #tab-dashboard .pill {
    padding: 6px 10px;
    border: 1px solid #dce7ee;
    border-radius: 20px;
    background: #eef4f8;
    color: #315775;
    font-size: 11px;
  }
  #tab-dashboard .dashboard-meetings,
  #tab-dashboard .executive-supporting { margin-top: 22px; }
  #tab-dashboard .section-heading { gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
  #tab-dashboard .meeting-preview-title { padding: 14px 16px; background: #f8fafc; border-color: var(--qc-line); }
  #tab-dashboard .meeting-preview-title > span {
    background: #eaf0f5;
    color: #365d79;
    border-radius: 8px;
    box-shadow: none;
  }
  #tab-dashboard .meeting-preview-list { max-height: 260px; overflow-y: auto; }
  #tab-dashboard .meeting-preview-item { border-color: var(--qc-line); }
  #tab-dashboard .meeting-preview-item:hover { background: #f1f6f9; }
  #tab-dashboard .executive-audit-panel { margin-top: 16px; }
  #tab-dashboard .table-wrap {
    max-height: 360px;
    overflow: auto;
    border: 1px solid var(--qc-line);
    border-radius: 9px;
  }
  #tab-dashboard table { min-width: 650px; width: 100%; }
  #tab-dashboard thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 12px 14px;
    background: #eaf0f5;
    color: #31506a;
    border-bottom: 1px solid #d5e0e9;
    font-size: 11px;
    text-transform: none;
    letter-spacing: 0;
  }
  #tab-dashboard tbody td { padding: 12px 14px; font-size: 12px; border-color: #e8edf2; font-variant-numeric: tabular-nums; }
  #tab-dashboard tbody tr:nth-child(even) { background: #f8fafc; }
  #tab-dashboard tbody tr:hover { background: #eef4f8; }

  #taskDialog {
    --task-ink: var(--qc-navy);
    --task-muted: var(--qc-muted);
    --task-line: var(--qc-line);
    --task-accent: var(--qc-red);
    border-color: var(--qc-line);
    border-radius: 16px;
    box-shadow: 0 24px 70px rgb(20 45 67 / 20%);
  }
  #taskForm .dialog-head {
    padding: 22px 26px 18px;
    background: linear-gradient(115deg, #fff, #f4f7fa);
    border-color: var(--qc-line);
  }
  #taskDialog h2 { font-weight: 700; letter-spacing: -.03em; }
  #taskForm .task-form-body { background: #f4f6f8; padding: 20px 24px; }
  #taskForm .task-form-section {
    margin: 0 0 18px;
    padding: 16px 18px 18px;
    border: 1px solid var(--qc-line);
    border-radius: 12px;
    background: #fff;
  }
  #taskForm legend {
    width: auto;
    max-width: 100%;
    margin: 0;
    padding: 0 8px;
    border-radius: 7px;
    background: #fff;
    font-size: 14px;
    line-height: 1.5;
  }
  #taskForm .task-section-number { background: #eaf0f5; color: #355873; border-radius: 7px; }
  #taskForm .task-section-note { margin: 0 0 15px; }
  #taskForm .form-grid label { color: #3c5268; font-size: 12px; font-weight: 600; }
  #taskForm :is(input:not([type="hidden"]), select, textarea) {
    border-color: #cdd8e2;
    border-radius: 8px;
    min-height: 44px;
    font-size: 14px;
    background: #fff;
  }
  #taskForm :is(input, select, textarea):focus {
    border-color: var(--qc-focus);
    outline: 3px solid rgb(55 103 133 / 17%);
    outline-offset: 1px;
  }
  #taskForm :is(input, select, textarea):disabled,
  #taskForm input[readonly] { background: #edf2f6; color: #5c6f81; }
  #taskForm .task-notes { padding: 14px 18px; border-radius: 10px; background: #fff; }
  #taskForm .task-form-footer {
    padding: 14px 26px 18px;
    background: #fff;
    border-color: var(--qc-line);
    box-shadow: 0 -4px 14px rgb(20 45 67 / 3%);
  }

  @media (max-width: 1200px) {
    #tab-dashboard .executive-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  }
  @media (max-width: 900px) {
    #tab-dashboard .executive-chart-grid,
    #tab-dashboard .executive-supporting-grid,
    #tab-dashboard .dashboard-meeting-grid { grid-template-columns: minmax(0, 1fr); }
    #tab-dashboard .page-head { flex-wrap: wrap; }
    #tab-dashboard .executive-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }
  @media (max-width: 520px) {
    #tab-dashboard { padding: 12px; border-radius: 10px; }
    #tab-dashboard .executive-kpi { padding: 12px; gap: 8px; }
    #tab-dashboard .kpi strong { font-size: 16px; }
    #tab-dashboard .chart-panel,
    #tab-dashboard .executive-supporting .panel { padding: 14px; }
    #tab-dashboard .page-head-actions { width: 100%; }
    #tab-dashboard .page-head-actions .button { flex: 1 1 auto; text-align: center; }
    #tab-dashboard .command-strip-metrics { gap: 10px; }
    #tab-dashboard .command-strip-title strong { font-size: 12px; }
    #taskDialog { border-radius: 12px; }
    #taskForm .dialog-head { padding: 17px 16px 15px; }
    #taskForm .task-form-body { padding: 16px 12px; }
    #taskForm .task-form-section { padding: 14px 12px; }
    #taskForm .task-form-footer { padding: 12px 16px 15px; }
    #taskForm :is(input:not([type="hidden"]), select, textarea) { font-size: 16px; }
  }
  @media (max-width: 380px) {
    #tab-dashboard .executive-kpis { grid-template-columns: minmax(0, 1fr); }
  }
  @media (prefers-reduced-motion: reduce) {
    #tab-dashboard .button,
    #taskDialog .button { transition: none; }
  }
}
