/*
 * Enterprise reviewer closeout
 * Final UI layer for OpenAI/Novita/Claude enterprise-readiness feedback:
 * clearer primary actions, plain-language status, lower report density,
 * improved mobile tap targets, and calmer compose validation.
 */

:root {
  --hvx-review-ink: #0f172a;
  --hvx-review-muted: #475569;
  --hvx-review-line: #cbd8e8;
  --hvx-review-soft: #f8fafc;
  --hvx-review-blue: #123b73;
  --hvx-review-blue-soft: #eef4ff;
  --hvx-review-red: #991b1b;
  --hvx-review-red-soft: #fff7f7;
  --hvx-review-amber: #92400e;
  --hvx-review-amber-soft: #fffbeb;
  --hvx-review-green: #166534;
  --hvx-review-green-soft: #f0fdf4;
}

html body.tenant-app-body .tenant-timeline-command-bar .hvx410-kpi-action.is-primary,
html body.tenant-app-body .tenant-report-executive-actions > button:first-child,
html body.mail-body #mail-compose-modal #compose-send-btn,
html body.mail-body #mail-compose-modal #compose-top-send-btn,
html body.mail-body .hvx102-owner-remediation-actions button:not(.secondary) {
  min-height: 36px !important;
  border: 1px solid var(--hvx-review-blue) !important;
  border-radius: 3px !important;
  background: var(--hvx-review-blue) !important;
  color: #ffffff !important;
  font-size: 11px !important;
  font-weight: 940 !important;
  letter-spacing: 0 !important;
  box-shadow: 0 1px 0 rgba(15, 23, 42, .08) !important;
}

html body.tenant-app-body .tenant-timeline-command-bar .hvx410-kpi-action.is-secondary,
html body.tenant-app-body .tenant-report-executive-actions .secondary,
html body.mail-body #mail-compose-modal .mail-compose-actions .secondary {
  min-height: 34px !important;
  border: 1px solid var(--hvx-review-line) !important;
  border-radius: 3px !important;
  background: #ffffff !important;
  color: var(--hvx-review-blue) !important;
  font-size: 10.5px !important;
  font-weight: 850 !important;
  box-shadow: none !important;
}

html body.tenant-app-body #app-stage-timeline .hvx100-workqueue-table th,
html body.mail-body .hvx100-conversation-table th {
  background: #edf4fb !important;
  color: var(--hvx-review-ink) !important;
  font-size: 10.5px !important;
  font-weight: 960 !important;
}

html body.tenant-app-body #app-stage-timeline .hvx100-workqueue-row:hover td,
html body.mail-body .hvx100-conversation-row:hover td {
  background: #f8fbff !important;
}

html body.tenant-app-body #app-stage-timeline .hvx100-workqueue-row.is-owner-blocked td:first-child,
html body.tenant-app-body #app-stage-timeline .hvx100-workqueue-row.is-p1 td:first-child,
html body.mail-body .hvx100-conversation-row.is-owner-required td:first-child {
  box-shadow: inset 4px 0 0 var(--hvx-review-red) !important;
}

html body.tenant-app-body #app-stage-timeline .hvx112-row-status-token.is-breach,
html body.mail-body .mail-conversation-triage.hvx18-sla-badge.is-review,
html body.mail-body .mail-conversation-triage.hvx18-sla-badge.is-blocked {
  border-left-color: var(--hvx-review-red) !important;
  background: var(--hvx-review-red-soft) !important;
  color: var(--hvx-review-red) !important;
}

html body.tenant-app-body #app-stage-timeline .hvx112-row-status-token.is-watch {
  border-left-color: var(--hvx-review-amber) !important;
  background: var(--hvx-review-amber-soft) !important;
  color: var(--hvx-review-amber) !important;
}

html body.tenant-app-body #app-stage-timeline .hvx112-row-status-token.is-track,
html body.tenant-app-body #app-stage-timeline .hvx112-row-status-token.is-done {
  border-left-color: var(--hvx-review-green) !important;
  background: var(--hvx-review-green-soft) !important;
  color: var(--hvx-review-green) !important;
}

html body.tenant-app-body #app-stage-reports .tenant-report-executive-panel {
  display: grid !important;
  grid-template-columns: minmax(320px, 1fr) minmax(280px, auto) !important;
  gap: 14px !important;
  padding: 16px !important;
  border: 1px solid var(--hvx-review-line) !important;
  border-left: 4px solid var(--hvx-review-blue) !important;
  border-radius: 4px !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

html body.tenant-app-body #app-stage-reports .tenant-report-executive-story h3 {
  margin: 3px 0 6px !important;
  color: var(--hvx-review-ink) !important;
  font-size: 20px !important;
  line-height: 1.18 !important;
}

html body.tenant-app-body #app-stage-reports .tenant-report-executive-story p {
  max-width: 760px !important;
  color: #24364b !important;
  font-size: 13px !important;
  line-height: 1.45 !important;
}

html body.tenant-app-body #app-stage-reports .tenant-report-executive-actions {
  align-self: start !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 8px !important;
  min-width: 260px !important;
}

html body.tenant-app-body #app-stage-reports .tenant-report-kpi-band {
  grid-column: 1 / -1 !important;
  display: grid !important;
  grid-template-columns: repeat(5, minmax(130px, 1fr)) !important;
  gap: 8px !important;
}

html body.tenant-app-body #app-stage-reports .tenant-report-kpi-band > span,
html body.tenant-app-body #app-stage-reports .tenant-report-pulse > span {
  min-height: 76px !important;
  padding: 10px !important;
  border: 1px solid #dbe5f0 !important;
  border-radius: 4px !important;
  background: var(--hvx-review-soft) !important;
}

html body.tenant-app-body #app-stage-reports .tenant-report-kpi-band b,
html body.tenant-app-body #app-stage-reports .tenant-report-pulse small {
  color: var(--hvx-review-muted) !important;
  font-size: 10px !important;
  font-weight: 900 !important;
  text-transform: uppercase !important;
}

html body.tenant-app-body #app-stage-reports .tenant-report-kpi-band strong,
html body.tenant-app-body #app-stage-reports .tenant-report-pulse strong {
  color: var(--hvx-review-ink) !important;
  font-size: 22px !important;
  line-height: 1.05 !important;
}

html body.tenant-app-body #app-stage-reports .tenant-report-production-context,
html body.tenant-app-body #app-stage-reports .tenant-report-supporting-grid,
html body.tenant-app-body #app-stage-reports .tenant-guide-card.tenant-report-card {
  border-radius: 4px !important;
  box-shadow: none !important;
}

html body.tenant-app-body #app-stage-reports .tenant-report-technical-detail {
  margin-top: 12px !important;
  border: 1px solid #dbe5f0 !important;
  border-radius: 4px !important;
  background: #ffffff !important;
}

html body.tenant-app-body #app-stage-reports .tenant-report-technical-detail > summary {
  min-height: 42px !important;
  padding: 0 12px !important;
  color: var(--hvx-review-blue) !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  cursor: pointer !important;
}

html body.tenant-app-body #app-workspace-filter {
  position: fixed !important;
  top: 84px !important;
  right: 22px !important;
  left: auto !important;
  width: min(560px, calc(100vw - 44px)) !important;
  max-height: calc(100vh - 112px) !important;
  border: 1px solid #8aa3bf !important;
  border-radius: 4px !important;
  background: #ffffff !important;
  box-shadow: 0 18px 48px rgba(15, 23, 42, .18) !important;
}

html body.mail-body #mail-compose-modal #compose-decision-summary .hvx446-compose-preflight-checklist,
html body.mail-embedded #mail-compose-modal #compose-decision-summary .hvx446-compose-preflight-checklist {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 6px !important;
}

html body.mail-body #mail-compose-modal #compose-decision-summary .hvx446-compose-preflight-checklist > span,
html body.mail-embedded #mail-compose-modal #compose-decision-summary .hvx446-compose-preflight-checklist > span {
  min-height: 38px !important;
  padding: 6px 8px !important;
  border: 1px solid #dbe5f0 !important;
  border-left: 3px solid var(--hvx-review-amber) !important;
  border-radius: 3px !important;
  background: #ffffff !important;
}

html body.mail-body #mail-compose-modal #compose-decision-summary .hvx446-compose-preflight-checklist > span b,
html body.mail-body #mail-compose-modal #compose-decision-summary .hvx446-compose-preflight-checklist > span em,
html body.mail-embedded #mail-compose-modal #compose-decision-summary .hvx446-compose-preflight-checklist > span b,
html body.mail-embedded #mail-compose-modal #compose-decision-summary .hvx446-compose-preflight-checklist > span em {
  min-width: 0 !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
}

html body.mail-body #mail-compose-modal #compose-decision-summary .hvx446-compose-preflight-checklist > span.is-pass,
html body.mail-embedded #mail-compose-modal #compose-decision-summary .hvx446-compose-preflight-checklist > span.is-pass {
  border-left-color: var(--hvx-review-green) !important;
  background: var(--hvx-review-green-soft) !important;
}

html body.mail-body #mail-compose-modal #compose-decision-summary .hvx446-compose-preflight-copy,
html body.mail-embedded #mail-compose-modal #compose-decision-summary .hvx446-compose-preflight-copy {
  display: block !important;
  margin-top: 7px !important;
  color: var(--hvx-review-muted) !important;
  font-size: 12px !important;
  font-weight: 750 !important;
}

html body.mail-body #mail-compose-modal #compose-send-state-panel.hvx100-compose-send-state,
html body.mail-embedded #mail-compose-modal #compose-send-state-panel.hvx100-compose-send-state {
  border-left-color: var(--hvx-review-blue) !important;
}

html body.mail-body #mail-compose-modal #compose-send-state-panel.hvx100-compose-send-state.is-ready,
html body.mail-embedded #mail-compose-modal #compose-send-state-panel.hvx100-compose-send-state.is-ready {
  border-left-color: var(--hvx-review-green) !important;
}

html body.tenant-app-body #app-stage-calendar .tenant-calendar-surface {
  gap: 10px !important;
}

html body.tenant-app-body #app-stage-calendar .tenant-calendar-head,
html body.tenant-app-body #app-stage-calendar .tenant-calendar-toolbar {
  margin-bottom: 0 !important;
  padding-bottom: 8px !important;
}

html body.tenant-app-body #app-stage-calendar .tenant-calendar-mode-help {
  display: none !important;
}

html body.tenant-app-body #app-stage-calendar .tenant-calendar-legend-primary {
  align-self: end !important;
  justify-self: stretch !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
}

html body.tenant-app-body #app-stage-calendar .tenant-calendar-month-shell {
  margin-top: 0 !important;
}

html body.tenant-app-body #app-stage-calendar .tenant-calendar-weekdays {
  border-top: 1px solid #dbe5f0 !important;
}

html body.mail-body .mail-workspace-toolbar,
html body.mail-embedded .mail-workspace-toolbar {
  align-items: center !important;
  gap: 8px !important;
}

html body.mail-body .mail-workspace-categories .mail-workspace-tab,
html body.mail-embedded .mail-workspace-categories .mail-workspace-tab,
html body.mail-body .mail-triage-strip [data-mail-triage-filter],
html body.mail-embedded .mail-triage-strip [data-mail-triage-filter] {
  min-height: 34px !important;
  border: 0 !important;
  border-bottom: 2px solid transparent !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #334155 !important;
  box-shadow: none !important;
}

html body.mail-body .mail-workspace-categories .mail-workspace-tab.active,
html body.mail-embedded .mail-workspace-categories .mail-workspace-tab.active,
html body.mail-body .mail-triage-strip [data-mail-triage-filter].is-active,
html body.mail-embedded .mail-triage-strip [data-mail-triage-filter].is-active {
  border-bottom-color: var(--hvx-review-blue) !important;
  color: var(--hvx-review-blue) !important;
  font-weight: 950 !important;
}

html body.mail-body .mail-triage-strip [data-mail-sort],
html body.mail-embedded .mail-triage-strip [data-mail-sort] {
  min-height: 32px !important;
  border-radius: 3px !important;
}

html body.mail-body .hvx100-conversation-row.is-owner-required .hvx100-conversation-row-action,
html body.mail-embedded .hvx100-conversation-row.is-owner-required .hvx100-conversation-row-action {
  min-height: 28px !important;
  padding: 0 9px !important;
  border: 1px solid #f59e0b !important;
  border-left: 3px solid #b45309 !important;
  border-radius: 3px !important;
  background: #fffbeb !important;
  color: #7c2d12 !important;
  font-weight: 900 !important;
}

html body.mail-body #mail-compose-modal #compose-send-btn.is-send-blocked,
html body.mail-body #mail-compose-modal #compose-top-send-btn.is-send-blocked,
html body.mail-embedded #mail-compose-modal #compose-send-btn.is-send-blocked,
html body.mail-embedded #mail-compose-modal #compose-top-send-btn.is-send-blocked {
  border-color: #94a3b8 !important;
  background: #e2e8f0 !important;
  color: #334155 !important;
  opacity: 1 !important;
  cursor: not-allowed !important;
}

@media (max-width: 920px) {
  html body.tenant-app-body .tenant-mobile-nav-btn,
  html body.tenant-app-body #app-stage-timeline button,
  html body.mail-body button,
  html body.mail-body .folder-btn {
    min-height: 44px !important;
  }

  html body.tenant-app-body #app-stage-timeline .hvx100-mobile-ops-status,
  html body.tenant-app-body #app-stage-timeline .tenant-timeline-mobile-card.hvx760-mobile-task-card {
    border-radius: 4px !important;
    padding: 12px !important;
  }

  html body.tenant-app-body #app-stage-timeline .hvx365-mobile-status-summary {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 8px !important;
  }

  html body.tenant-app-body #app-stage-timeline .hvx365-mobile-status-summary b,
  html body.tenant-app-body #app-stage-timeline .hvx365-mobile-status-summary span {
    min-height: 36px !important;
    padding: 8px !important;
    border: 1px solid #dbe5f0 !important;
    border-radius: 3px !important;
    background: #ffffff !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
  }

  html body.tenant-app-body #app-stage-reports .tenant-report-executive-panel,
  html body.tenant-app-body #app-stage-reports .tenant-report-kpi-band {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  html body.tenant-app-body #app-workspace-filter {
    inset: 68px 12px auto 12px !important;
    width: auto !important;
  }

  html body.mail-body #mail-compose-modal #compose-decision-summary .hvx446-compose-preflight-checklist,
  html body.mail-embedded #mail-compose-modal #compose-decision-summary .hvx446-compose-preflight-checklist {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  html body.tenant-app-body #app-stage-calendar .tenant-calendar-head,
  html body.tenant-app-body #app-stage-calendar .tenant-calendar-toolbar {
    gap: 8px !important;
  }

  html body.tenant-app-body #app-stage-calendar .tenant-calendar-summary-cards,
  html body.tenant-app-body #app-stage-calendar .tenant-calendar-legend-primary {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}
