/* =========================
   SUMMARY
========================= */

.log-summary {
    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 14px;

    margin-top: 18px;
}

.summary-card {
    display: flex;

    align-items: center;

    gap: 12px;

    background: white;

    border: 1px solid var(--border);

    border-radius: 12px;

    padding: 16px;

    box-shadow: var(--shadow);
}

.summary-icon {
    width: 36px;
    height: 36px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 9px;

    background: #f9fafb;

    color: #6b7280;

    font-size: 15px;
}

.summary-card span {
    display: block;

    color: #9ca3af;

    font-size: 10px;

    margin-bottom: 4px;
}

.summary-card strong {
    font-size: 17px;
}

.download-button {
    border: none;

    background: transparent;

    padding: 0;

    color: #d97706;

    font-family: inherit;

    font-size: 12px;

    font-weight: 700;

    cursor: pointer;
}

.download-button:hover {
    text-decoration: underline;
}


/* =========================
   TABLE
========================= */

.table-card {
    margin-top: 25px;

    background: white;

    border: 1px solid var(--border);

    border-radius: 16px;

    box-shadow: var(--shadow);

    overflow: hidden;
}

.table-header {
    padding: 21px 22px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    border-bottom: 1px solid var(--border);
}

.table-header h2 {
    font-size: 16px;
}

.data-range {
    background: #f9fafb;

    color: #6b7280;

    padding: 7px 11px;

    border-radius: 20px;

    font-size: 10px;
}

.table-wrapper {
    overflow-x: auto;
    overflow-y: auto;

    max-height: 520px;

    position: relative;
}

table {
    width: 100%;

    border-collapse: collapse;

    min-width: 650px;
}

thead {
    background: #f9fafb;

    position: sticky;

    top: 0;

    z-index: 2;
}

th {
    padding: 13px 20px;

    text-align: left;

    color: #6b7280;

    font-size: 10px;

    font-weight: 700;

    text-transform: uppercase;

    letter-spacing: 0.4px;
}

td {
    padding: 14px 20px;

    border-top: 1px solid #f3f4f6;

    color: #374151;

    font-size: 12px;
}

tbody tr:hover {
    background: #fafafa;
}

td:first-child {
    color: #9ca3af;
}


/* =========================
   CATEGORY
========================= */

.category-badge {
    display: inline-block;

    padding: 5px 9px;

    border-radius: 20px;

    font-size: 9px;

    font-weight: 700;
}

.category-low {
    background: #dcfce7;

    color: #15803d;
}

.category-moderate {
    background: #fef9c3;

    color: #a16207;
}

.category-high {
    background: #ffedd5;

    color: #c2410c;
}

.category-very-high {
    background: #fee2e2;

    color: #b91c1c;
}

.category-extreme {
    background: #f3e8ff;

    color: #7e22ce;
}


/* =========================
   TABLE STATES
========================= */

.loading,
.empty,
.error {
    text-align: center;

    padding: 50px 20px;

    color: #9ca3af;
}

.error {
    color: #ef4444;
}


/* =========================
   TABLE FOOTER
========================= */

.table-footer {
    padding: 14px 20px;

    border-top: 1px solid var(--border);

    color: #9ca3af;

    font-size: 10px;
}


/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1000px) {

    .log-summary {
        grid-template-columns:
            1fr 1fr;
    }

}

@media (max-width: 600px) {

    .log-summary {
        grid-template-columns:
            1fr;
    }

}