:root {
    --bg-color: #ffffff;
    --card-bg: #f8fafc;
    --accent-primary: #0d9488;
    /* Darker teal for better contrast on white */
    --accent-secondary: #7c3aed;
    /* Darker purple */
    --text-main: #0f172a;
    --text-muted: #5e6d82;
    /* Improved contrast ratio (>4.5:1) */
    --border-color: rgba(0, 0, 0, 0.08);
    --glass-blur: 12px;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --skeleton-bg: #e2e8f0;
}


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

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(13, 148, 136, 0.03) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(124, 58, 237, 0.03) 0%, transparent 40%);
}

.app-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem 2rem 2rem;
}

/* Global Module Navigation */
.global-header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border-radius: 0 0 24px 24px;
    margin-bottom: 2rem;
    padding: 0.75rem 2rem;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.global-nav-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.global-nav-items {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.global-nav-actions {
    display: flex;
    justify-content: flex-end;
}

.global-nav-link {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.6rem 1.25rem;
    border-radius: 50px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.global-nav-link:hover {
    color: var(--accent-primary);
    background: rgba(13, 148, 136, 0.08);
}

.global-nav-link.active {
    background: var(--accent-primary);
    color: #ffffff !important;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.25);
}

.global-nav-link .nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
}

.mobile-menu-toggle:hover {
    background: rgba(13, 148, 136, 0.08);
    color: var(--accent-primary);
}

@media (max-width: 1024px) {
    .global-header {
        padding: 0.75rem 1rem;
    }

    .global-nav-container {
        grid-template-columns: auto 1fr auto;
        gap: 1rem;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .global-nav-items {
        display: none;
        position: absolute;
        top: 100%;
        left: 1rem;
        right: 1rem;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 1rem;
        gap: 0.5rem;
        box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
        border: 1px solid var(--border-color);
        border-radius: 16px;
        z-index: 1000;
        animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    @keyframes slideDown {
        from { opacity: 0; transform: translateY(-10px); }
        to { opacity: 1; transform: translateY(0); }
    }

    .global-header.mobile-nav-active .global-nav-items {
        display: flex;
    }

    .global-nav-link {
        width: 100%;
        justify-content: flex-start;
        padding: 0.8rem 1.25rem;
        background: transparent !important;
        color: var(--text-muted) !important;
        box-shadow: none !important;
    }

    .global-nav-link:hover {
        background: rgba(13, 148, 136, 0.05) !important;
        color: var(--accent-primary) !important;
    }

    .global-nav-link.active {
        background: rgba(13, 148, 136, 0.1) !important;
        color: var(--accent-primary) !important;
        font-weight: 700;
    }

    .global-nav-actions {
        display: flex;
        align-items: center;
    }

    .logo-img {
        height: 36px;
    }
}

header {
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.logo-link:hover {
    transform: scale(1.02);
}

.logo-img {
    height: 48px;
    /* Adjusted for better visibility */
    width: auto;
    display: block;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    padding: 0.5rem 0;
    position: relative;
}

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

.nav-link.active {
    color: var(--text-main);
    font-weight: 600;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-primary);
    border-radius: 2px;
}

.header-content {
    margin-bottom: 3rem;
}

h1 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 4px 24px 0 rgba(0, 0, 0, 0.04);
    margin-bottom: 2rem;
}

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

h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
}

.chart-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
}

#bar-chart-container,
#map-container {
    width: 100%;
    position: relative;
    cursor: crosshair;
    overflow: hidden;
}

#bar-chart-container {
    height: 400px;
    margin-top: 1rem;
}

.bar-label {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 700;
    fill: var(--text-main);
    text-anchor: middle;
    pointer-events: none;
}

.bar {
    fill: var(--accent-primary);
    transition: fill 0.3s ease, opacity 0.3s ease;
    cursor: pointer;
}

.bar:hover {
    fill: var(--accent-secondary);
}

.axis-label {
    fill: var(--text-muted);
    font-size: 0.75rem;
    font-family: var(--font-body);
}

.grid-line {
    stroke: var(--border-color);
    stroke-opacity: 0.5;
    shape-rendering: crispEdges;
}


/* Map Styling */
#map-container {
    height: 500px;
}


.country {
    fill: #f1f5f9;
    stroke: #e2e8f0;
    stroke-width: 0.5px;
    transition: fill 0.3s ease, transform 0.2s ease;
}

.country-active {
    fill: var(--accent-primary);
}

.country:hover,
.country:focus {
    fill: var(--accent-secondary) !important;
    outline: none;
}

.country:focus-visible {
    stroke: var(--text-main);
    stroke-width: 2px;
}


.tooltip {
    position: absolute;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 20px;
    pointer-events: none;
    z-index: 1000;
    font-size: 0.9rem;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.12);
    transition: opacity 0.3s ease, transform 0.3s ease;
    min-width: 260px;
    color: var(--text-main);
    transform: translateY(0);
}

.tooltip.hidden {
    opacity: 0;
    transform: translateY(10px);
}

.tooltip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.trend-title {
    font-weight: 700;
    font-size: 1.1rem;
    font-family: var(--font-heading);
    margin: 0;
}

.region-badge {
    background: rgba(13, 148, 136, 0.1);
    color: var(--accent-primary);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
}

.tooltip-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 12px;
}

.tooltip-table th {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: left;
    padding: 4px 0;
    border-bottom: none;
    cursor: default;
}

.tooltip-table th:hover {
    color: var(--text-muted);
}

.tooltip-table td {
    padding: 6px 0;
    font-size: 0.85rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.tooltip-table td.val {
    font-weight: 700;
    font-family: var(--font-heading);
}

.tooltip-table .active-row {
    background: rgba(13, 148, 136, 0.05);
}

.sparkline-container {
    margin-top: 12px;
}

.sparkline-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.sparkline-svg {
    width: 100%;
    height: 40px;
    overflow: visible;
}


.trend-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 0.8rem;
}

.trend-arrow {
    font-size: 1rem;
    font-weight: bold;
}

.trend-up {
    color: #4ade80;
}

.trend-down {
    color: #f87171;
}

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

/* Year Selector */
.year-selector {
    display: flex;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.05);
    padding: 4px;
    border-radius: 12px;
}

.year-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.year-btn.active {
    background: var(--accent-primary);
    color: var(--bg-color);
}

/* Table Styling */
.filter-controls {
    display: flex;
    gap: 1rem;
}

.search-input,
.select-input {
    background: #ffffff;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 10px 16px;
    border-radius: 12px;
    font-family: var(--font-body);
}

.search-input {
    width: 250px;
}

.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

th {
    text-align: left;
    padding: 12px 16px;
    color: var(--text-muted);
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
}

th:hover,
th:focus-visible {
    color: var(--accent-primary);
    outline: 2px solid var(--accent-primary);
    outline-offset: -2px;
}


td {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
}

tr:hover td {
    background: rgba(0, 0, 0, 0.02);
}

.increase-value {
    font-weight: 700;
    font-family: var(--font-heading);
}

.positive {
    color: #16a34a;
    /* WCAG AA compliant green */
}


.active-year {
    color: var(--accent-primary);
    background: rgba(13, 148, 136, 0.1);
}

.global-nav-link {
    color: #475569;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
    padding: 6px 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: transform 0.2s;
}

.global-nav-link:hover .nav-icon {
    transform: translateY(-1px);
    opacity: 1;
}

.global-nav-link.active {
    color: var(--accent-primary);
    transform: translateX(2px);
}

footer {
    text-align: center;
    padding: 2rem 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, var(--skeleton-bg) 25%, #f1f5f9 50%, var(--skeleton-bg) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
    color: transparent !important;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.skeleton-text {
    height: 1rem;
    width: 80%;
    display: inline-block;
}

/* Pay Equity Audit Tool Styles */
.step-section {
    display: none;
}

.step-section.active {
    display: block;
}

.step-indicator {
    background: rgba(13, 148, 136, 0.1);
    color: var(--accent-primary);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.privacy-banner {
    background: rgba(124, 58, 237, 0.05);
    border: 1px solid rgba(124, 58, 237, 0.1);
    border-radius: 16px;
    padding: 1.25rem;
    margin-bottom: 2rem;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.privacy-icon {
    color: var(--accent-secondary);
    flex-shrink: 0;
}

.privacy-text {
    font-size: 0.9rem;
    color: var(--text-main);
    line-height: 1.5;
}

.privacy-text strong {
    color: var(--accent-secondary);
}

.import-zone {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 1rem 0;
}

.drop-zone {
    border: 2px dashed var(--border-color);
    border-radius: 16px;
    padding: 3rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(13, 148, 136, 0.02);
}

.drop-zone:hover,
.drop-zone.drag-over {
    border-color: var(--accent-primary);
    background: rgba(13, 148, 136, 0.05);
}

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

.drop-zone h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.drop-zone p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.divider {
    text-align: center;
    position: relative;
    margin: 1rem 0;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-color);
}

.divider span {
    background: var(--card-bg);
    padding: 0 1rem;
    position: relative;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
}

.paste-zone {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.paste-zone label {
    font-weight: 600;
    color: var(--text-main);
}

.paste-zone textarea {
    min-height: 200px;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    resize: vertical;
    background: #ffffff;
}

.sample-data-zone {
    text-align: center;
}

.full-width {
    width: 100%;
}

.btn-primary,
.btn-secondary {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-body);
}

.btn-primary {
    background: var(--accent-primary);
    color: white;
}

.btn-primary:hover {
    background: #0f766e;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(0, 0, 0, 0.02);
}

.mapping-instructions,
.config-instructions {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.mapping-container {
    overflow-x: auto;
    margin-bottom: 2rem;
}

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

.mapping-table th {
    background: rgba(0, 0, 0, 0.02);
    padding: 12px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid var(--border-color);
}

.mapping-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
}

.mapping-table select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: white;
    font-family: var(--font-body);
}

.mapping-table .preview-cell {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
}

.config-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2.5rem;
    margin-bottom: 2rem;
}

.config-group {
    margin-bottom: 2rem;
}

.config-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.config-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

/* Multi-select styling */
.multi-select-container {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 0.5rem;
    min-height: 50px;
}

.selected-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.tag {
    background: var(--accent-primary);
    color: white;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tag-remove {
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1rem;
    line-height: 1;
}

.attr-dropdown {
    width: 100%;
    border: none;
    background: transparent;
    padding: 8px;
    outline: none;
}

/* Advisor Card */
.advisor-card {
    background: rgba(13, 148, 136, 0.03);
    border: 1px solid rgba(13, 148, 136, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
}

.advisor-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--accent-primary);
    margin-bottom: 1.25rem;
}

.advisor-header h3 {
    font-size: 1.1rem;
    margin: 0;
}

.advisor-section {
    margin-bottom: 1.25rem;
}

.advisor-section h4 {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.advisor-section p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.advisor-section ul {
    margin: 0;
    padding-left: 1.25rem;
}

.advisor-section li {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.advisor-section strong {
    color: var(--text-main);
}

#min-group-size {
    padding: 10px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    width: 80px;
}

.button-group {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.config-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 2rem;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.checkbox-group label:hover {
    background: rgba(13, 148, 136, 0.02);
    border-color: var(--accent-primary);
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.config-filters h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.config-filters label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.config-filters input[type="number"] {
    width: 80px;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: var(--font-body);
}

.dashboard-actions {
    display: flex;
    gap: 0.75rem;
}

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

.metric-card {
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.05), rgba(124, 58, 237, 0.05));
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
}

.metric-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.metric-value {
    font-size: 2.5rem;
    font-weight: 700;
    font-family: var(--font-heading);
    color: var(--accent-primary);
    margin-bottom: 0.25rem;
}

.metric-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
}

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

.calc-toggle-group {
    display: flex;
    background: rgba(0, 0, 0, 0.05);
    padding: 3px;
    border-radius: 10px;
    gap: 2px;
}

.toggle-btn {
    border: none;
    background: transparent;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.toggle-btn.active {
    background: white;
    color: var(--accent-primary);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

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

.dashboard-item {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
}

.dashboard-item.full-width {
    grid-column: 1 / -1;
}

.dashboard-item h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.dashboard-item canvas {
    max-height: 300px;
}

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

/* Risk Badges */
.risk-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
}

.high-risk {
    background: rgba(239, 68, 68, 0.15);
    color: #b91c1c;
    /* Darker red for text */
}

.medium-risk {
    background: rgba(234, 179, 8, 0.15);
    color: #a16207;
    /* Darker yellow/orange */
}

.low-risk {
    background: rgba(34, 197, 94, 0.15);
    color: #15803d;
    /* Darker green */
}

header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
}

.card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
}

.search-input {
    width: 100%;
}

.dashboard-grid {
    grid-template-columns: 1fr;
}

.dashboard-item.full-width {
    grid-column: 1;
}

.metric-card-container {
    grid-template-columns: 1fr;
}

.button-group {
    flex-direction: column;
}

.dashboard-actions {
    flex-direction: column;
}

.dashboard-full-width {
    grid-column: 1 / -1;
    margin-top: 2rem;
}

.quartile-container {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 2rem;
    align-items: center;
    margin-top: 1rem;
}

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

.quartile-insights {
    background: rgba(255, 255, 255, 0.4);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.insights-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.insights-table th {
    text-align: left;
    padding: 10px 8px;
    border-bottom: 2px solid rgba(0, 0, 0, 0.05);
    color: var(--text-muted);
    font-weight: 600;
}

.insights-table td {
    padding: 14px 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    line-height: 1.4;
}

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

.insights-table .insight-text {
    color: var(--text-muted);
    font-style: italic;
    display: block;
    margin-top: 4px;
}

.item-header {
    margin-bottom: 1.5rem;
}

.item-header .subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 5px;
}

/* Global Filters in Header */
.card-header .header-main {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
}

.toolbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
    padding: 0.5rem 0;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    gap: 2rem;
}

.global-filters {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.dashboard-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Button Visual Weight Hierarchy */
.btn-primary {
    background: var(--accent-primary);
    color: white;
    border: none;
    font-weight: 600;
}

.btn-primary:hover {
    background: #0b7a70;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.2);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
    font-weight: 600;
}

.btn-outline:hover {
    background: rgba(13, 148, 136, 0.05);
    border-color: #0b7a70;
    color: #0b7a70;
}

.btn-ghost-subtle {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-ghost-subtle:hover {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fecaca;
}

.btn-with-icon {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 8px 16px;
    font-size: 0.85rem;
    white-space: nowrap;
}

.btn-with-icon svg {
    flex-shrink: 0;
}

.danger-hover:hover {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fecaca;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.filter-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.currency-badge {
    background: var(--accent-primary);
    color: white;
    padding: 4px 12px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    font-family: var(--font-heading);
}

/* Bento Box Grid */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: minmax(160px, auto);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.bento-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bento-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06);
}

.bento-card.span-2 {
    grid-column: span 2;
}

.bento-card.span-3 {
    grid-column: span 3;
}

/* Bento Grid Specifics */
.bento-card.highlight {
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(13, 148, 136, 0.05) 100%);
    border: 1px solid rgba(13, 148, 136, 0.2);
}

.cost-tier-main {
    margin-bottom: 0.25rem;
}

.cost-tier-main .cost-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: block;
    margin-bottom: 0px;
}

.cost-tier-main .cost-value {
    font-size: 1.75rem;
    font-weight: 800;
    font-family: var(--font-heading);
    color: var(--accent-primary);
    line-height: 1;
}

.cost-tier-sub {
    opacity: 0.8;
}

.cost-tier-sub .cost-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.cost-tier-sub .cost-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
}

.mt-2 {
    margin-top: 0.75rem;
}

/* Sensitivity Toggle & UI */
.sensitivity-control {
    background: rgba(243, 244, 246, 0.8);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 12px 20px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sensitivity-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sensitivity-info svg {
    color: var(--accent-primary);
}

.sensitivity-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
}

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

.toggle-switch {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.toggle-input {
    display: none;
}

.toggle-bar {
    width: 44px;
    height: 24px;
    background: #e5e7eb;
    border-radius: 12px;
    position: relative;
    transition: background 0.3s ease;
}

.toggle-bar::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.toggle-input:checked+.toggle-bar {
    background: var(--accent-primary);
}

.toggle-input:checked+.toggle-bar::before {
    transform: translateX(20px);
}

/* Outlier & Justification UI */
.outlier-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid #ffedd5;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.justification-placeholder {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
    cursor: pointer;
    border-bottom: 1px dashed var(--border-color);
    padding: 2px 0;
}

.justification-placeholder:hover {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
}

.sensitivity-impact-tag {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-secondary);
    background: rgba(16, 185, 129, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
}

.card-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.highlight-value {
    color: var(--accent-secondary);
    font-size: 3rem;
}

/* Comparison Container */
.bento-comparison-container {
    display: flex;
    align-items: center;
    justify-content: space-around;
    flex: 1;
    gap: 2rem;
}

.comparison-item {
    text-align: center;
}

.comparison-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.comparison-divider {
    width: 1px;
    height: 60%;
    background: var(--border-color);
}

/* Health Display */
.health-display {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.health-status-container {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.health-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 8px 16px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.85rem;
}

.health-badge.healthy {
    background: rgba(34, 197, 94, 0.1);
    color: #15803d;
}

.health-badge.warning {
    background: rgba(239, 68, 68, 0.1);
    color: #b91c1c;
}

.mt-auto {
    margin-top: auto;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.85rem;
}

/* Existing layout overrides for mobile */
@media (max-width: 1024px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }

    .bento-card.span-2,
    .bento-card.span-3 {
        grid-column: span 1;
    }

    .health-display {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }
}

/* X-Axis Toggle Styles */
.scatter-toggle-group {
    display: flex;
    gap: 0.25rem;
    background: rgba(0, 0, 0, 0.05);
    padding: 0.25rem;
    border-radius: 8px;
}

.scatter-toggle-group .toggle-btn {
    padding: 0.4rem 0.8rem;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.scatter-toggle-group .toggle-btn:hover {
    color: var(--accent-primary);
}

.scatter-toggle-group .toggle-btn.active {
    background: var(--accent-primary);
    color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

.details-drawer {
    position: fixed;
    top: 0;
    right: -600px;
    width: 600px;
    height: 100%;
    background: var(--bg-color);
    z-index: 2001;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.1);
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.details-drawer.active {
    right: 0;
}

.drawer-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.drawer-header h2 {
    margin-bottom: 0.25rem;
    color: var(--text-main);
}

.btn-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s;
}

.btn-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-main);
}

.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
}

.drawer-summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.summary-item {
    background: var(--card-bg);
    padding: 1.25rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.summary-item label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.summary-item .value {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--font-heading);
    color: var(--accent-primary);
}

.drawer-cost-comparison {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

.drawer-cost-comparison .cost-tier {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.drawer-cost-comparison .tier-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.drawer-cost-comparison .tier-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.drawer-section {
    margin-bottom: 2.5rem;
}

.drawer-section h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.section-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.table-container.compact table {
    font-size: 0.85rem;
}

.table-container.compact th {
    padding: 8px 12px;
}

.table-container.compact td {
    padding: 10px 12px;
}

.gap-priority {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
}

.gap-driver-bar-container {
    width: 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
    margin-top: 4px;
    overflow: hidden;
}

.gap-driver-bar {
    height: 100%;
    background: var(--accent-secondary);
}

.drawer-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border-color);
    background: var(--card-bg);
}

@media (max-width: 640px) {
    .details-drawer {
        width: 100%;
        right: -100%;
    }
}

/* --- Info Banner --- */
.info-banner {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(13, 148, 136, 0.08));
    border-left: 3px solid var(--accent-secondary);
    padding: 14px 16px;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-main);
}

.info-banner svg {
    color: var(--accent-secondary);
    margin-top: 2px;
}

.info-banner strong {
    color: var(--accent-secondary);
    font-weight: 600;
}

/* ============================================ */
/* Compliance & Action Tracker Styles */
/* ============================================ */

/* Filter Bar */
.filter-bar {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.filter-bar .filter-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.filter-bar .filter-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
}

.filter-toggle-group {
    display: flex;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.05);
    padding: 4px;
    border-radius: 10px;
}

.filter-toggle-group .toggle-btn {
    padding: 6px 14px;
    font-size: 0.85rem;
}

.search-input {
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: white;
    color: var(--text-main);
    font-size: 0.9rem;
    min-width: 250px;
}

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

/* Compliance Badges */
.compliance-badge {
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.compliance-badge.critical {
    background: rgba(239, 68, 68, 0.15);
    color: #dc2626;
}

.compliance-badge.warning {
    background: rgba(251, 191, 36, 0.15);
    color: #d97706;
}

.compliance-badge.compliant {
    background: rgba(34, 197, 94, 0.15);
    color: #16a34a;
}

/* Driver Indicators */
.driver-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 600;
}

.driver-indicator.outlier {
    background: rgba(251, 146, 60, 0.1);
    color: #ea580c;
}

.driver-indicator.systemic {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.driver-indicator.low-headcount {
    background: rgba(156, 163, 175, 0.15);
    color: #6b7280;
}

/* Priority Score */
.priority-score {
    font-weight: 700;
    font-family: var(--font-heading);
    color: var(--accent-primary);
}

.priority-score.high {
    color: #dc2626;
}

.priority-score.medium {
    color: #d97706;
}

.priority-score.low {
    color: #16a34a;
}

/* Action Checkbox */
.action-checkbox {
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--accent-primary);
}

/* Reviewed Row Styling */
tr.reviewed {
    opacity: 0.5;
    background: rgba(0, 0, 0, 0.02);
}

tr.reviewed td {
    text-decoration: line-through;
    color: var(--text-muted);
}

tr.reviewed .compliance-badge,
tr.reviewed .driver-indicator {
    opacity: 0.6;
}

/* Item Header for Compliance Tracker */
.item-header {
    margin-bottom: 1.5rem;
}

.item-header h3 {
    margin-bottom: 0.25rem;
}

.item-header .subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Gap Value Styling */
.gap-value {
    font-weight: 600;
}

.gap-value.high-risk {
    color: #dc2626;
}

.gap-value.medium-risk {
    color: #d97706;
}

.gap-value.low-risk {
    color: #16a34a;
}

/* ============================================
   DATA COVERAGE & EXCLUDED GROUPS STYLES
   ============================================ */

/* Health display divider */
.health-divider {
    width: 1px;
    height: 40px;
    background: var(--border-color);
    margin: 0 1.5rem;
}

/* Coverage details section */
.coverage-details {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.coverage-subtext {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.85rem;
}

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

.coverage-warning {
    color: #d97706;
    font-weight: 500;
}

/* Table footer summary styles */
.summary-row {
    background: var(--card-bg);
    border-top: 2px solid var(--border-color);
}

.summary-content {
    padding: 1rem !important;
}

.summary-stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.summary-label {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.summary-value {
    color: var(--text-primary);
    font-weight: 500;
}

.summary-divider {
    width: 1px;
    height: 30px;
    background: var(--border-color);
}

.btn-link {
    background: none;
    border: none;
    color: var(--primary-color);
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0;
    margin-left: 0.5rem;
}

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

/* Exclusion reason badges */
.exclusion-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-right: 0.5rem;
}

.exclusion-badge.gender-segregated {
    background: rgba(147, 51, 234, 0.1);
    color: #9333ea;
    border: 1px solid rgba(147, 51, 234, 0.3);
}

.exclusion-badge.low-headcount {
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
    border: 1px solid rgba(107, 114, 128, 0.3);
}

/* Gender Balance Status */
.gender-balance-status {
    margin-top: 1.5rem;
    padding: 12px 16px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.gender-balance-status .balance-icon {
    font-size: 1.2rem;
    font-weight: bold;
    flex-shrink: 0;
}

.gender-balance-status .balance-text {
    line-height: 1.4;
}

.gender-balance-status.balance-healthy {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #15803d;
}

.gender-balance-status.balance-healthy .balance-icon {
    color: #15803d;
}

.gender-balance-status.balance-moderate {
    background: rgba(234, 179, 8, 0.1);
    border: 1px solid rgba(234, 179, 8, 0.3);
    color: #a16207;
}

.gender-balance-status.balance-moderate .balance-icon {
    color: #a16207;
}

.gender-balance-status.balance-warning {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #b91c1c;
}

.gender-balance-status.balance-warning .balance-icon {
    color: #b91c1c;
}

/* ============================================
   PRO FEATURE GATING STYLES
   ============================================ */

/* --- Upgrade Modal (Premium SaaS Style) --- */
.upgrade-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.upgrade-modal.active {
    display: flex;
    animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.upgrade-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    cursor: pointer;
}

.upgrade-modal-content {
    background: #ffffff;
    width: 100%;
    max-width: 540px;
    border-radius: 24px;
    position: relative;
    z-index: 10;
    padding: 2.5rem;
    text-align: center;
    box-shadow:
        0 20px 25px -5px rgba(0, 0, 0, 0.1),
        0 10px 10px -5px rgba(0, 0, 0, 0.04),
        0 0 0 1px rgba(15, 23, 42, 0.05);
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.upgrade-modal.active .upgrade-modal-content {
    transform: translateY(0);
}

.upgrade-modal-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f1f5f9;
    border: none;
    color: #64748b;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    line-height: 1;
}

.upgrade-modal-close:hover {
    background: #e2e8f0;
    color: #1e293b;
}

/* Paid Badge */
.paid-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ecfdf5;
    color: #10b981;
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border: 1px solid #d1fae5;
}

.upgrade-modal-content h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.85rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.upgrade-modal-message {
    color: #64748b;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* Mockup Illustration Container */
.modal-mockup-container {
    background: #f8fafc;
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 2.5rem;
    position: relative;
    border: 1px solid #f1f5f9;
    overflow: hidden;
}

.modal-mockup {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    display: block;
}

/* Modal Actions */
.upgrade-modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding-top: 1.5rem;
    border-top: 1px solid #f1f5f9;
}

.upgrade-modal-actions .btn-primary {
    background: var(--accent-primary);
    color: #ffffff;
    border: none;
    font-weight: 700;
}

.upgrade-modal-actions .btn-primary:hover {
    background: #0b7a70;
    /* Slightly darker teal */
    transform: translateY(-2px);
}

.upgrade-modal-actions .btn-secondary {
    background: #ffffff;
    color: #0f172a;
    border: 1px solid #e2e8f0;
    font-weight: 600;
}

.upgrade-modal-actions .btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

/* Blur Overlay for Locked Tables */
.blur-overlay {
    position: relative;
}

.blur-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom,
            transparent 0%,
            rgba(248, 250, 252, 0.95) 30%,
            rgba(248, 250, 252, 0.98) 100%);
    backdrop-filter: blur(8px);
    z-index: 10;
    pointer-events: none;
}

.blur-overlay-message {
    position: absolute;
    bottom: 20%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 11;
    text-align: center;
    padding: 1.5rem 2rem;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.blur-overlay-message h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.blur-overlay-message p {
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

/* Blurred Text (for employee names/IDs) */
.blurred-text {
    filter: blur(6px);
    user-select: none;
    pointer-events: none;
}

/* Lock Icon Tooltip */
.lock-icon {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    cursor: help;
    position: relative;
}

.lock-icon svg {
    width: 16px;
    height: 16px;
}

.lock-icon-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    margin-bottom: 8px;
    z-index: 1000;
}

.lock-icon:hover .lock-icon-tooltip {
    opacity: 1;
}

/* Pro Badge */
.pro-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Locked Feature State */
.locked-feature {
    opacity: 0.6;
    cursor: not-allowed;
    position: relative;
}

.locked-feature::before {
    content: '🔒';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    z-index: 1;
    pointer-events: none;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

/* Locked Button States */
.btn-locked {
    opacity: 1;
    /* Keep visibility high */
    cursor: pointer;
    position: relative;
    border-color: #cbd5e1 !important;
    background: #f8fafc !important;
    color: #64748b !important;
}

.btn-locked:hover::after {
    content: "Upgrade to Pro";
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    margin-bottom: 5px;
    z-index: 1000;
}

/* Upgrade Preview Styling */
.upgrade-preview-container {
    margin: 20px 0;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    padding: 10px;
    max-height: 250px;
    overflow: hidden;
    position: relative;
}

.blurred-preview-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    color: #475569;
}

.blurred-preview-table th,
.blurred-preview-table td {
    padding: 10px;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
}

.blurred-preview-table th {
    background: #f1f5f9;
    font-weight: 600;
}

.preview-caption {
    font-size: 12px;
    color: #64748b;
    margin-top: 8px;
    font-style: italic;
    text-align: center;
}

.priority-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.priority-badge.high {
    background: #fee2e2;
    color: #b91c1c;
}

.priority-badge.med {
    background: #fef3c7;
    color: #b45309;
}

.btn-action-locked {
    background: #f1f5f9;
    color: #94a3b8;
    border: 1px solid #e2e8f0;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.btn-action-locked:hover {
    background: #e2e8f0;
    color: #64748b;
}

.btn-action-locked::before {
    content: "🔒";
    font-size: 12px;
}

.blurred-text {
    filter: blur(4px);
    user-select: none;
    pointer-events: none;
}

.blur-overlay {
    position: relative;
}

.blur-overlay-message {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(2px);
    z-index: 10;
    text-align: center;
    padding: 20px;
}

.blur-overlay-message h3 {
    margin-bottom: 10px;
    color: #1e293b;
}

.blur-overlay-message p {
    margin-bottom: 20px;
    max-width: 400px;
    color: #64748b;
}

.justification-locked {
    background: #f8fafc;
    color: #94a3b8;
    border: 1px dashed #cbd5e1;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    transition: all 0.2s;
    white-space: nowrap;
}

.justification-locked:hover {
    background: #f1f5f9;
    color: #64748b;
    border-style: solid;
}

/* Peer Group Table Gating */
.blurred-row td {
    filter: blur(4px);
    opacity: 0.6;
    user-select: none;
    pointer-events: none;
    transition: filter 0.3s ease;
}

.blurred-row td.unblurred-compliance {
    filter: none !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

.locked-cost-cell {
    position: relative;
    color: transparent !important;
    text-shadow: 0 0 8px rgba(100, 116, 139, 0.8);
    user-select: none;
}

.locked-cost-cell::after {
    content: "🔒";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 10px;
    text-shadow: none;
    color: #94a3b8;
}

.blurred-row:hover td {
    opacity: 0.8;
}

.table-blur-cta {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 180px;
    background: linear-gradient(to bottom, transparent, #ffffff 80%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 30px;
    z-index: 20;
    pointer-events: none;
}

.table-blur-cta .cta-content {
    background: white;
    padding: 20px 30px;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 450px;
    border: 1px solid #e2e8f0;
    pointer-events: auto;
    animation: fadeIn 0.5s ease;
}

.table-blur-cta h4 {
    margin-bottom: 8px;
    color: #1e293b;
    font-size: 16px;
}

.table-blur-cta p {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 16px;
    line-height: 1.5;
}

.has-blur-cta {
    position: relative;
    padding-bottom: 150px;
    /* Make room for the CTA */
}