:root {
    --primary-blue: #0044aa;
    --secondary-blue: #217aff;
    --primary-purple: #2c367a;
    --primary-green: #005a4e;
    --bg-main: #fcfdfe;
    --bg-card: #ffffff;
    --text-main: #1e293b;
    --text-muted: #8e9aaf;
    --border: #e2e8f0;
    --error-red: #ef4444;
    --font-stack: 'Inter', system-ui, -apple-system, sans-serif;
}

/* --- BASE & LAYOUT --- */
html, body { max-width: 100vw; overflow-x: hidden; margin: 0; }
body { font-family: var(--font-stack); background-color: var(--bg-main); color: var(--text-main); line-height: 1.6; }
main { margin: 2rem auto; padding: 0 1.5rem; box-sizing: border-box; }
[x-cloak] { display: none !important; }

/* --- NAVIGATION --- */
header.main-nav { 
    position: sticky; top: 0; width: 100%; height: 60px; background: white; 
    color: var(--primary-blue); display: grid; grid-template-columns: auto 1fr auto;
    align-items: center; padding: 0 2rem; z-index: 1000; border-bottom: 1px solid var(--border);
    box-sizing: border-box;
}
.brand h1 { font-size: 0.9rem; margin: 0; font-weight: 800; letter-spacing: 0.05em; color: var(--primary-blue); }
.case-container { display: flex; align-items: center; overflow: hidden; }
.case-tag { font-family: monospace; font-size: 0.7rem; background: #f1f5f9; padding: 2px 8px; border-radius: 4px; margin-left: 1rem; color: var(--primary-blue); border: 1px solid var(--border); }
.header-actions { display: flex; gap: 10px; align-items: center; margin-left: auto; }

/* --- BUTTONS --- */
.btn, .btn-action { 
    color: white !important; 
    background: var(--primary-blue); 
    font-weight: 800; 
    border: 1px solid var(--primary-blue); 
    padding: 0.5rem 1rem; 
    cursor: pointer; 
    text-transform: uppercase; 
    font-size: 0.7rem; 
    font-family: var(--font-stack); 
    white-space: nowrap; 
}

.btn-secondary {
    background: var(--secondary-blue);
}

.btn-action {
    width: 100%;
    padding: 1.25rem;
    font-size: 0.9rem;
    font-weight: 800;
    background: white;
    color: #0044aa;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    font-family: var(--font-stack);
}

/* --- BUTTON HOVER & ACTIVE STATES --- */

/* Primary Blue Buttons */
.btn, .btn-action {
    transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
}

.btn:hover, .btn-action:hover {
    background-color: #0055cc !important; /* Lighter blue */
    filter: brightness(1.1);
    box-shadow: 0 4px 12px rgba(0, 68, 170, 0.2);
}

.btn-secondary:hover {
    background: white !important;
    color: var(--secondary-blue) !important;
    filter: brightness(1.1);
    box-shadow: 0 4px 12px rgba(33, 122, 255, 0.2);
}


.btn:active, .btn-action:active {
    transform: translateY(1px); /* "Push" effect */
    filter: brightness(0.9);
}

/* Tab Buttons */
.step-btn:hover {
    color: var(--text-main);
    background-color: #f8fafc;
}

/* Specific Tab Hover Accents */
.step-btn.active-blue:hover { border-bottom-color: #0055cc; }
.step-btn.active-purple:hover { border-bottom-color: #3d4ba8; }
.step-btn.active-green:hover { border-bottom-color: #007a6a; }

/* Logout Button */
.btn-logout {
    background: #ffffff !important;
    color: var(--primary-blue) !important;
    border: 1px solid var(--primary-blue) !important;
    padding: 7px;
    text-decoration: none;
}

.btn-logout:hover {
    color: white !important;
    background: var(--primary-blue);
    box-shadow: 0 2px 4px rgba(0, 68, 170, 0.1);
}

.btn-logout:active {
    background: #e2efff !important;
    transform: translateY(1px);
}

/* Type Toggles (Report Type) */
.type-btn:not(.active):hover {
    background-color: #e2e8f0;
    color: var(--primary-blue);
}

/* --- SRP COMPONENTS: TOGGLES & TABS --- */
.obligation-label { font-size: 0.75rem; font-weight: 800; color: var(--text-muted); text-transform: uppercase; margin-bottom: 0.5rem; display: block; }

.sync-indicator {
    padding: 0.5rem 1rem;
    background: #f8fafc;
    border-radius: 4px;
    border: 1px solid var(--border);
    margin-bottom: 1rem;
    display: inline-flex;
}

nav.type-toggles { display: grid; grid-template-columns: 1fr 1fr; background: #f1f5f9; margin-bottom: 2rem; border: 1px solid var(--border); }
.type-btn { padding: 0.85rem; text-align: center; font-size: 0.75rem; font-weight: 800; cursor: pointer; transition: 0.2s; color: #475569; text-transform: uppercase; }
.type-btn.active.blue { background: var(--primary-blue); color: white; }

nav.step-tabs { display: flex; flex-wrap: wrap; gap: 1rem 2rem; margin: 2rem 0; border-bottom: 1px solid var(--border); }
.step-btn { padding: 1rem 0; cursor: pointer; border: none; background: none; font-weight: 800; font-size: 0.85rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 3px solid transparent; transition: all 0.2s ease; white-space: nowrap; }
.step-btn.active-blue { color: var(--primary-blue); border-bottom-color: var(--prima;ry-blue); }
.step-btn.active-purple { color: var(--primary-purple); border-bottom-color: var(--primary-purple); }
.step-btn.active-green { color: var(--primary-green); border-bottom-color: var(--primary-green); }

/* --- FORM SECTIONS --- */
article.reporting-module { background: var(--bg-card); padding: 2rem; border: 1px solid var(--border); box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05); max-width: 1100px; margin: auto; border-box; }
section.form-group-section { display: grid; grid-template-columns: 1fr; gap: 1.25rem; margin-bottom: 2rem; padding: 1.5rem 2rem; border: 1px solid var(--border); position: relative; box-sizing: border-box; }
section.form-group-section::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }
section.blue::before { background: var(--primary-blue); }
section.purple::before { background: var(--primary-purple); }
section.green::before { background: var(--primary-green); }
section.neutral::before { background: #cbd5e1; }

header.section-meta { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; flex-wrap: wrap; gap: 0.5rem; }
header.section-meta h2 { font-size: 0.9rem; text-transform: uppercase; margin: 0; letter-spacing: 0.05em; font-weight: 800; }
.art-cite { font-size: 0.7rem; color: var(--text-muted); font-style: italic; font-weight: 400; }

.field-container { display: flex; flex-direction: column; gap: 0.4rem; width: 100%; box-sizing: border-box; }
label.input-label { font-size: 0.7rem; font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.025em; }
label.required::after { content: " *"; color: var(--error-red); }

input, select, textarea { width: 100%; padding: 0.85rem; border: 1px solid var(--border); border-radius: 2px; font-size: 0.9rem; box-sizing: border-box; color: var(--text-main); background: #fff; font-family: var(--font-stack); }
input.error-ring, textarea.error-ring { border-color: var(--error-red); background-color: #fef2f2; }

/* --- CUSTOM TOGGLE SWITCH --- */
.toggle-group { display: flex; align-items: center; gap: 1rem; padding: 0.5rem 1rem; background: #f8fafc; border: 1px dashed var(--border); width: 100%; box-sizing: border-box; }
.switch { position: relative; display: inline-block; width: 50px; height: 24px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #cbd5e1; transition: .4s; border-radius: 24px; }
.slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .slider { background-color: var(--primary-blue); }
input:checked + .slider:before { transform: translateX(26px); }

/* --- STATUS & TOASTS --- */
.status-toast { background: #f8fafc; border-left: 4px solid var(--primary-green); color: #1e293b; padding: 1rem; margin-bottom: 2rem; font-weight: 600; font-size: 0.85rem; }
.status-toast.error-toast { border-left-color: var(--error-red); background-color: #fef2f2; }

/* --- ADMIN & MODALS --- */
.modal-overlay { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.7); display: flex; align-items: center; justify-content: center; z-index: 9999; }
.modal-content { background-color: #ffffff; width: 90%; max-width: 650px; padding: 3rem; border-radius: 12px; border: 1px solid var(--border); box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); }

/* --- USER HISTORY DRAWER & OVERLAY --- */
.history-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(2px);
    z-index: 9000;
    display: flex;
    justify-content: flex-end;
}

.history-drawer {
    width: 100%;
    max-width: 450px;
    height: 100vh;
    background: #ffffff;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start; /* Aligns the 'X' to the top */
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.history-header h3 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-main);
}

.history-content p {
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.history-item {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary-green);
    padding: 1rem;
    margin-bottom: 1rem;
}

.history-item-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.25rem;
}

.history-item-case {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-family: monospace;
}

/* Ensure the X button is distinct and clickable */
.drawer-header .btn-ui {
    font-size: 1.2rem;
    line-height: 1;
    padding: 0.25rem 0.6rem;
    height: auto;
    border: none;
    background: transparent;
    color: var(--text-muted);
}

.drawer-header .btn-ui:hover {
    color: var(--error-red);
    background: #fef2f2;
}

/* --- RESPONSIVE GRIDS --- */
@media (min-width: 768px) {
    .grid-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
    .grid-triple { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1.25rem; }
}

/* --- LOGIN PAGE --- */
/* --- LOGIN PAGE (CENTERED ON ALL DEVICES) --- */
.login-page { 
    background-color: #f8fafc; 
    display: flex; 
    flex-direction: column;
    align-items: center; 
    justify-content: center; 
    /* Using 100dvh for better mobile browser support (accounts for address bars) */
    min-height: 100dvh; 
    width: 100vw;
    margin: 0;
    padding: 1.5rem; /* Prevents box from touching screen edges on mobile */
    box-sizing: border-box;
}

.login-box { 
    background: #ffffff; 
    border: 1px solid #e2e8f0; 
    border-radius: 8px; 
    padding: 2.5rem; 
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1); 
    width: 100%; 
    max-width: 400px; 
    /* Force centering if there are inherited margins */
    margin: auto; 
    box-sizing: border-box;
}* Subtle brand styling for the login header */
.login-box h2 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    color: var(--primary-blue);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 800;
}

.login-input { 
    width: 100%; 
    padding: 12px; 
    margin-bottom: 1rem;
    border: 1px solid #cbd5e1; 
    border-radius: 4px; 
    font-size: 1rem; 
    box-sizing: border-box; 
    transition: border-color 0.2s;
}

.login-input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(0, 68, 170, 0.1);
}

.login-submit { 
    width: 100%; 
    padding: 14px; 
    background: var(--primary-blue); 
    border: none; 
    border-radius: 4px; 
    color: #ffffff; 
    font-weight: 700; 
    text-transform: uppercase;
    cursor: pointer; 
    transition: filter 0.2s, transform 0.1s;
}

.login-submit:hover {
    filter: brightness(1.1);
}

.login-submit:active {
    transform: translateY(1px);
}

footer.compliance-foot { text-align: center; margin-top: 4rem; border-top: 1px solid var(--border); padding-top: 2rem; font-size: 0.65rem; color: var(--text-muted); letter-spacing: 0.15em; font-weight: 700; }


/* --- ADMIN SPECIFIC LAYOUT --- */
.admin-page {
    background-color: #f1f5f9; /* Slightly darker background for contrast */
}

.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

/* --- ADMIN UI BUTTONS --- */
.btn-ui {
    height: 36px;
    display: inline-flex;
    align-items: center;
    padding: 0 1rem;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    text-decoration: none;
    border: 1px solid var(--border);
    background: white;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-ui.primary {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

.btn-ui.danger {
    color: #ef4444;
    border-color: #ef4444;
}

.btn-ui:hover {
    filter: brightness(1.05);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* --- ADMIN DATA TABLES --- */
.admin-table {
    width: 100%;
    background: white;
    border-collapse: collapse;
    border: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.admin-table th {
    background: #f8fafc;
    text-align: left;
    padding: 1rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border);
}

.admin-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.85rem;
}

.admin-table tr:hover {
    background: #fbfcfe;
}

/* --- SIDE DRAWER (Reports List) --- */
.admin-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 500px;
    max-width: 90vw;
    background: white;
    z-index: 3000;
    box-shadow: -10px 0 30px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    padding: 2rem;
    transform: translateX(0);
    transition: transform 0.3s ease-in-out;
}

/* Stage Border Colors */
.border-24h { border-left: 4px solid var(--primary-blue) !important; }
.border-72h { border-left: 4px solid var(--primary-purple) !important; }
.border-final { border-left: 4px solid var(--primary-green) !important; }
.border-draft { border-left: 4px solid #94a3b8 !important; } /* Slate */


/* Type Badge Styling */
.type-badge {
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    background: #f1f5f9;
    color: #475569;
    font-weight: bold;
    margin-right: 8px;
}

/* --- MODALS --- */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(2px);
    z-index: 4000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-card {
    background: white;
    width: 100%;
    max-width: 600px;
    padding: 2.5rem;
    border-radius: 4px;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
}

/* --- STATUS BADGES --- */
.badge {
    padding: 2px 8px;
    border-radius: 99px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
}
.badge-blue { background: #dbeafe; color: #1e40af; }
.badge-green { background: #dcfce7; color: #166534; }


.history-table-header, .history-row {
    display: grid;
    grid-template-columns: 1.5fr 2fr 1fr 1fr;
    gap: 10px;
    padding: 12px;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.history-table-header {
    font-weight: bold;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.history-row:hover {
    background: rgba(255, 255, 255, 0.05);
}

.btn-sm {
    padding: 4px 8px;
    font-size: 0.7rem;
    background: var(--primary-blue);
    border: none;
    border-radius: 4px;
    color: white;
    cursor: pointer;
}

/* --- REPORT VIEW --- */
/* Preview Modal Styles */
.preview-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(4px);
    z-index: 9999;
}

.preview-modal {
    background: white;
    width: 95%;
    max-width: 900px;
    max-height: 90vh;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
}

.preview-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.preview-body {
    padding: 2rem;
    overflow-y: auto;
}

.structured-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
    border: 1px solid #e2e8f0;
}

.structured-table th, 
.structured-table td {
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    text-align: left;
    font-size: 0.9rem;
}

.structured-table th {
    background: #f8fafc;
    color: #475569;
    width: 30%;
    font-weight: 700;
}

.preview-section-title {
    font-size: 0.75rem;
    font-weight: 800;
    color: #3b82f6;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 1.5rem 0 0.75rem 0;
}

.text-pre {
    white-space: pre-wrap;
    line-height: 1.6;
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    table-layout: fixed; /* Prevents layout breaking with long strings */
}

.report-table th {
    background: #f1f5f9;
    width: 30%;
    padding: 12px;
    border: 1px solid #cbd5e1;
    text-align: left;
    font-size: 0.75rem;
    color: #475569;
    text-transform: uppercase;
    vertical-align: top;
}

.report-table td {
    padding: 12px;
    border: 1px solid #cbd5e1;
    font-size: 0.9rem;
    word-break: break-word; /* Crucial for long JSON strings or hashes */
    vertical-align: top;
}

.nested-json {
    font-family: monospace;
    font-size: 0.8rem;
    background: #f8fafc;
    padding: 8px;
    border-radius: 4px;
    display: block;
    white-space: pre-wrap;
}

.tag-blue {
    background: #dbeafe;
    color: #1e40af;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
}

.preview-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    /* High z-index to stay above the drawer */
    z-index: 9999; 
    backdrop-filter: blur(2px);
}

.preview-modal {
    background: white;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    border-radius: 8px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
}

.preview-body {
    padding: 20px;
    overflow-y: auto;
}

.report-table {
    width: 100%;
    border-collapse: collapse;
}

.report-table th {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 10px;
    text-align: left;
    width: 30%;
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
}

.report-table td {
    border: 1px solid #e2e8f0;
    padding: 10px;
    font-size: 0.9rem;
    color: #1e293b;
}

.json-block {
    background: #f1f5f9;
    padding: 10px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.8rem;
    white-space: pre-wrap;
}

.preview-section-title {
    background: #f1f5f9;
    padding: 8px 15px;
    font-size: 0.75rem;
    font-weight: 800;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-left: 4px solid #3b82f6;
    margin: 20px 0 10px 0;
}

.preview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border: 1px solid #e2e8f0;
    border-bottom: none;
}

.preview-row {
    display: contents; /* Allows children to participate in the grid */
}

.preview-label {
    padding: 12px 15px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 600;
}

.preview-value {
    padding: 12px 15px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.9rem;
    color: #1e293b;
    word-break: break-word;
}

/* For full-width rows like Description */
.full-width {
    grid-column: span 2;
}

.field-container {
    /* Adjust '80px' to match the height of your top navigation bar */
    scroll-margin-top: 80px; 
}

.has-error {
    /* Optional: a very subtle shake animation to draw the eye */
    animation: shake 0.4s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

.reporting-header { display: flex; justify-content: space-between; align-items: center; }
/** DASHBOARD STYLES **/
/** DASHBOARD LAYOUT - GRID AREAS **/
.dashboard-page {
    display: grid;
    grid-template-columns: 1fr 340px;
    grid-template-areas: 
        "header aside"
        "table  aside";
    gap: 2rem;
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 1.5rem;
    align-items: start;
}

.dashboard-header { grid-area: header; display: flex; justify-content: space-between; align-items: center; }
.table-wrapper { grid-area: table; width: 100%; min-width: 0; overflow-x: auto; background: white; border: 1px solid var(--border); border-radius: 8px; }
.metrics-matrix-aside { grid-area: aside; width: 340px; }

/* Mobile: Re-order everything */
@media (max-width: 1024px) {
    .dashboard-page {
        grid-template-columns: 1fr;
        grid-template-areas: 
            "header"
            "aside"
            "table";
    }
    .metrics-matrix-aside { width: 100%; }
}

/** STYLES **/
.dashboard-header h2 { margin-bottom: 0; }
.dashboard-header p { margin-top: 0;}
.dashboard-table { width: 100%; border-collapse: collapse; background: white; }
.dashboard-table thead { background: #f8fafc; border-bottom: 2px solid #e2e8f0; }
.dashboard-table th { padding: 1rem 1.5rem; color: #475569; font-size: 0.85rem; font-weight: 600; text-transform: uppercase; cursor: pointer; user-select: none; transition: background 0.2s; }
.dashboard-table th:hover { background: #f1f5f9; }
.dashboard-table td { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border); color: #334155; font-size: 0.95rem; }
.dashboard-table tbody tr:hover { background: #fdfdfd; }

.badge { padding: 4px 10px; border-radius: 4px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; }
.badge-vuln { background: #f0f9ff; color: #0369a1; border-color: #bae6fd; }
.badge-incident { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }
.badge-status { border-radius: 9999px; }

.btn-continue { background: none; border: 1px solid var(--primary-blue); padding: 4px 12px; border-radius: 4px; font-size: 0.85rem; cursor: pointer; color: var(--primary-blue); }
.btn-continue:hover { background: var(--primary-blue); color: white;}

.btn-view { background: none; border: 1px solid #cbd5e1; padding: 4px 12px; border-radius: 4px; font-size: 0.85rem; cursor: pointer; color: #475569; }
.btn-view:hover { background: var(--secondary-blue); color: white;}
.btn-delete { margin-left: 8px; color: var(--error-red); background: none; border: 1px solid #f87171; padding: 4px 8px; border-radius: 4px; cursor: pointer;}
.btn-delete:hover { background: var(--error-red); color: white; }


.kpi-row { display: grid; grid-template-columns: 100px repeat(3, 1fr); gap: 0.5rem; margin-bottom: 0.5rem; }
.kpi-cell { background: white; padding: 0.5rem; border-radius: 6px; border: 1px solid var(--border); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; transition: all 0.2s ease; }
.kpi-cell:hover { border-color: #94a3b8; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.kpi-label { background: #f8fafc; border: 1px solid var(--border); font-size: 0.75rem; font-weight: 800; text-transform: uppercase; display: flex; align-items: center; justify-content: center; }
.active-cell-all { border: 2px solid #0f172a !important; background: #f1f5f9 !important; }
.active-cell-vuln { border: 2px solid #0284c7 !important; background: #f0f9ff !important; }
.active-cell-incident { border: 2px solid #ea580c !important; background: #fff7ed !important; }
.kpi-val { font-size: 1.1rem; font-weight: 800; }
.kpi-sub { font-size: 0.6rem; text-transform: uppercase; font-weight: 700; }
.text-vuln { color: #0284c7; }
.text-incident { color: #ea580c; }