:root {
    --app-primary: #183153;
    --app-primary-dark: #10243d;
    --app-bg: #f4f6f8;
    --app-card: #ffffff;
    --app-border: #d9dee5;
}

body {
    background: var(--app-bg);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.app-navbar {
    background: var(--app-primary);
}

.app-main {
    padding: 24px 0;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.page-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
}

.app-card {
    background: var(--app-card);
    border: 1px solid var(--app-border);
    border-radius: 18px;
    padding: 22px;
    min-height: 180px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.app-card h2 {
    font-size: 1.25rem;
    font-weight: 700;
}

.login-wrapper {
    min-height: calc(100vh - 48px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: white;
    border-radius: 22px;
    padding: 32px;
    border: 1px solid var(--app-border);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.btn {
    border-radius: 12px;
}

.form-control {
    border-radius: 12px;
}

@media (max-width: 991px) {
    .app-main {
        padding: 16px 0;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .app-card {
        min-height: auto;
    }
}

.stat-box {
    background: #f4f6f8;
    border-radius: 16px;
    padding: 18px;
}

.stat-box strong {
    display: block;
    font-size: 2rem;
    line-height: 1;
    color: var(--app-primary);
}

.stat-box span {
    display: block;
    margin-top: 8px;
    color: #6c757d;
}
.risk-category-block {
    border: 1px solid var(--app-border);
    border-radius: 16px;
    overflow: hidden;
    background: #ffffff;
}

.risk-category-title {
    background: #f4f6f8;
    border-bottom: 1px solid var(--app-border);
    font-size: 1.1rem;
    font-weight: 700;
    padding: 14px 18px;
    margin: 0;
    color: var(--app-primary);
}

.risk-category-block table {
    margin-bottom: 0;
}
.field-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
}

.field-header h1 {
    font-size: 2.2rem;
    font-weight: 800;
    margin: 0;
}

.field-kicker {
    display: inline-block;
    background: #d1fae5;
    color: #065f46;
    padding: 6px 12px;
    border-radius: 999px;
    font-weight: 700;
    margin-bottom: 8px;
}

.field-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.field-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.field-stat {
    background: #ffffff;
    border: 1px solid var(--app-border);
    border-radius: 18px;
    padding: 20px;
    text-align: center;
}

.field-stat strong {
    display: block;
    font-size: 2rem;
    color: var(--app-primary);
}

.field-stat span {
    color: #6c757d;
}

.field-unit-card {
    background: #ffffff;
    border: 1px solid var(--app-border);
    border-radius: 22px;
    padding: 22px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.field-unit-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 18px;
}

.field-unit-header h2 {
    font-size: 1.7rem;
    font-weight: 800;
    margin: 0;
}

.field-unit-header p {
    color: #6c757d;
    margin: 4px 0 0;
}

.field-risk-card {
    height: 100%;
    border: 1px solid var(--app-border);
    border-radius: 20px;
    padding: 20px;
    background: #ffffff;
}

.field-risk-top {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 14px;
}

.field-criticality {
    background: #fff3cd;
    color: #664d03;
    border-radius: 999px;
    padding: 6px 12px;
    font-weight: 800;
    white-space: nowrap;
}

.field-risk-card h3 {
    font-size: 1.35rem;
    font-weight: 800;
    margin-bottom: 16px;
}

.field-risk-section {
    margin-bottom: 14px;
}

.field-risk-section span {
    display: block;
    font-weight: 800;
    color: var(--app-primary);
    margin-bottom: 4px;
}

.field-risk-section p {
    margin: 0;
}

.field-score {
    background: #f4f6f8;
    border-radius: 16px;
    padding: 14px;
    margin-bottom: 14px;
}

.field-meta {
    background: #f8f9fa;
    border-radius: 16px;
    padding: 14px;
    margin-bottom: 16px;
}

.field-risk-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.field-alert {
    border-radius: 16px;
    padding: 18px;
    font-size: 1.05rem;
}

@media (max-width: 991px) {
    .field-header {
        flex-direction: column;
    }

    .field-actions {
        width: 100%;
        justify-content: stretch;
    }

    .field-actions .btn {
        flex: 1 1 48%;
    }

    .field-stats {
        grid-template-columns: 1fr;
    }

    .field-unit-header {
        flex-direction: column;
    }

    .field-unit-header .btn {
        width: 100%;
    }

    .field-risk-actions {
        grid-template-columns: 1fr;
    }
}