/* v217 Protected Workspace Operational QA Closeout
   Presentation-only: protected workspace layout consistency, duplicate-auth suppression, assurance-card alignment.
   No auth rules, Supabase schema, RLS, SQL, Netlify Functions, or protected business logic are modified by this stylesheet. */

body.tvh-ui-governed.v217-protected-qa {
  background: var(--tvh-bg, #F6F1E7);
  color: var(--tvh-ink, #17211B);
}

.v217-protected-qa .tvh-ui-governance-shell {
  border-bottom-color: var(--tvh-border, #DDD6C8);
}

/* Protected pages should not display public auth/header fragments underneath the protected shell. */
.v217-protected-qa header.site-header-2026,
.v217-protected-qa .site-auth-links,
.v217-protected-qa .site-auth-link[data-auth-show],
.v217-protected-qa .site-auth-button[data-auth-logout] {
  display: none !important;
}

/* Keep the protected top-shell logout authoritative and suppress duplicated inner logout buttons. */
.v217-protected-qa #logoutBtn,
.v217-protected-qa [data-v217-hide-duplicate="true"] {
  display: none !important;
}

/* Admin pages keep the workspace selector, but not duplicated global navigation. */
.v217-admin-dashboard .topbar .actions a[href="/admin/pipeline.html"],
.v217-admin-dashboard .topbar .actions a[href="/admin/automation.html"],
.v217-admin-dashboard .topbar .actions a[href="/portal/tv-cri/"],
.v217-admin-dashboard .topbar .actions #refreshBtn {
  display: none !important;
}

.v217-protected-qa .tvh-protected-assurance-card {
  max-width: 1180px;
  margin: 24px auto 34px;
}

.v217-protected-qa .tvh-protected-assurance-card h2 {
  max-width: 880px;
}

.v217-protected-qa .tvh-assurance-grid {
  align-items: stretch;
}

.v217-protected-qa .tvh-assurance-item {
  min-height: 112px;
}

.tvh-v217-operational-qa-panel {
  max-width: 1180px;
  margin: 20px auto 0;
  padding: 18px 20px;
  border: 1px solid rgba(12, 73, 64, .14);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(251,248,240,.94));
  box-shadow: 0 14px 34px rgba(23,33,27,.07);
  color: var(--tvh-ink, #17211B);
}

.tvh-v217-operational-qa-panel .kicker,
.tvh-v217-kicker {
  display: inline-flex;
  align-items: center;
  margin-bottom: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(15,118,110,.08);
  border: 1px solid rgba(15,118,110,.16);
  color: var(--tvh-teal, #0F766E);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.tvh-v217-operational-qa-panel h2,
.tvh-v217-operational-qa-panel h3 {
  margin: 0 0 8px;
  color: var(--tvh-green, #163D2D);
}

.tvh-v217-operational-qa-panel p {
  margin: 0;
  color: var(--tvh-muted, #647064);
  line-height: 1.62;
}

.tvh-v217-qa-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.tvh-v217-qa-card {
  padding: 14px 15px;
  border: 1px solid rgba(12,73,64,.12);
  border-radius: 16px;
  background: rgba(255,255,255,.64);
}

.tvh-v217-qa-card strong {
  display: block;
  margin-bottom: 5px;
  color: var(--tvh-green, #163D2D);
}

.tvh-v217-qa-card span {
  display: block;
  color: var(--tvh-muted, #647064);
  font-size: 13.5px;
  line-height: 1.45;
}

.tvh-v217-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.tvh-v217-actions a,
.tvh-v217-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 13px;
  border-radius: 999px;
  border: 1px solid rgba(12,73,64,.16);
  background: rgba(255,255,255,.68);
  color: var(--tvh-green, #163D2D);
  text-decoration: none;
  font-weight: 800;
  font-size: 13.5px;
}

.tvh-v217-actions a:first-child,
.tvh-v217-actions button:first-child {
  background: var(--tvh-green, #163D2D);
  color: #fff;
  border-color: var(--tvh-green, #163D2D);
}

@media (max-width: 760px) {
  .tvh-v217-operational-qa-panel { margin: 16px 14px 0; padding: 16px; }
  .tvh-v217-actions { display: grid; grid-template-columns: 1fr; }
  .tvh-v217-actions a, .tvh-v217-actions button { width: 100%; }
}


/* v224 full-site QA closeout: keep one protected shell visible and suppress legacy inner topbars/auth controls. */
body.tvh-ui-governed .wrap > .topbar,
body.tvh-ui-governed #app > .topbar,
body.tvh-ui-governed main > .topbar {
  display: none !important;
}
body.tvh-ui-governed .tvh-ui-governance-shell + .topbar {
  display: none !important;
}
.v224-final-qa .qa-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-top:16px}
.v224-final-qa .qa-card{border:1px solid var(--tvh-line, #d9ded7);border-radius:18px;background:var(--tvh-surface, #fff);padding:18px}
.v224-final-qa .qa-card h3{margin:0 0 8px;font-size:18px}
.v224-final-qa .qa-card p{margin:0;color:var(--tvh-muted, #617064);line-height:1.55}
.v224-final-qa .qa-status{display:inline-flex;align-items:center;border:1px solid var(--tvh-line, #d9ded7);border-radius:999px;padding:6px 9px;font-size:11px;font-weight:800;letter-spacing:.04em;text-transform:uppercase;color:var(--tvh-green, #124734);background:rgba(18,71,52,.06)}
.v224-final-qa table{width:100%;border-collapse:collapse;margin-top:12px}
.v224-final-qa th,.v224-final-qa td{padding:10px 12px;border-bottom:1px solid var(--tvh-line, #d9ded7);text-align:left;vertical-align:top}
.v224-final-qa th{font-size:12px;letter-spacing:.05em;text-transform:uppercase;color:var(--tvh-muted, #617064)}
@media(max-width:1000px){.v224-final-qa .qa-grid{grid-template-columns:1fr}}
