/* ==========================================================================
   ServiceIsDown Incidents — visual layer
   Dedicated to /incidents. Shared header/footer remain in serviceisdown.css.
   ========================================================================== */

.incidents-target {
    --inc-red:#f0222f;
    --inc-orange:#f79009;
    --inc-green:#12b76a;
    --inc-yellow:#eaaa08;
    --inc-blue:#3975f6;
    --inc-text:#101828;
    --inc-muted:#475467;
    --inc-border:#e2e6ed;
    background:#fff;
    color:var(--inc-text);
}

.incidents-target__hero {
    padding:43px 0 31px;
    border-bottom:1px solid #e7eaf0;
}

.incidents-target__hero-inner {
    display:grid;
    grid-template-columns:minmax(0,1fr) 630px;
    align-items:center;
    gap:48px;
}

.incidents-target__intro h1 {
    margin:0;
    font-size:2.25rem;
    line-height:1.05;
    font-weight:700;
    letter-spacing:-.045em;
}

.incidents-target__intro p {
    margin:13px 0 0;
    color:var(--inc-muted);
    font-size:.88rem;
}

.incidents-target__metrics {
    display:grid;
    grid-template-columns:repeat(4,1fr);
    overflow:hidden;
    border:1px solid var(--inc-border);
    border-radius:10px;
    background:#fff;
    box-shadow:0 8px 24px rgba(16,24,40,.035);
}

.incidents-target__metric {
    min-height:78px;
    display:grid;
    grid-template-columns:36px minmax(0,1fr);
    align-items:center;
    gap:10px;
    padding:12px 13px;
    border-right:1px solid var(--inc-border);
}

.incidents-target__metric:last-child { border-right:0; }

.incidents-target__metric-icon {
    width:36px;
    height:36px;
    display:grid;
    place-items:center;
    border-radius:50%;
}
.incidents-target__metric-icon svg {
    width:17px;
    height:17px;
    fill:none;
    stroke:currentColor;
    stroke-width:1.8;
    stroke-linecap:round;
    stroke-linejoin:round;
}
.incidents-target__metric-icon.red { background:#ffe8eb;color:#e1192d; }
.incidents-target__metric-icon.orange { background:#fff1e4;color:#e87900; }
.incidents-target__metric-icon.green { background:#e8f8f0;color:#16a163; }
.incidents-target__metric-icon.blue { background:#edf2ff;color:#3975f6; }

.incidents-target__metric small {
    display:block;
    color:#344054;
    font-size:.59rem;
    font-weight:650;
    line-height:1.25;
    white-space:nowrap;
}
.incidents-target__metric small span {
    color:#667085;
    font-weight:600;
}

.incidents-target__metric strong {
    display:block;
    margin-top:4px;
    font-size:1.35rem;
    line-height:1;
    letter-spacing:-.035em;
}

.incidents-target__toolbar {
    border-bottom:1px solid var(--inc-border);
}

.incidents-target__toolbar-inner {
    min-height:61px;
    display:flex;
    align-items:center;
    justify-content:flex-start;
    gap:24px;
}

.incidents-target__tabs {
    align-self:stretch;
    display:flex;
    align-items:stretch;
    gap:5px;
}

.incidents-target__tabs a {
    position:relative;
    display:flex;
    align-items:center;
    padding:0 17px;
    color:#344054;
    font-size:.72rem;
    font-weight:600;
    text-decoration:none;
}

.incidents-target__tabs a.is-active { color:var(--inc-red); }
.incidents-target__tabs a.is-active::after {
    content:"";
    position:absolute;
    left:10px;
    right:10px;
    bottom:-1px;
    height:2px;
    background:var(--inc-red);
}

.incidents-target__service-search svg {
    width:15px;
    fill:none;
    stroke:#475467;
    stroke-width:1.8;
}

.incidents-target__content {
    display:grid;
    grid-template-columns:238px minmax(0,1fr);
    gap:20px;
    padding-top:20px;
    padding-bottom:48px;
}

.incidents-target__filters {
    align-self:start;
    padding:17px 14px 14px;
    border:1px solid var(--inc-border);
    border-radius:9px;
    background:#fff;
    box-shadow:0 5px 18px rgba(16,24,40,.025);
}

.incidents-target__filter-head {
    display:flex;
    align-items:center;
    justify-content:space-between;
    margin-bottom:18px;
}
.incidents-target__filter-head strong { color:#475467;font-size:.62rem;letter-spacing:.03em; }
.incidents-target__filter-head a { color:var(--inc-red);font-size:.62rem;text-decoration:none; }

.incidents-target__filter-group { margin-top:18px; }
.incidents-target__filter-group h2 { margin:0 0 10px;font-size:.64rem;font-weight:700; }

.incidents-target__filter-group > label:not(.incidents-target__service-search) {
    min-height:29px;
    display:grid;
    grid-template-columns:14px 7px minmax(0,1fr) auto;
    align-items:center;
    gap:7px;
    margin:0;
    color:#344054;
    font-size:.64rem;
    cursor:pointer;
}
.incidents-target__filter-group label b { color:#667085;font-size:.61rem;font-weight:500; }
.incidents-target__filter-group input[type="checkbox"] { width:13px;height:13px;margin:0;accent-color:var(--inc-red); }

.filter-dot { width:6px;height:6px;border-radius:50%; }
.filter-dot.red { background:var(--inc-red); }
.filter-dot.orange { background:var(--inc-orange); }
.filter-dot.green { background:var(--inc-green); }
.filter-dot.yellow { background:var(--inc-yellow); }
.filter-dot.blue { background:var(--inc-blue); }

.incidents-target__service-search {
    height:35px;
    display:flex;
    align-items:center;
    gap:7px;
    padding:0 9px;
    border:1px solid #d9dee8;
    border-radius:6px;
}
.incidents-target__service-search input { min-width:0;width:100%;border:0;outline:0;font-size:.62rem; }
.incidents-target__service-search svg { flex:0 0 auto; }

.incidents-target__filter-group > select {
    width:100%;
    height:35px;
    padding:0 9px;
    border:1px solid #d9dee8;
    border-radius:6px;
    background:#fff;
    color:#344054;
    font-size:.62rem;
}

.incidents-target__apply {
    width:100%;
    min-height:36px;
    margin-top:14px;
    border:0;
    border-radius:6px;
    background:#101828;
    color:#fff;
    font-size:.62rem;
    font-weight:700;
}

.incidents-target__listing { min-width:0; }

.incidents-target__table {
    overflow:hidden;
    border:1px solid var(--inc-border);
    border-radius:9px;
    background:#fff;
}

.incidents-target__table-head,
.incidents-target__row {
    display:grid;
    grid-template-columns:1.25fr 2.55fr .9fr .82fr .72fr 18px;
    gap:12px;
    align-items:center;
}

.incidents-target__table-head {
    min-height:43px;
    padding:0 16px;
    border-bottom:1px solid var(--inc-border);
    color:#344054;
    font-size:.61rem;
    font-weight:700;
}

.incidents-target__row {
    min-height:64px;
    padding:8px 16px;
    border-bottom:1px solid #e7eaf0;
    color:inherit;
    text-decoration:none;
    transition:background .14s ease;
}
.incidents-target__row:last-child { border-bottom:0; }
.incidents-target__row:hover { background:#fcfcfd; }

.incidents-target__service-cell {
    min-width:0;
    display:grid;
    grid-template-columns:35px minmax(0,1fr);
    align-items:center;
    gap:10px;
}

.incidents-target__service-logo {
    width:32px;height:32px;display:grid;place-items:center;overflow:hidden;
    border-radius:8px;background:#f2f4f7;
}
.incidents-target__service-logo img { width:100%;height:100%;object-fit:cover; }
.incidents-target__service-logo i { font-style:normal;font-size:.72rem;font-weight:800;color:#344054; }

.incidents-target__service-cell strong,
.incidents-target__incident-cell strong {
    display:block;
    overflow:hidden;
    color:#101828;
    font-size:.68rem;
    font-weight:700;
    line-height:1.3;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.incidents-target__service-cell small,
.incidents-target__incident-cell small {
    display:block;
    overflow:hidden;
    margin-top:3px;
    color:#667085;
    font-size:.59rem;
    line-height:1.35;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.incidents-target__pill {
    display:inline-flex;
    align-items:center;
    gap:5px;
    padding:4px 8px;
    border-radius:999px;
    font-size:.57rem;
    font-style:normal;
    font-weight:700;
    white-space:nowrap;
}
.incidents-target__pill i { width:5px;height:5px;border-radius:50%;background:currentColor; }

.status-ongoing { background:#ffe8eb;color:#e1192d; }
.status-monitoring { background:#fff1e4;color:#e87900; }
.status-resolved { background:#e8f8f0;color:#169b62; }
.status-neutral { background:#f2f4f7;color:#667085; }
.severity-critical { background:#ffe8eb;color:#d92d20; }
.severity-major { background:#fff1e4;color:#e87900; }
.severity-minor { background:#fff7d6;color:#b77900; }
.severity-informational { background:#edf2ff;color:#3975f6; }

.incidents-target__date,
.incidents-target__updated {
    color:#344054;
    font-size:.6rem;
    line-height:1.35;
}
.incidents-target__date small { display:block;margin-top:2px;color:#667085;font-size:.58rem; }
.incidents-target__arrow { color:#344054;font-size:1rem;text-align:right; }

.incidents-target__empty {
    min-height:310px;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    padding:40px 20px;
    text-align:center;
}
.incidents-target__empty-icon {
    width:42px;height:42px;display:grid;place-items:center;border-radius:50%;
    background:#e8f8f0;color:#169b62;font-weight:800;
}
.incidents-target__empty h2 { margin:14px 0 0;font-size:.88rem; }
.incidents-target__empty p { max-width:360px;margin:7px 0 0;color:#667085;font-size:.67rem;line-height:1.5; }

.incidents-target__pagination {
    min-height:55px;
    display:grid;
    grid-template-columns:1fr auto 1fr;
    align-items:center;
    gap:18px;
    color:#667085;
    font-size:.6rem;
}
.incidents-target__pages { display:flex;gap:6px; }
.incidents-target__pages a,
.incidents-target__pages > span {
    width:30px;
    height:30px;
    display:grid;
    place-items:center;
    border:1px solid #d9dee8;
    border-radius:6px;
    background:#fff;
    color:#344054;
    font-size:.65rem;
    text-decoration:none;
}
.incidents-target__pages a:hover { background:#f8fafc; }
.incidents-target__pages > span.is-active {
    border-color:var(--inc-red);
    background:var(--inc-red);
    color:#fff;
}
.incidents-target__pages > span.is-disabled { color:#c1c7d0; }
.incidents-target__pagination-spacer { justify-self:end; }

@media (max-width:1050px) {
    .incidents-target__hero-inner { grid-template-columns:1fr;gap:24px; }
    .incidents-target__metrics { max-width:620px; }
    .incidents-target__content { grid-template-columns:210px minmax(0,1fr); }
    .incidents-target__table-head,
    .incidents-target__row { grid-template-columns:1.15fr 2.15fr .85fr .75fr 18px; }
    .incidents-target__table-head > span:nth-child(5),
    .incidents-target__row > span:nth-child(5) { display:none; }
}

@media (max-width:820px) {
    .incidents-target__content { grid-template-columns:1fr; }
    .incidents-target__filters { display:none; }
    .incidents-target__toolbar-inner { align-items:stretch;flex-direction:column;padding-top:8px;padding-bottom:8px; }
    .incidents-target__tabs { min-height:44px;overflow-x:auto; }
    .incidents-target__table-head { display:none; }
    .incidents-target__row {
        grid-template-columns:minmax(130px,.8fr) minmax(0,1.3fr) auto 18px;
        min-height:74px;
    }
    .incidents-target__row > span:nth-child(4),
    .incidents-target__row > span:nth-child(5),
    .incidents-target__row > span:nth-child(6) { display:none; }
}

@media (max-width:620px) {
    .incidents-target__hero { padding-top:30px; }
    .incidents-target__hero-inner { gap:20px; }
    .incidents-target__intro h1 { font-size:1.9rem; }
    .incidents-target__metrics { grid-template-columns:1fr 1fr; }
    .incidents-target__metric:nth-child(2) { border-right:0; }
    .incidents-target__metric:nth-child(n+3) { border-top:1px solid var(--inc-border); }
    .incidents-target__toolbar { overflow:hidden; }
    .incidents-target__tabs a { padding:0 12px;white-space:nowrap; }
    .incidents-target__row { grid-template-columns:1fr auto 18px;gap:9px; }
    .incidents-target__row > span:nth-child(2) { display:none; }
    .incidents-target__pagination { grid-template-columns:1fr auto; }
    .incidents-target__pagination > span { display:none; }
    .incidents-target__pagination-spacer { display:none; }
}


/* Home-aligned incidents hero — final desktop metric typography refinement */
@media (min-width: 1051px) {
    .incidents-target__metric {
        gap: 10px;
        padding-left: 13px;
        padding-right: 12px;
    }

    .incidents-target__metric small {
        font-size: .61rem;
        line-height: 1.2;
        letter-spacing: -.01em;
    }

    .incidents-target__metric small .incidents-target__metric-period {
        color: #667085;
        font-size: .56rem;
        font-weight: 600;
    }

    .incidents-target__metric strong {
        margin-top: 4px;
    }

    .incidents-target__metric:last-child {
        padding-right: 15px;
    }
}


/* Incidents hero — locked metric label structure */
.incidents-target__metric small {
    white-space: normal;
}

.incidents-target__metric small .incidents-target__metric-period {
    display: block;
    margin-top: 2px;
    color: #667085;
    font-size: .54rem;
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: 0;
    white-space: nowrap;
}

/* Service filter helper text */
.incidents-target__service-hint {
    display: block;
    margin: 5px 0 0;
    color: #667085;
    font-size: .58rem;
    font-weight: 400;
    line-height: 1.35;
}


/* Service autocomplete dropdown */
.incidents-target__service-autocomplete {
    position: relative;
}

.incidents-target__service-suggestions {
    position: absolute;
    z-index: 30;
    top: 39px;
    left: 0;
    right: 0;
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid #d9dee8;
    border-radius: 7px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(16,24,40,.12);
}

.incidents-target__service-suggestions[hidden] {
    display: none;
}

.incidents-target__service-option {
    width: 100%;
    display: grid;
    grid-template-columns: 30px minmax(0,1fr);
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    border: 0;
    border-bottom: 1px solid #eef1f5;
    background: #fff;
    color: #101828;
    text-align: left;
    cursor: pointer;
}

.incidents-target__service-option:last-child {
    border-bottom: 0;
}

.incidents-target__service-option:hover,
.incidents-target__service-option.is-active {
    background: #f8fafc;
}

.incidents-target__service-option-icon {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 7px;
    background: #f2f4f7;
    color: #344054;
    font-size: .66rem;
    font-weight: 700;
}

.incidents-target__service-option-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.incidents-target__service-option-copy {
    min-width: 0;
    display: block;
}

.incidents-target__service-option-copy strong {
    display: block;
    overflow: hidden;
    color: #101828;
    font-size: .64rem;
    font-weight: 700;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.incidents-target__service-option-copy small {
    display: block;
    overflow: hidden;
    margin-top: 2px;
    color: #667085;
    font-size: .55rem;
    font-weight: 400;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.incidents-target__service-message {
    padding: 10px;
    color: #667085;
    font-size: .59rem;
    line-height: 1.4;
}

.incidents-target__service-selected {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 6px;
    padding: 6px 8px;
    border-radius: 6px;
    background: #f8fafc;
    color: #344054;
    font-size: .59rem;
}

.incidents-target__service-selected[hidden] {
    display: none;
}

.incidents-target__service-selected button {
    flex: 0 0 auto;
    border: 0;
    background: transparent;
    color: #667085;
    font-size: .8rem;
    line-height: 1;
    cursor: pointer;
}



/* ==========================================================================
   /incidents — mobile incident card refinement
   Desktop rules above remain unchanged.
   ========================================================================== */

.incidents-target__mobile-label {
    display: none;
}

@media (max-width: 620px) {
    .incidents-target__content {
        padding-top: 20px;
        padding-bottom: 34px;
    }

    .incidents-target__listing {
        width: 100%;
    }

    .incidents-target__table {
        overflow: visible;
        border: 0;
        border-radius: 0;
        background: transparent;
    }

    .incidents-target__row {
        position: relative;
        display: grid;
        grid-template-columns: minmax(0,1fr) auto;
        grid-template-areas:
            "service status"
            "incident incident"
            "dates arrow";
        gap: 0 12px;
        min-height: 0;
        padding: 15px 15px 14px;
        border: 1px solid var(--inc-border);
        border-radius: 9px;
        background: #fff;
    }

    .incidents-target__row:last-child {
        border-bottom: 1px solid var(--inc-border);
    }

    .incidents-target__service-cell {
        grid-area: service;
        grid-template-columns: 34px minmax(0,1fr);
        gap: 10px;
        min-width: 0;
    }

    .incidents-target__service-logo {
        width: 32px;
        height: 32px;
        border-radius: 7px;
    }

    .incidents-target__service-cell strong {
        font-size: .68rem;
    }

    .incidents-target__service-cell small {
        display: none;
    }

    .incidents-target__incident-cell {
        grid-area: incident;
        display: block !important;
        min-width: 0;
        margin-top: 13px;
        padding-top: 12px;
        border-top: 1px solid #eef1f5;
    }

    .incidents-target__incident-cell strong {
        overflow: visible;
        font-size: .72rem;
        line-height: 1.35;
        white-space: normal;
        text-overflow: clip;
    }

    .incidents-target__incident-cell small {
        display: -webkit-box;
        overflow: hidden;
        margin-top: 4px;
        font-size: .6rem;
        line-height: 1.4;
        white-space: normal;
        text-overflow: clip;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    .incidents-target__status-cell {
        grid-area: status;
        display: block !important;
        align-self: center;
        justify-self: end;
    }

    .incidents-target__pill {
        padding: 4px 8px;
        font-size: .56rem;
    }

    .incidents-target__date {
        grid-area: dates;
        display: flex !important;
        align-items: center;
        flex-wrap: wrap;
        gap: 3px 5px;
        margin-top: 13px;
        color: #344054;
        font-size: .58rem;
    }

    .incidents-target__date small {
        display: inline;
        margin: 0;
        font-size: .58rem;
    }

    .incidents-target__date small::before {
        content: "·";
        margin-right: 5px;
        color: #98a2b3;
    }

    .incidents-target__updated {
        grid-area: dates;
        display: flex !important;
        align-items: center;
        gap: 5px;
        margin-top: 13px;
        margin-left: 150px;
        color: #344054;
        font-size: .58rem;
    }

    .incidents-target__mobile-label {
        display: inline;
        color: #98a2b3;
        font-size: .54rem;
        font-weight: 600;
    }

    .incidents-target__arrow {
        grid-area: arrow;
        display: block !important;
        align-self: end;
        justify-self: end;
        margin-top: 11px;
        color: #667085;
        font-size: 1rem;
    }

    .incidents-target__pagination {
        min-height: 52px;
        display: flex;
        justify-content: flex-start;
    }

    .incidents-target__pages {
        margin: 0;
    }
}

@media (max-width: 430px) {
    .incidents-target__updated {
        margin-left: 130px;
    }
}


/* ==========================================================================
   /incidents — mobile filter disclosure
   ========================================================================== */

.incidents-target__mobile-filterbar {
    display: none;
}

@media (max-width: 820px) {
    .incidents-target__mobile-filterbar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
    }

    .incidents-target__mobile-filter-toggle {
        min-height: 38px;
        display: inline-flex;
        align-items: center;
        gap: 7px;
        padding: 0 13px;
        border: 1px solid #d9dee8;
        border-radius: 7px;
        background: #fff;
        color: #344054;
        font: inherit;
        font-size: .66rem;
        font-weight: 700;
        cursor: pointer;
    }

    .incidents-target__mobile-filter-toggle svg {
        width: 15px;
        height: 15px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.8;
        stroke-linecap: round;
    }

    .incidents-target__mobile-filter-toggle.is-active {
        border-color: #cfd5df;
        background: #f8fafc;
        color: #101828;
    }

    .incidents-target__mobile-result-count {
        color: #667085;
        font-size: .62rem;
        font-weight: 600;
        white-space: nowrap;
    }

    .incidents-target__filters.is-mobile-open {
        display: block;
    }
}

@media (max-width: 620px) {
    .incidents-target__content {
        gap: 12px;
    }

    .incidents-target__mobile-filterbar {
        min-height: 42px;
    }

    .incidents-target__filters {
        padding: 16px 14px 14px;
        border-radius: 9px;
        box-shadow: none;
    }

    .incidents-target__filter-head {
        margin-bottom: 14px;
    }

    .incidents-target__filter-head strong {
        font-size: .64rem;
    }

    .incidents-target__filter-head a {
        font-size: .62rem;
    }

    .incidents-target__filter-group {
        margin-top: 16px;
    }

    .incidents-target__filter-group h2 {
        margin-bottom: 9px;
        font-size: .66rem;
    }

    .incidents-target__filter-group > label:not(.incidents-target__service-search) {
        min-height: 34px;
        font-size: .66rem;
    }

    .incidents-target__service-search,
    .incidents-target__filter-group > select {
        height: 40px;
    }

    .incidents-target__service-search input,
    .incidents-target__filter-group > select {
        font-size: .66rem;
    }

    .incidents-target__service-hint {
        margin-top: 6px;
        font-size: .58rem;
    }

    .incidents-target__apply {
        min-height: 40px;
        margin-top: 16px;
        font-size: .66rem;
    }
}

