.phase66-quality {
    display: grid;
    gap: 1rem;
}

.phase66-page-head {
    align-items: flex-start;
    gap: 1rem;
}

.phase66-eyebrow {
    margin: 0 0 .25rem;
    color: var(--muted, #64748b);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.phase66-policy {
    display: flex;
    gap: .6rem;
    align-items: flex-start;
    padding: .9rem 1rem;
    border: 1px solid #bfdbfe;
    border-radius: .85rem;
    background: #eff6ff;
    color: #1e3a8a;
}

.phase66-policy strong {
    flex: 0 0 auto;
}

.phase66-kpis {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.phase66-filters {
    padding: 1rem;
}

.phase66-filter-grid {
    display: grid;
    grid-template-columns: minmax(15rem, 2fr) repeat(3, minmax(9rem, 1fr));
    gap: .8rem;
}

.phase66-filter-grid label {
    display: grid;
    gap: .35rem;
    min-width: 0;
}

.phase66-filter-grid label > span {
    font-size: .78rem;
    font-weight: 800;
    color: #475569;
}

.phase66-filter-grid input,
.phase66-filter-grid select {
    width: 100%;
    min-height: 2.75rem;
}

.phase66-filter-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .6rem;
    margin-top: .85rem;
}

.phase66-filter-actions > span {
    margin-left: auto;
    color: #64748b;
    font-weight: 700;
}

.phase66-table-card {
    padding: 0;
    overflow: hidden;
}

.phase66-results-head {
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.phase66-results-head p {
    margin: .2rem 0 0;
    color: #64748b;
}

.phase66-table-wrap {
    width: 100%;
    overflow: auto;
    outline: none;
}

.phase66-table-wrap:focus-visible {
    box-shadow: inset 0 0 0 3px rgba(37, 99, 235, .25);
}

.phase66-table {
    width: 100%;
    min-width: 1040px;
    border-collapse: collapse;
}

.phase66-table th,
.phase66-table td {
    padding: .8rem .9rem;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: top;
    text-align: left;
}

.phase66-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f8fafc;
    color: #475569;
    font-size: .76rem;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.phase66-table th:first-child,
.phase66-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    background: #fff;
}

.phase66-table th:first-child {
    z-index: 3;
    background: #f8fafc;
}

.phase66-row-critical td:first-child {
    box-shadow: inset 4px 0 #dc2626;
}

.phase66-row-warning td:first-child {
    box-shadow: inset 4px 0 #d97706;
}

.phase66-table td > strong,
.phase66-table td > small {
    display: block;
}

.phase66-table td > small {
    margin-top: .25rem;
    color: #64748b;
}

.phase66-table td p {
    margin: .25rem 0;
    color: #334155;
}

.phase66-severity,
.phase66-domain {
    display: inline-flex;
    align-items: center;
    min-height: 1.7rem;
    padding: .2rem .55rem;
    border-radius: 999px;
    font-size: .73rem;
    font-weight: 800;
    white-space: nowrap;
}

.phase66-severity-critical {
    background: #fee2e2;
    color: #991b1b;
}

.phase66-severity-warning {
    background: #fef3c7;
    color: #92400e;
}

.phase66-domain {
    background: #e2e8f0;
    color: #334155;
}

.phase66-empty {
    padding: 2rem 1rem;
    text-align: center;
}

.phase66-empty p {
    margin: .35rem 0 0;
    color: #64748b;
}

.phase66-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: .55rem;
    padding: 1rem;
    border-top: 1px solid #e2e8f0;
}

.phase66-pagination > span {
    color: #475569;
    font-weight: 700;
}

@media (max-width: 980px) {
    .phase66-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .phase66-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .phase66-page-head,
    .phase66-policy {
        display: grid;
    }

    .phase66-page-head .inline-actions,
    .phase66-page-head .inline-actions .btn {
        width: 100%;
    }

    .phase66-kpis,
    .phase66-filter-grid {
        grid-template-columns: 1fr;
    }

    .phase66-filter-actions,
    .phase66-filter-actions .btn {
        width: 100%;
    }

    .phase66-filter-actions > span {
        margin-left: 0;
        text-align: center;
    }

    .phase66-table {
        min-width: 900px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .phase66-quality *,
    .phase66-quality *::before,
    .phase66-quality *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}
