/* ---- Hide deprecated label (inside th) ---- */
.hide-deprecated-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 400;
    color: var(--gray-500);
    cursor: pointer;
    margin-left: 12px;
    white-space: nowrap;
}
.hide-deprecated-label input {
    accent-color: var(--primary);
}

/* ---- QA dashboard ---- */
.qa-dashboard {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 4px 0 24px;
}
.qa-loading {
    color: var(--gray-500);
    padding: 24px 0;
}
.qa-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}
.qa-card {
    background: var(--surface, var(--white));
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    padding: 16px;
}
.qa-card-wide {
    grid-column: 1 / -1;
}
.qa-card h3 {
    margin: 0 0 12px;
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-800);
}
.qa-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
}
.qa-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 72px;
}
.qa-stat-value {
    font-size: 22px;
    font-weight: 600;
    line-height: 1.2;
}
.qa-stat-value.qa-warn {
    color: var(--danger);
}
.qa-stat-value.qa-ok {
    color: var(--success);
}
.qa-stat-label {
    font-size: 12px;
    color: var(--gray-500);
}
.qa-locale-bars {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}
.qa-locale-row {
    display: grid;
    grid-template-columns: 28px 1fr 40px;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}
.qa-locale-bar {
    height: 8px;
    background: var(--gray-100);
    border-radius: 4px;
    overflow: hidden;
}
.qa-locale-bar-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 4px;
}
.qa-locale-bar-fill.qa-warn {
    background: var(--danger);
}
.qa-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}
.qa-cov-matrix-wrap {
    overflow-x: auto;
    margin-top: 8px;
}
.qa-cov-matrix {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.qa-cov-matrix td {
    border: 1px solid var(--gray-200);
    padding: 6px 10px;
    text-align: center;
    white-space: nowrap;
}
.qa-cov-matrix th {
    border: 1px solid var(--gray-200);
    padding: 6px 10px;
    text-align: center;
    white-space: nowrap;
    background: var(--gray-50);
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 1;
}
.qa-cov-matrix th.qa-cov-wf-col,
.qa-cov-matrix td.qa-cov-wf-col {
    text-align: left;
    position: sticky;
    left: 0;
    background: var(--surface, var(--white));
    z-index: 2;
    min-width: 160px;
    max-width: 280px;
    white-space: normal;
}
.qa-cov-matrix thead th.qa-cov-wf-col {
    z-index: 3;
    background: var(--gray-50);
}
.qa-cov-cell {
    cursor: pointer;
    font-variant-numeric: tabular-nums;
    font-weight: 500;
}
.qa-cov-cell:hover {
    background: var(--gray-50);
}
.qa-cov-cell.qa-cov-warn {
    background: var(--danger-bg);
    color: var(--danger);
    font-weight: 700;
}
.qa-cov-cell.qa-cov-zero {
    color: var(--gray-400);
    font-weight: 400;
}
.qa-cov-tooltip {
    position: fixed;
    z-index: 200;
    max-width: 360px;
    padding: 10px 12px;
    background: var(--gray-800);
    color: var(--white);
    font-size: 12px;
    line-height: 1.45;
    border-radius: 6px;
    box-shadow: 0 4px 14px rgba(var(--black-rgb), 0.2);
    pointer-events: none;
    display: none;
}
.qa-cov-tooltip.visible {
    display: block;
}
.qa-cov-tooltip-title {
    font-weight: 600;
    margin-bottom: 6px;
}
.qa-cov-tooltip ul {
    margin: 0;
    padding-left: 16px;
}
.qa-cov-tooltip li {
    margin-bottom: 2px;
}
.qa-cov-tooltip-warn {
    color: var(--red-fca5a5);
    margin-bottom: 6px;
}
.qa-gap-list {
    margin: 0;
    padding-left: 18px;
    font-size: 13px;
    color: var(--gray-700);
}
.qa-gap-list li {
    margin-bottom: 4px;
}
.qa-meta {
    font-size: 13px;
    color: var(--gray-500);
    margin: 0 0 8px;
}
.qa-link-btn {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-size: 13px;
    padding: 0;
    text-decoration: underline;
}
.qa-link-btn:hover {
    color: var(--primary-dark, var(--blue-1d4ed8));
}
.qa-category-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}
.qa-chip {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--gray-100);
    color: var(--gray-700);
}
.qa-trans-summary-list {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
    font-size: 13px;
}
.qa-trans-summary-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2px 10px;
    padding: 6px 0;
    border-bottom: 1px solid var(--gray-100);
}
.qa-trans-summary-item:last-child {
    border-bottom: none;
}
.qa-trans-summary-label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--gray-800);
    font-weight: 500;
}
.qa-help-wrap {
    position: relative;
    display: inline-flex;
    flex-shrink: 0;
}
.qa-help-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    padding: 0;
    border: 1px solid var(--gray-300);
    border-radius: 50%;
    background: var(--gray-50);
    color: var(--gray-600);
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    cursor: help;
}
.qa-help-btn:hover,
.qa-help-btn:focus {
    border-color: var(--gray-400);
    background: var(--gray-100);
    color: var(--gray-800);
    outline: none;
}
.qa-help-tip {
    position: absolute;
    left: 0;
    bottom: calc(100% + 6px);
    z-index: 60;
    width: max-content;
    max-width: min(280px, 70vw);
    padding: 8px 10px;
    border-radius: 6px;
    background: var(--gray-900);
    color: var(--white);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
    text-align: left;
    box-shadow: 0 4px 12px rgba(var(--black-rgb), 0.15);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.12s ease, visibility 0.12s ease;
}
.qa-help-wrap:hover .qa-help-tip,
.qa-help-wrap:focus-within .qa-help-tip {
    opacity: 1;
    visibility: visible;
}
.qa-trans-summary-count {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: var(--gray-900);
    text-align: right;
}
.qa-trans-summary-locales {
    grid-column: 1 / -1;
    font-size: 12px;
    color: var(--gray-500);
}
.qa-trans-ai-footnote {
    margin-top: 10px;
    font-size: 12px;
    opacity: 0.85;
}

