﻿/* =========================================================
   PM Forecast Report
========================================================= */

.pm-report-toolbar {
    display: grid;
    grid-template-columns: 180px 190px 260px 260px minmax(260px, 1fr);
    gap: .85rem;
    align-items: end;
}

    .pm-report-toolbar .form-label {
        font-weight: 800;
        color: #475569;
        font-size: .82rem;
    }

.pm-forecast-bars {
    display: flex;
    flex-direction: column;
    gap: .9rem;
}

.pm-forecast-bar-item {
    border: 1px solid #e5e7eb;
    background: #ffffff;
    border-radius: 18px;
    padding: .9rem;
}

.pm-forecast-bar-head {
    display: flex;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .65rem;
}

    .pm-forecast-bar-head strong {
        display: block;
        color: #0f172a;
        font-weight: 900;
    }

    .pm-forecast-bar-head small {
        display: block;
        color: #64748b;
        margin-top: .2rem;
    }

.pm-forecast-bar-track {
    width: 100%;
    height: 10px;
    background: #eef2f7;
    border-radius: 999px;
    overflow: hidden;
}

.pm-forecast-bar-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(135deg, #2563eb, #60a5fa);
}

.pm-report-risk-list {
    display: flex;
    flex-direction: column;
    gap: .85rem;
}

.pm-report-risk-item {
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: .95rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .85rem;
    background: #ffffff;
}

    .pm-report-risk-item strong {
        display: block;
        color: #0f172a;
        font-size: 1.65rem;
        line-height: 1;
    }

    .pm-report-risk-item span {
        display: block;
        color: #64748b;
        font-size: .82rem;
        margin-top: .25rem;
        font-weight: 700;
    }

    .pm-report-risk-item > i {
        width: 46px;
        height: 46px;
        border-radius: 17px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 1.25rem;
    }

    .pm-report-risk-item.danger > i {
        background: #fee2e2;
        color: #dc2626;
    }

    .pm-report-risk-item.warning > i {
        background: #fff7ed;
        color: #ea580c;
    }

    .pm-report-risk-item.info > i {
        background: #e0f2fe;
        color: #0284c7;
    }

    .pm-report-risk-item.dark > i {
        background: #f1f5f9;
        color: #0f172a;
    }

@media (max-width: 1400px) {
    .pm-report-toolbar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .pm-report-toolbar {
        grid-template-columns: 1fr;
    }
}


/* =========================================================
   PM Compliance Report
========================================================= */

.compliance-toolbar {
    grid-template-columns: 170px 170px 170px 190px 240px 240px minmax(260px, 1fr) 120px;
}

.pm-compliance-bars {
    display: flex;
    flex-direction: column;
    gap: .9rem;
}

.pm-compliance-bar-item {
    border: 1px solid #e5e7eb;
    background: #ffffff;
    border-radius: 18px;
    padding: .9rem;
}

.pm-compliance-bar-head {
    display: flex;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .65rem;
}

    .pm-compliance-bar-head strong {
        display: block;
        color: #0f172a;
        font-weight: 900;
    }

    .pm-compliance-bar-head small {
        display: block;
        color: #64748b;
        margin-top: .2rem;
    }

.pm-compliance-bar-track {
    width: 100%;
    height: 10px;
    background: #eef2f7;
    border-radius: 999px;
    overflow: hidden;
}

.pm-compliance-bar-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(135deg, #7c3aed, #a78bfa);
}

.pm-compliance-badge {
    border-radius: 999px;
    padding: .32rem .7rem;
    font-size: .74rem;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

    .pm-compliance-badge.excellent {
        background: #dcfce7;
        color: #15803d;
    }

    .pm-compliance-badge.good {
        background: #dbeafe;
        color: #1d4ed8;
    }

    .pm-compliance-badge.warning {
        background: #fff7ed;
        color: #c2410c;
    }

    .pm-compliance-badge.danger {
        background: #fee2e2;
        color: #b91c1c;
    }

@media (max-width: 1600px) {
    .compliance-toolbar {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 992px) {
    .compliance-toolbar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 576px) {
    .compliance-toolbar {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   PM Workload Report
========================================================= */

.pm-workload-toolbar {
    grid-template-columns: 170px 170px 170px 240px 190px 190px minmax(260px, 1fr) 120px;
}

.pm-workload-badge {
    border-radius: 999px;
    padding: .32rem .7rem;
    font-size: .74rem;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

    .pm-workload-badge.high {
        background: #fee2e2;
        color: #b91c1c;
    }

    .pm-workload-badge.medium {
        background: #fff7ed;
        color: #c2410c;
    }

    .pm-workload-badge.low {
        background: #dcfce7;
        color: #15803d;
    }

.pm-workload-score-bar {
    width: 100%;
    height: 7px;
    background: #eef2f7;
    border-radius: 999px;
    overflow: hidden;
    min-width: 90px;
}

    .pm-workload-score-bar div {
        height: 100%;
        border-radius: 999px;
        background: linear-gradient(135deg, #0f172a, #64748b);
    }

.pm-workload-top-list {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.pm-workload-top-item {
    border: 1px solid #e5e7eb;
    background: #ffffff;
    border-radius: 16px;
    padding: .85rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
}

    .pm-workload-top-item div {
        min-width: 0;
    }

    .pm-workload-top-item strong {
        display: block;
        color: #0f172a;
        font-weight: 900;
        overflow-wrap: anywhere;
    }

    .pm-workload-top-item small {
        display: block;
        color: #64748b;
        margin-top: .15rem;
    }

@media (max-width: 1600px) {
    .pm-workload-toolbar {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 992px) {
    .pm-workload-toolbar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 576px) {
    .pm-workload-toolbar {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   PM Report Center
========================================================= */

.pm-report-center-toolbar {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 220px 220px;
    gap: .85rem;
    align-items: center;
}

.pm-report-center-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 1rem;
    align-items: start;
}

.pm-report-center-main {
    min-width: 0;
}

.pm-report-center-side {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.pm-report-section {
    border: 1px solid #e5e7eb;
    background: #ffffff;
    border-radius: 24px;
    padding: 1rem;
    box-shadow: 0 16px 35px rgba(15, 23, 42, 0.06);
}

.pm-report-count-badge {
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    padding: .35rem .75rem;
    font-size: .78rem;
    font-weight: 900;
    white-space: nowrap;
}

.pm-report-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.pm-report-card {
    position: relative;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    padding: 1rem;
    background: #ffffff;
    text-align: inherit;
    cursor: pointer;
    min-height: 240px;
    display: flex;
    flex-direction: column;
    gap: .9rem;
    transition: all .2s ease-in-out;
}

    .pm-report-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 20px 42px rgba(15, 23, 42, 0.12);
    }

.pm-report-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
}

.pm-report-icon {
    width: 48px;
    height: 48px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.35rem;
    box-shadow: 0 12px 24px rgba(15, 23, 42, .14);
}

.pm-report-type {
    border-radius: 999px;
    background: #f8fafc;
    color: #475569;
    border: 1px solid #e5e7eb;
    padding: .32rem .65rem;
    font-size: .72rem;
    font-weight: 900;
    white-space: nowrap;
}

.pm-report-card-body {
    flex: 1;
}

    .pm-report-card-body h5 {
        color: #0f172a;
        font-weight: 900;
        margin-bottom: .45rem;
        line-height: 1.35;
    }

    .pm-report-card-body p {
        color: #64748b;
        margin: 0;
        font-size: .88rem;
        line-height: 1.65;
    }

.pm-report-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}

    .pm-report-tags span {
        border-radius: 999px;
        background: #f1f5f9;
        color: #475569;
        padding: .25rem .55rem;
        font-size: .68rem;
        font-weight: 800;
    }

.pm-report-card-footer {
    border-top: 1px solid #e5e7eb;
    padding-top: .75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    color: #475569;
    font-size: .82rem;
    font-weight: 900;
}

    .pm-report-card-footer i {
        width: 30px;
        height: 30px;
        border-radius: 999px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: #f8fafc;
        transition: all .2s ease-in-out;
    }

.pm-report-card:hover .pm-report-card-footer i {
    transform: translateX(3px);
}

html[dir="rtl"] .pm-report-card:hover .pm-report-card-footer i {
    transform: translateX(-3px);
}

.pm-report-card.primary {
    background: radial-gradient(circle at top right, rgba(37, 99, 235, .11), transparent 42%), #ffffff;
}

.pm-report-card.info {
    background: radial-gradient(circle at top right, rgba(14, 165, 233, .12), transparent 42%), #ffffff;
}

.pm-report-card.success {
    background: radial-gradient(circle at top right, rgba(22, 163, 74, .12), transparent 42%), #ffffff;
}

.pm-report-card.warning {
    background: radial-gradient(circle at top right, rgba(245, 158, 11, .14), transparent 42%), #ffffff;
}

.pm-report-card.purple {
    background: radial-gradient(circle at top right, rgba(124, 58, 237, .12), transparent 42%), #ffffff;
}

.pm-report-card.dark {
    background: radial-gradient(circle at top right, rgba(15, 23, 42, .12), transparent 42%), #ffffff;
}

.pm-report-card.primary .pm-report-icon {
    background: linear-gradient(135deg, #2563eb, #60a5fa);
}

.pm-report-card.info .pm-report-icon {
    background: linear-gradient(135deg, #0284c7, #38bdf8);
}

.pm-report-card.success .pm-report-icon {
    background: linear-gradient(135deg, #16a34a, #4ade80);
}

.pm-report-card.warning .pm-report-icon {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
}

.pm-report-card.purple .pm-report-icon {
    background: linear-gradient(135deg, #7c3aed, #a78bfa);
}

.pm-report-card.dark .pm-report-icon {
    background: linear-gradient(135deg, #0f172a, #475569);
}

.pm-report-flow {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .85rem;
}

.pm-report-flow-step {
    border: 1px solid #e5e7eb;
    background: #ffffff;
    border-radius: 18px;
    padding: .9rem;
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    text-align: inherit;
    cursor: pointer;
    transition: all .18s ease-in-out;
}

    .pm-report-flow-step:hover {
        background: #f8fafc;
        transform: translateY(-2px);
        box-shadow: 0 12px 22px rgba(15, 23, 42, 0.08);
    }

    .pm-report-flow-step > span {
        width: 32px;
        height: 32px;
        border-radius: 12px;
        background: #0f172a;
        color: #ffffff;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-weight: 900;
        flex: 0 0 auto;
    }

    .pm-report-flow-step strong {
        display: block;
        color: #0f172a;
        font-weight: 900;
    }

    .pm-report-flow-step small {
        display: block;
        color: #64748b;
        margin-top: .2rem;
        line-height: 1.45;
    }

.pm-report-side-card {
    margin-bottom: 0;
}

.pm-report-quick-actions {
    display: flex;
    flex-direction: column;
    gap: .65rem;
}

    .pm-report-quick-actions button {
        border: 1px solid #e5e7eb;
        background: #ffffff;
        color: #0f172a;
        border-radius: 16px;
        padding: .75rem;
        display: flex;
        align-items: center;
        gap: .65rem;
        text-align: inherit;
        font-weight: 800;
        transition: all .16s ease-in-out;
    }

        .pm-report-quick-actions button:hover {
            background: #f8fafc;
            transform: translateY(-1px);
            box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
        }

    .pm-report-quick-actions i {
        width: 34px;
        height: 34px;
        border-radius: 13px;
        background: #f1f5f9;
        color: #dc2626;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

.pm-report-guide {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

    .pm-report-guide div {
        border: 1px solid #e5e7eb;
        background: #f8fafc;
        border-radius: 16px;
        padding: .85rem;
    }

    .pm-report-guide strong {
        display: block;
        color: #0f172a;
        font-weight: 900;
        margin-bottom: .25rem;
    }

    .pm-report-guide p {
        color: #64748b;
        margin: 0;
        line-height: 1.55;
        font-size: .85rem;
    }

@media (max-width: 1400px) {
    .pm-report-center-layout {
        grid-template-columns: 1fr;
    }

    .pm-report-center-side {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pm-report-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pm-report-flow {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .pm-report-center-toolbar {
        grid-template-columns: 1fr;
    }

    .pm-report-center-side {
        grid-template-columns: 1fr;
    }

    .pm-report-grid {
        grid-template-columns: 1fr;
    }

    .pm-report-flow {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   PM Setup Checklist
========================================================= */

.pm-setup-overview {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) 220px 220px 220px;
    gap: 1rem;
}

.pm-setup-score-card {
    border-radius: 24px;
    padding: 1.1rem;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    overflow: hidden;
    position: relative;
    box-shadow: 0 18px 42px rgba(15, 23, 42, .16);
}

    .pm-setup-score-card.ready {
        background: linear-gradient(135deg, #15803d, #22c55e);
    }

    .pm-setup-score-card.partial {
        background: linear-gradient(135deg, #c2410c, #f97316);
    }

    .pm-setup-score-card.not-ready {
        background: linear-gradient(135deg, #b91c1c, #ef4444);
    }

.pm-setup-score-content span {
    display: block;
    opacity: .9;
    font-weight: 800;
    margin-bottom: .25rem;
}

.pm-setup-score-content strong {
    display: block;
    font-size: 2.5rem;
    font-weight: 950;
    line-height: 1;
}

.pm-setup-score-content small {
    display: block;
    margin-top: .4rem;
    opacity: .9;
    font-weight: 700;
}

.pm-setup-score-ring {
    width: 92px;
    height: 92px;
    border-radius: 999px;
    border: 8px solid rgba(255, 255, 255, .34);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

    .pm-setup-score-ring span {
        font-weight: 950;
        font-size: 1.05rem;
    }

.pm-setup-mini-card {
    border: 1px solid #e5e7eb;
    background: #ffffff;
    border-radius: 22px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: .85rem;
    box-shadow: 0 14px 32px rgba(15, 23, 42, .06);
}

    .pm-setup-mini-card i {
        width: 50px;
        height: 50px;
        border-radius: 18px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 1.35rem;
    }

    .pm-setup-mini-card.success i {
        background: #dcfce7;
        color: #15803d;
    }

    .pm-setup-mini-card.warning i {
        background: #fff7ed;
        color: #c2410c;
    }

    .pm-setup-mini-card.danger i {
        background: #fee2e2;
        color: #b91c1c;
    }

    .pm-setup-mini-card strong {
        display: block;
        color: #0f172a;
        font-weight: 950;
        font-size: 1.55rem;
        line-height: 1;
    }

    .pm-setup-mini-card span {
        display: block;
        color: #64748b;
        font-size: .82rem;
        font-weight: 800;
        margin-top: .25rem;
    }

.pm-setup-alert {
    display: flex;
    align-items: flex-start;
    gap: .85rem;
    background: #fff7ed;
    border-color: #fed7aa;
}

    .pm-setup-alert > div:first-child {
        width: 42px;
        height: 42px;
        border-radius: 16px;
        background: #ffedd5;
        color: #c2410c;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 1.25rem;
        flex: 0 0 auto;
    }

    .pm-setup-alert strong {
        display: block;
        color: #9a3412;
        font-weight: 950;
    }

    .pm-setup-alert p {
        margin: .25rem 0 0;
        color: #9a3412;
        line-height: 1.6;
    }

.pm-setup-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 1rem;
    align-items: start;
}

.pm-setup-main {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}

.pm-setup-side {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.pm-setup-group {
    margin-bottom: 0;
}

.pm-setup-group-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .85rem;
    padding-bottom: .85rem;
    border-bottom: 1px solid #e5e7eb;
}

    .pm-setup-group-header > div:first-child {
        display: flex;
        align-items: flex-start;
        gap: .75rem;
    }

        .pm-setup-group-header > div:first-child > i {
            width: 44px;
            height: 44px;
            border-radius: 16px;
            background: #f1f5f9;
            color: #dc2626;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 1.2rem;
            flex: 0 0 auto;
        }

    .pm-setup-group-header h5 {
        margin: 0;
        color: #0f172a;
        font-weight: 950;
    }

    .pm-setup-group-header p {
        margin: .2rem 0 0;
        color: #64748b;
        line-height: 1.55;
        font-size: .9rem;
    }

.pm-setup-group-badge {
    border-radius: 999px;
    padding: .35rem .75rem;
    font-size: .76rem;
    font-weight: 950;
    white-space: nowrap;
}

    .pm-setup-group-badge.passed {
        background: #dcfce7;
        color: #15803d;
    }

    .pm-setup-group-badge.warning {
        background: #fff7ed;
        color: #c2410c;
    }

    .pm-setup-group-badge.failed {
        background: #fee2e2;
        color: #b91c1c;
    }

.pm-setup-check-list {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    margin-top: .9rem;
}

.pm-setup-check-item {
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: .85rem;
    background: #ffffff;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: .8rem;
    align-items: start;
}

    .pm-setup-check-item.passed {
        background: linear-gradient(90deg, rgba(220, 252, 231, .45), #ffffff 40%);
    }

    .pm-setup-check-item.warning {
        background: linear-gradient(90deg, rgba(255, 247, 237, .7), #ffffff 42%);
    }

    .pm-setup-check-item.failed {
        background: linear-gradient(90deg, rgba(254, 226, 226, .7), #ffffff 42%);
    }

.pm-setup-check-icon {
    width: 42px;
    height: 42px;
    border-radius: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.18rem;
}

.pm-setup-check-item.passed .pm-setup-check-icon {
    background: #dcfce7;
    color: #15803d;
}

.pm-setup-check-item.warning .pm-setup-check-icon {
    background: #fff7ed;
    color: #c2410c;
}

.pm-setup-check-item.failed .pm-setup-check-icon {
    background: #fee2e2;
    color: #b91c1c;
}

.pm-setup-check-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .65rem;
    margin-bottom: .25rem;
}

    .pm-setup-check-title strong {
        color: #0f172a;
        font-weight: 950;
    }

.pm-setup-check-content p {
    margin: 0;
    color: #64748b;
    line-height: 1.55;
    font-size: .88rem;
}

.pm-setup-check-content small {
    margin-top: .4rem;
    display: flex;
    align-items: flex-start;
    gap: .35rem;
    color: #475569;
    line-height: 1.5;
    font-weight: 700;
}

.pm-setup-status {
    border-radius: 999px;
    padding: .25rem .6rem;
    font-size: .7rem;
    font-weight: 950;
    white-space: nowrap;
}

    .pm-setup-status.passed {
        background: #dcfce7;
        color: #15803d;
    }

    .pm-setup-status.warning {
        background: #fff7ed;
        color: #c2410c;
    }

    .pm-setup-status.failed {
        background: #fee2e2;
        color: #b91c1c;
    }

.pm-setup-check-actions {
    display: flex;
    justify-content: flex-end;
}

.pm-setup-side-card {
    margin-bottom: 0;
}

.pm-setup-quick-links {
    display: flex;
    flex-direction: column;
    gap: .65rem;
}

    .pm-setup-quick-links button {
        border: 1px solid #e5e7eb;
        background: #ffffff;
        color: #0f172a;
        border-radius: 16px;
        padding: .75rem;
        display: flex;
        align-items: center;
        gap: .65rem;
        text-align: inherit;
        font-weight: 850;
        transition: all .16s ease-in-out;
    }

        .pm-setup-quick-links button:hover {
            background: #f8fafc;
            transform: translateY(-1px);
            box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
        }

    .pm-setup-quick-links i {
        width: 34px;
        height: 34px;
        border-radius: 13px;
        background: #f1f5f9;
        color: #dc2626;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

.pm-setup-count-list {
    display: flex;
    flex-direction: column;
    gap: .6rem;
}

    .pm-setup-count-list div {
        border: 1px solid #e5e7eb;
        background: #f8fafc;
        border-radius: 14px;
        padding: .7rem .8rem;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: .75rem;
    }

    .pm-setup-count-list span {
        color: #64748b;
        font-weight: 800;
        font-size: .84rem;
    }

    .pm-setup-count-list strong {
        color: #0f172a;
        font-weight: 950;
    }

@media (max-width: 1400px) {
    .pm-setup-overview {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pm-setup-layout {
        grid-template-columns: 1fr;
    }

    .pm-setup-side {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .pm-setup-overview {
        grid-template-columns: 1fr;
    }

    .pm-setup-side {
        grid-template-columns: 1fr;
    }

    .pm-setup-check-item {
        grid-template-columns: 42px minmax(0, 1fr);
    }

    .pm-setup-check-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }

    .pm-setup-check-title {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* =========================================================
   PM Bulk Actions
========================================================= */

.pm-bulk-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 1rem;
    align-items: start;
}

.pm-bulk-main {
    min-width: 0;
}

.pm-bulk-side {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.pm-bulk-side-card {
    margin-bottom: 0;
}

.pm-bulk-filter-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: .85rem;
    align-items: end;
}

    .pm-bulk-filter-grid .form-label,
    .pm-bulk-settings .form-label {
        font-weight: 850;
        color: #475569;
        font-size: .82rem;
    }

.pm-bulk-checks {
    grid-column: span 2;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .55rem;
    align-self: end;
}

    .pm-bulk-checks label {
        border: 1px solid #e5e7eb;
        border-radius: 14px;
        padding: .62rem .7rem;
        display: flex;
        align-items: center;
        gap: .5rem;
        background: #ffffff;
        color: #475569;
        font-weight: 800;
        font-size: .78rem;
        cursor: pointer;
    }

    .pm-bulk-checks input {
        accent-color: #dc2626;
    }

.pm-bulk-selected-badge {
    border-radius: 999px;
    padding: .35rem .75rem;
    background: #f1f5f9;
    color: #475569;
    font-weight: 950;
    font-size: .78rem;
    white-space: nowrap;
}

.pm-bulk-action-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .85rem;
}

.pm-bulk-action-card {
    border: 1px solid #e5e7eb;
    background: #ffffff;
    border-radius: 20px;
    padding: 1rem;
    display: flex;
    align-items: flex-start;
    gap: .8rem;
    text-align: inherit;
    cursor: pointer;
    min-height: 128px;
    transition: all .18s ease-in-out;
}

    .pm-bulk-action-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 16px 32px rgba(15, 23, 42, .10);
    }

    .pm-bulk-action-card > i {
        width: 46px;
        height: 46px;
        border-radius: 17px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 auto;
        font-size: 1.25rem;
        color: #ffffff;
    }

    .pm-bulk-action-card strong {
        display: block;
        color: #0f172a;
        font-weight: 950;
        margin-bottom: .25rem;
    }

    .pm-bulk-action-card span {
        display: block;
        color: #64748b;
        line-height: 1.5;
        font-size: .82rem;
    }

    .pm-bulk-action-card.primary > i {
        background: linear-gradient(135deg, #2563eb, #60a5fa);
    }

    .pm-bulk-action-card.success > i {
        background: linear-gradient(135deg, #16a34a, #4ade80);
    }

    .pm-bulk-action-card.warning > i {
        background: linear-gradient(135deg, #f59e0b, #fbbf24);
    }

    .pm-bulk-action-card.info > i {
        background: linear-gradient(135deg, #0284c7, #38bdf8);
    }

    .pm-bulk-action-card.dark > i {
        background: linear-gradient(135deg, #0f172a, #475569);
    }

    .pm-bulk-action-card.danger > i {
        background: linear-gradient(135deg, #dc2626, #f87171);
    }

    .pm-bulk-action-card.muted > i {
        background: linear-gradient(135deg, #64748b, #94a3b8);
    }

.pm-bulk-preview-summary {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: .75rem;
}

    .pm-bulk-preview-summary div {
        border: 1px solid #e5e7eb;
        background: #f8fafc;
        border-radius: 16px;
        padding: .85rem;
    }

    .pm-bulk-preview-summary span {
        display: block;
        color: #64748b;
        font-size: .76rem;
        font-weight: 800;
    }

    .pm-bulk-preview-summary strong {
        display: block;
        color: #0f172a;
        font-size: 1.5rem;
        font-weight: 950;
        line-height: 1;
        margin-top: .3rem;
    }

.pm-bulk-row-selected {
    background: #fff7ed !important;
}

.pm-bulk-flag {
    border-radius: 999px;
    padding: .22rem .55rem;
    font-size: .68rem;
    font-weight: 900;
}

    .pm-bulk-flag.danger {
        background: #fee2e2;
        color: #b91c1c;
    }

    .pm-bulk-flag.warning {
        background: #fff7ed;
        color: #c2410c;
    }

    .pm-bulk-flag.info {
        background: #e0f2fe;
        color: #0369a1;
    }

.pm-bulk-settings {
    display: flex;
    flex-direction: column;
    gap: .85rem;
}

.pm-bulk-rules {
    display: flex;
    flex-direction: column;
    gap: .7rem;
}

    .pm-bulk-rules div {
        border: 1px solid #e5e7eb;
        background: #ffffff;
        border-radius: 15px;
        padding: .75rem;
        display: flex;
        align-items: flex-start;
        gap: .55rem;
        color: #475569;
        line-height: 1.5;
        font-size: .84rem;
        font-weight: 750;
    }

    .pm-bulk-rules i {
        color: #dc2626;
        margin-top: .08rem;
    }

.pm-bulk-result-mini {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .55rem;
}

    .pm-bulk-result-mini div {
        border-radius: 15px;
        padding: .75rem;
        text-align: center;
    }

    .pm-bulk-result-mini span {
        display: block;
        font-size: .72rem;
        font-weight: 850;
        margin-bottom: .25rem;
    }

    .pm-bulk-result-mini strong {
        display: block;
        font-size: 1.4rem;
        font-weight: 950;
        line-height: 1;
    }

    .pm-bulk-result-mini .success {
        background: #dcfce7;
        color: #15803d;
    }

    .pm-bulk-result-mini .failed {
        background: #fee2e2;
        color: #b91c1c;
    }

    .pm-bulk-result-mini .skipped {
        background: #f1f5f9;
        color: #475569;
    }

.pm-bulk-result-badge {
    border-radius: 999px;
    padding: .28rem .65rem;
    font-size: .72rem;
    font-weight: 950;
    white-space: nowrap;
}

    .pm-bulk-result-badge.success {
        background: #dcfce7;
        color: #15803d;
    }

    .pm-bulk-result-badge.failed {
        background: #fee2e2;
        color: #b91c1c;
    }

    .pm-bulk-result-badge.skipped {
        background: #f1f5f9;
        color: #475569;
    }

.pm-bulk-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1060;
    background: rgba(15, 23, 42, .55);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.pm-bulk-modal {
    width: min(760px, 100%);
    background: #ffffff;
    border-radius: 26px;
    box-shadow: 0 28px 70px rgba(15, 23, 42, .30);
    overflow: hidden;
}

.pm-bulk-modal-header {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

    .pm-bulk-modal-header > div:first-child {
        display: flex;
        align-items: flex-start;
        gap: .8rem;
    }

        .pm-bulk-modal-header > div:first-child > i {
            width: 48px;
            height: 48px;
            border-radius: 18px;
            background: #fee2e2;
            color: #dc2626;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 1.25rem;
            flex: 0 0 auto;
        }

    .pm-bulk-modal-header h5 {
        color: #0f172a;
        font-weight: 950;
        margin: 0;
    }

    .pm-bulk-modal-header p {
        color: #64748b;
        margin: .25rem 0 0;
        line-height: 1.55;
    }

.pm-bulk-modal-body {
    padding: 1rem;
}

.pm-bulk-confirm-warning {
    border: 1px solid #fed7aa;
    background: #fff7ed;
    color: #9a3412;
    border-radius: 18px;
    padding: .85rem;
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    line-height: 1.55;
    font-weight: 800;
}

.pm-bulk-confirm-stats {
    margin-top: .9rem;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .75rem;
}

    .pm-bulk-confirm-stats div {
        border: 1px solid #e5e7eb;
        background: #f8fafc;
        border-radius: 16px;
        padding: .85rem;
    }

    .pm-bulk-confirm-stats span {
        display: block;
        color: #64748b;
        font-size: .75rem;
        font-weight: 850;
    }

    .pm-bulk-confirm-stats strong {
        display: block;
        color: #0f172a;
        font-size: 1.45rem;
        font-weight: 950;
        line-height: 1;
        margin-top: .25rem;
    }

.pm-bulk-modal-settings {
    margin-top: .9rem;
}

.pm-bulk-modal-footer {
    padding: 1rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .65rem;
}

@media (max-width: 1500px) {
    .pm-bulk-layout {
        grid-template-columns: 1fr;
    }

    .pm-bulk-side {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .pm-bulk-filter-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .pm-bulk-action-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 992px) {
    .pm-bulk-side {
        grid-template-columns: 1fr;
    }

    .pm-bulk-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pm-bulk-checks {
        grid-column: span 2;
    }

    .pm-bulk-preview-summary,
    .pm-bulk-confirm-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 576px) {
    .pm-bulk-filter-grid {
        grid-template-columns: 1fr;
    }

    .pm-bulk-checks {
        grid-column: span 1;
        grid-template-columns: 1fr;
    }

    .pm-bulk-action-grid {
        grid-template-columns: 1fr;
    }

    .pm-bulk-preview-summary,
    .pm-bulk-confirm-stats {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   PM Alerts Center
========================================================= */

.pm-alert-overview {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.pm-alert-summary-card {
    border: 1px solid #e5e7eb;
    background: #ffffff;
    border-radius: 22px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: .85rem;
    box-shadow: 0 14px 32px rgba(15, 23, 42, .06);
}

    .pm-alert-summary-card i {
        width: 52px;
        height: 52px;
        border-radius: 18px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 1.4rem;
    }

    .pm-alert-summary-card strong {
        display: block;
        color: #0f172a;
        font-size: 1.7rem;
        font-weight: 950;
        line-height: 1;
    }

    .pm-alert-summary-card span {
        display: block;
        color: #64748b;
        font-size: .82rem;
        font-weight: 850;
        margin-top: .25rem;
    }

    .pm-alert-summary-card.danger i {
        background: #fee2e2;
        color: #b91c1c;
    }

    .pm-alert-summary-card.warning i {
        background: #fff7ed;
        color: #c2410c;
    }

    .pm-alert-summary-card.critical i {
        background: #450a0a;
        color: #fecaca;
    }

    .pm-alert-summary-card.success i {
        background: #dcfce7;
        color: #15803d;
    }

.pm-alert-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 1rem;
    align-items: start;
}

.pm-alert-main {
    min-width: 0;
}

.pm-alert-side {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.pm-alert-side-card {
    margin-bottom: 0;
}

.pm-alert-filter-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: .85rem;
    align-items: end;
}

    .pm-alert-filter-grid .form-label,
    .pm-alert-scan-options .form-label {
        font-weight: 850;
        color: #475569;
        font-size: .82rem;
    }

.pm-alert-toolbar {
    display: flex;
    align-items: center;
    gap: .6rem;
    flex-wrap: wrap;
}

.pm-alert-count-badge {
    border-radius: 999px;
    padding: .35rem .75rem;
    background: #f1f5f9;
    color: #475569;
    font-weight: 950;
    font-size: .78rem;
    white-space: nowrap;
}

.pm-alert-scan-result {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .75rem;
}

    .pm-alert-scan-result div {
        border-radius: 16px;
        padding: .85rem;
        text-align: center;
    }

    .pm-alert-scan-result span {
        display: block;
        font-size: .76rem;
        font-weight: 850;
        margin-bottom: .25rem;
    }

    .pm-alert-scan-result strong {
        display: block;
        font-size: 1.55rem;
        font-weight: 950;
        line-height: 1;
    }

    .pm-alert-scan-result .created {
        background: #dcfce7;
        color: #15803d;
    }

    .pm-alert-scan-result .updated {
        background: #dbeafe;
        color: #1d4ed8;
    }

    .pm-alert-scan-result .resolved {
        background: #f1f5f9;
        color: #475569;
    }

    .pm-alert-scan-result .failed {
        background: #fee2e2;
        color: #b91c1c;
    }

.pm-alert-list {
    display: flex;
    flex-direction: column;
    gap: .8rem;
}

.pm-alert-card {
    border: 1px solid #e5e7eb;
    background: #ffffff;
    border-radius: 22px;
    padding: 1rem;
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) auto;
    gap: .9rem;
    align-items: start;
    transition: all .16s ease-in-out;
}

    .pm-alert-card:hover {
        box-shadow: 0 14px 28px rgba(15, 23, 42, .08);
        transform: translateY(-1px);
    }

    .pm-alert-card.unread {
        border-color: #fecaca;
        background: linear-gradient(90deg, rgba(254, 242, 242, .75), #ffffff 42%);
    }

    .pm-alert-card.resolved {
        opacity: .72;
        background: #f8fafc;
    }

.pm-alert-icon {
    width: 54px;
    height: 54px;
    border-radius: 19px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
}

.pm-alert-card.info .pm-alert-icon {
    background: #e0f2fe;
    color: #0369a1;
}

.pm-alert-card.warning .pm-alert-icon {
    background: #fff7ed;
    color: #c2410c;
}

.pm-alert-card.danger .pm-alert-icon {
    background: #fee2e2;
    color: #b91c1c;
}

.pm-alert-card.critical .pm-alert-icon {
    background: #450a0a;
    color: #fecaca;
}

.pm-alert-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .85rem;
}

    .pm-alert-title-row h5 {
        margin: 0;
        color: #0f172a;
        font-weight: 950;
    }

.pm-alert-meta {
    margin-top: .35rem;
    display: flex;
    align-items: center;
    gap: .4rem;
    flex-wrap: wrap;
}

    .pm-alert-meta span {
        border-radius: 999px;
        background: #f1f5f9;
        color: #64748b;
        padding: .2rem .55rem;
        font-size: .7rem;
        font-weight: 850;
    }

.pm-alert-content p {
    margin: .65rem 0 0;
    color: #475569;
    line-height: 1.65;
    font-weight: 650;
}

.pm-alert-source {
    margin-top: .65rem;
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
}

    .pm-alert-source span {
        color: #64748b;
        background: #f8fafc;
        border: 1px solid #e5e7eb;
        border-radius: 999px;
        padding: .25rem .6rem;
        font-size: .72rem;
        font-weight: 800;
    }

.pm-alert-badges {
    display: flex;
    align-items: center;
    gap: .4rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.pm-alert-severity,
.pm-alert-state {
    border-radius: 999px;
    padding: .28rem .65rem;
    font-size: .72rem;
    font-weight: 950;
    white-space: nowrap;
}

    .pm-alert-severity.info {
        background: #e0f2fe;
        color: #0369a1;
    }

    .pm-alert-severity.warning {
        background: #fff7ed;
        color: #c2410c;
    }

    .pm-alert-severity.danger {
        background: #fee2e2;
        color: #b91c1c;
    }

    .pm-alert-severity.critical {
        background: #450a0a;
        color: #fecaca;
    }

    .pm-alert-state.unread {
        background: #fee2e2;
        color: #b91c1c;
    }

    .pm-alert-state.read {
        background: #f1f5f9;
        color: #475569;
    }

    .pm-alert-state.resolved {
        background: #dcfce7;
        color: #15803d;
    }

.pm-alert-actions {
    display: flex;
    flex-direction: column;
    gap: .45rem;
    min-width: 130px;
}

.pm-alert-scan-options {
    display: flex;
    flex-direction: column;
    gap: .7rem;
}

    .pm-alert-scan-options label {
        border: 1px solid #e5e7eb;
        background: #ffffff;
        border-radius: 15px;
        padding: .7rem;
        display: flex;
        align-items: center;
        gap: .55rem;
        color: #475569;
        font-weight: 800;
        font-size: .82rem;
        cursor: pointer;
    }

    .pm-alert-scan-options input[type="checkbox"] {
        accent-color: #dc2626;
    }

.pm-alert-quick-links {
    display: flex;
    flex-direction: column;
    gap: .65rem;
}

    .pm-alert-quick-links button {
        border: 1px solid #e5e7eb;
        background: #ffffff;
        color: #0f172a;
        border-radius: 16px;
        padding: .75rem;
        display: flex;
        align-items: center;
        gap: .65rem;
        text-align: inherit;
        font-weight: 850;
        transition: all .16s ease-in-out;
    }

        .pm-alert-quick-links button:hover {
            background: #f8fafc;
            transform: translateY(-1px);
            box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
        }

    .pm-alert-quick-links i {
        width: 34px;
        height: 34px;
        border-radius: 13px;
        background: #f1f5f9;
        color: #dc2626;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

.pm-alert-rules {
    display: flex;
    flex-direction: column;
    gap: .7rem;
}

    .pm-alert-rules div {
        border: 1px solid #e5e7eb;
        background: #ffffff;
        border-radius: 15px;
        padding: .75rem;
        display: flex;
        align-items: flex-start;
        gap: .55rem;
        color: #475569;
        line-height: 1.5;
        font-size: .84rem;
        font-weight: 750;
    }

    .pm-alert-rules i {
        color: #dc2626;
        margin-top: .08rem;
    }

@media (max-width: 1400px) {
    .pm-alert-layout {
        grid-template-columns: 1fr;
    }

    .pm-alert-side {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .pm-alert-filter-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 992px) {
    .pm-alert-overview {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pm-alert-side {
        grid-template-columns: 1fr;
    }

    .pm-alert-card {
        grid-template-columns: 54px minmax(0, 1fr);
    }

    .pm-alert-actions {
        grid-column: 1 / -1;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .pm-alert-title-row {
        flex-direction: column;
    }

    .pm-alert-badges {
        justify-content: flex-start;
    }
}

@media (max-width: 576px) {
    .pm-alert-overview {
        grid-template-columns: 1fr;
    }

    .pm-alert-filter-grid {
        grid-template-columns: 1fr;
    }

    .pm-alert-scan-result {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* =========================================================
   Facilities Incidents
========================================================= */

.incident-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.incident-kpi-card {
    border: 1px solid #e5e7eb;
    background: #ffffff;
    border-radius: 22px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: .85rem;
    box-shadow: 0 14px 32px rgba(15, 23, 42, .06);
}

    .incident-kpi-card i {
        width: 52px;
        height: 52px;
        border-radius: 18px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 1.35rem;
    }

    .incident-kpi-card strong {
        display: block;
        color: #0f172a;
        font-size: 1.7rem;
        font-weight: 950;
        line-height: 1;
    }

    .incident-kpi-card span {
        display: block;
        color: #64748b;
        font-size: .82rem;
        font-weight: 850;
        margin-top: .25rem;
    }

    .incident-kpi-card.total i {
        background: #f1f5f9;
        color: #0f172a;
    }

    .incident-kpi-card.open i {
        background: #dbeafe;
        color: #1d4ed8;
    }

    .incident-kpi-card.converted i {
        background: #dcfce7;
        color: #15803d;
    }

    .incident-kpi-card.critical i {
        background: #fee2e2;
        color: #b91c1c;
    }

.incident-filter-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: .85rem;
    align-items: end;
}

    .incident-filter-grid .form-label,
    .incident-form-grid .form-label {
        font-weight: 850;
        color: #475569;
        font-size: .82rem;
    }

.incident-count-badge {
    border-radius: 999px;
    padding: .35rem .75rem;
    background: #f1f5f9;
    color: #475569;
    font-weight: 950;
    font-size: .78rem;
    white-space: nowrap;
}

.incident-priority-badge {
    border-radius: 999px;
    padding: .3rem .7rem;
    background: #f1f5f9;
    color: #475569;
    font-size: .74rem;
    font-weight: 950;
    white-space: nowrap;
}

    .incident-priority-badge.low {
        background: #dcfce7;
        color: #15803d;
    }

    .incident-priority-badge.medium {
        background: #fef9c3;
        color: #854d0e;
    }

    .incident-priority-badge.high {
        background: #ffedd5;
        color: #c2410c;
    }

    .incident-priority-badge.critical {
        background: #fee2e2;
        color: #b91c1c;
    }

.incident-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1060;
    background: rgba(15, 23, 42, .55);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.incident-modal {
    width: min(720px, 100%);
    max-height: calc(100vh - 2rem);
    background: #ffffff;
    border-radius: 26px;
    box-shadow: 0 28px 70px rgba(15, 23, 42, .30);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.incident-modal-lg {
    width: min(1100px, 100%);
}

.incident-modal-header {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

    .incident-modal-header > div:first-child {
        display: flex;
        align-items: flex-start;
        gap: .8rem;
    }

        .incident-modal-header > div:first-child > i {
            width: 48px;
            height: 48px;
            border-radius: 18px;
            background: #fee2e2;
            color: #dc2626;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 1.25rem;
            flex: 0 0 auto;
        }

    .incident-modal-header h5 {
        color: #0f172a;
        font-weight: 950;
        margin: 0;
    }

    .incident-modal-header p {
        color: #64748b;
        margin: .25rem 0 0;
        line-height: 1.55;
    }

.incident-modal-body {
    padding: 1rem;
    overflow: auto;
}

.incident-modal-footer {
    padding: 1rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .65rem;
}

.incident-form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .85rem;
}

    .incident-form-grid .span-2 {
        grid-column: span 2;
    }

    .incident-form-grid .span-3 {
        grid-column: span 3;
    }

@media (max-width: 1400px) {
    .incident-filter-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 992px) {
    .incident-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .incident-filter-grid,
    .incident-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

        .incident-form-grid .span-2,
        .incident-form-grid .span-3 {
            grid-column: span 2;
        }
}

@media (max-width: 576px) {
    .incident-kpi-grid,
    .incident-filter-grid,
    .incident-form-grid {
        grid-template-columns: 1fr;
    }

        .incident-form-grid .span-2,
        .incident-form-grid .span-3 {
            grid-column: span 1;
        }
}

/* =========================================================
   Incident Details
========================================================= */

.incident-details-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    gap: 1rem;
    align-items: start;
}

.incident-details-main,
.incident-details-side {
    min-width: 0;
}

.incident-details-hero {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.incident-details-icon {
    width: 68px;
    height: 68px;
    border-radius: 24px;
    background: #fee2e2;
    color: #dc2626;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    flex: 0 0 auto;
}

.incident-details-info h4 {
    color: #0f172a;
    font-weight: 950;
    margin: 0 0 .45rem;
}

.incident-details-info p {
    color: #475569;
    margin: 0;
    line-height: 1.8;
}

.incident-details-meta {
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: .6rem;
    flex-wrap: wrap;
}

    .incident-details-meta span {
        border-radius: 999px;
        padding: .35rem .75rem;
        background: #f8fafc;
        color: #475569;
        border: 1px solid #e5e7eb;
        font-size: .78rem;
        font-weight: 850;
    }

.incident-info-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .85rem;
}

.incident-info-item {
    border: 1px solid #e5e7eb;
    background: #f8fafc;
    border-radius: 18px;
    padding: .85rem;
}

    .incident-info-item label {
        display: block;
        color: #64748b;
        font-size: .75rem;
        font-weight: 900;
        margin-bottom: .3rem;
    }

    .incident-info-item strong {
        display: block;
        color: #0f172a;
        font-size: .92rem;
        font-weight: 950;
    }

.incident-timeline {
    position: relative;
    display: grid;
    gap: .85rem;
}

.incident-timeline-item {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: .7rem;
    position: relative;
}

.incident-timeline-dot {
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: #dc2626;
    margin-top: .35rem;
    box-shadow: 0 0 0 5px #fee2e2;
}

.incident-timeline-content {
    border: 1px solid #e5e7eb;
    background: #ffffff;
    border-radius: 18px;
    padding: .85rem;
}

.incident-timeline-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
    flex-wrap: wrap;
}

    .incident-timeline-title strong {
        color: #0f172a;
        font-weight: 950;
    }

    .incident-timeline-title span {
        color: #64748b;
        font-size: .75rem;
        font-weight: 850;
    }

.incident-timeline-content p {
    color: #475569;
    margin: .45rem 0;
    line-height: 1.6;
}

.incident-timeline-content small {
    color: #64748b;
    font-weight: 800;
}

.incident-comments-list,
.incident-attachments-list {
    display: grid;
    gap: .75rem;
}

.incident-comment-item {
    border: 1px solid #e5e7eb;
    background: #ffffff;
    border-radius: 18px;
    padding: .85rem;
}

.incident-comment-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
    flex-wrap: wrap;
    margin-bottom: .45rem;
}

    .incident-comment-header strong {
        color: #0f172a;
        font-weight: 950;
    }

    .incident-comment-header span {
        color: #64748b;
        font-size: .73rem;
        font-weight: 850;
    }

.incident-comment-item p {
    color: #475569;
    margin: 0 0 .45rem;
    line-height: 1.7;
}

.incident-comment-item small {
    border-radius: 999px;
    padding: .25rem .55rem;
    background: #f1f5f9;
    color: #475569;
    font-size: .72rem;
    font-weight: 900;
}

.incident-attachment-item {
    border: 1px solid #e5e7eb;
    background: #ffffff;
    border-radius: 18px;
    padding: .75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .7rem;
}

    .incident-attachment-item > div:first-child {
        display: flex;
        align-items: center;
        gap: .65rem;
        min-width: 0;
    }

        .incident-attachment-item > div:first-child > i {
            width: 42px;
            height: 42px;
            border-radius: 14px;
            background: #f1f5f9;
            color: #334155;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            flex: 0 0 auto;
        }

    .incident-attachment-item strong {
        display: block;
        color: #0f172a;
        font-weight: 950;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 220px;
    }

    .incident-attachment-item small {
        display: block;
        color: #64748b;
        font-size: .72rem;
        font-weight: 800;
    }

@media (max-width: 1200px) {
    .incident-details-layout {
        grid-template-columns: 1fr;
    }

    .incident-details-side {
        order: 2;
    }
}

@media (max-width: 768px) {
    .incident-details-hero {
        flex-direction: column;
    }

    .incident-info-grid {
        grid-template-columns: 1fr;
    }

    .incident-attachment-item {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* =========================================================
   Incident Settings
========================================================= */

.incident-settings-filter {
    display: grid;
    grid-template-columns: 1fr 220px auto;
    gap: .85rem;
    align-items: end;
}

@media (max-width: 768px) {
    .incident-settings-filter {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   Incident Review Checklist
========================================================= */

.incident-review-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.incident-review-card {
    border: 1px solid #e5e7eb;
    background: #ffffff;
    border-radius: 22px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: .85rem;
    box-shadow: 0 14px 32px rgba(15, 23, 42, .06);
}

    .incident-review-card i {
        width: 52px;
        height: 52px;
        border-radius: 18px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 1.35rem;
    }

    .incident-review-card strong {
        display: block;
        color: #0f172a;
        font-size: 1.7rem;
        font-weight: 950;
        line-height: 1;
    }

    .incident-review-card span {
        display: block;
        color: #64748b;
        font-size: .82rem;
        font-weight: 850;
        margin-top: .25rem;
    }

    .incident-review-card.success i {
        background: #dcfce7;
        color: #15803d;
    }

    .incident-review-card.warning i {
        background: #fef9c3;
        color: #854d0e;
    }

    .incident-review-card.danger i {
        background: #fee2e2;
        color: #b91c1c;
    }

    .incident-review-card.info i {
        background: #dbeafe;
        color: #1d4ed8;
    }

.incident-review-snapshot {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .85rem;
}

    .incident-review-snapshot div {
        border: 1px solid #e5e7eb;
        background: #f8fafc;
        border-radius: 18px;
        padding: .85rem;
    }

    .incident-review-snapshot label {
        display: block;
        color: #64748b;
        font-size: .75rem;
        font-weight: 900;
        margin-bottom: .3rem;
    }

    .incident-review-snapshot strong {
        display: block;
        color: #0f172a;
        font-size: 1.25rem;
        font-weight: 950;
    }

.incident-review-list {
    display: grid;
    gap: 1rem;
}

.incident-review-group {
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    padding: 1rem;
    background: #f8fafc;
}

.incident-review-group-title {
    display: flex;
    align-items: center;
    gap: .55rem;
    margin-bottom: .85rem;
    color: #0f172a;
}

    .incident-review-group-title i {
        color: #dc2626;
        font-size: 1.1rem;
    }

    .incident-review-group-title strong {
        font-weight: 950;
    }

.incident-review-item {
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    background: #ffffff;
    padding: .85rem;
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: .75rem;
}

    .incident-review-item + .incident-review-item {
        margin-top: .7rem;
    }

.incident-review-item-icon {
    width: 42px;
    height: 42px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.incident-review-item.passed .incident-review-item-icon {
    background: #dcfce7;
    color: #15803d;
}

.incident-review-item.warning .incident-review-item-icon {
    background: #fef9c3;
    color: #854d0e;
}

.incident-review-item.failed .incident-review-item-icon {
    background: #fee2e2;
    color: #b91c1c;
}

.incident-review-item.info .incident-review-item-icon {
    background: #dbeafe;
    color: #1d4ed8;
}

.incident-review-item-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    flex-wrap: wrap;
}

    .incident-review-item-title strong {
        color: #0f172a;
        font-weight: 950;
    }

    .incident-review-item-title span {
        border-radius: 999px;
        padding: .25rem .6rem;
        background: #f1f5f9;
        color: #475569;
        font-size: .72rem;
        font-weight: 900;
    }

.incident-review-item p {
    color: #475569;
    margin: .45rem 0 0;
    line-height: 1.65;
}

@media (max-width: 992px) {
    .incident-review-summary,
    .incident-review-snapshot {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 576px) {
    .incident-review-summary,
    .incident-review-snapshot {
        grid-template-columns: 1fr;
    }

    .incident-review-item {
        grid-template-columns: 1fr;
    }
}
