/* ---------------------------------------------- *
/* Refined Apple-like CSS for Dashboard */
/* ---------------------------------------------- */

/* ---------------------------------------------- */
/* 1. Theme Variables */
/* ---------------------------------------------- */

/* Define CSS Custom Properties for Theming */
:root {
    --background: #F9F9F9;
    --container-bg: #FFFFFF;
    --chart-container-bg: rgba(251, 251, 251, 0.88);
    --chart-container-border: rgba(0, 0, 0, 0.06);
    --text-primary: #1C1C1E;
    --text-secondary: #8E8E93;
    /* Non-maxRAID bars: neutral light gray (solid) */
    --bar-bg: #D8D8DD;
    --bar-hover-bg: #CDCDD2;
    --bar-label-color: #1C1C1E;
    --bar-border: #C7C7CC;
    /* Primary bar: Apple blue */
    --maxraid-bar-start: #007AFF;
    --maxraid-bar-end: #0055CC;
    --maxraid-bar-hover-start: #3395FF;
    --maxraid-bar-hover-end: #007AFF;
    --maxraid-bar-label: #FFFFFF;
    --dropdown-bg: #FFFFFF;
    --dropdown-hover-bg: #F5F5F7;
    --menu-bg: #E8ECEF;
    --menu-hover-bg: #D8DCE0;
    --menu-border: #D3D3D3;
    --separator: #E2E2E7;
    --table-header-bg: #F9F9F9;
    --table-row-even-bg: #FCFCFC;
    --table-row-hover-bg: #F5F5F5;
    --accent: #007AFF;
    --accent-hover: #0055FF;
    --shadow: rgba(0, 0, 0, 0.06);
    --shadow-hover: rgba(0, 0, 0, 0.12);
    --comparison-bg: #5AAEFF;
    /* Comparison slot colors (blue gradient pairs — bright→dark) */
    --compare-1-bg: #5AAEFF;
    --compare-1-start: #6EBCFF;
    --compare-1-end: #3D8EE6;
    --compare-2-bg: #8DC8FF;
    --compare-2-start: #B0DAFF;
    --compare-2-end: #5AAEFF;
    --compare-3-bg: #BFE0FF;
    --compare-3-start: #D6ECFF;
    --compare-3-end: #8DC8FF;
    /* Toggle slider */
    --toggle-track: #C7C7CC;
    --toggle-track-active: var(--accent);
    /* Added for login functionality */
    --error-bg: #ff3b30;
    --success-bg: #34c759;
}

/* Dark Mode Colors (Device Preference) */
@media (prefers-color-scheme: dark) {
    :root:not(.light),
    .dark {
        --background: #0C0C0C;
        --container-bg: #1A1A1A;
        --chart-container-bg: rgba(20, 20, 20, 0.88);
        --chart-container-border: rgba(255, 255, 255, 0.06);
        --text-primary: #F5F5F7;
        --text-secondary: #A1A1AA;
        /* Non-maxRAID bars: neutral dark gray (solid) */
        --bar-bg: #3A3A3C;
        --bar-hover-bg: #48484A;
        --bar-label-color: #F5F5F7;
        --bar-border: #3A3A3C;
        /* Primary bar: mint green (dark mode) */
        --maxraid-bar-start: #98FF98;
        --maxraid-bar-end: #5CD85C;
        --maxraid-bar-hover-start: #B0FFB0;
        --maxraid-bar-hover-end: #98FF98;
        --maxraid-bar-label: #1C1C1E;
        --dropdown-bg: #1A1A1A;
        --dropdown-hover-bg: #2C2C2E;
        --menu-bg: #2A2A2A;
        --menu-hover-bg: #3A3A3C;
        --menu-border: #444446;
        --separator: #2C2C2E;
        --table-header-bg: #1C1C1E;
        --table-row-even-bg: #1A1A1C;
        --table-row-hover-bg: #2C2C2E;
        --accent: #98FF98;
        --accent-hover: #78DF78;
        --shadow: rgba(0, 0, 0, 0.4);
        --shadow-hover: rgba(0, 0, 0, 0.6);
        --comparison-bg: #78DF78;
        /* Comparison slot colors (green gradient pairs — bright→dark) */
        --compare-1-bg: #78DF78;
        --compare-1-start: #98FF98;
        --compare-1-end: #4CB84C;
        --compare-2-bg: #98FF98;
        --compare-2-start: #B8FFB8;
        --compare-2-end: #78DF78;
        --compare-3-bg: #B8FFB8;
        --compare-3-start: #D0FFD0;
        --compare-3-end: #98FF98;
        /* Toggle slider (dark) */
        --toggle-track: #48484A;
        --toggle-track-active: var(--accent);
        /* Added for login functionality */
        --error-bg: #ff453a;
        --success-bg: #30d158;
    }
}

/* Manual Light Mode Toggle */
.light {
    --background: #F9F9F9;
    --container-bg: #FFFFFF;
    --chart-container-bg: rgba(251, 251, 251, 0.88);
    --chart-container-border: rgba(0, 0, 0, 0.06);
    --text-primary: #1C1C1E;
    --text-secondary: #8E8E93;
    /* Non-maxRAID bars: neutral light gray (solid) */
    --bar-bg: #D8D8DD;
    --bar-hover-bg: #CDCDD2;
    --bar-label-color: #1C1C1E;
    --bar-border: #C7C7CC;
    /* Primary bar: Apple blue */
    --maxraid-bar-start: #007AFF;
    --maxraid-bar-end: #0055CC;
    --maxraid-bar-hover-start: #3395FF;
    --maxraid-bar-hover-end: #007AFF;
    --maxraid-bar-label: #FFFFFF;
    --dropdown-bg: #FFFFFF;
    --dropdown-hover-bg: #F5F5F7;
    --menu-bg: #E8ECEF;
    --menu-hover-bg: #D8DCE0;
    --menu-border: #D3D3D3;
    --separator: #E2E2E7;
    --table-header-bg: #F9F9F9;
    --table-row-even-bg: #FCFCFC;
    --table-row-hover-bg: #F5F5F5;
    --accent: #007AFF;
    --accent-hover: #0055FF;
    --shadow: rgba(0, 0, 0, 0.06);
    --shadow-hover: rgba(0, 0, 0, 0.12);
    --comparison-bg: #5AAEFF;
    /* Comparison slot colors (blue gradient pairs — bright→dark) */
    --compare-1-bg: #5AAEFF;
    --compare-1-start: #6EBCFF;
    --compare-1-end: #3D8EE6;
    --compare-2-bg: #8DC8FF;
    --compare-2-start: #B0DAFF;
    --compare-2-end: #5AAEFF;
    --compare-3-bg: #BFE0FF;
    --compare-3-start: #D6ECFF;
    --compare-3-end: #8DC8FF;
    /* Toggle slider */
    --toggle-track: #C7C7CC;
    --toggle-track-active: var(--accent);
    /* Added for login functionality */
    --error-bg: #ff3b30;
    --success-bg: #34c759;
}

/* Manual Dark Mode Toggle */
.dark {
    --background: #0C0C0C;
    --container-bg: #1A1A1A;
    --chart-container-bg: rgba(20, 20, 20, 0.88);
    --chart-container-border: rgba(255, 255, 255, 0.06);
    --text-primary: #F5F5F7;
    --text-secondary: #A1A1AA;
    /* Non-maxRAID bars: neutral dark gray (solid) */
    --bar-bg: #3A3A3C;
    --bar-hover-bg: #48484A;
    --bar-label-color: #F5F5F7;
    --bar-border: #3A3A3C;
    /* Primary bar: mint green (dark mode) */
    --maxraid-bar-start: #98FF98;
    --maxraid-bar-end: #5CD85C;
    --maxraid-bar-hover-start: #B0FFB0;
    --maxraid-bar-hover-end: #98FF98;
    --maxraid-bar-label: #1C1C1E;
    --dropdown-bg: #1A1A1A;
    --dropdown-hover-bg: #2C2C2E;
    --menu-bg: #2A2A2A;
    --menu-hover-bg: #3A3A3C;
    --menu-border: #444446;
    --separator: #2C2C2E;
    --table-header-bg: #1C1C1E;
    --table-row-even-bg: #1A1A1C;
    --table-row-hover-bg: #2C2C2E;
    --accent: #98FF98;
    --accent-hover: #78DF78;
    --shadow: rgba(0, 0, 0, 0.4);
    --shadow-hover: rgba(0, 0, 0, 0.6);
    --comparison-bg: #78DF78;
    /* Comparison slot colors (green gradient pairs — bright→dark) */
    --compare-1-bg: #78DF78;
    --compare-1-start: #98FF98;
    --compare-1-end: #4CB84C;
    --compare-2-bg: #98FF98;
    --compare-2-start: #B8FFB8;
    --compare-2-end: #78DF78;
    --compare-3-bg: #B8FFB8;
    --compare-3-start: #D0FFD0;
    --compare-3-end: #98FF98;
    /* Toggle slider (dark) */
    --toggle-track: #48484A;
    --toggle-track-active: var(--accent);
    /* Added for login functionality */
    --error-bg: #ff453a;
    --success-bg: #30d158;
}

/* ---------------------------------------------- */
/* 2. Global Styles */
/* ---------------------------------------------- */

/* Box-sizing reset (replaces Tailwind preflight) */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif;
    background-color: var(--background);
    margin: 0;
    padding: 0;
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Added for login functionality: Center content for auth pages */
body.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

/* Hidden Class */
.hidden {
    display: none !important;
}

/* ---------------------------------------------- */
/* 3. Animations */
/* ---------------------------------------------- */

/* Fade-In Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

/* Added for login functionality: Fade-Out Animation */
@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}
.fade-out {
    animation: fadeOut 0.3s ease forwards;
}

/* Added for login functionality: Fade-Out for Error Messages (with display: none) */
@keyframes fadeOutMessage {
    0% { opacity: 1; }
    80% { opacity: 1; }
    100% { opacity: 0; display: none; }
}

/* Added for login functionality: Shake Animation for Error Messages */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
}
.error-message.shake {
    animation: shake 0.3s ease;
}

/* Chart Refresh Animation */
@keyframes refreshChart {
    0% { 
        opacity: 0; 
        transform: translateX(-8px); 
        width: 0;
    }
    100% { 
        opacity: 1; 
        transform: translateX(0); 
        width: var(--final-width);
    }
}
.refresh-chart {
    animation: refreshChart 0.5s ease-out forwards;
}

/* ---------------------------------------------- */
/* 4. Component Styles */
/* ---------------------------------------------- */

/* ---------------------------------------------- */
/* 4.1 Title Section */
.title-container {
    padding: 8px 0; /* Increased padding for better spacing */
    margin-bottom: 24px;
    position: relative;
}

.main-title {
    font-size: 48px; /* Larger for a commanding presence */
    font-weight: 800; /* Bolder for elegance */
    color: var(--text-primary);
    text-align: center;
    margin-top: 8px;
    margin-bottom: 16px;
    line-height: 1;
    letter-spacing: -0.5px; /* Tighter letter spacing for a polished look */
}

.main-title .subtitle {
    font-weight: 300;
}

.bold-custom {
    font-weight: 700; /* Extra bold for emphasis */
}

.hostname {
    font-size: 22px;
    font-weight: 500; /* Medium weight for balance */
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 4px;
    line-height: 1;
}

.hostname .drive {
    font-size: 17px;
    font-weight: 400;
}

.timestamp {
    font-size: 13px;
    font-weight: 400;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.1;
}

/* ---------------------------------------------- */
/* 4.2 Chart Container */
.chart-container {
    background-color: var(--chart-container-bg);
    border-radius: 16px;
    padding: 10px 20px 16px 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    margin-bottom: 16px;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    position: relative;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--chart-container-border);
}

.chart-container:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

/* Share Icon Styles */
.share-icon {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 11;
}

.share-icon i {
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.share-icon:hover i {
    color: var(--accent);
}

/* Theme Toggle Icon Styles */
.theme-toggle {
    position: absolute;
    top: 12px;
    z-index: 10;
    cursor: pointer;
}

.theme-toggle i {
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.theme-toggle:hover i {
    color: var(--accent);
}

/* Position the theme toggle icon at the top right */
.theme-toggle.top-right {
    right: 40px; /* Adjusted to provide better spacing between icons */
    margin-right: 12px; /* Add a small margin to separate from the share icon */
}

/* Comparison Label */
.comparison-label {
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    color: var(--text-primary);
}

.comparison-label .drive {
    font-size: 12px;
    font-weight: 400;
}


.clear-comparison i {
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.clear-comparison:hover i {
    color: var(--accent);
}

.comparison-indicator {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 4px;
    background-color: var(--comparison-bg); /* Default comparison color */
    margin-right: 8px;
    margin-top: 3px;
}

/* Comparison indicator slot colors */
.comparison-indicator.compare-1 {
    background-color: var(--compare-1-bg);
}
.comparison-indicator.compare-2 {
    background-color: var(--compare-2-bg);
}
.comparison-indicator.compare-3 {
    background-color: var(--compare-3-bg);
}
.comparison-indicator.primary {
    background: linear-gradient(135deg, var(--maxraid-bar-start), var(--maxraid-bar-end));
}

.comparison-date {
    color: var(--text-secondary);
}

/* ---------------------------------------------- */
/* 4.3 Chart Bars */
.bar-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 28px;
    position: relative;
}

.bar {
    height: 44px;
    background: var(--bar-bg);
    border: 0;
    box-shadow: 0 1px 3px var(--shadow);
    border-radius: 0 8px 8px 0;
    position: relative !important;
    margin-bottom: 3px;
    width: 18%;
    min-width: 20px;
    transition: background 0.3s ease, box-shadow 0.2s ease;
    top: auto !important;
    left: auto !important;
}

/* Non-maxRAID bar label uses theme-aware color */
.bar:not(.maxraid) .bar-label {
    color: var(--bar-label-color);
}

/* Branded maxRAID bar gradient — the hero color */
.bar.maxraid {
    background: linear-gradient(90deg, var(--maxraid-bar-start) 0%, var(--maxraid-bar-end) 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.bar.maxraid .bar-label {
    color: var(--maxraid-bar-label);
}
/* When labels overflow outside any bar, use readable page text color */
.bar .bar-label.outside {
    color: var(--text-primary) !important;
}

/* Hover states */
.bar:not(.maxraid):hover {
    background: var(--bar-hover-bg);
}

/* Comparison bars */
.bar.comparison {
    background: var(--comparison-bg);
    margin-top: 0;
    position: relative !important;
    top: auto !important;
    left: 0 !important;
}

/* Overlapping bars in comparison mode — subtle overlap */
.bar-container.comparison-mode .bar.comparison {
    margin-top: -6px;
}

/* When primary bar is hidden, first comparison bar sits normally */
.bar-container.comparison-mode.primary-hidden .bar.comparison {
    margin-top: 0;
}
.bar-container.comparison-mode.primary-hidden .bar.comparison + .bar.comparison {
    margin-top: -6px;
}

/* 'All' mode metric sub-bars — layered card-stack effect */
.bar.metric-sub {
    height: 38px;
    margin-top: -6px;
    position: relative !important;
    box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.12), 0 1px 3px var(--shadow);
}
/* Z-index stacking: primary bar on top, sub-bars recede */
.all-metrics-mode > .bar:not(.metric-sub) {
    z-index: 10 !important;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.18);
}
.all-metrics-mode > .bar.metric-sub:nth-of-type(2) { z-index: 8; }
.all-metrics-mode > .bar.metric-sub:nth-of-type(3) { z-index: 6; }
.all-metrics-mode > .bar.metric-sub:nth-of-type(4) { z-index: 4; }
.all-metrics-mode > .bar.metric-sub:nth-of-type(5) { z-index: 2; }
.all-metrics-mode > .bar.metric-sub:nth-of-type(6) { z-index: 1; }

.bar.metric-sub.metric-performance {
    background: linear-gradient(90deg, var(--compare-1-start) 0%, var(--compare-1-end) 100%);
}
.bar.metric-sub.metric-capacity {
    background: linear-gradient(90deg, var(--compare-3-start) 0%, var(--compare-3-end) 100%);
}
/* Generic sub-bar color slots for block-size/rw-mix expansion */
.bar.metric-sub.sub-1 {
    background: linear-gradient(90deg, var(--compare-1-start) 0%, var(--compare-1-end) 100%);
}
.bar.metric-sub.sub-2 {
    background: linear-gradient(90deg, var(--compare-2-start) 0%, var(--compare-2-end) 100%);
}
.bar.metric-sub.sub-3 {
    background: linear-gradient(90deg, var(--compare-3-start) 0%, var(--compare-3-end) 100%);
}
.bar.metric-sub.sub-4 {
    background: linear-gradient(90deg, var(--compare-3-start) 0%, var(--compare-3-end) 100%);
    opacity: 0.7;
}
.bar.metric-sub .bar-label {
    font-size: 15px;
    color: #1C1C1E;
}

/* Comparison slot color overrides (gradients) */
.bar.comparison.compare-1 {
    background: linear-gradient(90deg, var(--compare-1-start) 0%, var(--compare-1-end) 100%);
}
.bar.comparison.compare-2 {
    background: linear-gradient(90deg, var(--compare-2-start) 0%, var(--compare-2-end) 100%);
}
.bar.comparison.compare-3 {
    background: linear-gradient(90deg, var(--compare-3-start) 0%, var(--compare-3-end) 100%);
}

/* Force dark text on comparison bar labels inside the bar */
.bar.comparison .bar-label {
    color: #1C1C1E;
}
/* Outside labels use theme text color for readability on page background */
.bar.comparison .bar-label.outside {
    color: var(--text-primary);
}

.bar-label {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-weight: 600;
    font-size: 18px;
    right: 12px;
    white-space: nowrap;
    color: var(--bar-label-color);
    transition: right 0.3s ease;
    z-index: 3;
}

.bar-label.outside {
    color: var(--text-primary);
    right: auto;
    left: calc(100% + 8px);
}

.bar-label-suffix {
    font-size: 0.7em;
    font-weight: 400;
    opacity: 0.75;
}

.category-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-primary);
    position: relative;
    z-index: 5;
}

.subtext {
    font-size: 80%;
    font-weight: 400;
    color: var(--text-secondary);
}

/* ---------------------------------------------- */
/* 4.4 Dropdowns */
.dropdown-container {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 8px auto;
}

.dropdown {
    appearance: none;
    background: var(--dropdown-bg);
    border: 1px solid var(--separator);
    padding: 6px 24px 6px 12px;
    font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: var(--text-primary);
    cursor: pointer;
    position: relative;
    border-radius: 10px;
    transition: background 0.3s ease, color 0.2s ease, box-shadow 0.2s ease;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%236E6E73' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.dropdown:hover {
    background: var(--dropdown-hover-bg);
    color: var(--text-primary);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.dropdown:focus {
    outline: none;
    background: var(--dropdown-hover-bg);
    color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent);
}

.dropdown.highlight {
    background: var(--dropdown-hover-bg);
    transition: background 0.3s ease;
}

.dropdown option:disabled {
    color: #AEAEB2;
    cursor: not-allowed;
}

/* ---------------------------------------------- */
/* 4.5 Hamburger Menu */
.hamburger-menu {
    position: absolute;
    top: 10px;
    left: 12px;
    z-index: 10;
    cursor: pointer;
}

.hamburger-menu i {
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.hamburger-menu:hover i {
    color: var(--accent);
}

/* Adjust hamburger menu position when inside chart-container */
.chart-container .hamburger-menu {
    top: 12px; /* Align with share icon and theme toggle */
    right: 52px;
    left: auto;
}

/* Ensure hamburger menu position in list view remains unchanged */
.mobile-container > .hamburger-menu {
    top: 10px;
    left: 12px;    
}

/* Hamburger Menu Dropdown Styles */
.menu-dropdown {
    position: absolute;
    top: 30px;
    left: 0;
    background-color: var(--menu-bg);
    border: 1px solid var(--menu-border);
    border-radius: 6px;
    z-index: 20;
    min-width: 120px;
    box-shadow: 0 2px 8px var(--shadow);
}

.menu-item {
    display: block;
    padding: 6px 12px;
    font-size: 14px;
    font-weight: 400;
    color: var(--text-primary);
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.menu-item:hover {
    background-color: var(--menu-hover-bg);
    color: var(--text-primary);
}

/* ---------------------------------------------- */
/* 4.6 Tables */

.table-container {
    background-color: var(--container-bg);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    transition: box-shadow 0.3s ease;
}

.table-container:hover {
    box-shadow: 0 2px 8px var(--shadow);
}

.table-container h3 {
    margin-bottom: 16px;
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
}

.benchmark-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    text-align: right;
    cursor: pointer;
    display: block;
    margin-top: 12px;
    transition: color 0.3s ease;
}

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

.bg-elegant-table {
    background-color: var(--chart-container-bg);
    border-radius: 8px;
}

.elegant-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background-color: var(--container-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: none;
    border: none;
    table-layout: fixed;
    color: var(--text-primary);
}

.elegant-table thead {
    background-color: var(--table-header-bg);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.elegant-table th,
.elegant-table td {
    padding: 12px 16px;
    text-align: right;
    border-bottom: 1px solid var(--separator);
    width: auto;
    color: var(--text-primary);
}

.elegant-table th:first-child,
.elegant-table td:first-child {
    text-align: left;
    font-weight: 500;
    width: 16.67%;
}

.elegant-table thead tr:first-child th.rw-header {
    vertical-align: bottom;
    padding: 8px 16px 8px;
    font-size: 13px;
    line-height: 1.4;
    color: var(--text-secondary);
}

.elegant-table thead tr:nth-child(2) th {
    padding: 12px 16px 16px;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 600;
    color: var(--text-primary);
    background-color: var(--table-header-bg);
}

.elegant-table tbody tr {
    background-color: var(--container-bg);
    transition: background-color 0.3s ease;
}

.elegant-table tbody tr:nth-child(even) {
    background-color: var(--table-row-even-bg);
}

.elegant-table tbody tr:hover {
    background-color: var(--table-row-hover-bg);
}

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

/* Highlight the row selected for comparison */
.elegant-table tbody tr.selected-for-compare {
    background-color: var(--table-row-hover-bg); /* Use the hover background for a subtle highlight */
    border-left: 4px solid var(--accent); /* Use the accent color for the border */
}

.rw-header {
    text-align: center !important;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-secondary);
    background-color: var(--table-header-bg);
    vertical-align: bottom;
    padding-bottom: 4px;
}

.block-value {
    font-weight: 500;
    font-size: 14px;
    padding: 2px 0;
    color: var(--text-primary);
}

.bold-value {
    font-weight: 700;
    font-size: 15px;
    padding: 2px 0;
    color: var(--accent);
}

/* Scoped styles for the list view table */
.elegant-table.list-table {
    table-layout: auto; /* Allow columns to adjust based on content */
}

.elegant-table.list-table th,
.elegant-table.list-table td {
    padding: 12px 16px;
    text-align: left; /* Align all columns to the left for a cleaner look */
    border-bottom: 1px solid var(--separator);
    width: auto;
    color: var(--text-primary);
}

/* Specific column widths for the list view (Desktop) */
.elegant-table.list-table th:nth-child(1), /* Date Entered */
.elegant-table.list-table td:nth-child(1) {
    min-width: 150px;
    width: 25%;
}

.elegant-table.list-table th:nth-child(2), /* Profile ID */
.elegant-table.list-table td:nth-child(2) {
    min-width: 150px;
    width: 35%;
}

.elegant-table.list-table th:nth-child(3), /* Disk Configuration */
.elegant-table.list-table td:nth-child(3) {
    min-width: 120px;
    width: 30%;
}

.elegant-table.list-table th:nth-child(4), /* Compare */
.elegant-table.list-table td:nth-child(4) {
    min-width: 80px;
    width: 10%;
    text-align: center;
}

/* Ensure text doesn't overflow */
.elegant-table.list-table td {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Style for the hostname column */
.hostname-column {
    font-weight: 600; /* Bold the hostname */
}

/* Style for the date column with date on top of time */
.date-column {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.date-part,
.time-part {
    font-size: 14px;
    line-height: 1.2;
}

.date-part {
    font-weight: 500; /* Slightly bolder to emphasize the date */
    margin-bottom: 2px;
    white-space: normal; /* Allow wrapping to prevent truncation */
}

.time-part {
    font-size: 12px; /* Smaller font for the time */
    color: var(--text-secondary); /* Softer color for secondary info */
}

/* Style for the compare column */
.compare-column {
    text-align: center;
}

/* Style for the compare checkbox */
.compare-checkbox {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--text-secondary);
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    vertical-align: middle;
}

.compare-checkbox:checked {
    background-color: var(--accent);
    border-color: var(--accent);
}

.compare-checkbox:checked::after {
    content: '\f00c'; /* Font Awesome check icon */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--container-bg);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
}

/* Added for login functionality: Style for the stay logged in checkbox */
.stay-logged-in {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--text-secondary);
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    vertical-align: middle;
}

.stay-logged-in:checked {
    background-color: var(--accent);
    border-color: var(--accent);
}

.stay-logged-in:checked::after {
    content: '\f00c'; /* Font Awesome check icon */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--container-bg);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
}

/* ---------------------------------------------- */
/* 4.7 Footer Section */
.footer-container {
    margin-top: 16px;
    padding-top: 8px;
    border-top: 1px solid var(--separator);
}

.footer-text {
    font-size: 11px;
    font-weight: 400;
    color: var(--text-secondary);
    line-height: 1.3;
    text-align: left;
}

.marketing-container {
    padding: 12px 0;
    text-align: center;
}

.marketing-text {
    font-size: 15px;
    font-weight: 400;
    color: var(--text-primary);
    line-height: 1.4;
    max-width: 90%;
    margin: 0 auto 8px;
}

.marketing-link {
    font-size: 16px;
    font-weight: 500;
    color: var(--accent);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.bottom-logo {
    max-height: 36px;
    margin: 16px auto 8px;
    display: block;
    transition: opacity 0.3s ease;
}

.bottom-logo:hover {
    opacity: 0.85;
}

.copyright-text {
    padding: 0 10%;
    font-size: 12px;
    font-weight: 400;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 8px;
    margin-bottom: 16px;
    line-height: 1.4;
}

.contact-link {
    color: var(--text-secondary);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s ease;
}

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

/* ---------------------------------------------- */
/* 4.8 Authentication Pages (Login, Forgot Password, Reset Password) */
/* Added for login functionality */
.auth-container {
    background-color: var(--container-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px var(--shadow);
    width: 100%;
    max-width: 400px;
    text-align: center;
    transition: box-shadow 0.3s ease;
}

.auth-container:hover {
    box-shadow: 0 6px 16px var(--shadow-hover);
}

.auth-logo {
    display: block;
    margin: 0 auto 1rem;
    max-height: 40px; /* Adjust based on your logo size */
}

h2.login-title {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif;
    letter-spacing: -0.5px;
    line-height: 1;
}

h2.login-title .maxraid {
    font-weight: 600;
}

h2.login-title .dashboard {
    font-weight: 400;
}

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

input[type="email"],
input[type="password"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--separator);
    border-radius: 8px;
    font-size: 1rem;
    box-sizing: border-box;
    color: var(--text-primary);
    background-color: var(--container-bg);
    transition: border-color 0.3s ease;
}

input[type="email"]:focus,
input[type="password"]:focus {
    outline: none;
    border-color: var(--accent);
}

.checkbox {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

input[type="checkbox"] {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--text-secondary);
    border-radius: 4px;
    margin-right: 0.5rem;
    position: relative;
    cursor: pointer;
}

input[type="checkbox"]:checked {
    background-color: var(--accent);
    border-color: var(--accent);
}

input[type="checkbox"]:checked::after {
    content: '\2713';
    color: var(--container-bg);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 14px;
}

button {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--accent);
    color: var(--container-bg);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: var(--accent-hover);
}

.error,
.success {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.9rem;
}

.error {
    background-color: var(--error-bg);
    color: var(--container-bg);
    animation: shake 0.5s, fadeOutMessage 10s forwards;
}

.success {
    background-color: var(--success-bg);
    color: var(--container-bg);
}

.forgot-password {
    margin-top: 1rem;
    text-align: center;
}

.forgot-password a {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.forgot-password a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* Style for the username in the forgot/create message */
.profile-username {
    font-weight: 700; /* Slightly bold for emphasis */
}

/* Style for the support link in the forgot/create message */
.support-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.support-link:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* ---------------------------------------------- */
/* 4.9 Modal Dialogs for Account Setup and Login */
/* ---------------------------------------------- */

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Semi-transparent overlay */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

/* Reuse .auth-container for modal content */
.modal-content {
    width: 100%;
    max-width: 400px;
}

/* Modal-specific heading and paragraph styles */
.modal-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.modal-content p {
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

/* Button container for modals */
.modal-buttons {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1rem;
}

/* Reuse existing button styles for modal buttons */
.modal-button {
    width: flex;
    padding: 0.7rem 1.2rem;
    font-size: 1.0rem;
}

/* Primary button (reuse existing button styles) */
.modal-button.primary {
    background-color: var(--accent);
    color: var(--container-bg);
}

/* Secondary button (use theme variables) */
.modal-button.secondary {
    background-color: var(--separator);
    color: var(--text-primary);
}

.modal-button.secondary:hover {
    background-color: var(--table-row-hover-bg);
}

/* Blur the background when a dialog is open */
body.dialog-open > *:not(.modal-overlay) {
    filter: blur(4px);
    transition: filter 0.3s ease;
}

/* Ensure the modal overlay and its content are not blurred */
.modal-overlay,
.modal-overlay * {
    filter: none !important;
}

/* Responsive adjustments for modals */
@media (max-width: 768px) {
    .modal-content {
        max-width: 80%;
    }

    .modal-content h3 {
        font-size: 1.25rem;
    }

    .modal-content p {
        font-size: 0.85rem;
    }

    .modal-button {
        padding: 0.7rem 1.6rem;
        font-size: 1.0rem;
    }
}

/* ---------------------------------------------- */
/* 4.10 User Menu */
/* ---------------------------------------------- */

/* Position the user menu in the top-right corner of the main container */
.user-menu {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    cursor: pointer;
}

/* Header containing the icon and username */
.user-menu-header {
    display: flex;
    align-items: center;
}

/* Username display for logged-in state */
.username {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: -6px;
    margin-right: 0.5rem; /* Changed from margin-left to margin-right */
    font-weight: 400;
}

/* Submenu dropdown (reuse existing menu-dropdown styles) */
.user-menu .menu-dropdown {
    top: 100%;
    right: 0;
    left: auto;
    margin-top: 0.05rem; /* Reduced from 0.5rem to 0.25rem for a tighter gap */
    min-width: 200px;
}

/* Menu item with icon */
.menu-item {
    display: flex;
    align-items: center;
    padding: 6px 12px;
    font-size: 14px;
    font-weight: 400;
    color: var(--text-primary);
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.menu-item:hover {
    background-color: var(--menu-hover-bg);
    color: var(--text-primary);
}

/* Small icons before menu items */
.menu-icon {
    font-size: 0.8rem;
    margin-right: 0.5rem;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.menu-item:hover .menu-icon {
    color: var(--accent);
}

/* Theme toggle item */
.theme-toggle-item {
    position: relative;
}

/* Theme options container (segmented control) */
.theme-options {
    display: flex;
    gap: 0.25rem;
    padding: 0.25rem;
    border: 1px solid var(--separator);
    border-radius: 6px;
    margin-top: 0.25rem;
}

/* Individual theme option */
.theme-option {
    flex: 1;
    padding: 0.25rem 0.5rem;
    font-size: 0.85rem;
    text-align: center;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s ease, font-weight 0.2s ease;
}

.theme-option:hover {
    background-color: var(--dropdown-hover-bg);
}

.theme-option.selected {
    background-color: var(--dropdown-hover-bg);
    font-weight: 500;
}

/* Responsive adjustments for user menu */
@media (max-width: 768px) {
    .user-menu {
        top: 8px;
        right: 8px;
    }

    .user-menu .menu-dropdown {
        min-width: 180px;
    }

    .username {
        font-size: 0.0rem;
    }

    .menu-item {
        font-size: 13px;
        padding: 5px 10px;
    }

 x   .menu-icon {
        font-size: 0.75rem;
    }

    .theme-option {
        font-size: 0.8rem;
        padding: 0.2rem 0.4rem;
    }
}

/* ---------------------------------------------- */
/* 4.11 Benchmark Tables Comparison */
/* ---------------------------------------------- */

.benchmark-table td {
    position: relative;
    padding: 8px 12px;
    font-size: 14px;
    color: var(--text-primary);
    min-width: 80px; /* Ensure enough width for stacked values */
}

/* Container for stacking primary and comparison values */
.benchmark-table .value-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-end; /* Align values to the right */
    gap: 2px; /* Small gap between primary and comparison values */
    white-space: normal !important; /* Override any white-space: nowrap */
}

/* Style the primary value */
.benchmark-table .primary-value {
    color: var(--text-primary) !important; /* Ensure primary color applies */
}

/* Style the comparison value with accent color */
.benchmark-table .compare-value {
    color: var(--accent) !important; /* Ensure accent color applies */
    font-size: 0.92em; /* Slightly smaller for hierarchy */
}

/* Highlighted cell styling */
.benchmark-table td.bold-value .primary-value {
    font-weight: 600; /* Bold the primary value */
    color: var(--accent) !important;
/*    color: var(--text-primary) !important; /* Maintain primary color */
}

.benchmark-table td.bold-value .compare-value {
    font-weight: 600; /* Bold the comparison value */
    color: var(--accent) !important; /* Maintain accent color */
}

/* Adjust cell padding to accommodate stacked values */
.benchmark-table td {
    padding: 6px 12px; /* Reduced top/bottom padding for tighter fit */
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .benchmark-table td {
        font-size: 13px;
        padding: 4px 8px; /* Further reduce padding on mobile */
        min-width: 60px; /* Slightly smaller min-width on mobile */
    }

    .benchmark-table .compare-value {
        font-size: 0.85em; /* Even smaller on mobile */
    }
}


/* ---------------------------------------------- */
/* 5. Responsive Adjustments */
/* ---------------------------------------------- */

@media (max-width: 768px) {
    /* Title Section */
    .title-container {
        margin-bottom: 12px;
    }

    .main-title {
        font-size: 32px;
        margin-top: 6px;
    }

    .hostname {
        font-size: 18px;
    }

    .hostname .drive {
       font-size: 15px;
    }

    .timestamp {
        font-size: 12px;
    }

    /* Chart Bars */
    .category-title {
        font-size: 16px;
        margin-bottom: 1px;
    }

    .category-title .drive {
       font-size: 14px;
    }

    .bar {
        height: 40px;
        width: 100%;
        min-width: 0;
        margin-bottom: 8px;
    }

    .bar-label {
        font-size: 16px;
        right: 12px;
    }

    .bar-label.outside {
        left: calc(100% + 6px);
        right: auto;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .bar-container {
        overflow: visible;
    }

    /* Dropdowns */
    .dropdown-container {
        flex-wrap: wrap;
        gap: 6px;
        justify-content: center;
    }

    .dropdown {
        padding: 4px 20px 4px 8px;
        font-size: 13px;
        background-position: right 6px center;
    }

    /* Tables */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .bg-elegant-table {
        min-width: auto; /* Remove min-width to fit viewport */
    }

    .elegant-table {
        width: 100%;
        min-width: auto; /* Remove min-width to fit viewport */
        table-layout: auto;
    }

    .elegant-table th,
    .elegant-table td {
        width: auto;
        min-width: 0; /* Allow columns to shrink */
        padding: 8px 12px; /* Reduce padding for mobile */
    }

    .elegant-table th:first-child,
    .elegant-table td:first-child {
        width: auto;
        min-width: 0;
    }

    /* Benchmark Link */
    .benchmark-link {
        font-size: 13px;
    }

    .chart-container .hamburger-menu {
        top: 12px; /* Align with share icon and theme toggle */
        right: 42px;
        left: auto;
    }

    /* Chart Container Icons */
    .theme-toggle.top-right {
        right: 30px; /* Slightly closer on mobile to fit smaller width */
        margin-right: 6px;
    }

    .share-icon {
        right: 0px; /* Slightly closer to the edge on mobile */
    }

    /* List View Adjustments */
    .elegant-table.list-table {
        table-layout: fixed; /* Enforce percentage widths */
        min-width: auto; /* Remove min-width to fit viewport */
        width: 100%;
    }

    .elegant-table.list-table th,
    .elegant-table.list-table td {
        padding: 8px 8px; /* Reduced horizontal padding */
        min-width: 0; /* Allow columns to shrink */
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .elegant-table.list-table th:nth-child(1), /* Date Entered */
    .elegant-table.list-table td:nth-child(1) {
        min-width: 80px;
        width: 26%; /* Reduced from 25% */
    }

    .elegant-table.list-table th:nth-child(2), /* Host Name */
    .elegant-table.list-table td:nth-child(2) {
        min-width: 0;
        width: 50%; /* Unchanged */
    }

    .elegant-table.list-table th:nth-child(3), /* Disk Configuration */
    .elegant-table.list-table td:nth-child(3) {
        min-width: 0;
        width: 0; 
    }

    .elegant-table.list-table th:nth-child(4), /* Compare (now 3rd column on mobile) */
    .elegant-table.list-table td:nth-child(4) {
        min-width: 200px;
        width: 24%;
    }

    /* Hide elements with desktop-only class on mobile */
    .desktop-only {
        display: none;
    }

    /* Widen the container on mobile */
    .mobile-container {
        max-width: 100%; /* Use full width on mobile */
        padding: 6px 0; /* Remove horizontal padding */
        margin-left: 0;
        margin-right: 0;
    }

    /* Main container responsive */
    .main-container {
        padding: 1rem 0.75rem;
        margin-top: 0;
        border-radius: 0;
    }

    /* Chart container responsive */
    .chart-container {
        border-radius: 12px;
    }

    /* Table card responsive */
    .table-card {
        padding: 0.75rem;
        margin-bottom: 1.5rem;
    }

    .table-heading {
        font-size: 1rem;
    }

    .table-subheading {
        font-size: 0.8rem;
    }

    /* Slider responsive */
    .slider-row {
        padding-right: 0.5rem;
    }

    /* Reduce table container padding on mobile */
    .table-container {
        padding: 8px; /* Reduced from 16px */
    }

    /* Allow date wrapping to reduce column width */
    .date-part {
        white-space: normal; /* Allow wrapping */
    }

    /* Adjust compare checkbox for mobile */
    .compare-checkbox {
        width: 18px;
        height: 18px;
    }

    /* Allow wrapping for comparison label on mobile */
    .comparison-label {
        flex-wrap: wrap;
        max-width: calc(100% - 80px);
        white-space: normal;
    }

    /* Ensure the indicator stays on the same line */
    .comparison-indicator {
        flex-shrink: 0;
    }

    /* Added for login functionality: Responsive adjustments for auth pages */
    .auth-container {
        padding: 1.0rem; /* Slightly smaller padding */
        max-width: 80%; /* Slightly wider on smaller screens */
    }

    .auth-logo {
        max-height: 54px; /* Slightly smaller on mobile */
    }

    h2 {
        font-size: 1.25rem; /* Slightly smaller on mobile */
    }

    input[type="email"],
    input[type="password"] {
        padding: 0.6rem; /* Slightly smaller padding */
        font-size: 1.2rem; /* Smaller font size for mobile */
    }

    button {
        padding: 0.8rem; /* Slightly smaller padding */
        font-size: 1.3rem; /* Smaller font size for mobile */
    }

    .error,
    .success {
        font-size: 0.85rem; /* Slightly smaller font size */
        padding: 0.5rem; /* Slightly smaller padding */
    }

    .forgot-password a {
        font-size: 0.85rem; /* Slightly smaller font size */
    }
}

/* ---------------------------------------------- */
/* 6. Tailwind Utility Replacements */
/* ---------------------------------------------- */

/* Main container (replaces max-w-4xl mx-auto p-6 rounded-xl mt-1 sm:mt-6) */
.main-container {
    max-width: 56rem;
    margin: 0.25rem auto 0;
    padding: 1.5rem;
    border-radius: 0.75rem;
    background-color: var(--container-bg);
    position: relative;
}
@media (min-width: 640px) {
    .main-container { margin-top: 1.5rem; }
}

/* Icon button (replaces w-6 h-6 text-gray-600 hover:text-blue-500 transition-colors duration-200) */
.icon-btn {
    width: 1.5rem;
    height: 1.5rem;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}
.icon-btn:hover { color: var(--accent); }

/* Spacing utility */
.mt-4 { margin-top: 1rem; }

/* ---------------------------------------------- */
/* 6.1 Toggle Slider (RAID/Size) */
/* ---------------------------------------------- */

.slider-row {
    display: flex;
    justify-content: flex-end;
    margin: 0.5rem 0 1rem;
    padding-right: 1rem;
    font-size: 0.875rem;
}

.slider-controls {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.slider-label {
    color: var(--text-primary);
    font-weight: 500;
}

.toggle-track {
    position: relative;
    width: 3rem;
    height: 1.5rem;
    background-color: var(--toggle-track);
    border-radius: 9999px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: background-color 0.2s ease;
}

.toggle-track.active {
    background-color: var(--toggle-track-active);
}

.toggle-thumb {
    position: absolute;
    width: 1.25rem;
    height: 1.25rem;
    background-color: white;
    border-radius: 9999px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
    transform: translateX(2px);
}

.toggle-thumb.active {
    transform: translateX(26px);
}

/* ---------------------------------------------- */
/* 6.2 Benchmark Table Cards */
/* ---------------------------------------------- */

.tables-group {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    transition: opacity 0.3s ease;
}

.table-card {
    padding: 1rem;
    background-color: var(--chart-container-bg);
    border-radius: 0.5rem;
    margin-bottom: 2rem;
}

.table-heading {
    font-size: 1.125rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.table-subheading {
    font-size: 0.875rem;
    font-weight: 300;
    margin-left: 0.5rem;
    color: var(--text-secondary);
}

/* ---------------------------------------------- */
/* 6.3 Staggered Bar Animation */
/* ---------------------------------------------- */

.bar-container {
    animation: barFadeIn 0.5s ease-out backwards;
}

.bar-container:nth-child(1) { animation-delay: 0ms; }
.bar-container:nth-child(2) { animation-delay: 80ms; }
.bar-container:nth-child(3) { animation-delay: 160ms; }
.bar-container:nth-child(4) { animation-delay: 240ms; }
.bar-container:nth-child(5) { animation-delay: 320ms; }

@keyframes barFadeIn {
    from {
        opacity: 0;
        transform: translateX(-12px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ---------------------------------------------- */
/* 6.4 Benchmark Tables Positioning */
/* ---------------------------------------------- */

#benchmark-tables {
    position: relative;
}

/* ---------------------------------------------- */
/* 7. Error Page */
/* ---------------------------------------------- */

.error-page {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    padding: 20px;
    text-align: center;
}

.error-container {
    background-color: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    width: 100%;
}

.error-container h1 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 16px;
}

.error-container p {
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 24px;
}

.error-container a {
    color: #007aff;
    text-decoration: none;
    font-weight: 500;
}

.error-container a:hover {
    text-decoration: underline;
}
