body {
    background: #f5f7fb;
    color: #1f2937;
}

.page-shell {
    padding: 28px;
}

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

.flash-stack {
    margin-bottom: 18px;
}

.metric-card,
.panel,
.example-box {
    background: #ffffff;
    border: 1px solid #e3e8ef;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.metric-card {
    padding: 18px;
}

.metric-card span {
    color: #64748b;
    display: block;
    font-size: 0.86rem;
    margin-bottom: 6px;
}

.metric-card strong {
    color: #111827;
    display: block;
    font-size: 1.75rem;
    line-height: 1;
}

.metric-card .metric-code {
    font-size: 1.35rem;
}

.metric-card small {
    display: block;
    font-size: 0.75rem;
    margin-top: 4px;
}

.panel {
    overflow: hidden;
}

.panel form,
.example-box {
    padding: 18px;
}

.panel-header {
    align-items: center;
    border-bottom: 1px solid #e3e8ef;
    display: flex;
    justify-content: space-between;
    padding: 16px 18px;
}

.search-form {
    align-items: center;
    display: flex;
    gap: 8px;
    padding: 0;
}

.search-form .form-control {
    min-width: 240px;
}

.table thead th {
    background: #f8fafc;
    color: #475569;
    font-size: 0.78rem;
    letter-spacing: 0;
    text-transform: uppercase;
}

.description-cell {
    max-width: 300px;
    white-space: normal;
}

.action-buttons {
    display: inline-flex;
    gap: 8px;
}

.action-buttons form {
    padding: 0;
}

.badge.text-bg-primary {
    background-color: #1f6feb !important;
}

.form-section {
    border-bottom: 1px solid #e3e8ef;
    margin-bottom: 18px;
    padding-bottom: 18px;
}

.form-section:last-of-type {
    border-bottom: 0;
}

.form-section h3 {
    color: #334155;
    font-weight: 700;
    margin-bottom: 12px;
}

.option-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.option-check {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e3e8ef;
    border-radius: 8px;
    display: flex;
    gap: 8px;
    margin: 0;
    min-height: 44px;
    padding: 10px 12px;
}

.option-check .form-check-input {
    margin: 0;
}

.filter-actions {
    align-items: end;
    display: flex;
    gap: 8px;
}

.incident-button-row,
.download-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.download-grid {
    justify-content: flex-start;
    padding: 18px;
}

.policy-block-panel {
    max-height: calc(100vh - 150px);
}

.policy-block-list {
    max-height: calc(100vh - 215px);
    overflow-y: auto;
    padding: 14px;
}

.policy-block {
    background: #ffffff;
    border: 1px solid #e3e8ef;
    border-radius: 8px;
    display: block;
    margin-bottom: 10px;
    padding: 12px;
    text-align: left;
    width: 100%;
}

.policy-block:hover,
.policy-block.active {
    border-color: #1f6feb;
    box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.12);
}

.policy-block span {
    color: #64748b;
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.policy-block strong {
    display: block;
    margin-bottom: 6px;
}

.policy-block small {
    color: #475569;
    display: -webkit-box;
    line-height: 1.4;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 768px) {
    .page-shell {
        padding: 18px;
    }

    .page-header,
    .panel-header,
    .search-form {
        align-items: stretch;
        flex-direction: column;
    }

    .search-form .form-control {
        min-width: 100%;
    }
}
