:root {
    /* Color Palette - Premium Navy & Emerald Theme */
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary: #10b981;
    --background: #f1f5f9;
    --sidebar: #0f172a;
    --surface: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --danger: #ef4444;
    --success: #10b981;
    --glass: rgba(255, 255, 255, 0.85);

    /* Layout */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --sidebar-width: 260px;

    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --shadow-lg: 0 2px 8px -1px rgb(0 0 0 / 0.04), 0 1px 3px -1px rgb(0 0 0 / 0.03);
}

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

body {
    font-family: var(--font-family);
    background-color: var(--background);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    height: 100vh;
    overflow: hidden;
}

/* Dashboard Layout */
.dashboard-wrapper {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar);
    color: white;
    display: flex;
    flex-direction: column;
    padding: 2rem 1.5rem;
    transition: all 0.3s ease;
}

.sidebar .logo {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    margin-bottom: 3rem;
    background: linear-gradient(135deg, #60a5fa, #34d399);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    padding-left: 0.5rem;
}

.nav-menu {
    list-style: none;
    flex-grow: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    margin-bottom: 0.5rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    color: #94a3b8;
    font-weight: 600;
}

.nav-item .icon {
    margin-right: 0.75rem;
    font-size: 1.25rem;
}

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

.nav-item.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Content Area */
.content-area {
    flex-grow: 1;
    overflow-y: auto;
    padding: 2rem 3rem;
    position: relative;
    background: radial-gradient(circle at top right, #e0e7ff 0%, transparent 30%);
}

.feature-view {
    display: none;
    max-width: 1100px;
    margin: 0 auto;
}

.feature-view.active {
    display: block;
    animation: fadeIn 0.4s ease-out;
}

/* Glass Panel Enhancements */
.glass-panel {
    background: var(--glass);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    margin-bottom: 2rem;
}

/* Typography */
h1 {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    color: var(--text-main);
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.125rem;
    margin-bottom: 2.5rem;
}

/* Forms & UI Elements (Re-using some from original) */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

input[type="text"],
input[type="number"],
select {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: white;
    font-size: 1rem;
    transition: all 0.2s ease;
}

input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.75rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    font-size: 1rem;
    gap: 0.5rem;
}

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

.btn-block {
    width: 100%;
}

/* Asset Planning Specifics */
.projection-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.5rem;
}

.projection-table th {
    text-align: left;
    padding: 1rem;
    border-bottom: 2px solid var(--border);
    color: var(--text-muted);
    font-size: 0.85rem;
}

.projection-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
}

.ratio-bar-container {
    height: 12px;
    background: #e2e8f0;
    border-radius: 6px;
    display: flex;
    overflow: hidden;
    margin: 1.5rem 0;
}

.ratio-segment {
    height: 100%;
    transition: width 0.5s ease;
}

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

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

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

.view-section {
    display: none;
}

.view-section.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

/* Existing components maintained */
.stepper {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3rem;
    position: relative;
    padding: 0 1rem;
}

.stepper::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--border);
    z-index: 1;
    transform: translateY(-50%);
}

.step {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: white;
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    z-index: 2;
    color: var(--text-muted);
}

.step.active {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
}

.step.completed {
    border-color: var(--secondary);
    background: var(--secondary);
    color: white;
}

.chip {
    padding: 0.5rem 1.25rem;
    border: 1.5px solid var(--border);
    background: white;
    border-radius: 2rem;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.chip.selected {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--primary);
}

input:checked+.slider:before {
    transform: translateX(20px);
}

@media (max-width: 1024px) {
    .sidebar {
        width: 80px;
        padding: 2rem 0.5rem;
    }

    .sidebar .logo {
        font-size: 1.25rem;
        text-align: center;
    }

    .nav-item span:not(.icon) {
        display: none;
    }

    .nav-item .icon {
        margin-right: 0;
    }
}

@media (max-width: 768px) {
    body {
        overflow-y: auto;
        height: auto;
    }

    .dashboard-wrapper {
        flex-direction: column;
        height: auto;
    }

    .sidebar {
        width: 100%;
        height: auto;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 0.75rem 1.25rem;
        position: sticky;
        top: 0;
        z-index: 1000;
        background: rgba(15, 23, 42, 0.95);
        backdrop-filter: blur(12px);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .sidebar .logo {
        margin-bottom: 0;
        font-size: 1.5rem;
        padding-left: 0;
    }

    .nav-menu {
        display: flex;
        flex-direction: row;
        gap: 0.5rem;
        flex-grow: 0;
    }

    .nav-item {
        margin-bottom: 0;
        padding: 0.5rem 0.75rem;
        font-size: 0.8125rem;
    }
    
    .nav-item span:not(.icon) {
        display: inline !important;
    }

    /* Hide version info on mobile */
    .sidebar > div:last-child {
        display: none !important;
    }

    .content-area {
        padding: 1.5rem 1rem;
        overflow-y: visible;
        height: auto;
    }

    /* Grid Responsiveness */
    .grid-responsive {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    h1 {
        font-size: 1.75rem;
    }

    .subtitle {
        font-size: 0.9375rem;
        margin-bottom: 1.5rem;
    }

    .glass-panel {
        padding: 1.25rem !important;
    }

    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.9375rem;
    }

    /* Additional UI tweaks for mobile */
    #display-monthly-net {
        font-size: 2.25rem !important;
    }

    #display-estimated-refund {
        font-size: 2.75rem !important;
    }

    .projection-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}