/* ===== CSS Variables ===== */
:root {
    --bg-primary: #0f0f1a;
    --bg-secondary: #1a1a2e;
    --bg-tertiary: #252542;
    --bg-card: #1e1e35;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --text-muted: #6b6b7b;
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-gradient: linear-gradient(135deg, #6366f1, #8b5cf6);
    --critical: #ef4444;
    --high: #f97316;
    --medium: #eab308;
    --low: #22c55e;
    --info: #3b82f6;
    --border-color: rgba(255, 255, 255, 0.08);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ===== App Container ===== */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* ===== Sidebar ===== */
.sidebar {
    width: 260px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
    position: fixed;
    height: 100vh;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    margin-bottom: 32px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--accent-gradient);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
}

.nav-item svg {
    width: 20px;
    height: 20px;
}

.nav-item:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-color);
}

.version-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.version-info .subtitle {
    font-size: 0.75rem;
}

/* ===== Main Content ===== */
.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 24px 32px;
    min-height: 100vh;
}

/* ===== Header ===== */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.analysis-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
}

.status-dot.active {
    background: var(--low);
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.status-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ===== Views ===== */
.view {
    display: none;
}

.view.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Upload View ===== */
.upload-container {
    max-width: 700px;
    margin: 0 auto;
}

.upload-zone {
    background: var(--bg-secondary);
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-xl);
    padding: 64px 32px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.05);
}

.upload-icon {
    width: 80px;
    height: 80px;
    background: var(--accent-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.upload-icon svg {
    width: 40px;
    height: 40px;
    color: white;
}

.upload-zone h3 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.upload-zone p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.file-info {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 24px;
    border: 1px solid var(--border-color);
}

.file-icon {
    font-size: 2.5rem;
}

.file-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.file-name {
    font-weight: 600;
    font-size: 1.1rem;
}

.file-size {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.btn-analyze {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--low);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-analyze:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(34, 197, 94, 0.4);
}

.btn-analyze svg {
    width: 18px;
    height: 18px;
}

.supported-formats {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-top: 32px;
    text-align: center;
    border: 1px solid var(--border-color);
}

.supported-formats h4 {
    margin-bottom: 16px;
    color: var(--text-secondary);
}

.format-list {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
}

.format-badge {
    background: var(--bg-tertiary);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-family: monospace;
    font-size: 0.9rem;
}

.security-note {
    color: var(--low);
    font-size: 0.9rem;
}

/* ===== Metadata Header ===== */
.metadata-header {
    display: flex;
    gap: 32px;
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.metadata-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 140px;
}

.metadata-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.45);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.metadata-value {
    font-size: 0.95rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

/* ===== Device Info Panel ===== */
.device-info-panel {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(139, 92, 246, 0.08));
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: var(--radius-lg);
    padding: 16px 24px;
    margin-bottom: 24px;
    animation: fadeIn 0.4s ease;
}

.device-meta-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.device-meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.device-meta-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: rgba(99, 102, 241, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.device-meta-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== Dashboard Bottom Grid (Summary + Chart) ===== */
.dashboard-bottom-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

.summary-panel,
.chart-panel {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--border-color);
}

.section-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.chart-wrapper {
    position: relative;
    height: 220px;
}

/* ===== Stats Section ===== */
.stats-section {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
    overflow: visible;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    cursor: pointer;
}

.stat-card:active {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* Stat card click hint */
.stat-card::after {
    content: "Click to view details";
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

.stat-card:hover::after {
    opacity: 1;
    bottom: -35px;
}

.stat-icon {
    font-size: 2rem;
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.gradient-red .stat-value {
    color: var(--critical);
}

.gradient-orange .stat-value {
    color: var(--high);
}

.gradient-yellow .stat-value {
    color: var(--medium);
}

.gradient-green .stat-value {
    color: var(--low);
}

/* ===== Charts Section ===== */
.charts-section {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 24px;
    margin-bottom: 32px;
}

.chart-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--border-color);
}

.chart-header {
    margin-bottom: 20px;
}

.chart-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

.chart-body {
    position: relative;
    height: 250px;
}

/* ===== Score Card ===== */
.score-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
}

.score-circle {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    position: relative;
    border: 6px solid var(--border-color);
}

.score-circle.critical {
    border-color: var(--critical);
}

.score-circle.high {
    border-color: var(--high);
}

.score-circle.medium {
    border-color: var(--medium);
}

.score-circle.good {
    border-color: var(--low);
}

.score-circle.excellent {
    border-color: #22c55e;
}

.score-circle.fair {
    border-color: var(--medium);
}

.score-circle.poor {
    border-color: var(--high);
}

.score-value {
    font-size: 3rem;
    font-weight: 800;
}

.score-label {
    color: var(--text-secondary);
    font-size: 1rem;
}

.score-rating {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* ===== Summary Section ===== */
.summary-section {
    margin-bottom: 32px;
}

.summary-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--border-color);
}

.summary-card h3 {
    margin-bottom: 16px;
}

.summary-content .no-data {
    color: var(--text-muted);
    text-align: center;
    padding: 32px;
}

.summary-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.summary-item .icon {
    font-size: 1.25rem;
}

.summary-item .text {
    flex: 1;
}

.summary-item .count {
    font-weight: 600;
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    background: var(--bg-primary);
}

/* Summary Insights */
.summary-divider {
    height: 1px;
    background: var(--border-color);
    margin: 8px 0;
}

.summary-item.insight {
    background: rgba(99, 102, 241, 0.1);
    border-left: 3px solid var(--accent-primary);
}

.summary-item.insight-good {
    background: rgba(34, 197, 94, 0.1);
    border-left: 3px solid var(--low);
}

.summary-item.insight-info {
    background: rgba(59, 130, 246, 0.1);
    border-left: 3px solid var(--info);
}

.summary-item.insight-warning {
    background: rgba(234, 179, 8, 0.15);
    border-left: 3px solid var(--medium);
}

.summary-item.insight-critical {
    background: rgba(239, 68, 68, 0.15);
    border-left: 3px solid var(--critical);
}

.summary-item.critical-alert {
    background: rgba(239, 68, 68, 0.1);
    border-left: 3px solid var(--critical);
    animation: pulse-critical 2s infinite;
}

@keyframes pulse-critical {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.8;
    }
}

/* ===== Findings View ===== */
.findings-container {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.findings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.findings-filters {
    display: flex;
    gap: 12px;
}

.filter-select {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 10px 16px;
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
}

.btn-export {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--accent-gradient);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-export:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-export svg {
    width: 18px;
    height: 18px;
}

.findings-list {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 600px;
    overflow-y: auto;
}

.no-findings {
    text-align: center;
    color: var(--text-muted);
    padding: 48px;
}

.finding-item {
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 20px;
    border-left: 4px solid var(--border-color);
    transition: var(--transition);
}

.finding-item:hover {
    transform: translateX(4px);
}

.finding-item.critical {
    border-left-color: var(--critical);
}

.finding-item.high {
    border-left-color: var(--high);
}

.finding-item.medium {
    border-left-color: var(--medium);
}

.finding-item.low {
    border-left-color: var(--low);
}

.finding-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.finding-title {
    font-size: 1rem;
    font-weight: 600;
}

.severity-badge {
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.severity-badge.critical {
    background: rgba(239, 68, 68, 0.2);
    color: var(--critical);
}

.severity-badge.high {
    background: rgba(249, 115, 22, 0.2);
    color: var(--high);
}

.severity-badge.medium {
    background: rgba(234, 179, 8, 0.2);
    color: var(--medium);
}

.severity-badge.low {
    background: rgba(34, 197, 94, 0.2);
    color: var(--low);
}

.finding-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 12px;
    line-height: 1.5;
}

.finding-meta {
    display: flex;
    gap: 16px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.finding-recommendation {
    margin-top: 12px;
    padding: 12px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}

.finding-recommendation strong {
    color: var(--accent-primary);
}

/* ===== Best Practice View ===== */
.bestpractice-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.bp-category {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.bp-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: var(--bg-tertiary);
    cursor: pointer;
}

.bp-category-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.1rem;
    font-weight: 600;
}

.bp-category-title .icon {
    font-size: 1.5rem;
}

.bp-score {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bp-score-value {
    font-weight: 700;
    font-size: 1.25rem;
}

.bp-score-bar {
    width: 100px;
    height: 8px;
    background: var(--bg-primary);
    border-radius: 4px;
    overflow: hidden;
}

.bp-score-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.bp-items {
    padding: 16px 24px;
}

.bp-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.bp-item:last-child {
    border-bottom: none;
}

.bp-item-status {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}

.bp-item-status.pass {
    background: rgba(34, 197, 94, 0.2);
    color: var(--low);
}

.bp-item-status.fail {
    background: rgba(239, 68, 68, 0.2);
    color: var(--critical);
}

.bp-item-status.warn {
    background: rgba(234, 179, 8, 0.2);
    color: var(--medium);
}

.bp-item-text {
    flex: 1;
    font-size: 0.95rem;
}

.bp-item-text.pass {
    color: var(--text-primary);
}

.bp-item-text.fail {
    color: var(--text-secondary);
}

.no-data {
    text-align: center;
    color: var(--text-muted);
    padding: 48px;
}

/* ===== Scoring View ===== */
.scoring-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.scoring-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 16px;
    padding: 20px 24px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.scoring-intro h3 {
    margin-bottom: 8px;
    font-size: 1.3rem;
}

.scoring-intro p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.scoring-legend {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.legend-item {
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
}

.legend-item.l1 {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.legend-item.l2 {
    background: rgba(249, 115, 22, 0.2);
    color: #f97316;
}

.legend-item.l3 {
    background: rgba(234, 179, 8, 0.2);
    color: #eab308;
}

.legend-item.l4 {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.legend-item.l5 {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.scoring-overview {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.score-domain-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--border-color);
    text-align: center;
    transition: all 0.3s ease;
}

.score-domain-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.score-domain-card.overall {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(168, 85, 247, 0.1));
    border-color: var(--accent-primary);
}

.domain-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
}

.domain-icon {
    font-size: 1.5rem;
}

.domain-name {
    font-weight: 600;
    font-size: 1.1rem;
}

.domain-score {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

.domain-score.l1 {
    color: #ef4444;
}

.domain-score.l2 {
    color: #f97316;
}

.domain-score.l3 {
    color: #eab308;
}

.domain-score.l4 {
    color: #3b82f6;
}

.domain-score.l5 {
    color: #22c55e;
}

.domain-level {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.scoring-details {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

/* Scoring Table Styles */
.scoring-table-header {
    display: grid;
    grid-template-columns: 90px 1fr 120px 1fr 1fr 200px;
    gap: 12px;
    padding: 16px 24px;
    background: var(--bg-tertiary);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
}

.scoring-table-row {
    display: grid;
    grid-template-columns: 90px 1fr 120px 1fr 1fr 200px;
    gap: 12px;
    padding: 14px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    align-items: center;
}

.scoring-table-row:hover {
    background: rgba(255, 255, 255, 0.02);
}

.col-domain {
    font-weight: 600;
    color: var(--accent-primary);
    font-size: 0.9rem;
}

.col-topic {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.col-topic strong {
    font-size: 0.95rem;
}

.topic-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.col-level {
    text-align: right;
}

.level-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    min-width: 100px;
    text-align: center;
}

.level-badge.l1 {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.level-badge.l2 {
    background: rgba(249, 115, 22, 0.2);
    color: #f97316;
}

.level-badge.l3 {
    background: rgba(234, 179, 8, 0.2);
    color: #eab308;
}

.level-badge.l4 {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.level-badge.l5 {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.col-explanation {
    font-size: 0.85rem;
    line-height: 1.4;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    background: rgba(99, 102, 241, 0.1);
    color: var(--text-secondary);
    border-left: 3px solid #6366f1;
    font-weight: 500;
}

.col-risk {
    font-size: 0.85rem;
    line-height: 1.4;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-weight: 500;
}

.col-risk.risk-high {
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
    border-left: 3px solid #ef4444;
}

.col-risk.risk-medium {
    background: rgba(234, 179, 8, 0.1);
    color: #fde047;
    border-left: 3px solid #eab308;
}

.col-risk.risk-low {
    background: rgba(34, 197, 94, 0.1);
    color: #86efac;
    border-left: 3px solid #22c55e;
}

.scoring-table-divider {
    height: 2px;
    background: var(--border-color);
}

/* Suggest Column */
.col-suggest {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.suggest-select {
    width: 100%;
    padding: 8px 32px 8px 12px;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.95) 100%);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 8px;
    color: #e2e8f0;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath fill='%238b5cf6' d='M5 7L1 3h8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
}

.suggest-select:hover {
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.15);
}

.suggest-select:focus {
    outline: none;
    border-color: rgba(139, 92, 246, 0.6);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15), 0 0 16px rgba(139, 92, 246, 0.1);
}

.suggest-select option {
    background: #1e293b;
    color: #f1f5f9;
    padding: 8px;
}

.suggest-detail {
    font-size: 0.78rem;
    line-height: 1.4;
    padding: 8px 10px;
    border-radius: 6px;
    background: rgba(139, 92, 246, 0.08);
    border-left: 3px solid rgba(139, 92, 246, 0.5);
    color: #c4b5fd;
    animation: suggestFadeIn 0.3s ease;
}

@keyframes suggestFadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.suggest-level-indicator {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    margin-right: 4px;
}

.suggest-level-indicator.l2 {
    background: rgba(249, 115, 22, 0.2);
    color: #f97316;
}

.suggest-level-indicator.l3 {
    background: rgba(234, 179, 8, 0.2);
    color: #eab308;
}

.suggest-level-indicator.l4 {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.suggest-level-indicator.l5 {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.suggest-achieved {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.25);
    border-radius: 8px;
    color: #86efac;
    font-size: 0.8rem;
    font-weight: 600;
}

.scoring-domain-section {
    border-bottom: 1px solid var(--border-color);
}

.scoring-domain-section:last-child {
    border-bottom: none;
}

.scoring-domain-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: var(--bg-tertiary);
    cursor: pointer;
}

.scoring-domain-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
}

.scoring-domain-title .icon {
    font-size: 1.25rem;
}

.scoring-domain-badge {
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
}

.scoring-domain-content {
    padding: 16px 24px;
}

.scoring-check-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.scoring-check-item:last-child {
    border-bottom: none;
}

.check-level {
    min-width: 50px;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
}

.check-level.l1 {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.check-level.l2 {
    background: rgba(249, 115, 22, 0.2);
    color: #f97316;
}

.check-level.l3 {
    background: rgba(234, 179, 8, 0.2);
    color: #eab308;
}

.check-level.l4 {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.check-level.l5 {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.check-info {
    flex: 1;
}

.check-topic {
    font-weight: 600;
    margin-bottom: 4px;
}

.check-description {
    font-size: 0.85rem;
    color: var(--text-muted);
}

@media (max-width: 1024px) {
    .scoring-overview {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .scoring-overview {
        grid-template-columns: 1fr;
    }

    .scoring-header {
        flex-direction: column;
    }
}

/* ===== Modal Styles ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-tertiary);
}

.modal-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    padding: 4px 8px;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-tertiary);
}

/* ===== Form Styles (Elegant Theme) ===== */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #e2e8f0;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.95) 100%);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 10px;
    color: #f1f5f9;
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: rgba(99, 102, 241, 0.35);
    background: linear-gradient(135deg, rgba(30, 41, 59, 1) 0%, rgba(15, 23, 42, 1) 100%);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: rgba(139, 92, 246, 0.6);
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.1),
        0 0 0 4px rgba(139, 92, 246, 0.15),
        0 0 20px rgba(139, 92, 246, 0.1);
    background: linear-gradient(135deg, rgba(30, 41, 59, 1) 0%, rgba(15, 23, 42, 1) 100%);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(148, 163, 184, 0.6);
    font-style: italic;
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238b5cf6' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.form-group select option {
    background: #1e293b;
    color: #f1f5f9;
    padding: 12px;
}

.form-group small {
    display: block;
    margin-top: 8px;
    color: rgba(148, 163, 184, 0.7);
    font-size: 0.8rem;
    font-style: italic;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
    line-height: 1.6;
}

/* Button Styles for Modal (Elegant) */
.btn-secondary {
    background: linear-gradient(135deg, rgba(51, 65, 85, 0.8) 0%, rgba(30, 41, 59, 0.9) 100%);
    color: #cbd5e1;
    border: 1px solid rgba(148, 163, 184, 0.2);
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, rgba(71, 85, 105, 0.9) 0%, rgba(51, 65, 85, 0.95) 100%);
    color: #f1f5f9;
    border-color: rgba(148, 163, 184, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Primary button enhancement */
.modal-footer .btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.modal-footer .btn-primary:hover {
    background: linear-gradient(135deg, #7c7ff2 0%, #9d75f7 50%, #b96cf8 100%);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
    transform: translateY(-2px);
}

/* ===== Responsive ===== */
@media (max-width: 1200px) {
    .stats-section {
        grid-template-columns: repeat(2, 1fr);
    }

    .charts-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 80px;
        padding: 16px 8px;
    }

    .logo-text,
    .nav-item span,
    .version-info {
        display: none;
    }

    .main-content {
        margin-left: 80px;
        padding: 16px;
    }

    .stats-section {
        grid-template-columns: 1fr;
    }
}

/* ===== Scoring Tabs ===== */
.scoring-tabs {
    display: flex;
    gap: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 24px;
}

.scoring-tab {
    flex: 1;
    padding: 12px 16px;
    border-radius: 10px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.scoring-tab:hover {
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.05);
}

.scoring-tab.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(168, 85, 247, 0.3));
    color: #fff;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
}

.scoring-tab-content {
    display: none;
}

.scoring-tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Overall Maturity Banner ===== */
.overall-maturity-banner {
    background: linear-gradient(135deg, rgba(30, 30, 50, 0.9), rgba(20, 20, 40, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px 28px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 28px;
}

.maturity-score-big {
    font-size: 3rem;
    font-weight: 700;
    min-width: 100px;
    text-align: center;
}

.maturity-label {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 8px;
}

.maturity-breakdown {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.maturity-breakdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    min-width: 100px;
}

.maturity-breakdown-item .mb-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 4px;
}

.maturity-breakdown-item .mb-value {
    font-size: 1.3rem;
    font-weight: 600;
    color: #a78bfa;
}

/* Maturity Level Colors */
.maturity-initial {
    color: #ef4444 !important;
}

.maturity-basic {
    color: #f97316 !important;
}

.maturity-defined {
    color: #eab308 !important;
}

.maturity-managed {
    color: #22c55e !important;
}

.maturity-optimized {
    color: #06b6d4 !important;
}

/* ===== Policy Scoring Legend ===== */
.policy-score-legend {
    display: flex;
    gap: 16px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 0.85rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.6);
}

.legend-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 22px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
}

.legend-badge.pass {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.legend-badge.partial {
    background: rgba(234, 179, 8, 0.15);
    color: #eab308;
}

.legend-badge.fail {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

/* ===== Policy Category Card ===== */
.policy-category-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
    transition: border-color 0.3s ease;
}

.policy-category-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.policy-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s ease;
}

.policy-category-header:hover {
    background: rgba(255, 255, 255, 0.03);
}

.policy-cat-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.policy-cat-icon {
    font-size: 1.2rem;
}

.policy-cat-name {
    font-size: 0.95rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

.policy-cat-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.policy-cat-score {
    font-size: 0.85rem;
    font-weight: 600;
    min-width: 35px;
    text-align: right;
}

.policy-cat-bar {
    width: 80px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.policy-cat-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
}

.policy-cat-percent {
    font-size: 0.85rem;
    font-weight: 600;
    min-width: 40px;
    text-align: right;
}

.policy-cat-chevron {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.4);
    transition: transform 0.3s ease;
    margin-left: 4px;
}

.policy-cat-chevron.rotated {
    transform: rotate(-180deg);
}

/* ===== Policy Category Body (items) ===== */
.policy-category-body {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 8px 18px 12px;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    max-height: 5000px;
    opacity: 1;
    overflow: hidden;
}

.policy-category-body.collapsed {
    max-height: 0;
    opacity: 0;
    padding: 0 18px;
    border-top: none;
}

.policy-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.policy-item:last-child {
    border-bottom: none;
}

.policy-item-score {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 28px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 2px;
}

.policy-item-score.score-pass {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.policy-item-score.score-partial {
    background: rgba(234, 179, 8, 0.15);
    color: #eab308;
    border: 1px solid rgba(234, 179, 8, 0.3);
}

.policy-item-score.score-fail {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.policy-item-info {
    flex: 1;
}

.policy-item-name {
    font-size: 0.88rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 2px;
}

.policy-item-detail {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.45);
    line-height: 1.4;
}

/* ===== Policy Overall Footer ===== */
.policy-overall-footer {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    background: linear-gradient(135deg, rgba(30, 30, 50, 0.8), rgba(20, 20, 40, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    margin-top: 16px;
}

.policy-overall-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
}

.policy-overall-value {
    font-size: 1.8rem;
    font-weight: 700;
}

.policy-overall-maturity {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    flex: 1;
}

/* ===== Responsive Scoring ===== */
@media (max-width: 768px) {
    .overall-maturity-banner {
        flex-direction: column;
        text-align: center;
        padding: 16px;
    }

    .maturity-breakdown {
        justify-content: center;
    }

    .scoring-tabs {
        flex-direction: column;
    }

    .policy-cat-bar {
        display: none;
    }

    .policy-score-legend {
        flex-direction: column;
        gap: 8px;
    }
}

/* ===== Dashboard Scoring Section ===== */
.dashboard-scoring-section {
    margin-top: 24px;
}

.dashboard-scoring-section .section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 16px;
}

.scoring-overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.dash-score-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 20px;
    transition: border-color 0.3s ease, transform 0.2s ease;
}

.dash-score-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.dash-score-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.dash-score-icon {
    font-size: 1.3rem;
}

.dash-score-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
}

.dash-score-body {
    text-align: center;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.dash-score-big {
    font-size: 2.4rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.6);
}

.dash-score-level {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.45);
    margin-top: 4px;
}

.dash-score-categories {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dash-cat-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dash-cat-name {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.55);
    min-width: 110px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dash-cat-bar {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    overflow: hidden;
}

.dash-cat-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.6s ease;
}

.dash-cat-pct {
    font-size: 0.72rem;
    font-weight: 600;
    min-width: 32px;
    text-align: right;
}

@media (max-width: 1024px) {
    .scoring-overview-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .scoring-overview-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== Firewall Score Overview ===== */
.fw-score-overview {
    display: flex;
    gap: 28px;
    align-items: stretch;
    margin-bottom: 24px;
    background: linear-gradient(135deg, rgba(30, 30, 50, 0.6), rgba(20, 20, 40, 0.8));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 28px;
}

/* Main Score (left side) */
.fw-score-main {
    display: flex;
    align-items: center;
    gap: 24px;
    min-width: 320px;
}

.fw-score-ring {
    position: relative;
    width: 120px;
    height: 120px;
    flex-shrink: 0;
}

.fw-score-ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.fw-score-ring .ring-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.08);
    stroke-width: 8;
}

.fw-score-ring .ring-fill {
    fill: none;
    stroke: rgba(255, 255, 255, 0.2);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 326.73;
    stroke-dashoffset: 326.73;
    transition: stroke-dashoffset 1s ease, stroke 0.4s ease;
}

.fw-score-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.8rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.5);
    transition: color 0.4s;
}

.fw-score-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.fw-score-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: -0.02em;
}

.fw-score-level {
    font-size: 0.95rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.45);
    transition: color 0.4s;
}

.fw-score-formula {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.formula-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: rgba(167, 139, 250, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.formula-text {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.5);
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

/* Domain Breakdown (right side) */
.fw-domain-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: center;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    padding-left: 28px;
}

.fw-domain-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    transition: border-color 0.3s, background 0.3s, transform 0.2s;
}

.fw-domain-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(4px);
}

.fw-domain-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.fw-domain-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.fw-domain-name {
    font-size: 0.92rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
}

.fw-domain-bar {
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.fw-domain-bar-fill {
    height: 100%;
    border-radius: 3px;
    width: 0%;
    transition: width 0.8s ease, background 0.4s;
}

.fw-domain-score {
    font-size: 1.4rem;
    font-weight: 800;
    min-width: 60px;
    text-align: right;
    color: rgba(255, 255, 255, 0.5);
    transition: color 0.4s;
}

@media (max-width: 900px) {
    .fw-score-overview {
        flex-direction: column;
        padding: 20px;
    }

    .fw-score-main {
        min-width: unset;
        justify-content: center;
    }

    .fw-domain-list {
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        padding-left: 0;
        padding-top: 20px;
    }
}

@media (max-width: 480px) {
    .fw-score-main {
        flex-direction: column;
        text-align: center;
    }

    .fw-score-info {
        align-items: center;
    }
}

/* ===== Rule Hygiene â€” Compact Clickable ===== */
.rule-hygiene-compact {
    margin-top: 8px;
}

.rh-clickable {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
    user-select: none;
}

.rh-clickable:hover {
    background: rgba(99, 102, 241, 0.08);
    border-color: rgba(99, 102, 241, 0.3);
}

.rh-count-badge {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(168, 85, 247, 0.2));
    color: #a78bfa;
    padding: 3px 12px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.82rem;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    border: 1px solid rgba(167, 139, 250, 0.25);
}

.rh-status-ok {
    color: #22c55e;
    font-size: 0.8rem;
    font-weight: 500;
}

.rh-status-warn {
    color: #f97316;
    font-size: 0.8rem;
    font-weight: 500;
}

.rh-expand-hint {
    margin-left: auto;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.3);
    transition: transform 0.3s ease, color 0.3s ease;
}

.rh-clickable:hover .rh-expand-hint {
    color: rgba(167, 139, 250, 0.7);
}

/* Expandable Rule List â€” hidden by default */
.rh-rule-list {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease, margin 0.3s ease;
    margin-top: 0;
}

.rh-rule-list.rh-expanded {
    max-height: 8000px;
    opacity: 1;
    margin-top: 12px;
    overflow-x: auto;
}

/* Duplicate row highlight */
.rh-row-dup {
    background: rgba(249, 115, 22, 0.06) !important;
}

.rh-row-dup:hover {
    background: rgba(249, 115, 22, 0.1) !important;
}

/* Action tag */
.rh-action-accept {
    color: #22c55e;
    font-weight: 600;
    font-size: 0.78rem;
}

.rh-action-deny {
    color: #ef4444;
    font-weight: 600;
    font-size: 0.78rem;
}

/* Status tags */
.rh-ok-tag {
    color: #22c55e;
    font-size: 0.72rem;
    font-weight: 500;
}

.rh-dup-tag {
    color: #f97316;
    font-size: 0.72rem;
    font-weight: 600;
    background: rgba(249, 115, 22, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

/* Duplicate Detail Section */
.rh-dup-detail-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.rh-dup-detail-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 12px;
}

.rh-syntax-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(167, 139, 250, 0.8);
    margin-top: 8px;
    margin-bottom: 4px;
}

/* Duplicate Group (shared) */
.duplicate-group {
    background: rgba(239, 68, 68, 0.04);
    border: 1px solid rgba(239, 68, 68, 0.15);
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 10px;
    transition: border-color 0.3s ease;
}

.duplicate-group:hover {
    border-color: rgba(239, 68, 68, 0.3);
}

.duplicate-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.dup-group-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #f97316;
}

.duplicate-reason {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.55);
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    margin-bottom: 8px;
    line-height: 1.5;
    border-left: 3px solid rgba(249, 115, 22, 0.5);
}

.duplicate-reason code {
    background: rgba(167, 139, 250, 0.12);
    color: #c4b5fd;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    word-break: break-all;
}

.duplicate-reason strong {
    color: rgba(255, 255, 255, 0.7);
}

/* Rule Detail Table */
.rule-detail-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.78rem;
    border-radius: 8px;
    overflow: hidden;
}

.rule-detail-table thead th {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.6);
    padding: 8px 10px;
    font-weight: 600;
    text-align: left;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    white-space: nowrap;
}

.rule-detail-table tbody td {
    padding: 7px 10px;
    color: rgba(255, 255, 255, 0.65);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    vertical-align: middle;
    font-size: 0.76rem;
}

.rule-detail-table tbody td code {
    background: rgba(167, 139, 250, 0.1);
    color: #c4b5fd;
    padding: 1px 5px;
    border-radius: 3px;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.72rem;
}

.rule-detail-table tbody tr:last-child td {
    border-bottom: none;
}

.rule-detail-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.rule-id-badge {
    display: inline-block;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(168, 85, 247, 0.2));
    color: #a78bfa;
    padding: 2px 8px;
    border-radius: 5px;
    font-weight: 700;
    font-size: 0.75rem;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    border: 1px solid rgba(167, 139, 250, 0.25);
}

.rule-syntax-block {
    background: rgba(0, 0, 0, 0.35);
    color: #e2e8f0;
    padding: 10px 12px;
    border-radius: 6px;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.72rem;
    line-height: 1.6;
    white-space: pre;
    overflow-x: auto;
    margin: 4px 0;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

/* Highlighted column value for exposure issues */
code.rh-highlight {
    background: rgba(239, 68, 68, 0.2) !important;
    color: #fca5a5 !important;
    border: 1px solid rgba(239, 68, 68, 0.3);
    font-weight: 600;
}

.rh-weak-tag {
    color: #ef4444;
    font-size: 0.72rem;
    font-weight: 600;
    background: rgba(239, 68, 68, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

.cipher-empty-msg {
    padding: 10px;
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.75rem;
    text-align: center;
    font-style: italic;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    border: 1px dashed rgba(255, 255, 255, 0.1);
}

/* Cipher Compact â€” fits inside col-explanation */
.cipher-compact {
    width: 100%;
}

.cipher-clickable {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.25s ease;
    user-select: none;
    flex-wrap: wrap;
}

.cipher-clickable:hover {
    background: rgba(99, 102, 241, 0.08);
    border-color: rgba(99, 102, 241, 0.3);
}

.cipher-stat {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 4px;
}

.cipher-stat.cipher-strong {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.cipher-stat.cipher-med {
    background: rgba(234, 179, 8, 0.15);
    color: #eab308;
}

.cipher-stat.cipher-weak {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

/* Expandable detail list */
.cipher-detail-list {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease, margin 0.3s ease;
    margin-top: 0;
}

.cipher-detail-list.cipher-open {
    max-height: 3000px;
    opacity: 1;
    margin-top: 8px;
}

.cipher-item {
    padding: 6px 8px;
    border-radius: 6px;
    margin-bottom: 4px;
    border-left: 3px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
}

.cipher-item.cd-strong {
    border-left-color: #22c55e;
}

.cipher-item.cd-med {
    border-left-color: #eab308;
    background: rgba(234, 179, 8, 0.04);
}

.cipher-item.cd-weak {
    border-left-color: #ef4444;
    background: rgba(239, 68, 68, 0.06);
}

.cipher-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
}

.cipher-item-type {
    font-size: 0.68rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.cipher-item-rating {
    font-size: 0.65rem;
    font-weight: 600;
}

.cd-strong .cipher-item-rating {
    color: #22c55e;
}

.cd-med .cipher-item-rating {
    color: #eab308;
}

.cd-weak .cipher-item-rating {
    color: #ef4444;
}

code.cipher-item-value {
    display: block;
    background: rgba(167, 139, 250, 0.1);
    color: #c4b5fd;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.72rem;
    margin-bottom: 2px;
    word-break: break-all;
}

.cd-weak code.cipher-item-value {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
}

.cipher-item-line {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.3);
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== Formal Audit Table Styles ===== */
.audit-table-wrapper {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.audit-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03) !important;
}

.audit-table th {
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.85rem;
}

/* ===== Tab Summary Panels ===== */
.tab-summary {
    margin-bottom: 28px;
}

.tab-summary-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #f1f5f9;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tab-summary-title svg {
    width: 20px;
    height: 20px;
    stroke: #a5b4fc;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.tab-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.tab-stat-card {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid #1e293b;
    border-radius: 10px;
    padding: 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: all 0.2s;
}

.tab-stat-card:hover {
    border-color: #334155;
    background: rgba(15, 23, 42, 0.9);
}

.tab-stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: #f8fafc;
    line-height: 1;
}

.tab-stat-label {
    font-size: 0.78rem;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ===== Tab Data Tables ===== */
.tab-data-table-wrapper {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid #1e293b;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 24px;
}

.tab-data-table-header {
    padding: 14px 18px;
    background: #1e293b;
    border-bottom: 1px solid #334155;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tab-data-table-header h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #e2e8f0;
    margin: 0;
}

.tab-data-table-header .table-badge {
    font-size: 0.78rem;
    color: #a5b4fc;
    background: rgba(99, 102, 241, 0.15);
    padding: 3px 10px;
    border-radius: 12px;
    border: 1px solid rgba(99, 102, 241, 0.25);
}

.tab-data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.tab-data-table thead th {
    padding: 10px 14px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(15, 23, 42, 0.5);
    border-bottom: 1px solid #334155;
    text-align: left;
    white-space: nowrap;
}

.tab-data-table tbody td {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(30, 41, 59, 0.5);
    color: #cbd5e1;
    vertical-align: top;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tab-data-table tbody tr:last-child td {
    border-bottom: none;
}

.tab-data-table tbody tr:hover {
    background: rgba(99, 102, 241, 0.04);
}

.tab-data-table .cell-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 600;
}

.tab-data-table .cell-badge.accept {
    background: rgba(34, 197, 94, 0.12);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.tab-data-table .cell-badge.deny {
    background: rgba(239, 68, 68, 0.12);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.tab-data-table .cell-badge.enable {
    background: rgba(34, 197, 94, 0.12);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.tab-data-table .cell-badge.disable {
    background: rgba(239, 68, 68, 0.12);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.tab-data-table .cell-badge.info {
    background: rgba(99, 102, 241, 0.12);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.tab-data-table .cell-badge.warn {
    background: rgba(234, 179, 8, 0.12);
    color: #fde68a;
    border: 1px solid rgba(234, 179, 8, 0.2);
}

/* Scrollable table container */
.tab-data-table-scroll {
    max-height: 400px;
    overflow-y: auto;
    overflow-x: auto;
}

.tab-data-table-scroll::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.tab-data-table-scroll::-webkit-scrollbar-track {
    background: #0f172a;
}

.tab-data-table-scroll::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 3px;
}

/* Recommendation summary stats */
.rec-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.rec-summary-card {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid #1e293b;
    border-radius: 10px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.rec-summary-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.rec-summary-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.rec-summary-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: #f8fafc;
    line-height: 1;
}

.rec-summary-label {
    font-size: 0.78rem;
    color: #64748b;
    font-weight: 500;
}

.tab-badge-summary {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 4px;
    font-weight: 400;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.scoring-tab:hover .tab-badge-summary,
.scoring-tab.active .tab-badge-summary {
    opacity: 1;
    color: #e2e8f0;
}

/* ===== Detail Expand Toggle ===== */
.tab-detail-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    margin-bottom: 20px;
    background: rgba(30, 41, 59, 0.5);
    border: 1px dashed #475569;
    border-radius: 6px;
    color: #94a3b8;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab-detail-toggle:hover {
    background: #1e293b;
    color: #e2e8f0;
    border-color: #64748b;
}

.tab-detail-toggle .chevron {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.tab-detail-toggle.expanded .chevron {
    transform: rotate(180deg);
}

.tab-detail-content {
    animation: slideDown 0.3s ease-out forwards;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
/* ===== Inline Tab Detail Toggle ===== */
.tab-inline-detail-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.65rem;
    color: #818cf8;
    margin-top: 6px;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(129, 140, 248, 0.1);
    transition: all 0.2s;
}
.tab-inline-detail-toggle:hover {
    background: rgba(129, 140, 248, 0.2);
    color: #a5b4fc;
}
.tab-inline-detail-toggle .chevron { width: 12px; height: 12px; transition: transform 0.3s; }
.tab-inline-detail-toggle.expanded .chevron { transform: rotate(180deg); }

/* ===== VPN Audit Table ===== */
.vpn-audit-section {
    margin-bottom: 28px;
}

.vpn-audit-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.vpn-audit-section-title .vpn-section-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 20px;
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
    text-transform: none;
    letter-spacing: 0;
}

.vpn-audit-table-wrap {
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.vpn-audit-table-scroll {
    overflow-x: auto;
    max-height: 480px;
    overflow-y: auto;
}

.vpn-audit-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
    table-layout: auto;
}

/* Sticky header */
.vpn-audit-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #1e1e35;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
    cursor: default;
    user-select: none;
}

/* Zebra striping — data rows only */
.vpn-audit-table tbody tr.vpn-data-row:nth-child(4n+1),
.vpn-audit-table tbody tr.vpn-data-row:nth-child(4n+2) {
    background: rgba(255, 255, 255, 0.02);
}
.vpn-audit-table tbody tr.vpn-data-row:nth-child(4n+3),
.vpn-audit-table tbody tr.vpn-data-row:nth-child(4n+4) {
    background: var(--bg-tertiary);
}

.vpn-data-row {
    cursor: pointer;
    transition: background 0.15s ease;
}

.vpn-data-row:hover {
    background: rgba(99, 102, 241, 0.08) !important;
}

.vpn-data-row.expanded-row {
    background: rgba(99, 102, 241, 0.06) !important;
}

.vpn-audit-table td {
    padding: 9px 12px;
    vertical-align: middle;
    color: var(--text-primary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    white-space: nowrap;
}

.vpn-audit-table td.wrap-cell {
    white-space: normal;
    word-break: break-all;
    min-width: 120px;
}

/* Number column */
.vpn-audit-table td.col-num {
    color: var(--text-muted);
    font-size: 0.72rem;
    width: 32px;
    text-align: center;
}

/* Status icons */
.vpn-status-icon {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 20px;
    white-space: nowrap;
}
.vpn-status-icon.ok {
    color: #22c55e;
    background: rgba(34, 197, 94, 0.12);
}
.vpn-status-icon.warning {
    color: #eab308;
    background: rgba(234, 179, 8, 0.12);
}
.vpn-status-icon.critical {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.12);
}
.vpn-status-icon svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}

/* Expand icon in the row */
.vpn-expand-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0;
    transition: color 0.2s;
}
.vpn-expand-btn:hover { color: var(--text-primary); }
.vpn-expand-btn .expand-chevron {
    width: 14px;
    height: 14px;
    transition: transform 0.25s ease;
}
.vpn-data-row.expanded-row .vpn-expand-btn .expand-chevron {
    transform: rotate(180deg);
}

/* Expandable detail row */
.vpn-detail-row td {
    padding: 0 !important;
    border-bottom: 1px solid rgba(99, 102, 241, 0.25) !important;
}

.vpn-detail-inner {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.vpn-detail-inner.open {
    max-height: 600px;
}

.vpn-detail-content {
    display: flex;
    gap: 24px;
    padding: 16px 24px;
    background: rgba(10, 10, 30, 0.6);
    flex-wrap: wrap;
    border-top: 1px solid rgba(99, 102, 241, 0.18);
    animation: fadeIn 0.25s ease;
}

.vpn-findings-block {
    flex: 1;
    min-width: 200px;
}

.vpn-findings-block h5 {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 700;
    margin-bottom: 8px;
}

.vpn-findings-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.vpn-findings-list li {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.45;
}

.vpn-findings-list li .finding-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-top: 5px;
    flex-shrink: 0;
}
.vpn-findings-list li.sev-critical .finding-dot { background: #ef4444; }
.vpn-findings-list li.sev-warning .finding-dot { background: #eab308; }
.vpn-findings-list li.sev-info .finding-dot { background: #3b82f6; }
.vpn-findings-list li.sev-ok .finding-dot { background: #22c55e; }

.vpn-risk-block {
    min-width: 120px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.vpn-risk-block h5 {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 700;
    margin-bottom: 2px;
}

.vpn-risk-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}
.vpn-risk-badge.low    { background: rgba(34,197,94,0.15);  color: #22c55e; }
.vpn-risk-badge.medium { background: rgba(234,179,8,0.15);  color: #eab308; }
.vpn-risk-badge.high   { background: rgba(249,115,22,0.15); color: #f97316; }
.vpn-risk-badge.critical { background: rgba(239,68,68,0.15); color: #ef4444; }

.vpn-recs-block {
    flex: 1.5;
    min-width: 200px;
}

.vpn-recs-block h5 {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 700;
    margin-bottom: 8px;
}

.vpn-recs-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.vpn-recs-list li {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    font-size: 0.8rem;
    color: #a5b4fc;
    line-height: 1.45;
}

.vpn-recs-list li::before {
    content: "→";
    color: #6366f1;
    font-size: 0.8rem;
    flex-shrink: 0;
    margin-top: 1px;
}

/* Empty state */
.vpn-no-data {
    text-align: center;
    padding: 32px;
    color: var(--text-muted);
    font-size: 0.88rem;
}

/* IKE version badge specific */
.vpn-ike-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.73rem;
    font-weight: 600;
}
.vpn-ike-badge.v2 { background: rgba(34,197,94,0.15); color: #22c55e; }
.vpn-ike-badge.v1 { background: rgba(234,179,8,0.15); color: #eab308; }
.vpn-ike-badge.unknown { background: rgba(255,255,255,0.07); color: var(--text-muted); }

/* PFS badge */
.vpn-pfs-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.73rem;
    font-weight: 600;
}
.vpn-pfs-badge.enabled  { background: rgba(34,197,94,0.15);  color: #22c55e; }
.vpn-pfs-badge.disabled { background: rgba(239,68,68,0.15);  color: #ef4444; }
.vpn-pfs-badge.unknown  { background: rgba(255,255,255,0.07); color: var(--text-muted); }

/* VPN tunnel status badge */
.vpn-tunnel-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.73rem;
    font-weight: 600;
}
.vpn-tunnel-status.enable  { background: rgba(34,197,94,0.15);  color: #22c55e; }
.vpn-tunnel-status.disable { background: rgba(239,68,68,0.15);  color: #ef4444; }
.vpn-tunnel-status.unknown { background: rgba(255,255,255,0.07); color: var(--text-muted); }

