* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-dark: #0f172a;
    --bg-sidebar: #020617;
    --bg-content: #f8fafc;
    --bg-card: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --success: #10b981;
    --warning: #f59e0b;
    --critical: #7f1d1d;
    --critical-bg: #fef2f2;
    --high: #dc2626;
    --high-bg: #fef2f2;
    --medium: #f97316;
    --medium-bg: #fff7ed;
    --low: #22c55e;
    --low-bg: #f0fdf4;
    --unknown: #6b7280;
    --unknown-bg: #f3f4f6;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg-content);
    color: var(--text-primary);
    line-height: 1.6;
}

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

.sidebar {
    width: 260px;
    background: var(--bg-sidebar);
    color: #fff;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.logo svg {
    color: var(--primary);
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    color: #cbd5e1;
    text-decoration: none;
    transition: all 0.2s;
}

.nav-item:hover {
    background: rgba(255,255,255,0.05);
    color: #fff;
}

.nav-item.active {
    background: rgba(59, 130, 246, 0.2);
    color: var(--primary);
    border-right: 3px solid var(--primary);
}

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 0.75rem;
}

.user-email {
    font-size: 0.875rem;
    color: #e2e8f0;
}

.user-role {
    font-size: 0.75rem;
    text-transform: uppercase;
}

.badge-admin {
    color: var(--primary);
}

.badge-viewer {
    color: var(--text-muted);
}

.logout-btn {
    display: block;
    padding: 0.5rem 1rem;
    background: rgba(255,255,255,0.1);
    color: #fff;
    text-decoration: none;
    border-radius: 0.375rem;
    text-align: center;
    font-size: 0.875rem;
    transition: background 0.2s;
}

.logout-btn:hover {
    background: rgba(255,255,255,0.2);
}

.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 2rem;
}

.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.page-subtitle {
    color: var(--text-secondary);
}

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.card {
    background: var(--bg-card);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.card-blue .card-icon {
    background: #dbeafe;
    color: var(--primary);
}

.card-red .card-icon {
    background: #fee2e2;
    color: var(--danger);
}

.card-yellow .card-icon {
    background: #fef3c7;
    color: var(--warning);
}

.card-green .card-icon {
    background: #d1fae5;
    color: var(--success);
}

.card-content {
    flex: 1;
}

.card-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.card-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.card-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.dashboard-section {
    margin-top: 2rem;
}

.dashboard-section h2 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.chart-container {
    background: var(--bg-card);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
}

.chart-container h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.chart-container.chart-wide {
    grid-column: span 2;
}

.chart-wrapper {
    height: 250px;
    position: relative;
}

.chart-wrapper-wide {
    height: 300px;
}

@media (max-width: 900px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .chart-container.chart-wide {
        grid-column: span 1;
    }
}

.quick-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.quick-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.quick-action-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.quick-action-btn.btn-danger:hover {
    border-color: var(--danger);
    color: var(--danger);
}

.filter-bar {
    background: var(--bg-card);
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.filter-form {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.filter-group label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.filter-group select,
.filter-group input {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    font-size: 0.875rem;
    min-width: 140px;
}

.filter-search {
    flex: 1;
    max-width: 300px;
}

.filter-search input {
    width: 100%;
}

.findings-count {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.table-container {
    background: var(--bg-card);
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

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

.data-table th,
.data-table td {
    padding: 0.875rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background: #f8fafc;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.data-table tbody tr:hover {
    background: #f8fafc;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.empty-state {
    text-align: center;
    color: var(--text-muted);
    padding: 2rem !important;
}

.text-muted {
    color: var(--text-muted);
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-sm {
    padding: 0.125rem 0.5rem;
    font-size: 0.625rem;
}

.badge-severity-critical {
    background: var(--critical);
    color: #fff;
}

.badge-severity-high {
    background: var(--high);
    color: #fff;
}

.badge-severity-medium {
    background: var(--medium);
    color: #fff;
}

.badge-severity-low {
    background: var(--low);
    color: #fff;
}

.badge-severity-unknown {
    background: var(--unknown);
    color: #fff;
}

.badge-status-new {
    background: #dbeafe;
    color: #1d4ed8;
}

.badge-status-review {
    background: #e0e7ff;
    color: #4338ca;
}

.badge-status-relevant {
    background: #fef3c7;
    color: #b45309;
}

.badge-status-irrelevant {
    background: #f3f4f6;
    color: #6b7280;
}

.badge-status-accepted {
    background: #d1fae5;
    color: #047857;
}

.badge-status-progress {
    background: #e0f2fe;
    color: #0369a1;
}

.badge-status-fixed {
    background: #dcfce7;
    color: #15803d;
}

.badge-status-verified {
    background: #d1fae5;
    color: #047857;
}

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

.badge-status-obsolete {
    background: #e5e7eb;
    color: #6b7280;
}

.finding-row.obsolete {
    opacity: 0.5;
}

.finding-row.obsolete:hover {
    opacity: 0.8;
}

.badge-type {
    background: #f3f4f6;
    color: #374151;
}

.badge-env-prod {
    background: #fee2e2;
    color: #dc2626;
}

.badge-env-staging {
    background: #fef3c7;
    color: #b45309;
}

.badge-env-stage {
    background: #fef3c7;
    color: #b45309;
}

.badge-env-dev {
    background: #dbeafe;
    color: #1d4ed8;
}

.badge-env-test {
    background: #e0e7ff;
    color: #4338ca;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-secondary {
    background: #e2e8f0;
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: #cbd5e1;
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-danger:hover {
    background: var(--danger-hover);
}

.btn-block {
    display: block;
    width: 100%;
    justify-content: center;
}

.section-card {
    background: var(--bg-card);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.section-card h2 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.375rem;
    font-size: 0.875rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-hint {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.form-hint code {
    background: #f1f5f9;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-family: monospace;
}

.form-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.form-row .form-group {
    flex: 1;
    min-width: 200px;
}

.form-actions {
    display: flex;
    align-items: flex-end;
}

.alert {
    padding: 1rem 1.25rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.alert-error {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.alert-success {
    background: #d1fae5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.import-stats {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.stat {
    font-weight: 600;
}

.stat-new {
    color: #1d4ed8;
}

.stat-updated {
    color: #b45309;
}

.stat-regression {
    color: #b91c1c;
}

.info-list {
    list-style: none;
    padding-left: 0;
}

.info-list li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.info-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.875rem;
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
}

.finding-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.finding-badges {
    display: flex;
    gap: 0.5rem;
}

.finding-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (max-width: 1024px) {
    .finding-detail-grid {
        grid-template-columns: 1fr;
    }
}

.detail-section,
.triage-section {
    background: var(--bg-card);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.detail-section h2,
.triage-section h2 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.detail-list {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.5rem 1rem;
}

.detail-list dt {
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.detail-list dd {
    font-size: 0.875rem;
}

.cvss-score {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: #fee2e2;
    color: #b91c1c;
    border-radius: 0.25rem;
    font-weight: 600;
}

.audit-section {
    margin-bottom: 2rem;
}

.audit-section h2 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

.page-actions {
    margin-top: 1.5rem;
}

.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.reports-grid .section-card {
    text-align: center;
    margin-bottom: 0;
}

.report-icon {
    color: var(--primary);
    margin-bottom: 1rem;
}

.reports-grid h2 {
    margin-bottom: 0.5rem;
}

.reports-grid p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-dark) 0%, #1e3a5f 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 1rem;
}

.login-card {
    background: var(--bg-card);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header svg {
    color: var(--primary);
    margin-bottom: 1rem;
}

.login-header h1 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.login-form .form-group {
    margin-bottom: 1.25rem;
}

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .app-container {
        flex-direction: column;
    }
    
    .sidebar-nav {
        display: flex;
        overflow-x: auto;
        padding: 0;
    }
    
    .nav-item {
        padding: 0.75rem 1rem;
        white-space: nowrap;
    }
    
    .nav-item.active {
        border-right: none;
        border-bottom: 3px solid var(--primary);
    }
    
    .sidebar-footer {
        display: none;
    }
}

/* Customer/System specific styles */
.breadcrumb {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.detail-item label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.detail-item span {
    font-size: 1rem;
    color: var(--text-primary);
}

.detail-item a {
    color: var(--primary);
    text-decoration: none;
}

.detail-item a:hover {
    text-decoration: underline;
}

.badge-env-prod {
    background: #fee2e2;
    color: #dc2626;
}

.badge-env-staging {
    background: #fef3c7;
    color: #b45309;
}

.badge-env-dev {
    background: #dbeafe;
    color: #2563eb;
}

.badge-env-test {
    background: #f3e8ff;
    color: #7c3aed;
}

.badge-info {
    background: #eff6ff;
    color: #3b82f6;
}

.badge-type {
    background: #f3f4f6;
    color: #6b7280;
}

.link-primary {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.link-primary:hover {
    text-decoration: underline;
}

.link-secondary {
    color: var(--text-secondary);
    text-decoration: none;
}

.link-secondary:hover {
    color: var(--primary);
}

.filter-checkbox {
    display: flex;
    align-items: center;
}

.filter-checkbox label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    white-space: nowrap;
}

.filter-checkbox input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
}

.file-upload-area {
    position: relative;
    border: 2px dashed var(--border-color);
    border-radius: 0.5rem;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--bg-card);
}

.file-upload-area:hover,
.file-upload-area.dragover {
    border-color: var(--primary);
    background: #f0f7ff;
}

.file-upload-area .file-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.file-upload-content {
    pointer-events: none;
}

.file-upload-content svg {
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.file-upload-content p {
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.file-upload-content small {
    color: var(--text-muted);
}

.selected-files {
    margin-top: 1rem;
    text-align: left;
}

.file-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.file-list li {
    background: #e0f2fe;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    color: var(--primary);
}

.file-size {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.json-paste-details {
    margin-top: 0.5rem;
}

.json-paste-details summary {
    cursor: pointer;
    color: var(--primary);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.json-paste-details summary:hover {
    text-decoration: underline;
}

.import-results {
    margin-top: 1rem;
}

.import-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--bg-content);
    border-radius: 0.375rem;
    margin-bottom: 0.5rem;
}

.import-result-item.success {
    border-left: 3px solid var(--success);
}

.import-result-item.error {
    border-left: 3px solid var(--danger);
}

.import-result-file {
    font-weight: 500;
}

.import-result-stats {
    display: flex;
    gap: 0.75rem;
    font-size: 0.875rem;
}

.cve-link {
    color: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.cve-link:hover {
    color: var(--primary);
}

.cve-link svg {
    opacity: 0.5;
}

.cve-link:hover svg {
    opacity: 1;
}

.cve-link-inline {
    color: var(--primary);
    text-decoration: none;
}

.cve-link-inline:hover {
    text-decoration: underline;
}

.occurrence-info {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.finding-row {
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.finding-row:hover {
    background-color: #f1f5f9;
}

.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
}

.modal.active {
    display: block;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-card);
    border-radius: 0.75rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0.5rem;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-loading {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.modal-badges {
    display: flex;
    gap: 0.5rem;
}

.modal-subtitle {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    padding-right: 2rem;
}

.modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

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

.modal-section h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.modal-section .detail-list {
    font-size: 0.875rem;
}

.modal-section .detail-list dt {
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.modal-section .detail-list dd {
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.modal-section .detail-list a {
    color: var(--primary);
    word-break: break-all;
}

.modal-section form .form-group {
    margin-bottom: 1rem;
}

.modal-section form label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.modal-section form select,
.modal-section form input,
.modal-section form textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

.audit-list {
    font-size: 0.8rem;
    max-height: 200px;
    overflow-y: auto;
}

.audit-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: var(--bg-content);
    border-radius: 0.25rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.audit-date {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.audit-user {
    font-weight: 500;
}

.audit-action {
    color: var(--text-secondary);
}

.audit-arrow {
    color: var(--text-muted);
}

.modal-section-full {
    grid-column: 1 / -1;
}

.data-table-sm {
    font-size: 0.875rem;
}

.data-table-sm th,
.data-table-sm td {
    padding: 0.5rem 0.75rem;
}

.modal-actions {
    text-align: center;
    padding: 1.5rem 0;
    border-top: 1px solid var(--border-color);
    margin-top: 1rem;
}

.btn-lg {
    padding: 0.75rem 2rem;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-back {
    margin-bottom: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.triage-form-container {
    background: var(--bg-content);
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.affected-checkboxes {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-top: 0.5rem;
    max-height: 200px;
    overflow-y: auto;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 0.25rem;
}

.checkbox-label:hover {
    background: var(--bg-content);
}

.checkbox-label input[type="checkbox"] {
    width: auto;
}

.affected-item {
    margin-left: 1.5rem;
}

.form-control-lg {
    font-size: 1rem;
    padding: 0.75rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.section-header h3 {
    margin-bottom: 0;
}

.severity-cards {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.severity-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 1.5rem;
    border-radius: 0.75rem;
    min-width: 100px;
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.15s;
    cursor: pointer;
}

.severity-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.severity-card-count {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.severity-card-label {
    font-size: 0.875rem;
    margin-top: 0.5rem;
    opacity: 0.9;
}

.severity-card-critical {
    background: linear-gradient(135deg, #7f1d1d 0%, #991b1b 100%);
    color: #fff;
}

.severity-card-high {
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
    color: #fff;
}

.severity-card-medium {
    background: linear-gradient(135deg, #ea580c 0%, #f97316 100%);
    color: #fff;
}

.severity-card-low {
    background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%);
    color: #fff;
}

.severity-card-total {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    cursor: default;
}

.severity-card-total:hover {
    transform: none;
    box-shadow: none;
}

.charts-grid-customer {
    margin-bottom: 1.5rem;
    grid-template-columns: repeat(3, 1fr);
}

.charts-grid-customer .chart-container {
    height: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
}

.charts-grid-customer .chart-container h3 {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.charts-grid-customer .chart-canvas-wrapper {
    position: relative;
    height: 150px;
    flex: 1;
}

.charts-grid-customer .chart-wide {
    grid-column: span 1;
}

@media (max-width: 1200px) {
    .charts-grid-customer {
        grid-template-columns: 1fr 1fr;
    }
    .charts-grid-customer .chart-wide {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .charts-grid-customer {
        grid-template-columns: 1fr;
    }
    .charts-grid-customer .chart-wide {
        grid-column: span 1;
    }
}

.modal-sections-row {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}

.modal-sections-row .modal-grid {
    flex: 1;
}

.modal-sections-row > .btn {
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: 0.25rem;
}

/* Sortierbare Tabellen */
.sortable-table th.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 1.5rem;
    transition: background 0.15s;
}

.sortable-table th.sortable:hover {
    background: rgba(59, 130, 246, 0.1);
}

.sortable-table th.sortable .sort-icon::after {
    content: '⇅';
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.3;
    font-size: 0.75rem;
}

.sortable-table th.sortable.sort-asc .sort-icon::after {
    content: '↑';
    opacity: 1;
    color: var(--primary);
}

.sortable-table th.sortable.sort-desc .sort-icon::after {
    content: '↓';
    opacity: 1;
    color: var(--primary);
}

.sortable-table th.sortable.sort-asc,
.sortable-table th.sortable.sort-desc {
    background: rgba(59, 130, 246, 0.08);
}
