* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Inter, Arial, sans-serif;
    background: #f4f6f9;
    color: #111827;
}

a {
    text-decoration: none;
    color: inherit;
}

.layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 270px;
    background: #111827;
    color: #e5e7eb;
    padding: 28px 22px;
    position: fixed;
    height: 100vh;
}

.brand h2 {
    margin: 0;
    font-size: 25px;
}

.brand p {
    margin: 6px 0 34px;
    color: #9ca3af;
    font-size: 14px;
}

.nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav a {
    padding: 13px 14px;
    border-radius: 10px;
    color: #d1d5db;
    font-weight: 600;
}

.nav a:hover {
    background: #1f2937;
    color: white;
}

.main {
    margin-left: 270px;
    width: calc(100% - 270px);
}

.topbar {
    background: white;
    padding: 28px 36px;
    border-bottom: 1px solid #e5e7eb;
}

.topbar h1 {
    margin: 0;
    font-size: 32px;
}

.topbar p {
    margin: 6px 0 0;
    color: #667085;
}

.content {
    padding: 30px 36px;
}

.toolbar {
    margin-bottom: 20px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 18px;
    margin-bottom: 26px;
}

.stats-grid.two {
    grid-template-columns: repeat(2, 1fr);
}

.stat-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.stat-card span {
    color: #667085;
    font-size: 14px;
    font-weight: 700;
}

.stat-card strong {
    display: block;
    margin-top: 8px;
    font-size: 31px;
}

.stat-card.danger strong {
    color: #b91c1c;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 24px;
}

.panel {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
    margin-bottom: 24px;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.panel-header h2 {
    margin: 0;
    font-size: 20px;
}

.panel-header a {
    color: #2563eb;
    font-weight: 800;
    font-size: 14px;
}

.alert-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 15px;
    border: 1px solid #eef2f7;
    border-radius: 14px;
    background: #fafbfc;
    margin-bottom: 12px;
}

.alert-card:hover {
    background: #f1f5f9;
}

.alert-card p {
    margin: 6px 0 0;
    color: #667085;
    font-size: 13px;
}

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

.siem-table {
    width: 100%;
    border-collapse: collapse;
}

.siem-table th {
    text-align: left;
    padding: 14px 12px;
    color: #667085;
    font-size: 13px;
    border-bottom: 1px solid #e5e7eb;
    white-space: nowrap;
}

.siem-table td {
    padding: 15px 12px;
    border-bottom: 1px solid #f0f2f5;
    font-size: 14px;
    vertical-align: middle;
    white-space: nowrap;
}

.siem-table tr:hover {
    background: #fafafa;
}

.badge {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    text-transform: lowercase;
}

.badge-low {
    background: #e7f8ef;
    color: #047857;
}

.badge-medium {
    background: #fff7df;
    color: #a16207;
}

.badge-high {
    background: #ffedd5;
    color: #c2410c;
}

.badge-critical {
    background: #fee2e2;
    color: #b91c1c;
}

.badge-neutral {
    background: #eef2f7;
    color: #475467;
}

.count-badge {
    background: #eef2f7;
    color: #475467;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}

.tabs-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 22px;
}

.tab-link {
    background: white;
    border: 1px solid #e5e7eb;
    padding: 11px 15px;
    border-radius: 10px;
    color: #344054;
    font-weight: 800;
}

.active-tab {
    background: #1e3a5f;
    border-color: #1e3a5f;
    color: white;
}

.btn {
    border: none;
    border-radius: 10px;
    padding: 11px 14px;
    font-weight: 800;
    cursor: pointer;
    font-size: 14px;
}

.btn-small {
    padding: 8px 10px;
    font-size: 13px;
}

.btn-primary {
    background: #1e3a5f;
    color: white;
}

.btn-secondary {
    background: #eef2f7;
    color: #344054;
}

.btn-warning {
    background: #fff4db;
    color: #9a6700;
}

.btn-success {
    background: #e7f8ef;
    color: #047857;
}

.btn-danger {
    background: #fee2e2;
    color: #b91c1c;
}

.action-row {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.muted {
    color: #667085;
    font-size: 13px;
    margin-top: 4px;
}

.empty {
    color: #667085;
    padding: 18px;
}

.filter-panel {
    margin-bottom: 22px;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
}

.filter-grid input,
.filter-grid select {
    padding: 12px;
    border: 1px solid #d0d5dd;
    border-radius: 10px;
    font-size: 14px;
}

.detail-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.detail-list div {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #f0f2f5;
    padding-bottom: 10px;
}

.detail-list span {
    color: #667085;
    font-weight: 700;
}

.vertical-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.full {
    width: 100%;
}

.history-item {
    padding: 14px;
    border: 1px solid #eef2f7;
    border-radius: 12px;
    margin-bottom: 10px;
    background: #fafbfc;
}

.history-item span,
.history-item small {
    display: block;
    margin-top: 5px;
    color: #667085;
}

@media (max-width: 1200px) {
    .stats-grid,
    .grid-2,
    .filter-grid {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
    }

    .main {
        margin-left: 0;
        width: 100%;
    }

    .layout {
        flex-direction: column;
    }
}
.login-body {
    background: #0f172a;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}

.login-card {
    width: 420px;
    background: white;
    border-radius: 18px;
    padding: 34px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.login-card h1 {
    margin: 0;
    font-size: 32px;
    color: #111827;
}

.login-card p {
    margin: 8px 0 28px;
    color: #667085;
}

.login-card form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.login-card label {
    font-weight: 700;
    color: #344054;
}

.login-card input {
    padding: 13px;
    border: 1px solid #d0d5dd;
    border-radius: 10px;
    font-size: 15px;
}

.flash-message {
    background: #fee2e2;
    color: #b91c1c;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 18px;
    font-weight: 700;
}
