.unit-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(480px, 1fr));
    gap: 1.5rem;
    align-items: start;
}

.unit-card-grid > * {
    align-self: start;
}

.incidents-page .incident-unit-card {
    position: relative;
    align-self: start;
    height: auto;
    min-height: unset;
    background: #fff;
    border: 1px solid #f1f3f5;
    border-radius: 1rem;
    box-shadow: 0 0.25rem 1rem rgba(0,0,0,0.06);
    overflow: visible;
    cursor: default;
}
.incident-unit-card-content {
    padding: 1.5rem;
}

.incidents-page .incident-unit-card-content {
    padding: 1.5rem;
}

.incidents-page .incident-unit-card-info {
    width: 100%;
}

.unit-card-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.unit-id-visible {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    color: #6c757d;
}

.unit-status-row {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-top: 1.1rem;
}

.summary-card {
    background: #fff;
    border-radius: 1rem;
    padding: 1.25rem;
    box-shadow: 0 0.25rem 1rem rgba(0,0,0,0.06);
    border: 1px solid #f1f3f5;
}

.summary-label {
    color: #6c757d;
    font-size: 0.9rem;
}

.summary-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.1;
}

.summary-status-open {
    border-left: 4px solid #343a40;
}

.summary-status-acknowledged {
    border-left: 4px solid #198754;
}

.summary-status-resolved {
    border-left: 4px solid #ced4da;
}

.summary-total {
    border-left: 4px solid #0d6efd;
}

.incident-accordion {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.accordion-section {
    border: 1px solid #e9ecef;
    border-radius: 0.85rem;
    overflow: hidden;
    background: #fff;
}

.accordion-header-button {
    width: 100%;
    border: 0;
    background: #f8f9fa;
    padding: 0.85rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #343a40;
    font-weight: 700;
    text-align: left;
}

.accordion-header-button:hover {
    background: #f1f3f5;
}

.accordion-count {
    border-radius: 999px;
    background: #e9ecef;
    color: #495057;
    min-width: 1.75rem;
    height: 1.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    padding: 0 0.45rem;
}

.accordion-body-content {
    padding: 1rem;
    border-top: 1px solid #e9ecef;
}

.incident-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.incident-mini-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-left: 4px solid #6c757d;
    border-radius: 0.85rem;
    padding: 1rem 1.1rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.incident-mini-card.severity-alarm {
    border-left-color: #dc3545;
    background: #fffafa;
}

.incident-mini-card.severity-warning {
    border-left-color: #ffc107;
    background: #fffdf5;
}

.incident-mini-card.severity-info {
    border-left-color: #0dcaf0;
    background: #f5fdff;
}

.incident-mini-card.severity-unknown {
    border-left-color: #6c757d;
    background: #fafafa;
}

.incident-meta-compact {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
}

.empty-active-state {
    color: #198754;
    background: #f3fbf7;
    border: 1px solid #d6f0e0;
    border-radius: 0.75rem;
    padding: 0.85rem;
    font-size: 0.95rem;
}

.clickable-incident-card {
    cursor: pointer;
}

.clickable-incident-card:focus {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

.incidents-page .incident-unit-card,
.incidents-page .incident-unit-card:hover,
.incidents-page .incident-mini-card,
.incidents-page .incident-mini-card:hover,
.incidents-page .clickable-incident-card,
.incidents-page .clickable-incident-card:hover {
    transform: none !important;
    transition: none !important;
}

.incidents-page .unit-card-grid {
    align-items: start;
}

.incidents-page .unit-card-grid > .incident-unit-card {
    align-self: start;
}

.incidents-page .incident-mini-card,
.incidents-page .incident-mini-card:hover,
.incidents-page .clickable-incident-card,
.incidents-page .clickable-incident-card:hover {
    box-shadow: 0 1px 4px rgba(0,0,0,0.06) !important;
}

.incidents-page .incident-unit-card .unit-id-visible {
    opacity: 1;
    visibility: visible;
    display: block;
    color: #6c757d;
}

.incidents-page .incidentRuleSet-name {
    font-weight: 700;
    font-size: 1.05rem;
    color: #212529;
    line-height: 1.3;
}

.incidents-page .incidentRuleSet-description {
    margin-top: 0.25rem;
    color: #6c757d;
    font-size: 0.9rem;
}

.incidents-page .incident-badge {
    position: absolute;
    top: -0.65rem;
    right: -0.65rem;
    min-width: 1.9rem;
    height: 1.9rem;
    padding: 0 0.5rem;
    border-radius: 999px;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    box-shadow: 0 0.2rem 0.5rem rgba(0,0,0,0.15);
}

.incidents-page .incident-badge.open-count {
    background: #D90000;
    color: #fff;
}

.clickable-table-row:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

@media (max-width: 992px) {
    .unit-card-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .unit-card-grid {
        grid-template-columns: 1fr;
    }

    .incidents-page .incident-unit-card-content {
        padding: 1.25rem;
    }

    .accordion-body-content {
        padding: 0.85rem;
    }

    .incident-mini-card {
        padding: 0.9rem;
    }
}