.qops-page,
.qops-page * {
    box-sizing: border-box;
    letter-spacing: 0;
}

.qops-page {
    position: relative;
    min-height: calc(100vh - 112px);
    padding: 12px;
    background: #f3f6f8;
    color: #17364c;
    font-family: "Open Sans", Arial, sans-serif;
    font-size: 13px;
}

.qops-print-header {
    display: none;
}

.qops-filter-band,
.qops-band,
.qops-kpi-strip,
.qops-tabs {
    width: 100%;
    background: #fff;
    border: 1px solid #cbd7e0;
}

.qops-filter-band {
    position: relative;
    z-index: 30;
    padding: 11px 12px 9px;
    border-top: 3px solid #17699d;
}

.qops-filter-grid {
    display: grid;
    gap: 9px 10px;
    align-items: end;
}

.week-filter-grid {
    grid-template-columns: 128px 128px minmax(210px, 1.1fr) minmax(180px, .85fr) minmax(190px, .9fr) minmax(240px, 1.2fr) auto;
}

.lookup-filter-grid {
    grid-template-columns: minmax(280px, 1.5fr) repeat(4, minmax(185px, 1fr)) minmax(135px, .65fr);
}

.qops-field {
    display: flex;
    position: relative;
    min-width: 0;
    margin: 0;
    flex-direction: column;
    gap: 5px;
    color: #29485e;
    font-weight: 600;
}

.qops-field > span {
    height: 17px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 12px;
}

.qops-field input,
.qops-field select,
.qops-multi-trigger {
    width: 100%;
    height: 36px;
    min-width: 0;
    padding: 0 10px;
    border: 1px solid #bfcdd7;
    border-radius: 4px;
    background: #fff;
    color: #17364c;
    outline: 0;
    font-size: 13px;
    font-weight: 400;
}

.qops-field input:focus,
.qops-field select:focus,
.qops-multi-trigger:focus,
.qops-multi-trigger.open {
    border-color: #2482bd;
    box-shadow: 0 0 0 2px rgba(36, 130, 189, .13);
}

.qops-input-icon {
    position: relative;
}

.qops-input-icon > i {
    position: absolute;
    z-index: 1;
    top: 11px;
    left: 10px;
    color: #668094;
}

.qops-input-icon input {
    padding-left: 31px;
}

.qops-multi-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    text-align: left;
}

.qops-multi-trigger > span {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.qops-multi-trigger > i {
    margin-left: 8px;
    color: #49677c;
}

.qops-multi-menu {
    position: absolute;
    z-index: 1300;
    top: calc(100% + 5px);
    left: 0;
    width: max(100%, 330px);
    min-width: 260px;
    max-width: min(440px, 88vw);
    padding: 7px;
    border: 1px solid #aebfcb;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(29, 54, 72, .2);
}

.qops-multi-menu.align-right {
    right: 0;
    left: auto;
}

.qops-check-all {
    width: 100%;
    height: 33px;
    margin-bottom: 4px;
    padding: 0 9px;
    border: 0;
    border-bottom: 1px solid #d8e1e7;
    background: #f4f7f9;
    color: #17699d;
    cursor: pointer;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
}

.qops-option-list {
    max-height: 300px;
    overflow-x: hidden;
    overflow-y: auto;
}

.qops-option-list.compact {
    max-height: 230px;
}

.qops-option-list label {
    display: flex;
    width: 100%;
    min-height: 34px;
    margin: 0;
    padding: 7px 8px;
    align-items: flex-start;
    gap: 8px;
    border-bottom: 1px solid #edf1f4;
    color: #29485e;
    cursor: pointer;
    line-height: 19px;
    font-size: 13px;
    font-weight: 500;
}

.qops-option-list label:hover {
    background: #edf5fa;
}

.qops-option-list input[type="checkbox"] {
    width: 17px;
    height: 17px;
    margin: 1px 0 0;
    flex: 0 0 17px;
    accent-color: #17699d;
}

.qops-option-list .option-icon {
    width: 16px;
    margin-top: 2px;
    color: #56758a;
    text-align: center;
}

.qops-color-dot {
    width: 9px;
    height: 9px;
    margin-top: 5px;
    flex: 0 0 9px;
    border-radius: 50%;
    background: #708494;
}

.qops-filter-actions,
.qops-report-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.qops-filter-actions {
    height: 36px;
    white-space: nowrap;
}

.lookup-actions {
    grid-column: span 2;
}

.qops-report-actions {
    margin-top: 9px;
    padding-top: 9px;
    border-top: 1px solid #dce4ea;
}

.qops-button,
.qops-icon-button {
    height: 36px;
    border: 1px solid #b9c8d3;
    border-radius: 4px;
    background: #fff;
    color: #28475c;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
}

.qops-button {
    padding: 0 13px;
}

.qops-button i {
    margin-right: 5px;
}

.qops-icon-button {
    width: 36px;
    flex: 0 0 36px;
    padding: 0;
}

.qops-button:hover,
.qops-icon-button:hover {
    border-color: #6d8da3;
    background: #edf4f8;
}

.qops-button.primary {
    border-color: #17699d;
    background: #17699d;
    color: #fff;
}

.qops-button.success {
    border-color: #27825f;
    background: #27825f;
    color: #fff;
}

.qops-button.secondary {
    border-color: #9fb1bd;
    background: #f5f7f9;
}

.qops-button:disabled,
.qops-icon-button:disabled {
    opacity: .48;
    cursor: default;
}

.qops-alert {
    margin-top: 10px;
    padding: 10px 12px;
    border-left: 4px solid #c24f4f;
    background: #fff0f0;
    color: #8b3030;
    font-weight: 600;
}

.qops-kpi-strip {
    display: grid;
    margin-top: 10px;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
}

.qops-kpi-strip article {
    min-width: 0;
    min-height: 82px;
    padding: 13px 16px;
    border-right: 1px solid #d8e1e7;
}

.qops-kpi-strip article:last-child {
    border-right: 0;
}

.qops-kpi-strip span {
    display: block;
    color: #4a667a;
    font-size: 12px;
    font-weight: 700;
}

.qops-kpi-strip span i {
    margin-left: 3px;
    color: #17699d;
}

.qops-kpi-strip strong {
    display: block;
    margin-top: 5px;
    color: #143a55;
    line-height: 34px;
    font-size: 29px;
}

.qops-module-grid {
    display: grid;
    margin-top: 10px;
    gap: 8px;
    grid-template-columns: repeat(5, minmax(205px, 1fr));
}

.qops-module-card {
    min-width: 0;
    min-height: 124px;
    padding: 12px;
    border: 1px solid #c7d3dc;
    border-top: 4px solid #526b7d;
    border-radius: 4px;
    background: #fff;
}

.qops-module-head {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 8px;
}

.qops-module-head strong,
.qops-link-text {
    min-width: 0;
    overflow: hidden;
    color: #183b54;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 13px;
    font-weight: 700;
}

.qops-link-text,
.qops-project-link {
    padding: 0;
    border: 0;
    background: transparent;
    text-align: left;
}

.qops-link-text {
    cursor: pointer;
}

.qops-link-text:hover,
.qops-link-text:focus,
.qops-project-link:hover strong,
.qops-project-link:focus strong {
    color: #0872b9;
    text-decoration: underline;
}

.qops-sync-label {
    display: inline-flex;
    margin-top: 4px;
    align-items: center;
    gap: 5px;
    color: #647c8d;
    font-size: 10px;
    font-weight: 600;
}

.qops-module-icon {
    display: inline-flex;
    width: 29px;
    height: 29px;
    flex: 0 0 29px;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    background: #526b7d;
    color: #fff;
    font-size: 14px;
}

.qops-module-value {
    margin-top: 7px;
    color: #173d57;
    line-height: 34px;
    font-size: 27px;
    font-weight: 700;
}

.qops-module-metrics {
    display: flex;
    min-width: 0;
    gap: 11px;
    color: #607789;
    font-size: 11px;
    white-space: nowrap;
}

.qops-module-metrics b {
    color: #203f55;
    font-size: 12px;
}

.module-image { border-top-color: #2878ad; }
.module-image .qops-module-icon { background: #2878ad; }
.module-approval { border-top-color: #536f91; }
.module-approval .qops-module-icon { background: #536f91; }
.module-accept-work { border-top-color: #2a8f72; }
.module-accept-work .qops-module-icon { background: #2a8f72; }
.module-accept-material { border-top-color: #6e8d3c; }
.module-accept-material .qops-module-icon { background: #6e8d3c; }
.module-hscl { border-top-color: #1d6fa5; }
.module-hscl .qops-module-icon { background: #1d6fa5; }
.module-risk { border-top-color: #d08927; }
.module-risk .qops-module-icon { background: #d08927; }
.module-bb-hoso { border-top-color: #16867f; }
.module-bb-hoso .qops-module-icon { background: #16867f; }
.module-bb-hientruong { border-top-color: #bd4a4a; }
.module-bb-hientruong .qops-module-icon { background: #bd4a4a; }
.module-defect { border-top-color: #805f91; }
.module-defect .qops-module-icon { background: #805f91; }

.qops-chart-grid {
    display: grid;
    margin-top: 10px;
    gap: 10px;
    grid-template-columns: 1fr 1fr;
}

.qops-band {
    margin-top: 10px;
}

.qops-chart-grid .qops-band {
    min-width: 0;
    margin-top: 0;
}

.qops-section-head {
    display: flex;
    min-height: 48px;
    padding: 10px 13px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid #d5dfe6;
    background: #f8fafb;
}

.qops-section-head h2 {
    margin: 0;
    color: #173c55;
    line-height: 22px;
    font-size: 16px;
    font-weight: 700;
}

.qops-section-head > div > small {
    display: block;
    margin-top: 2px;
    color: #61798b;
    font-size: 11px;
}

.qops-section-head > span {
    flex: 0 0 auto;
    color: #5f788b;
    font-size: 12px;
    font-weight: 600;
}

.qops-chart {
    min-height: 310px;
    padding: 4px 8px 0;
}

.qops-table-wrap {
    width: 100%;
    overflow: auto;
    background: #fff;
}

.qops-table {
    width: 100%;
    border-collapse: collapse;
    color: #1f3d52;
    table-layout: auto;
    font-size: 12px;
}

.qops-table th,
.qops-table td {
    min-height: 38px;
    padding: 8px 9px;
    border-right: 1px solid #d4dee5;
    border-bottom: 1px solid #d4dee5;
    vertical-align: middle;
}

.qops-table th:last-child,
.qops-table td:last-child {
    border-right: 0;
}

.qops-table thead th {
    position: sticky;
    z-index: 3;
    top: 0;
    background: #286a9f;
    color: #fff;
    white-space: nowrap;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
}

.qops-table tbody tr:nth-child(even) {
    background: #f6f8fa;
}

.qops-table tbody tr:hover {
    background: #edf5fa;
}

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

.qops-table td small {
    margin-top: 2px;
    color: #647d90;
    line-height: 16px;
}

.qops-table .numeric {
    text-align: center;
}

.qops-table .index-col {
    width: 52px;
    min-width: 52px;
    text-align: center;
}

.qops-table .date-col {
    width: 122px;
    min-width: 122px;
    white-space: nowrap;
}

.qops-table .action-col {
    width: 55px;
    min-width: 55px;
    text-align: center;
}

.qops-table .wide-col {
    min-width: 260px;
}

.qops-table .title-cell {
    min-width: 250px;
    max-width: 440px;
}

.qops-table .total-col {
    background: #edf4f8;
}

.quality-table {
    min-width: 1320px;
}

.project-matrix {
    min-width: 1450px;
}

.activity-table {
    min-width: 1500px;
}

.lookup-table {
    min-width: 1940px;
}

.qops-module-pill,
.qops-event-pill,
.qops-status,
.qops-type-pill,
.audit-label {
    display: inline-flex;
    min-height: 23px;
    padding: 3px 7px;
    align-items: center;
    gap: 4px;
    border: 1px solid #9fb2bf;
    border-radius: 3px;
    background: #fff;
    color: #365468;
    line-height: 15px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.qops-module-pill.module-image { color: #2878ad; border-color: #2878ad; }
.qops-module-pill.module-approval { color: #536f91; border-color: #536f91; }
.qops-module-pill.module-accept-work { color: #2a8f72; border-color: #2a8f72; }
.qops-module-pill.module-accept-material { color: #6e8d3c; border-color: #6e8d3c; }
.qops-module-pill.module-hscl { color: #1d6fa5; border-color: #1d6fa5; }
.qops-module-pill.module-risk { color: #b2711c; border-color: #d08927; }
.qops-module-pill.module-bb-hoso { color: #16867f; border-color: #16867f; }
.qops-module-pill.module-bb-hientruong { color: #a93f3f; border-color: #bd4a4a; }
.qops-module-pill.module-defect { color: #715180; border-color: #805f91; }

.qops-pill-link {
    cursor: pointer;
}

.qops-pill-link:hover,
.qops-pill-link:focus {
    box-shadow: 0 0 0 2px rgba(23, 105, 157, .14);
}

.qops-project-link {
    display: inline-flex;
    min-width: 0;
    flex-direction: column;
    cursor: pointer;
    color: inherit;
}

.qops-project-link strong,
.qops-project-link small {
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.qops-event-pill.event-upload,
.qops-event-pill.event-create,
.qops-event-pill.event-submit { color: #246e9c; border-color: #70a9cc; background: #edf7fd; }
.qops-event-pill.event-response { color: #19745c; border-color: #6eb39f; background: #edf9f5; }
.qops-event-pill.event-complete { color: #287a48; border-color: #78b78e; background: #eff9f2; }
.qops-event-pill.event-index_update,
.qops-event-pill.event-workflow { color: #9a641c; border-color: #d5aa6d; background: #fff8ec; }

.qops-status.filled {
    font-weight: 700;
}

.qops-type-pill {
    color: #1b6896;
    border-color: #8fb5ce;
    background: #edf6fb;
}

.qops-type-pill.defect {
    color: #72517f;
    border-color: #b7a0c0;
    background: #f7f2f9;
}

.audit-label {
    margin-top: 4px;
    color: #a23c3c;
    border-color: #cf8585;
    background: #fff3f3;
}

.score-cell strong {
    color: #125d91;
    font-size: 16px;
}

.success-text {
    color: #23805e;
}

.danger-text {
    color: #b63d3d;
}

.qops-data-note {
    padding: 8px 12px;
    border-top: 1px solid #d6e0e7;
    background: #f7fafc;
    color: #526f83;
    font-size: 11px;
}

.qops-data-note i {
    margin-right: 4px;
    color: #17699d;
}

.qops-table .action-col button,
.report-actions button {
    width: 29px;
    height: 29px;
    margin: 1px;
    padding: 0;
    border: 1px solid #aabcc8;
    border-radius: 3px;
    background: #fff;
    color: #17699d;
    cursor: pointer;
}

.qops-table .action-col button:hover,
.report-actions button:hover {
    border-color: #17699d;
    background: #eaf4fa;
}

.report-actions {
    width: 150px;
    min-width: 150px;
    text-align: center !important;
    white-space: nowrap;
}

.qops-empty {
    min-height: 90px;
    padding: 34px 15px;
    color: #657f91;
    text-align: center;
    font-size: 13px;
}

.qops-pagination {
    display: flex;
    min-height: 49px;
    padding: 8px 12px;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid #d4dee5;
    background: #f8fafb;
    color: #4f6b7f;
    font-size: 12px;
}

.qops-pagination > div {
    display: flex;
    gap: 4px;
}

.qops-pagination button {
    min-width: 31px;
    height: 31px;
    padding: 0 7px;
    border: 1px solid #b7c6d0;
    border-radius: 3px;
    background: #fff;
    color: #294b62;
    cursor: pointer;
}

.qops-pagination button.active {
    border-color: #17699d;
    background: #17699d;
    color: #fff;
}

.qops-pagination button:disabled {
    opacity: .4;
    cursor: default;
}

.qops-loading {
    display: flex;
    position: fixed;
    z-index: 2100;
    right: 24px;
    bottom: 20px;
    min-width: 235px;
    min-height: 46px;
    padding: 11px 15px;
    align-items: center;
    gap: 9px;
    border: 1px solid #8fa8b9;
    border-radius: 4px;
    background: #173f5b;
    box-shadow: 0 6px 18px rgba(24, 50, 68, .25);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
}

.qops-tabs {
    display: flex;
    margin-bottom: 10px;
    border-bottom: 2px solid #17699d;
}

.qops-tabs button {
    min-width: 155px;
    height: 42px;
    padding: 0 17px;
    border: 0;
    border-right: 1px solid #d5dfe6;
    background: #f7f9fa;
    color: #476276;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
}

.qops-tabs button i {
    margin-right: 5px;
}

.qops-tabs button span {
    margin-left: 5px;
    color: inherit;
}

.qops-tabs button.active {
    background: #17699d;
    color: #fff;
}

.lookup-result-band {
    margin-top: 10px;
}

@media (max-width: 1450px) {
    .week-filter-grid {
        grid-template-columns: 128px 128px repeat(3, minmax(180px, 1fr));
    }

    .week-filter-grid .keyword-field {
        grid-column: span 2;
    }

    .week-filter-grid .qops-filter-actions {
        grid-column: span 3;
    }

    .qops-module-grid {
        grid-template-columns: repeat(3, minmax(210px, 1fr));
    }

    .lookup-filter-grid {
        grid-template-columns: repeat(4, minmax(190px, 1fr));
    }
}

@media (max-width: 900px) {
    .qops-page { padding: 8px; }
    .week-filter-grid,
    .lookup-filter-grid { grid-template-columns: 1fr 1fr; }
    .week-filter-grid .keyword-field,
    .week-filter-grid .qops-filter-actions,
    .lookup-actions { grid-column: 1 / -1; }
    .qops-filter-actions { justify-content: flex-start; overflow-x: auto; }
    .qops-module-grid { grid-template-columns: 1fr 1fr; }
    .qops-chart-grid { grid-template-columns: 1fr; }
    .qops-kpi-strip { grid-template-columns: 1fr 1fr; }
    .qops-kpi-strip article:nth-child(2) { border-right: 0; }
}

@media print {
    @page { size: A4 landscape; margin: 9mm; }
    body * { visibility: hidden !important; }
    .qops-week-page,
    .qops-week-page * { visibility: visible !important; }
    .qops-week-page {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        min-height: 0;
        padding: 0;
        background: #fff;
        color: #000;
    }
    .qops-print-header { display: block; margin-bottom: 8px; text-align: center; }
    .qops-print-header h1 { margin: 0 0 5px; font-size: 20px; }
    .qops-no-print,
    .qops-loading { display: none !important; }
    .qops-module-grid { grid-template-columns: repeat(3, 1fr); gap: 5px; }
    .qops-module-card { min-height: 92px; break-inside: avoid; }
    .qops-module-value { font-size: 21px; }
    .qops-chart-grid { grid-template-columns: 1fr 1fr; }
    .qops-band,
    .qops-kpi-strip,
    .qops-module-grid { break-inside: avoid; }
    .qops-table-wrap { overflow: visible; }
    .qops-table { min-width: 0 !important; font-size: 8px; }
    .qops-table th,
    .qops-table td { padding: 4px; }
    .qops-section-head h2 { font-size: 13px; }
}
