/* ============================================
           1. CSS VARIABLES & TYPOGRAPHY
           - Color palette, gradients, glass effects
           - Modify these to change the overall theme
           ============================================ */
:root {
    --primary: #3b82f6;
    --primary-glow: rgba(59, 130, 246, 0.4);
    --secondary: #0ea5e9;
    --success: #10b981;
    --success-glow: rgba(16, 185, 129, 0.4);
    --danger: #ef4444;
    --danger-glow: rgba(239, 68, 68, 0.3);
    --warning: #f59e0b;
    --accent: #06b6d4;
    --gold: #fbbf24;
    --bitcoin: #f7931a;
    --bg-dark: #0a1628;
    --bg-card: rgba(59, 130, 246, 0.05);
    --bg-card-hover: rgba(59, 130, 246, 0.12);
    --glass: rgba(59, 130, 246, 0.08);
    --glass-border: rgba(59, 130, 246, 0.2);
    --text: #e2e8f0;
    --text-muted: #a8b5c7;
    /* Improved contrast for WCAG AA compliance */
    --gradient-1: linear-gradient(135deg, #1e40af 0%, #3b82f6 50%, #0ea5e9 100%);
    --gradient-2: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
    --gradient-3: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    --gradient-4: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
    --gradient-gold: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
}

/* ============================================
           2. BASE RESET & BODY
           ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Font fallback with size-adjust to prevent CLS */
@font-face {
    font-family: 'Inter Fallback';
    src: local('Arial');
    size-adjust: 107%;
    ascent-override: 90%;
    descent-override: 25%;
    line-gap-override: 0%;
}

@font-face {
    font-family: 'Space Grotesk Fallback';
    src: local('Arial');
    size-adjust: 105%;
    ascent-override: 95%;
    descent-override: 22%;
    line-gap-override: 0%;
}

body {
    font-family: 'Inter', 'Inter Fallback', system-ui, sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ============================================
           3. ANIMATIONS & BACKGROUND EFFECTS
           - Rotating gradient background
           - Floating financial symbols
           ============================================ */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.bg-animation::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(circle at 20% 80%, rgba(59, 130, 246, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(14, 165, 233, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(6, 182, 212, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 60% 60%, rgba(30, 64, 175, 0.15) 0%, transparent 40%);
    animation: bgRotate 30s linear infinite;
    will-change: transform;
    /* GPU acceleration */
}

@keyframes bgRotate {
    0% {
        transform: rotate3d(0, 0, 1, 0deg);
        /* GPU-accelerated 3D rotation */
    }

    100% {
        transform: rotate3d(0, 0, 1, 360deg);
    }
}

/* Floating Animated Objects */
.floating-objects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.floating-item {
    position: absolute;
    font-size: 2rem;
    opacity: 0.15;
    animation: floatUp 15s linear infinite;
    text-shadow: 0 0 10px currentColor;
    /* GPU-friendly alternative to drop-shadow */
    will-change: transform, opacity;
    /* GPU acceleration hint */
}

/* Disable floating animations on mobile for better performance */
@media (max-width: 768px) {
    .floating-objects {
        display: none;
    }

    .bg-animation::before {
        animation: none;
        /* Disable rotating gradient on mobile */
    }
}

.floating-item.gold {
    color: var(--gold);
}

.floating-item.blue {
    color: var(--primary);
}

.floating-item.cyan {
    color: var(--accent);
}

.floating-item.bitcoin {
    color: var(--bitcoin);
}

.floating-item.green {
    color: var(--success);
}

@keyframes floatUp {
    0% {
        transform: translate3d(0, 100vh, 0);
        /* GPU-accelerated 3D transform */
        opacity: 0;
    }

    10% {
        opacity: 0.15;
    }

    90% {
        opacity: 0.15;
    }

    100% {
        transform: translate3d(0, -100px, 0);
        opacity: 0;
    }
}

.floating-item:nth-child(1) {
    left: 5%;
    animation-delay: 0s;
    animation-duration: 18s;
}

.floating-item:nth-child(2) {
    left: 15%;
    animation-delay: 2s;
    animation-duration: 22s;
}

.floating-item:nth-child(3) {
    left: 25%;
    animation-delay: 4s;
    animation-duration: 16s;
}

.floating-item:nth-child(4) {
    left: 35%;
    animation-delay: 1s;
    animation-duration: 20s;
}

.floating-item:nth-child(5) {
    left: 45%;
    animation-delay: 3s;
    animation-duration: 19s;
}

.floating-item:nth-child(6) {
    left: 55%;
    animation-delay: 5s;
    animation-duration: 17s;
}

.floating-item:nth-child(7) {
    left: 65%;
    animation-delay: 2.5s;
    animation-duration: 21s;
}

.floating-item:nth-child(8) {
    left: 75%;
    animation-delay: 0.5s;
    animation-duration: 18s;
}

.floating-item:nth-child(9) {
    left: 85%;
    animation-delay: 4.5s;
    animation-duration: 23s;
}

.floating-item:nth-child(10) {
    left: 95%;
    animation-delay: 1.5s;
    animation-duration: 16s;
}

.floating-item:nth-child(11) {
    left: 10%;
    animation-delay: 6s;
    animation-duration: 20s;
}

.floating-item:nth-child(12) {
    left: 30%;
    animation-delay: 7s;
    animation-duration: 19s;
}

.floating-item:nth-child(13) {
    left: 50%;
    animation-delay: 8s;
    animation-duration: 21s;
}

.floating-item:nth-child(14) {
    left: 70%;
    animation-delay: 9s;
    animation-duration: 17s;
}

.floating-item:nth-child(15) {
    left: 90%;
    animation-delay: 10s;
    animation-duration: 22s;
}

/* ============================================
           4. PAGE LAYOUT & NAVIGATION
           - Multi-page wizard system
           - Progress dots, navigation buttons
           - Page transitions (slide left/right)
           ============================================ */
.page-container {
    position: relative;
    width: 100%;
    min-height: 100vh;
    overflow: hidden;
}

.page {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 100vh;
    padding: 20px;
    opacity: 0;
    transform: translateX(100%);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    overflow-y: auto;
}

.page.active {
    display: block;
    opacity: 1;
    transform: translateX(0);
    pointer-events: all;
    position: relative;
}

/* Ensure non-active pages are hidden */
.page:not(.active) {
    display: none !important;
}

.page.exit-left {
    opacity: 0;
    transform: translateX(-100%);
}

.page.enter-right {
    transform: translateX(100%);
}

/* Floating Page Menu */
.floating-menu {
    position: fixed;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 4px;
    z-index: 100;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    padding: 6px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.floating-menu__item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--text);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.floating-menu__item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
}

.floating-menu__item.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

.floating-menu__item.completed:not(.active) {
    color: var(--success);
}

.floating-menu__label {
    display: inline;
}

/* Mobile: Compact text labels */
@media (max-width: 600px) {
    .floating-menu {
        padding: 4px;
        gap: 2px;
    }

    .floating-menu__item {
        padding: 8px 10px;
        font-size: 0.6rem;
    }
}

/* Very small screens */
@media (max-width: 380px) {
    .floating-menu__item {
        padding: 6px 8px;
        font-size: 0.55rem;
        letter-spacing: 0;
    }
}

/* Navigation Buttons */
.nav-buttons {
    display: flex;
    gap: 16px;
    margin-top: 30px;
    justify-content: center;
}

.nav-btn {
    padding: 14px 32px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.nav-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px var(--primary-glow);
}

.nav-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
    border: 1px solid var(--glass-border);
}

.nav-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Hero button - larger for welcome page */

/* ============================================
           5. CARDS & GLASS EFFECTS
           - Glassmorphism cards with backdrop blur
           - Hover animations, glow effects
           ============================================ */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 14px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.card:hover {
    transform: translateY(-4px);
    background: var(--bg-card-hover);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 40px var(--primary-glow);
}

/* Page Content Wrapper */
.page-content {
    max-width: 800px;
    margin: 54px auto 27px;
}

/* Page Header */
.page-header {
    text-align: center;
    margin-bottom: 18px;
}

.page-header h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fff 0%, #6366f1 50%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.page-header p {
    color: var(--text-muted);
    font-size: 0.76rem;
}

.page-header .step-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--gradient-1);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.step-completion {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
}

.step-completion.complete {
    background: rgba(16, 185, 129, 0.3);
    color: #86efac;
}

.step-completion.partial {
    background: rgba(251, 191, 36, 0.3);
    color: #fcd34d;
}

.step-completion.empty {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

/* ============================================
           6. FORMS & INPUTS
           - Form groups, labels, input fields
           - Select dropdowns, row layouts
           ============================================ */
h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 9px;
}

h2::before {
    content: '';
    width: 4px;
    height: 24px;
    background: var(--gradient-1);
    border-radius: 2px;
}

h4 {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
    margin: 12px 0 9px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
}

.form-group {
    margin-bottom: 12px;
}

label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 5px;
    color: #cbd5e1;
    /* Improved contrast - lighter gray */
}

/* Mandatory field label indicator */
.form-group:has(.mandatory) label::after {
    content: ' *';
    color: var(--danger);
    font-weight: 600;
}

input,
select,
input[type="text"],
input[type="number"],
input[type="date"],
input[type="month"] {
    width: 100%;
    height: 40px;
    padding: 8px 11px;
    background: rgba(15, 23, 42, 0.9) !important;
    /* Darker, solid background */
    border: 1px solid rgba(100, 116, 139, 0.3);
    /* Subtle border */
    border-radius: 8px;
    color: #f1f5f9 !important;
    /* Bright text for input values */
    font-size: 0.76rem;
    font-weight: 500;
    transition: all 0.2s ease;
    -webkit-text-fill-color: #f1f5f9;
    /* For webkit browsers */
}

/* Mandatory field styling */
input.mandatory,
input[type="text"].mandatory,
input[type="number"].mandatory {
    border-left: 3px solid var(--primary);
    background: rgba(30, 58, 95, 0.9) !important;
    color: #f1f5f9 !important;
}

input.mandatory:focus {
    border-left-color: var(--success);
    background: rgba(30, 41, 59, 0.95) !important;
}

/* Dropdown select specific styling */
select {
    background: rgba(15, 23, 42, 0.9);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23cbd5e1' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 32px;
}

/* Dropdown options styling */
select option {
    background: #1e293b;
    color: #f1f5f9;
    padding: 12px;
}

select option:hover,
select option:focus,
select option:checked {
    background: rgba(59, 130, 246, 0.4);
    color: white;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(30, 41, 59, 0.95);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

input::placeholder {
    color: rgba(148, 163, 184, 0.6);
    /* More visible placeholder */
    font-weight: 400;
}

/* Override browser autofill styles */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px rgba(15, 23, 42, 0.95) inset !important;
    -webkit-text-fill-color: #f1f5f9 !important;
    caret-color: #f1f5f9 !important;
}

/* Ensure text color is always light for dark theme inputs */
input,
select,
textarea,
input[type="text"],
input[type="number"],
input[type="date"],
input[type="month"] {
    color: #f1f5f9 !important;
    -webkit-text-fill-color: #f1f5f9 !important;
}

/* Small input for inline/modal use */
.input-sm {
    height: 40px !important;
    padding: 8px !important;
    font-size: 0.8rem !important;
    background: rgba(30, 41, 59, 0.95) !important;
    border: 1px solid rgba(100, 116, 139, 0.3) !important;
    border-radius: 4px !important;
    color: #f1f5f9 !important;
}

/* Label for compact inputs */
.label-sm {
    font-size: 0.7rem;
    color: #94a3b8;
    margin-bottom: 4px;
    display: block;
}

.row-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
}

/* ============================================
           MOBILE-FIRST FORM STYLES
           ============================================ */

/* Responsive row-inputs for mobile */
@media (max-width: 480px) {
    .row-inputs {
        grid-template-columns: 1fr 1fr;
        gap: 5px;
    }

    input,
    select {
        height: 40px;
        padding: 8px 9px;
        font-size: 16px;
        /* Prevents iOS zoom */
    }

    label {
        font-size: 0.8rem;
    }

    .form-group {
        margin-bottom: 10px;
    }
}

/* Very small screens - stack if needed */
@media (max-width: 360px) {
    .row-inputs {
        grid-template-columns: 1fr;
        gap: 7px;
    }

    .page-header h1 {
        font-size: 1.4rem;
    }

    .card {
        padding: 9px;
    }
}

/* Form Section Headers */
.form-section {
    margin: 14px 0 9px;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
}

.form-section__title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-section__subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 3px;
}

/* Tooltip System */
.tooltip-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.4);
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--primary);
    cursor: help;
    margin-left: 6px;
    transition: all 0.2s;
}

.tooltip-trigger:hover {
    background: rgba(59, 130, 246, 0.4);
    transform: scale(1.1);
}

.tooltip-content {
    display: none;
    position: absolute;
    z-index: 100;
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.8rem;
    color: #e2e8f0;
    max-width: 280px;
    line-height: 1.5;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.tooltip-trigger:hover+.tooltip-content,
.tooltip-trigger:focus+.tooltip-content,
.tooltip-content:hover {
    display: block;
}

/* Label with tooltip wrapper */
.label-with-tooltip {
    display: flex;
    align-items: center;
    position: relative;
    margin-bottom: 8px;
}

.label-with-tooltip label {
    margin-bottom: 0;
}

/* Info/Alert Boxes */
.info-box {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 10px;
    padding: 11px 13px;
    margin-bottom: 14px;
    font-size: 0.85rem;
}

.info-box--warning {
    background: rgba(234, 179, 8, 0.1);
    border-color: rgba(234, 179, 8, 0.3);
}

.info-box--success {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
}

.info-box__title {
    font-weight: 600;
    font-size: 0.8rem;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.info-box--warning .info-box__title {
    color: var(--warning);
}

.info-box__text {
    color: var(--text-muted);
    font-size: 0.8rem;
    line-height: 1.4;
}

/* Conditional/Collapsible Form Section */
.form-conditional {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(100, 116, 139, 0.2);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 14px;
}

/* Collapsible Details Component */

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

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

/* Hide default marker */

/* Display/Result Fields (read-only styled) */

/* Total Display (unified across pages) */
.total-display {
    text-align: right;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.2rem;
    margin: 14px 0;
    padding: 11px;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 10px;
}

.total-display--hidden {
    display: none;
}

.total-display__value {
    font-weight: 700;
    font-size: 1.3rem;
}

.total-display__value--success {
    color: var(--success);
}

/* Button variations */
.btn-gradient-2 {
    background: var(--gradient-2);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-gradient-2:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(244, 63, 94, 0.3);
}

.btn-gradient-4 {
    background: var(--gradient-4);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-gradient-4:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.btn-success {
    background: var(--success);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
}

.btn-success:hover {
    background: #059669;
}

/* Edit buttons container */
.edit-buttons {
    margin-top: 10px;
}

/* Form hint text */
.form-hint {
    display: block;
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-top: 4px;
}

/* Optional field indicator */
.form-group--optional label::after {
    content: ' (optional)';
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 400;
}

/* Tips box improved */
.tips-box-compact {
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 10px;
    padding: 11px 14px;
    font-size: 0.8rem;
    line-height: 1.6;
    color: var(--text-muted);
}

.tips-box-compact strong {
    color: var(--primary);
}

/* Mobile-optimized form on small screens */
@media (max-width: 380px) {
    .form-conditional {
        padding: 11px;
    }

    .info-box {
        padding: 9px 11px;
    }

    h4 {
        font-size: 0.75rem;
    }
}

/* ============================================
           7. BUTTONS & ACTIONS
           - Primary/secondary button styles
           - Edit/remove action buttons
           - Item list rows with hover effects
           ============================================ */
button {
    background: var(--gradient-1);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.76rem;
    width: 100%;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px var(--primary-glow);
}

button.secondary-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
}

button.remove-btn {
    background: var(--danger);
    width: auto;
    min-width: 44px;
    min-height: 44px;
    padding: 8px 14px;
    font-size: 0.9rem;
}

button.edit-btn {
    background: var(--warning);
    width: auto;
    padding: 6px 12px;
    font-size: 0.8rem;
}

/* Items List */
.items-list {
    margin-bottom: 16px;
}

.item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    margin-bottom: 8px;
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.item-row:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

.item-info h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.item-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.freed-cashflow {
    display: inline-block;
    font-size: 0.65rem;
    color: var(--success);
    background: rgba(16, 185, 129, 0.12);
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 6px;
    vertical-align: middle;
    opacity: 0.9;
}

.payoff-eta {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 2px;
    opacity: 0.85;
}

.projection-hint {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 2px;
    opacity: 0.85;
}

.item-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
}

.item-value.positive {
    color: var(--success);
}

.item-value.negative {
    color: var(--danger);
}

.item-actions {
    display: flex;
    gap: 8px;
    margin-left: 16px;
}

/* ============================================
           8. UI COMPONENTS
           - Tips box (warning style)
           - Summary cards with rows
           - Empty state placeholder
           - Toast notifications
           ============================================ */
.tips-box {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 12px;
    padding: 12px;
    margin-top: 16px;
    font-size: 0.8rem;
    color: var(--warning);
}

.tips-box strong {
    display: block;
    margin-bottom: 4px;
}

/* Summary Card - 10% reduced height */
.summary-card {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(30, 41, 59, 0.8) 100%);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 14px;
    padding: 13px;
    margin-top: 16px;
}

.summary-card::before {
    content: 'SUMMARY';
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 2px;
    color: var(--primary);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 0;
    border-bottom: 1px solid rgba(100, 116, 139, 0.15);
    font-size: 0.9rem;
}

.summary-row span:first-child {
    color: #94a3b8;
}

.summary-row span:last-child {
    font-weight: 600;
    font-family: 'Space Grotesk', monospace;
}

.summary-row:last-child {
    border-bottom: none;
}

.summary-row.total {
    border-top: 2px solid rgba(59, 130, 246, 0.3);
    border-bottom: none;
    margin-top: 12px;
    padding-top: 16px;
    font-weight: bold;
    font-size: 1.05rem;
}

.summary-row.total span:first-child {
    color: #e2e8f0;
}

/* Summary row variations */
.summary-row.sub-item {
    font-size: 0.8rem;
    padding: 6px 0 6px 16px;
    background: rgba(0, 0, 0, 0.15);
    margin: 2px 0;
    border-radius: 6px;
    border-bottom: none;
}

.summary-row.sub-item span:first-child {
    color: #64748b;
}

.summary-row.highlight {
    background: rgba(59, 130, 246, 0.1);
    padding: 12px;
    margin: 8px -8px;
    border-radius: 8px;
}

.summary-row.highlight span:last-child {
    color: #3b82f6;
    font-size: 1.1rem;
}

.summary-row.info-row {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed rgba(100, 116, 139, 0.3);
    border-bottom: none;
    font-size: 0.85rem;
}

/* Text color utilities */
.text-danger {
    color: var(--danger) !important;
}

.text-success {
    color: var(--success) !important;
}

.text-warning {
    color: var(--warning) !important;
}

.text-accent {
    color: var(--accent) !important;
}

/* Compact tips box */
.tips-box.compact {
    padding: 12px 16px;
    font-size: 0.8rem;
    line-height: 1.5;
}

.tips-box.compact strong {
    display: inline;
    margin-right: 4px;
}

/* Last Updated Label */
.last-updated-label {
    display: block;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed var(--glass-border);
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Empty State */
.empty-state {
    text-align: center;
    color: var(--text-muted);
    padding: 30px;
    font-size: 0.9rem;
}

.empty-state .icon {
    font-size: 3rem;
    margin-bottom: 12px;
    opacity: 0.5;
}

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

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

.animate-in {
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes pulse {

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

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

/* Toast Notification */
#save-status {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: white;
    padding: 16px 32px;
    border-radius: 50px;
    opacity: 0;
    transition: all 0.5s ease;
    pointer-events: none;
    z-index: 9999;
    font-weight: 600;
}

#save-status.show {
    opacity: 1;
}

/* ============================================
           9. TOOLTIPS & INFO POPUPS
           - Info trigger buttons (?)
           - Global tooltip container
           - Tooltip header, stats, charts, progress
           ============================================ */
.info-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* Increased touch target for accessibility (44px min recommended) */
    width: 32px;
    height: 32px;
    min-width: 44px;
    min-height: 44px;
    margin: -11px;
    /* Negative margin to keep visual size while expanding touch area */
    padding: 11px;
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.75rem;
    color: var(--primary);
    transition: all 0.2s;
    flex-shrink: 0;
}

.info-trigger:hover {
    background: rgba(59, 130, 246, 0.4);
    transform: scale(1.1);
}

/* Global Tooltip */
.global-tooltip {
    position: fixed;
    width: 320px;
    font-family: 'Inter', 'Inter Fallback', system-ui, sans-serif;
    background: linear-gradient(135deg, rgba(10, 22, 40, 0.98) 0%, rgba(20, 40, 70, 0.98) 100%);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(59, 130, 246, 0.2);
    z-index: 10000;
    backdrop-filter: blur(10px);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}

.global-tooltip.visible {
    opacity: 1;
    visibility: visible;
}

.global-tooltip::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 10px solid transparent;
    border-bottom-color: rgba(59, 130, 246, 0.4);
}

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

.tooltip-header h4 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.tooltip-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.tooltip-chart {
    height: 80px;
    margin: 12px 0;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 8px;
}

.tooltip-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.tooltip-stat {
    background: rgba(0, 0, 0, 0.2);
    padding: 10px;
    border-radius: 8px;
    text-align: center;
}

.tooltip-stat-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.tooltip-stat-value {
    font-family: 'Space Grotesk';
    font-size: 0.76rem;
    font-weight: 600;
}

.tooltip-progress {
    margin: 12px 0;
}

.tooltip-progress-bar {
    height: 6px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
    overflow: hidden;
}

.tooltip-progress-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.tooltip-progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ============================================
           10. RESPONSIVE DESIGN
           - Tablet breakpoint (768px)
           - Mobile breakpoint (480px)
           - Touch-friendly sizing
           ============================================ */

/* Tablet and small laptops */
@media (max-width: 768px) {
    .page-header h1 {
        font-size: 1.6rem;
    }

    .page-header p {
        display: none;
    }

    .row-inputs {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    /* Dashboard: Stack columns vertically */

    .card {
        padding: 14px;
        border-radius: 14px;
    }

    /* Hide form section subtitles on tablet */
    .form-section__subtitle {
        display: none;
    }

    .form-section {
        margin: 12px 0 8px;
    }

    label {
        font-size: 0.8rem;
    }

    input,
    select {
        height: 40px;
        padding: 8px 10px;
        font-size: 0.9rem;
    }
}

/* Mobile phones */
@media (max-width: 480px) {

    /* Welcome page */

    /* Page layout - compact height */
    .page {
        padding: 8px;
    }

    .page-content {
        margin: 50px auto 14px;
    }

    .page-header {
        margin-bottom: 12px;
    }

    .page-header h1 {
        font-size: 1.4rem;
    }

    .page-header p {
        display: none;
    }

    /* Cards - 10% reduced height */
    .card {
        padding: 11px;
        border-radius: 10px;
        margin-bottom: 11px !important;
    }

    /* Headings */
    h2 {
        font-size: 1.05rem;
        margin-bottom: 7px;
    }

    h4 {
        font-size: 0.75rem;
        margin: 9px 0 6px;
    }

    /* Form sections - 10% reduced height */
    .form-section {
        margin: 11px 0 7px;
        padding-bottom: 5px;
    }

    .form-section__title {
        font-size: 0.8rem;
    }

    .form-group {
        margin-bottom: 11px;
    }

    /* Form elements - standardized 40px height */
    input,
    select {
        height: 40px;
        padding: 8px 10px;
        font-size: 16px;
        /* Prevents iOS zoom */
        border-radius: 7px;
    }

    label {
        font-size: 0.8rem;
        margin-bottom: 4px;
    }

    button {
        padding: 9px 14px;
        font-size: 0.85rem;
    }

    .nav-btn {
        padding: 9px 16px;
        font-size: 0.85rem;
    }

    .nav-buttons {
        margin-top: 14px;
        gap: 9px;
    }

    /* Item rows - 10% reduced height */
    .item-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .item-actions {
        margin-left: 0;
        width: 100%;
        justify-content: flex-end;
    }

    .item-value {
        font-size: 0.76rem;
    }

    /* Summary - 10% reduced height */
    .summary-card {
        padding: 10px;
        margin-top: 10px;
    }

    .summary-row {
        font-size: 0.8rem;
        padding: 2px 0;
    }

    .summary-row.sub-item {
        font-size: 0.75rem;
        padding: 1px 0;
    }

    /* Tooltips */
    .global-tooltip {
        width: calc(100vw - 16px);
        max-width: 280px;
        font-size: 0.8rem;
    }

    /* Tooltip trigger - 10% smaller */
    .tooltip-trigger {
        width: 14px;
        height: 14px;
        font-size: 0.6rem;
        margin-left: 4px;
    }

    .tooltip-stats {
        grid-template-columns: 1fr 1fr;
        gap: 5px;
    }

    /* Tips box */
    .tips-box {
        font-size: 0.75rem;
        padding: 9px;
    }
}

/* Dashboard-specific mobile styles */
@media (max-width: 768px) {

    /* Net worth card: stack vertically */

    /* Stats grids: 2 columns instead of 3/4/5 */

    /* Strategy buttons: stack or 2 columns */

    /* Chart section */
    .dashboard-chart-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
    }

    .dashboard-chart-buttons {
        width: 100%;
        justify-content: space-between !important;
    }

    .dashboard-chart-buttons button {
        flex: 1;
        padding: 8px 8px !important;
    }

    .dashboard-chart-container {
        height: 280px !important;
    }

    /* Two column layout: stack */

    /* Budget breakdown */

    /* Welcome page steps */

    /* Journey summary grid - 2 columns on mobile */
    .journey-summary-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }

    .journey-stat {
        padding: 14px !important;
        gap: 12px !important;
    }

    .journey-stat-icon {
        font-size: 1.5rem !important;
    }

    .journey-stat-value {
        font-size: 1.1rem !important;
    }

    .journey-stat-label {
        font-size: 0.75rem !important;
    }

    .journey-chart-container {
        height: 280px !important;
    }

    .journey-empty-state {
        padding: 24px 16px !important;
    }

    .journey-empty-state h3 {
        font-size: 1.2rem !important;
    }

    .journey-empty-state p {
        font-size: 0.85rem !important;
    }
}

/* Extra small screens */
@media (max-width: 480px) {

    .dashboard-chart-container {
        height: 220px !important;
    }

    .nav-btn {
        padding: 10px 16px;
        font-size: 0.85rem;
    }

    /* Journey - single column on extra small */
    .journey-summary-grid {
        grid-template-columns: 1fr !important;
    }

    .journey-stat {
        padding: 10px !important;
        gap: 10px !important;
    }

    .journey-stat-icon {
        font-size: 1.2rem !important;
    }

    .journey-stat-value {
        font-size: 0.95rem !important;
    }

    .journey-stat-label {
        font-size: 0.6rem !important;
    }

    .journey-chart-container {
        height: 200px !important;
    }

    /* Data tables on extra small */
}

/* ============================================
           11. DARK/LIGHT MODE THEMING
           ============================================ */
[data-theme="light"] {
    --bg-dark: #f1f5f9;
    --bg-card: rgba(15, 23, 42, 0.03);
    --bg-card-hover: rgba(15, 23, 42, 0.08);
    --glass: rgba(15, 23, 42, 0.05);
    --glass-border: rgba(15, 23, 42, 0.12);
    --text: #1e293b;
    --text-muted: #64748b;
}

[data-theme="light"] body {
    background: var(--bg-dark);
}

[data-theme="light"] .bg-animation::before {
    background:
        radial-gradient(circle at 20% 80%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(14, 165, 233, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(6, 182, 212, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 60% 60%, rgba(30, 64, 175, 0.08) 0%, transparent 40%);
}

[data-theme="light"] .card {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(15, 23, 42, 0.1);
}

[data-theme="light"] .floating-item {
    opacity: 0.08;
}

[data-theme="light"] input,
[data-theme="light"] select {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(15, 23, 42, 0.15);
    color: var(--text);
}

[data-theme="light"] .global-tooltip {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(241, 245, 249, 0.98) 100%);
    border-color: rgba(15, 23, 42, 0.15);
    color: var(--text);
}

[data-theme="light"] .floating-menu {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(15, 23, 42, 0.1);
}

[data-theme="light"] .floating-menu__item {
    color: var(--text-muted);
}

[data-theme="light"] .floating-menu__item:hover {
    background: rgba(15, 23, 42, 0.05);
}

[data-theme="light"] .floating-menu__item.active {
    background: var(--primary);
    color: white;
}

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    z-index: 1000;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.theme-toggle:hover {
    background: var(--bg-card-hover);
    transform: scale(1.1);
}

/* ============================================
           12. CUSTOM MODAL SYSTEM
           ============================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

.modal-content {
    background: linear-gradient(135deg, rgba(10, 22, 40, 0.98) 0%, rgba(20, 40, 70, 0.98) 100%);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 24px;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5), 0 0 40px rgba(59, 130, 246, 0.2);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
}

[data-theme="light"] .modal-content {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(241, 245, 249, 0.98) 100%);
}

.modal-overlay.active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.modal-header h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.3rem;
    margin: 0;
}

.modal-header .modal-icon {
    font-size: 1.5rem;
}

.modal-body {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 24px;
}

.modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.modal-btn {
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-size: 0.76rem;
}

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

.modal-btn.danger {
    background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
    color: white;
}

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

.modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.track-badge {
    background: var(--glass);
    color: var(--text-muted);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid var(--glass-border);
}

.track-badge.ahead {
    background: rgba(34, 197, 94, 0.2);
    color: var(--success);
    border-color: rgba(34, 197, 94, 0.3);
}

.track-badge.behind {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.3);
}

.track-badge.on-track {
    background: rgba(99, 102, 241, 0.2);
    color: var(--primary);
    border-color: rgba(99, 102, 241, 0.3);
}

/* Journey Section */

.journey-chart-wrapper {
    margin: 16px 0;
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    overflow: hidden;
}

.journey-chart-container {
    position: relative;
    height: 280px;
    overflow: hidden;
}

/* Standardized Data Tables */

.empty-row td {
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    padding: 32px 16px;
}

/* Floating Action Button */

/* Record Payment Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal .modal-content {
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(30, 41, 59, 0.98) 100%);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 28px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.modal .modal-header h2 {
    margin: 0;
    font-family: 'Space Grotesk', sans-serif;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.8rem;
    cursor: pointer;
    padding: 8px;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: color 0.2s ease, background 0.2s ease;
    border-radius: 8px;
}

.modal-close:hover,
.modal-close:active {
    color: var(--text);
    background: rgba(255, 255, 255, 0.1);
}

/* Backup Modal Styles */
.backup-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.backup-option-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    width: 100%;
}

.backup-option-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--primary);
    transform: translateX(4px);
}

.backup-option-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.backup-icon {
    font-size: 1.5rem;
    width: 32px;
    text-align: center;
}

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

.backup-desc {
    font-size: 0.7rem;
    color: var(--text-muted);
    display: block;
    margin-top: 2px;
}

.backup-option-btn .backup-label,
.backup-option-btn .backup-desc {
    display: block;
}

.gdrive-status {
    margin-top: 16px;
    padding: 12px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 8px;
}

.gdrive-user {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    color: var(--text-primary);
}

.btn-link {
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: underline;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Quick amount modal form-group - inherits from base .form-group (12px margin) */
.form-group label {
    display: block;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 5px;
    font-weight: 500;
}

/* Payment Preview */

.extra-payment {
    grid-column: span 2;
    background: rgba(34, 197, 94, 0.1);
    border-radius: 8px;
    padding: 12px;
}

.modal .modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--glass-border);
}

.btn {
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-size: 0.76rem;
}

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

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

.btn:hover {
    transform: translateY(-2px);
}

/* Financial Journey Section */

.journey-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 16px 0;
}

.journey-stat {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    overflow: hidden;
    min-width: 0;
}

.journey-stat:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.journey-stat.payments-made {
    border-left: 3px solid var(--primary);
}

.journey-stat.debt-reduced {
    border-left: 3px solid var(--success);
}

.journey-stat.assets-grown {
    border-left: 3px solid var(--secondary);
}

.journey-stat.networth-change {
    border-left: 3px solid var(--gold);
}

.journey-stat-icon {
    font-size: 1.5rem;
    opacity: 0.9;
    flex-shrink: 0;
}

.journey-stat-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    overflow: hidden;
}

.journey-stat-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.journey-stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.journey-stat-percent {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    display: inline-block;
    width: fit-content;
    margin-top: 2px;
}

.journey-stat-percent.positive {
    background: rgba(34, 197, 94, 0.2);
    color: var(--success);
}

.journey-stat-percent.negative {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

/* Action Buttons for Payment History */

/* Journey Empty State */
.journey-empty-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(99, 102, 241, 0.1));
    border-radius: 16px;
    border: 2px dashed rgba(139, 92, 246, 0.3);
}

.journey-empty-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.journey-empty-state h3 {
    color: var(--text-light);
    font-size: 1.4rem;
    margin: 0 0 12px 0;
}

.journey-empty-state p {
    color: var(--text-muted);
    font-size: 0.76rem;
    max-width: 400px;
    margin: 0 0 24px 0;
    line-height: 1.5;
}

.journey-empty-state .btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
}

/* Journey Chart Placeholder Overlay */
.journey-chart-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-style: italic;
    background: rgba(30, 30, 50, 0.8);
    border-radius: 12px;
    z-index: 5;
}

.journey-chart-container {
    position: relative;
}

.journey-chart-container {
    height: 350px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    margin-bottom: 24px;
}

/* Responsive for Monthly Tracking */
@media (max-width: 768px) {

    /* Page Header */
    /* Overview Grid */
    /* Journey Summary */
    .journey-summary-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .journey-stat {
        padding: 12px;
        gap: 10px;
    }

    .journey-stat-icon {
        font-size: 1.3rem;
    }

    .journey-stat-value {
        font-size: 1rem;
    }

    .journey-stat-label {
        font-size: 0.65rem;
    }

    .journey-stat-percent {
        font-size: 0.65rem;
        padding: 1px 5px;
    }

    .journey-chart-container {
        height: 280px;
    }

    /* Card Header */

    /* FAB */

    /* Modal */
}

@media (max-width: 480px) {

    /* Title */
    /* Month Stats */

    /* Journey Summary */
    .journey-summary-grid {
        gap: 8px;
    }

    .journey-stat {
        padding: 10px;
        gap: 8px;
    }

    .journey-stat-icon {
        font-size: 1.2rem;
    }

    .journey-stat-value {
        font-size: 0.9rem;
    }

    .journey-stat-label {
        font-size: 0.6rem;
    }

    .journey-stat-percent {
        font-size: 0.6rem;
        padding: 1px 4px;
    }

    /* Card Header */

    /* Due Today */

    /* Tables */

    /* Chart */
    .journey-chart-container {
        height: 240px;
    }

    .journey-chart-wrapper {
        padding: 12px;
    }
}

/* ============================================
           13. TOAST NOTIFICATION SYSTEM
           ============================================ */
#toast-container {
    position: fixed;
    bottom: 100px;
    right: 16px;
    z-index: 10002;
    display: flex;
    flex-direction: column;
    gap: 6px;
    pointer-events: none;
}

.toast {
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transform: translateX(120%);
    transition: transform 0.25s ease-out;
    pointer-events: auto;
    white-space: nowrap;
    backdrop-filter: blur(8px);
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    background: rgba(16, 185, 129, 0.95);
    color: white;
}

.toast.warning {
    background: rgba(245, 158, 11, 0.95);
    color: white;
}

.toast.error {
    background: rgba(239, 68, 68, 0.95);
    color: white;
}

.toast.info {
    background: rgba(59, 130, 246, 0.95);
    color: white;
}

.toast-icon {
    font-size: 0.85rem;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
    line-height: 1.2;
}

.toast-close {
    background: none;
    border: none;
    color: white;
    opacity: 0.6;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 8px;
    min-width: 36px;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    margin-left: 2px;
    border-radius: 4px;
}

.toast-close:hover {
    opacity: 1;
}

.toast-action {
    background: rgba(255, 255, 255, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
    margin-left: 4px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.toast-action:hover {
    background: rgba(255, 255, 255, 0.4);
}

@media (max-width: 480px) {
    #toast-container {
        right: 12px;
        bottom: 100px;
    }
}

/* Collapsible Deductions in Budget Summary */
.deductions-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    background: none;
    border: none;
    padding: 8px 0;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 500;
}

.deductions-toggle__arrow {
    font-size: 0.65rem;
    color: var(--text-muted);
    transition: transform 0.2s ease;
    margin-left: 6px;
}

.deductions-body {
    overflow: hidden;
    max-height: 500px;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 1;
}

.deductions-body.collapsed {
    max-height: 0;
    opacity: 0;
}

/* Budget Health Badge */
.budget-health-badge {
    text-align: center;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 8px;
    margin-top: 8px;
}

.budget-health-badge--healthy {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.budget-health-badge--ok {
    background: rgba(234, 179, 8, 0.15);
    color: var(--warning);
}

.budget-health-badge--low {
    background: rgba(251, 146, 60, 0.15);
    color: var(--gold);
}

.budget-health-badge--over {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

/* Debt Type Tag Badge */
.debt-type-tag {
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 6px;
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary);
    margin-left: 4px;
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* EPF Hint */
.epf-contribution-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
    padding: 8px 0;
}

/* ============================================
           14. TUTORIAL OVERLAY SYSTEM
           ============================================ */
.tutorial-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

.tutorial-highlight {
    position: relative;
    z-index: 10001 !important;
    box-shadow: 0 0 0 4px var(--primary), 0 0 30px var(--primary-glow) !important;
    border-radius: 8px;
}

.tutorial-popup {
    position: fixed;
    background: linear-gradient(135deg, rgba(10, 22, 40, 0.98) 0%, rgba(20, 40, 70, 0.98) 100%);
    border: 1px solid var(--primary);
    border-radius: 16px;
    padding: 20px;
    max-width: 320px;
    z-index: 10002;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 30px var(--primary-glow);
}

[data-theme="light"] .tutorial-popup {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(241, 245, 249, 0.98) 100%);
}

.tutorial-popup h4 {
    font-family: 'Space Grotesk', sans-serif;
    margin-bottom: 8px;
    color: var(--primary);
}

.tutorial-popup p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.tutorial-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.tutorial-buttons {
    display: flex;
    gap: 8px;
}

/* ============================================
           15. EXPENSE PIE CHART SECTION
           ============================================ */
.expense-chart-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--glass-border);
}

/* ============================================
           16. NET WORTH HISTORY SECTION
           ============================================ */
.history-chart-section {
    margin-top: 24px;
}

.history-chart-container {
    height: 200px;
    position: relative;
}

/* ============================================
           17. WELCOME PAGE STYLES
           ============================================ */

/* Nav buttons container */
.nav-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* ============================================
           18. QUICK-START TEMPLATES
           ============================================ */

/* ============================================
           18b. LANDING PAGE - HERO SECTION
           ============================================ */
.landing-hero {
    text-align: center;
    padding: 60px 20px 40px;
    position: relative;
    overflow: hidden;
}

.landing-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    padding: 8px 20px;
    margin-bottom: 24px;
    font-size: 0.85rem;
    color: var(--text);
    animation: fadeInDown 0.6s ease;
}

.landing-hero__badge-icon {
    font-size: 1.1rem;
}

.landing-hero__title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2.2rem, 6vw, 4rem);
    font-weight: 700;
    background: linear-gradient(135deg, #fff 0%, #3b82f6 40%, #8b5cf6 70%, #06b6d4 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
    animation: gradientShift 8s ease infinite, fadeInUp 0.8s ease;
}

@keyframes gradientShift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

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

.landing-hero__subtitle {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    color: var(--text-muted);
    margin-bottom: 32px;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.landing-hero__ctas {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 40px;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.landing-hero__cta {
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.landing-hero__cta--primary {
    background: var(--gradient-1);
    color: white;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
}

.landing-hero__cta--primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.5);
}

.landing-hero__cta--secondary {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    color: var(--text);
}

.landing-hero__cta--secondary:hover {
    background: var(--bg-card-hover);
    transform: translateY(-3px);
}

.landing-hero__stats {
    display: flex;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.6s both;
}

.landing-hero__stat {
    text-align: center;
}

.landing-hero__stat-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.landing-hero__stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Floating achievement cards */
.landing-hero__floaters {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.landing-floater {
    position: absolute;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 10px 16px;
    font-size: 0.75rem;
    color: var(--text);
    white-space: nowrap;
    animation: float 6s ease-in-out infinite;
    opacity: 0.7;
}

.landing-floater:nth-child(1) {
    top: 15%;
    left: 5%;
    animation-delay: 0s;
}

.landing-floater:nth-child(2) {
    top: 25%;
    right: 8%;
    animation-delay: 1s;
}

.landing-floater:nth-child(3) {
    bottom: 30%;
    left: 8%;
    animation-delay: 2s;
}

.landing-floater:nth-child(4) {
    bottom: 20%;
    right: 5%;
    animation-delay: 3s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(-2deg);
    }

    50% {
        transform: translateY(-15px) rotate(2deg);
    }
}

@media (max-width: 768px) {
    .landing-hero__floaters {
        display: none;
    }
}

/* ============================================
           18c. LANDING PAGE - TIMELINE
           ============================================ */
.landing-timeline {
    padding: 40px 20px;
    max-width: 900px;
    margin: 0 auto;
}

.landing-section__title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.5rem, 4vw, 2rem);
    text-align: center;
    margin-bottom: 40px;
    color: var(--text);
}

.landing-timeline__steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    position: relative;
}

.landing-timeline__steps::before {
    content: '';
    position: absolute;
    top: 28px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: linear-gradient(90deg, var(--glass-border), var(--primary), var(--glass-border));
}

.landing-timeline__step {
    text-align: center;
    position: relative;
    z-index: 1;
}

.landing-timeline__number {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: white;
    margin: 0 auto 16px;
    transition: transform 0.3s ease;
}

.landing-timeline__step:hover .landing-timeline__number {
    transform: scale(1.15);
}

.landing-timeline__number--1 {
    background: var(--gradient-1);
}

.landing-timeline__number--2 {
    background: var(--gradient-2);
}

.landing-timeline__number--3 {
    background: var(--gradient-3);
}

.landing-timeline__number--4 {
    background: var(--gradient-4);
}

.landing-timeline__label {
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.76rem;
}

.landing-timeline__tag {
    display: inline-block;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 0.7rem;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .landing-timeline__steps {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .landing-timeline__steps::before {
        top: 0;
        bottom: 0;
        left: 27px;
        right: auto;
        width: 2px;
        height: auto;
    }

    .landing-timeline__step {
        display: flex;
        align-items: flex-start;
        text-align: left;
        gap: 20px;
    }

    .landing-timeline__number {
        margin: 0;
        flex-shrink: 0;
    }
}

/* ============================================
           18d. LANDING PAGE - FEATURES GRID
           ============================================ */
.landing-features {
    padding: 40px 20px;
    max-width: 1100px;
    margin: 0 auto;
}

.landing-features__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

@media (max-width: 1024px) {
    .landing-features__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .landing-features__grid {
        grid-template-columns: 1fr;
    }
}

.landing-feature-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.landing-feature-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.landing-feature-card__icon {
    font-size: 2rem;
    margin-bottom: 12px;
}

.landing-feature-card__title {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.landing-feature-card__desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ============================================
           18e. LANDING PAGE - TEMPLATES GRID
           ============================================ */
.landing-templates {
    padding: 40px 20px;
    max-width: 1100px;
    margin: 0 auto;
}

.landing-templates__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

@media (max-width: 900px) {
    .landing-templates__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .landing-templates__grid {
        grid-template-columns: 1fr;
    }
}

.landing-template-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.landing-template-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    border-color: var(--primary);
}

.landing-template-card__icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.landing-template-card__name {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.landing-template-card__desc {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 16px;
}

.landing-template-card__stats {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.landing-template-card__stat {
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
}

.landing-template-card__stat-label {
    color: var(--text-muted);
}

.landing-template-card__stat-value {
    color: var(--primary);
    font-weight: 600;
}

/* ============================================
           18f. LANDING PAGE - BLOG GRID
           ============================================ */
.landing-blog {
    padding: 20px 20px 40px;
    max-width: 1100px;
    margin: 0 auto;
}

.landing-blog-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 24px;
    text-decoration: none;
    color: var(--text);
    transition: all 0.3s ease;
    display: block;
}

.landing-blog-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.landing-blog-card__icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.landing-blog-card__title {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.landing-blog__small-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

@media (max-width: 768px) {
    .landing-blog__small-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .landing-blog__small-grid {
        grid-template-columns: 1fr;
    }
}

.landing-blog-card--small {
    padding: 13px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.landing-blog-card--small .landing-blog-card__icon {
    font-size: 1.2rem;
}

.landing-blog-card--small .landing-blog-card__title {
    font-size: 0.75rem;
    margin-bottom: 0;
}

.landing-blog__view-all {
    display: block;
    text-align: center;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    padding: 16px;
    margin-top: 16px;
    transition: color 0.2s ease;
}

.landing-blog__view-all:hover {
    color: var(--secondary);
}

/* Gold Blog Card - Solid Gold Background */
.landing-blog-card--gold {
    position: relative;
    background: linear-gradient(135deg, #daa520 0%, #ffd700 50%, #f5c400 100%);
    border: 2px solid #ffd700;
    animation: goldBreathing 3s ease-in-out infinite;
}

.landing-blog-card--gold:hover {
    background: linear-gradient(135deg, #f5c400 0%, #ffd700 50%, #daa520 100%);
    border-color: #fff8dc;
    transform: translateY(-6px);
    box-shadow: 0 15px 40px rgba(255, 193, 7, 0.5);
}

.landing-blog-card--gold .landing-blog-card__icon {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.landing-blog-card--gold .landing-blog-card__title {
    color: #1a1a2e;
    font-weight: 700;
    font-size: 0.76rem;
    text-shadow: none;
}

.landing-blog-card--gold .landing-blog-card__content-gold {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.landing-blog-card--gold .landing-blog-card__subtitle {
    color: rgba(26, 26, 46, 0.7);
    font-size: 0.56rem;
    font-weight: 500;
}

@keyframes goldBreathing {

    0%,
    100% {
        box-shadow: 0 4px 20px rgba(218, 165, 32, 0.4);
    }

    50% {
        box-shadow: 0 8px 30px rgba(255, 215, 0, 0.6);
    }
}

/* Bitcoin Blog Card - Orange Bitcoin Background */
.landing-blog-card--bitcoin {
    position: relative;
    background: linear-gradient(135deg, #f7931a 0%, #fbbf24 50%, #f59e0b 100%);
    border: 2px solid #f7931a;
    animation: bitcoinBreathing 3s ease-in-out infinite;
}

.landing-blog-card--bitcoin:hover {
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 50%, #f7931a 100%);
    border-color: #fff8dc;
    transform: translateY(-6px);
    box-shadow: 0 15px 40px rgba(247, 147, 26, 0.5);
}

.landing-blog-card--bitcoin .landing-blog-card__icon {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.landing-blog-card--bitcoin .landing-blog-card__title {
    color: #1a1a2e;
    font-weight: 700;
    font-size: 0.76rem;
    text-shadow: none;
}

.landing-blog-card--bitcoin .landing-blog-card__content-bitcoin {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.landing-blog-card--bitcoin .landing-blog-card__subtitle {
    color: rgba(26, 26, 46, 0.7);
    font-size: 0.56rem;
    font-weight: 500;
}

@keyframes bitcoinBreathing {

    0%,
    100% {
        box-shadow: 0 4px 20px rgba(247, 147, 26, 0.4);
    }

    50% {
        box-shadow: 0 8px 30px rgba(247, 147, 26, 0.6);
    }
}

/* StashAway Blog Card - Purple/Indigo Background */
.landing-blog-card--stashaway {
    position: relative;
    background: linear-gradient(135deg, #6366f1 0%, #818cf8 50%, #a5b4fc 100%);
    border: 2px solid #6366f1;
    animation: stashawayBreathing 3s ease-in-out infinite;
}

.landing-blog-card--stashaway:hover {
    background: linear-gradient(135deg, #818cf8 0%, #a5b4fc 50%, #6366f1 100%);
    border-color: #e0e7ff;
    transform: translateY(-6px);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.5);
}

.landing-blog-card--stashaway .landing-blog-card__icon {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.landing-blog-card--stashaway .landing-blog-card__title {
    color: #fff;
    font-weight: 700;
    font-size: 0.76rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.landing-blog-card--stashaway .landing-blog-card__content-stashaway {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.landing-blog-card--stashaway .landing-blog-card__subtitle {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.56rem;
    font-weight: 500;
}

@keyframes stashawayBreathing {

    0%,
    100% {
        box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
    }

    50% {
        box-shadow: 0 8px 30px rgba(99, 102, 241, 0.6);
    }
}

/* Cashflow Blog Card - Green Background */

@keyframes cashflowBreathing {

    0%,
    100% {
        box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
    }

    50% {
        box-shadow: 0 8px 30px rgba(16, 185, 129, 0.6);
    }
}

/* ============================================
           18g. LANDING PAGE - SECTION SUBTITLE
           ============================================ */
.landing-section__subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: -28px;
    margin-bottom: 32px;
}

/* ============================================
           18h. LANDING PAGE - CALCULATOR TOOLS
           ============================================ */
.landing-tools {
    padding: 32px 20px;
    max-width: 700px;
    margin: 0 auto;
}

.landing-tools__list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

@media (max-width: 500px) {
    .landing-tools__list {
        grid-template-columns: 1fr;
    }
}

.landing-tool-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s ease;
}

.landing-tool-link:hover {
    background: var(--bg-card-hover);
    transform: translateX(4px);
}

.landing-tool-link__icon {
    font-size: 1.3rem;
    flex-shrink: 0;
    width: 28px;
    text-align: center;
}

.landing-tool-link__text {
    flex: 1;
    min-width: 0;
}

.landing-tool-link__title {
    font-weight: 600;
    font-size: 0.9rem;
    display: block;
}

.landing-tool-link__desc {
    color: var(--text-muted);
    font-size: 0.75rem;
    display: block;
    margin-top: 2px;
}

.landing-tool-link__arrow {
    color: var(--primary);
    font-weight: 600;
    font-size: 1rem;
    flex-shrink: 0;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.landing-tool-link:hover .landing-tool-link__arrow {
    opacity: 1;
}

/* ============================================
           18i. LANDING PAGE - FOOTER CTA
           ============================================ */
.landing-footer-cta {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(180deg, transparent 0%, rgba(59, 130, 246, 0.05) 100%);
}

.landing-footer-cta__title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    margin-bottom: 16px;
}

.landing-footer-cta__subtitle {
    color: var(--text-muted);
    margin-bottom: 32px;
    font-size: 1rem;
}

.landing-footer-cta__privacy {
    margin-top: 24px;
    color: var(--text-muted);
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* ============================================
           18h. LANDING PAGE - SCROLL ANIMATIONS
           ============================================ */
.landing-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.landing-animate.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
           19. MOBILE TABLE FIX
           ============================================ */

/* ============================================
           19. PRINT STYLESHEET
           ============================================ */
@media print {

    /* Hide interactive elements */
    /* Reset background */
    body,
    .page,
    .card {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }

    :root {
        --text: #1e293b !important;
        --text-muted: #64748b !important;
    }

    /* Show all pages */
    .page {
        display: block !important;
        position: relative !important;
        transform: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        page-break-after: always;
        padding: 20px !important;
    }

    .page-container {
        overflow: visible !important;
    }

    /* Page header */
    .page-header h1 {
        color: black !important;
        -webkit-text-fill-color: black !important;
    }

    /* Chart optimization */
    .chart-container,
    .dashboard-chart-container {
        break-inside: avoid;
        height: auto !important;
        max-height: 400px;
    }

    canvas {
        max-width: 100% !important;
    }

    /* Table styling */
    table {
        border-collapse: collapse;
        width: 100%;
    }

    th,
    td {
        border: 1px solid #ddd;
        padding: 8px;
        text-align: left;
    }

    /* Item rows */
    .item-row {
        border: 1px solid #ddd;
        padding: 12px;
        margin-bottom: 8px;
        page-break-inside: avoid;
    }

    .item-value {
        color: black !important;
    }

    .item-value.positive {
        color: #059669 !important;
    }

    .item-value.negative {
        color: #dc2626 !important;
    }

    /* Summary cards */
    .summary-card {
        border: 1px solid #ddd;
        background: #f8fafc !important;
    }

    /* Hide welcome page in print */
    #page-0 {
        display: none !important;
    }
}

/* ============================================
           ACCESSIBILITY IMPROVEMENTS
           ============================================ */

/* Focus indicators for keyboard navigation */
*:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

button:focus-visible {
    box-shadow: 0 0 0 3px var(--primary-glow);
    outline: none;
}

input:focus-visible,
select:focus-visible {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.floating-menu__item:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Reduced motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .floating-item {
        display: none !important;
    }

    .bg-animation::before {
        animation: none !important;
    }

    .page {
        transition: none !important;
    }
}

/* Skip link for screen readers */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary);
    color: white;
    padding: 8px 16px;
    z-index: 10001;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

/* ============================================
           BLOG HIGHLIGHTS SECTION
           ============================================ */

/* ============================================
           FORM VALIDATION STYLES
           ============================================ */

/* ============================================
           LOADING STATES & SKELETON
           ============================================ */

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

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

.chart-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(10, 22, 40, 0.8);
    border-radius: 16px;
    z-index: 10;
}

.chart-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--glass-border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================
           ITEM ANIMATIONS
           ============================================ */

.item-row {
    animation: slideInLeft 0.3s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

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

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(20px);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ============================================
           MOBILE IMPROVEMENTS
           ============================================ */

@media (max-width: 768px) {

    /* Bottom navigation on mobile for thumb reach */
    .floating-menu {
        position: fixed;
        bottom: 0;
        top: auto;
        left: 0;
        right: 0;
        transform: none;
        border-radius: 16px 16px 0 0;
        padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
        justify-content: space-around;
        background: rgba(10, 22, 40, 0.98);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        border-left: none;
        border-right: none;
        border-bottom: none;
    }

    .floating-menu__item {
        flex-direction: column;
        gap: 2px;
        padding: 8px 6px;
    }

    .floating-menu__label {
        display: block;
        font-size: 0.65rem;
    }

    .page-content {
        margin-bottom: 90px !important;
    }

    /* Larger touch targets - 10% reduced */
    button,
    .nav-btn,
    .item-actions button {
        min-height: 40px;
        min-width: 40px;
    }

    input,
    select {
        height: 40px;
        min-height: 40px;
        font-size: 16px !important;
        /* Prevent iOS zoom */
    }

    /* Touch feedback */
    button:active {
        transform: scale(0.98);
    }
}

/* ============================================
           EMERGENCY FUND & FINANCIAL HEALTH WIDGETS
           ============================================ */

.health-score-gauge {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: conic-gradient(var(--success) 0deg,
            var(--warning) 120deg,
            var(--danger) 240deg,
            var(--danger) 360deg);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.health-score-gauge::before {
    content: '';
    position: absolute;
    width: 90px;
    height: 90px;
    background: var(--bg-dark);
    border-radius: 50%;
}

.health-score-value {
    position: relative;
    font-size: 1.5rem;
    font-weight: 700;
    z-index: 1;
}

/* ============================================
           ZAKAT CALCULATOR STYLES
           ============================================ */

.zakat-breakdown-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed var(--glass-border);
}

.zakat-breakdown-item:last-child {
    border-bottom: none;
}

.zakat-total {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gold);
    text-align: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    margin-top: 12px;
}

/* ============================================
           INFLATION TOGGLE
           ============================================ */

.inflation-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.toggle-switch {
    position: relative;
    width: 48px;
    height: 24px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.3s;
}

.toggle-switch.active {
    background: var(--primary);
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s;
}

.toggle-switch.active::after {
    transform: translateX(24px);
}

/* ============================================
           LAST SAVED TIMESTAMP
           ============================================ */

.last-saved {
    position: fixed;
    bottom: 80px;
    right: 20px;
    font-size: 0.75rem;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.5);
    padding: 6px 12px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    z-index: 99;
}

@media (max-width: 768px) {
    .last-saved {
        bottom: 110px;
        right: 10px;
        font-size: 0.7rem;
    }
}

/* ============================================
           BENTO GRID LAYOUT SYSTEM (v2.2.0)
           ============================================ */
.bento-container {
    display: grid;
    gap: 20px;
    padding: 24px;
    padding-top: 80px;
    /* Space for screenshot without showing menu (floating menu ~55px + buffer) */
    min-height: calc(100vh - 80px);
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    grid-template-areas:
        "hero"
        "chart"
        "lists"
        "actions";
    overflow: visible;
    /* Allow tooltips to extend outside */
}

/* ZONE A: HERO CARD */

/* Health Score Gauge */

.health-gauge {
    position: relative;
    width: 140px;
    height: 140px;
    transition: transform 0.3s ease;
}

.health-gauge:hover {
    transform: scale(1.05);
}

/* Health Gauge Pulse Animation */

@keyframes gaugePulse {

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

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

/* Dashboard Footer Guides (compact blog links) */
.dashboard-footer__guides {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    padding: 8px 0 12px;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 12px;
}

.dashboard-footer__guides a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

.dashboard-footer__guides a:hover {
    color: var(--text);
    text-decoration: underline;
}

/* ============================================
   BENTO WIDGETS (Goals, Insights, Retirement)
   ============================================ */
.bento-insights {
    padding: 16px;
}

.bento-insights__toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--text);
}

.bento-insights__toggle .bento-widget__title {
    margin-bottom: 0;
}

.bento-insights__arrow {
    font-size: 0.75rem;
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

.bento-insights__body {
    overflow: hidden;
    max-height: 1000px;
    transition: max-height 0.3s ease, opacity 0.3s ease, margin-top 0.3s ease;
    opacity: 1;
    margin-top: 10px;
}

.bento-insights__body.collapsed {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
}

.bento-widget__title {
    font-size: 0.95rem;
    color: var(--text);
    margin: 0 0 10px 0;
}

.bento-insight-item {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.bento-insight-item:last-child {
    border-bottom: none;
}

.bento-insight-item__icon {
    font-size: 1.1rem;
}

.bento-insight-item__body {
    flex: 1;
}

.bento-insight-item__title {
    font-weight: 600;
    font-size: 0.75rem;
}

.bento-insight-item__msg {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* ============================================
   BREAKDOWN CHARTS (Debt & Asset Doughnuts)
   ============================================ */
.bento-breakdowns {
    grid-area: breakdowns;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (max-width: 600px) {
    .bento-breakdowns {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .bento-breakdown {
        padding: 12px;
    }

    .bento-breakdown__chart {
        height: 160px;
    }

    .bento-breakdown__title {
        font-size: 0.75rem;
    }
}

.bento-breakdown {
    padding: 20px;
    position: relative;
    text-align: center;
}

.bento-breakdown__title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 4px 0;
}

.bento-breakdown__center {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.bento-breakdown__chart {
    height: 220px;
    position: relative;
}

/* ============================================
   CHART STAT VALUE MODIFIERS
   ============================================ */
.bento-chart__stat-value--success {
    color: var(--success);
}

.bento-chart__stat-value--warning {
    color: var(--warning);
}

.bento-chart__stat-value--danger {
    color: var(--danger);
}

/* ============================================
   BENTO LIST TOTAL MODIFIERS
   ============================================ */
.bento-list__total--danger {
    color: var(--danger);
}

.bento-list__total--success {
    color: var(--success);
}

/* ============================================
   DEBT STRATEGY BAR
   ============================================ */
.debt-strategy-bar {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

/* ============================================
   DASHBOARD FOOTER
   ============================================ */
.dashboard-footer {
    margin-top: 40px;
    padding: 30px 20px;
    border-top: 1px solid var(--glass-border);
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.dashboard-footer__refs {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.footer-link {
    color: var(--text-muted);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    padding: 4px 8px;
    border-radius: 4px;
}

.footer-link:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
}

.dashboard-footer__author {
    margin-bottom: 12px;
}

.dashboard-footer__author-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.2s;
}

.dashboard-footer__privacy {
    margin-bottom: 12px;
    color: var(--success);
    font-weight: 500;
}

.dashboard-footer__verify {
    font-size: 0.7rem;
    color: var(--text-muted);
    cursor: pointer;
    text-decoration: underline;
    margin-left: 4px;
}

.dashboard-footer__legal {
    opacity: 0.5;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.5;
}

.dashboard-footer__link {
    color: #60a5fa;
    text-decoration: none;
}

/* ZONE B: CHART AREA */
.bento-chart {
    grid-area: chart;
    padding: 24px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    display: flex;
    flex-direction: column;
}

.bento-chart__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 16px;
}

.bento-chart__title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.bento-chart__controls {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.bento-chart__toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.bento-chart__buttons {
    display: flex;
    gap: 8px;
}

.bento-chart__btn {
    padding: 8px 16px;
    font-size: 0.8rem;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.bento-chart__btn:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: var(--primary);
    color: var(--text);
}

.bento-chart__btn.active {
    background: var(--gradient-1);
    border-color: transparent;
    color: white;
}

.bento-chart__canvas {
    flex: 1;
    min-height: 350px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    padding: 16px;
}

.bento-chart__stats {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-top: 12px;
    /* Collapsible support */
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease, margin 0.3s ease;
}

.bento-chart__stats.collapsed {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
}

.bento-chart__stat {
    background: rgba(0, 0, 0, 0.2);
    padding: 10px 8px;
    border-radius: 10px;
    text-align: center;
}

.bento-chart__stat-label {
    font-size: 0.6rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.bento-chart__stat-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.76rem;
    font-weight: 600;
    margin-top: 2px;
}

/* Stats toggle button */
.bento-chart__stats-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 6px;
    margin-top: 8px;
    background: transparent;
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.2s;
}

.bento-chart__stats-toggle:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text);
}

.bento-chart__stats-toggle .toggle-icon {
    transition: transform 0.3s ease;
}

.bento-chart__stats-toggle.expanded .toggle-icon {
    transform: rotate(180deg);
}

/* ZONE C: QUICK ACTIONS */

/* Compact Quick Actions Bar */
.quick-actions-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 12px 20px;
    background: rgba(15, 23, 42, 0.6);
    border-top: 1px solid var(--glass-border);
    flex-wrap: wrap;
}

.quick-actions-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.quick-actions-label {
    font-size: 0.6rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-right: 4px;
}

.quick-actions-divider {
    width: 1px;
    height: 24px;
    background: var(--glass-border);
}

.qa-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
}

.qa-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: var(--primary);
    transform: scale(1.1);
}

.qa-btn--ai {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(99, 102, 241, 0.2));
    border-color: rgba(139, 92, 246, 0.4);
}

.qa-btn--ai:hover {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.4), rgba(99, 102, 241, 0.4));
    border-color: rgba(139, 92, 246, 0.6);
}

.qa-btn--danger {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
}

.qa-btn--danger:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.5);
}

@media (max-width: 480px) {
    .quick-actions-bar {
        padding: 10px 12px;
        gap: 10px;
    }

    .quick-actions-label {
        display: none;
    }

    .qa-btn {
        width: 40px;
        height: 40px;
    }
}

/* ZONE D: DEBT & ASSET LISTS */
.bento-lists {
    grid-area: lists;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

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

.bento-list {
    background: var(--glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 16px;
    /* max-height: 300px; removed to show all */
    /* overflow-y: auto; removed to show all */
}

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

.bento-list__title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.bento-list__total {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    font-weight: 700;
}

.bento-list__item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.15s ease, transform 0.15s ease;
}

.bento-list__item:hover {
    background: rgba(255, 255, 255, 0.03);
    transform: translateX(2px);
}

.bento-list__item-sub {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.bento-list__item:last-child {
    border-bottom: none;
}

.bento-list__item-name {
    font-size: 0.85rem;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.bento-list__item-name span {
    opacity: 0.7;
}

.bento-list__item-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
}

.bento-list__item-details {
    display: flex;
    gap: 12px;
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.bento-list__empty {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Debt Strategy Buttons */
.strategy-btn {
    flex: 1;
    min-width: 70px;
    padding: 8px 10px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid transparent;
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.strategy-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
}

.strategy-btn.active {
    background: rgba(59, 130, 246, 0.2);
    border-color: var(--primary);
    color: var(--text);
}

.strategy-btn.active[data-strategy="avalanche"] {
    background: rgba(239, 68, 68, 0.15);
    border-color: var(--danger);
}

.strategy-btn.active[data-strategy="snowball"] {
    background: rgba(59, 130, 246, 0.15);
    border-color: var(--primary);
}

.strategy-btn.active[data-strategy="minimum"] {
    background: rgba(100, 100, 100, 0.2);
    border-color: rgba(150, 150, 150, 0.5);
}

/* Floating Action Button (FAB) */
.fab-container {
    position: fixed;
    bottom: 80px;
    right: 20px;
    z-index: 999;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: 12px;
}

.fab-main {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--gradient-1);
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fab-main:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(59, 130, 246, 0.5);
}

.fab-main.active {
    transform: rotate(45deg);
    background: var(--danger);
}

.fab-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.fab-container.open .fab-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.fab-option {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    color: var(--text);
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.fab-option:hover {
    transform: scale(1.1);
    background: rgba(59, 130, 246, 0.2);
}

.fab-option::before {
    content: attr(data-label);
    position: absolute;
    right: 60px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s;
}

.fab-option:hover::before {
    opacity: 1;
}

@media (min-width: 769px) {
    .fab-container {
        display: none;
    }
}

/* MOBILE BOTTOM NAVIGATION */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: rgba(10, 22, 40, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--glass-border);
    z-index: 1000;
    padding: 8px 16px;
    padding-bottom: max(8px, env(safe-area-inset-bottom));
}

.bottom-nav__container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.bottom-nav__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 6px 10px;
    border-radius: 10px;
    color: var(--text-muted);
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
    background: none;
    border: none;
    min-width: 56px;
}

.bottom-nav__item:hover,
.bottom-nav__item:focus {
    color: var(--primary);
    background: rgba(59, 130, 246, 0.1);
}

.bottom-nav__item.active {
    color: var(--primary);
    background: rgba(59, 130, 246, 0.15);
}

.bottom-nav__icon {
    font-size: 1.4rem;
    line-height: 1;
}

.bottom-nav__label {
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================
           RESPONSIVE BREAKPOINTS (Standardized)
           - Desktop: > 1024px (default)
           - Tablet: 768px - 1024px
           - Mobile: 480px - 768px
           - Small Mobile: < 480px
           ============================================ */

/* TABLET (1024px and below) */
@media (max-width: 1024px) {
    .bento-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        grid-template-areas:
            "hero"
            "chart"
            "lists"
            "actions";
        max-width: 100%;
        padding: 16px;
    }

    .bento-lists {
        grid-template-columns: 1fr 1fr;
    }
}

/* MOBILE (768px and below) */
@media (max-width: 768px) {
    .bento-container {
        padding: 12px;
        padding-bottom: 90px;
        /* Space for bottom nav */
        gap: 16px;
    }

    /* Hero Card */
    .hero-card {
        padding: 20px;
    }

    .health-gauge {
        width: 100px;
        height: 100px;
    }

    /* Chart */
    .bento-chart {
        padding: 16px;
    }

    .bento-chart__canvas {
        min-height: 280px;
    }

    .bento-chart__stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .bento-chart__stat {
        padding: 8px 6px;
    }

    .bento-chart__stat-label {
        font-size: 0.55rem;
    }

    .bento-chart__stat-value {
        font-size: 0.85rem;
    }

    .bento-chart__stats>*:nth-child(n+4) {
        display: none;
    }

    /* Lists */
    .bento-lists {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .bento-list {
        max-height: 280px;
        overflow-y: auto;
    }

    /* Quick Actions - Hide on mobile, show bottom nav */

    .bottom-nav {
        display: flex;
    }
}

/* SMALL MOBILE (480px and below) */
@media (max-width: 480px) {
    .bento-container {
        padding: 10px;
        padding-bottom: 85px;
        gap: 12px;
    }

    /* Hero Card */
    .hero-card {
        padding: 16px;
    }

    .health-gauge {
        width: 80px;
        height: 80px;
    }

    /* Chart */
    .bento-chart {
        padding: 12px;
    }

    .bento-chart__canvas {
        min-height: 250px;
    }

    .bento-chart__header {
        flex-direction: column;
        align-items: flex-start;
    }

    .bento-chart__stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 4px;
    }

    .bento-chart__stat {
        padding: 6px 4px;
    }

    .bento-chart__stat-label {
        font-size: 0.45rem;
    }

    .bento-chart__stat-value {
        font-size: 0.65rem;
        word-break: break-word;
    }

    /* Show all 5 stats - hiding rule removed */

    /* Lists */
    .bento-list {
        max-height: 250px;
        padding: 12px;
        overflow-y: auto;
    }

    .strategy-btn {
        padding: 6px 8px;
        font-size: 0.65rem;
    }
}

.bento-hidden-mobile {
    display: block;
}

@media (max-width: 768px) {
    .bento-hidden-mobile {
        display: none !important;
    }
}

/* ============================================
           WHAT-IF MODAL STYLES
           ============================================ */
/* Slider Input Component */
/* ============================================
           MOBILE MENU OVERLAY
           ============================================ */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.mobile-menu-content {
    width: 90%;
    max-width: 320px;
    max-height: 85vh;
    overflow-y: auto;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 16px;
}

.mobile-menu-close {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 1.5rem;
    line-height: 1;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s;
}

.mobile-menu-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.mobile-menu-nav {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.mobile-menu-nav button {
    width: 100%;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--text);
    font-size: 0.9rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
}

.mobile-menu-nav button:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: var(--primary);
}

/* Blog link styled as button */
.mobile-menu-link {
    display: block;
    width: 100%;
    padding: 10px 14px;
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 10px;
    color: var(--primary);
    font-size: 0.9rem;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}

.mobile-menu-link:hover {
    background: rgba(59, 130, 246, 0.3);
    border-color: var(--primary);
}

.mobile-menu-nav hr {
    border: none;
    border-top: 1px solid var(--glass-border);
    margin: 8px 0;
}

.mobile-menu-section {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 8px 0 2px;
    font-weight: 600;
}

.mobile-menu-section:first-child {
    padding-top: 0;
}

.mobile-menu-danger {
    background: rgba(239, 68, 68, 0.15) !important;
    border-color: rgba(239, 68, 68, 0.3) !important;
    color: #fca5a5 !important;
}

.mobile-menu-danger:hover {
    background: rgba(239, 68, 68, 0.25) !important;
    border-color: rgba(239, 68, 68, 0.5) !important;
}

/* ============================================
           CALCULATOR POPOVER COMPONENT
           ============================================ */
.calculator-popover {
    position: fixed;
    width: 340px;
    max-height: 90vh;
    background: linear-gradient(135deg, rgba(10, 22, 40, 0.98) 0%, rgba(20, 40, 70, 0.98) 100%);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6);
    z-index: 10002;
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
    transition: all 0.2s ease;
    overflow: hidden;
}

.calculator-popover.active {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.calculator-popover__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--glass-border);
}

.calculator-popover__header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.calculator-popover__close {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.calculator-popover__close:hover {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.calculator-popover__body {
    padding: 16px 20px;
    max-height: 350px;
    overflow-y: auto;
}

.calculator-popover__footer {
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid var(--glass-border);
}

.calculator-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(14, 165, 233, 0.2));
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
}

.calculator-total__label {
    font-weight: 600;
}

.calculator-total__value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
    transition: all 0.2s ease;
}

.calculator-total__value.updated {
    transform: scale(1.1);
    color: var(--success);
}

.calculator-actions {
    display: flex;
    gap: 12px;
}

.calc-btn {
    flex: 1;
    padding: 12px 16px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

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

.calc-btn--secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
}

.calc-btn--primary {
    background: var(--gradient-1);
    border: none;
    color: white;
}

.calc-btn--primary:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

@media (max-width: 480px) {
    .calculator-popover {
        width: calc(100vw - 32px);
        left: 16px !important;
        right: 16px;
        max-height: 80vh;
    }
}

/* Consolidation Comparison UI */

.comparison-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 0.8rem;
}

/* NET WORTH HERO CARD - OG Image Style for Social Sharing */
/* Landscape format for sharing, fixed dimensions for consistent screenshots */
.hero-card {
    grid-area: hero;
    background: linear-gradient(145deg, rgba(10, 22, 40, 0.98) 0%, rgba(15, 35, 70, 0.98) 50%, rgba(20, 45, 90, 0.98) 100%);
    position: relative;
    overflow: visible;
    /* Allow tooltips to show outside */
    padding: 24px 28px;
    border-radius: 16px;
    box-shadow:
        0 0 0 1px rgba(59, 130, 246, 0.25),
        0 0 40px rgba(59, 130, 246, 0.12),
        0 25px 60px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    margin: 0 auto;
}

/* Animated gradient border */
.hero-card::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.5), rgba(147, 51, 234, 0.5), rgba(16, 185, 129, 0.5), rgba(59, 130, 246, 0.5));
    background-size: 300% 100%;
    border-radius: 18px;
    z-index: -1;
    animation: borderGlow 6s ease-in-out infinite;
    opacity: 0.6;
}

@keyframes borderGlow {

    0%,
    100% {
        background-position: 0% 50%;
        opacity: 0.5;
    }

    50% {
        background-position: 100% 50%;
        opacity: 0.7;
    }
}

/* Header: Brand + Privacy + Date - All inline */
.hero-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    position: relative;
    z-index: 2;
    flex-shrink: 0;
}

.hero-card__header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hero-card__brand {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-card__logo-img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.hero-card__title {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    font-family: 'Inter', sans-serif;
}

.brand-blue {
    color: #1e3a5f;
    background: linear-gradient(135deg, #2c5282 0%, #1e3a5f 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-gold {
    color: #c9a227;
    background: linear-gradient(135deg, #d4af37 0%, #c9a227 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-card__date {
    font-size: 0.7rem;
    color: rgba(148, 163, 184, 0.8);
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* Two-column body layout */
.hero-card__body {
    display: flex;
    flex: 1;
    gap: 20px;
    min-height: 0;
}

/* Left column - Net worth and metrics */
.hero-card__left {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
}

/* Right column - Pie chart */
.hero-card__right {
    flex: 0 0 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: visible;
    /* Allow tooltips to extend outside */
}

/* Main Net Worth Display */
.hero-card__main {
    text-align: left;
    position: relative;
    z-index: 2;
}

.hero-card__networth {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.hero-card__networth-label {
    font-size: 0.65rem;
    color: rgba(148, 163, 184, 0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-card__networth-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    background: linear-gradient(135deg, #ffffff 0%, #93c5fd 50%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s ease-in-out infinite;
}

.hero-card__networth-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-card__networth-value.positive {
    background: linear-gradient(135deg, #ffffff 0%, #86efac 50%, #34d399 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

.hero-card__networth-value.negative {
    background: linear-gradient(135deg, #ffffff 0%, #fca5a5 50%, #f87171 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

@keyframes shimmer {

    0%,
    100% {
        filter: brightness(1);
    }

    50% {
        filter: brightness(1.15);
    }
}

/* Inline Health Indicator */
.hero-card__health {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.hero-card__health:hover {
    background: rgba(0, 0, 0, 0.35);
}

.hero-card__health-bar {
    width: 50px;
    height: 5px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.hero-card__health-fill {
    height: 100%;
    background: linear-gradient(90deg, #ef4444, #f59e0b, #10b981);
    border-radius: 3px;
    transition: width 0.6s ease;
}

.hero-card__health-score {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    color: #10b981;
}

.hero-card__health-label {
    font-size: 0.6rem;
    color: rgba(148, 163, 184, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Compact Assets vs Debts Row */
.hero-card__split {
    display: flex;
    gap: 10px;
    position: relative;
    z-index: 2;
}

.hero-card__split-item {
    flex: 1;
    padding: 10px 12px;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.hero-card__split-item--assets {
    background: linear-gradient(145deg, rgba(16, 185, 129, 0.15), rgba(16, 185, 129, 0.05));
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.hero-card__split-item--assets:hover {
    border-color: rgba(16, 185, 129, 0.4);
    transform: translateY(-1px);
}

.hero-card__split-item--debts {
    background: linear-gradient(145deg, rgba(239, 68, 68, 0.15), rgba(239, 68, 68, 0.05));
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.hero-card__split-item--debts:hover {
    border-color: rgba(239, 68, 68, 0.4);
    transform: translateY(-1px);
}

.hero-card__split-label {
    font-size: 0.5rem;
    color: rgba(148, 163, 184, 0.8);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 2px;
}

.hero-card__split-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    font-weight: 700;
}

.hero-card__split-item--assets .hero-card__split-value {
    color: #34d399;
}

.hero-card__split-item--debts .hero-card__split-value {
    color: #f87171;
}

/* Hide mini progress bars in compact mode */

/* Key Metrics Row */
.hero-card__metrics {
    display: flex;
    justify-content: flex-start;
    gap: 16px;
    margin-top: 8px;
}

.hero-card__metric {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.2s ease;
}

.hero-card__metric:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
}

.hero-card__metric-label {
    font-size: 0.55rem;
    color: rgba(148, 163, 184, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hero-card__metric-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: #60a5fa;
}

/* Milestone Footer */
.hero-card__footer {
    text-align: center;
    padding-top: 8px;
    position: relative;
    z-index: 2;
    flex-shrink: 0;
}

.hero-card__milestone {
    font-size: 0.7rem;
    color: rgba(147, 197, 253, 0.85);
    font-style: italic;
}

/* Watermark for Screenshots */
.hero-card__watermark {
    position: absolute;
    bottom: 6px;
    right: 10px;
    font-size: 0.55rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    z-index: 1;
}

.wm-blue {
    color: rgba(147, 197, 253, 0.5);
}

.wm-gold {
    color: rgba(212, 175, 55, 0.5);
}

/* Hero Pie Chart - Detailed breakdown */
.hero-card__pie {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    overflow: visible;
    /* Allow tooltips to extend outside */
}

.hero-card__pie canvas {
    max-width: 180px;
    max-height: 180px;
}

/* Mobile Responsive - Stack vertically */
@media (max-width: 520px) {
    .hero-card {
        aspect-ratio: auto;
        max-width: 100%;
        padding: 16px;
    }

    .hero-card__body {
        flex-direction: column;
        gap: 16px;
    }

    .hero-card__left {
        align-items: center;
        text-align: center;
    }

    .hero-card__main {
        text-align: center;
    }

    .hero-card__networth {
        align-items: center;
    }

    .hero-card__networth-value {
        font-size: 1.8rem;
    }

    .hero-card__right {
        flex: 0 0 auto;
    }

    .hero-card__pie canvas {
        max-width: 100px;
        max-height: 100px;
    }

    .hero-card__split {
        justify-content: center;
    }

    .hero-card__split-value {
        font-size: 0.9rem;
    }
}

/* ZONE A2: WEALTH BALANCE ANIMATION */

.balance-lever {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.5);
    position: absolute;
    top: 40px;
    border-radius: 2px;
    transition: transform 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.balance-status {
    margin-top: 16px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
}

/* Validation states for dark theme - removed light backgrounds */

/* ============================================
           PRINT STYLES
           - Optimized for dashboard/report printing
           - Light background, dark text
           - Hide navigation and interactive elements
           ============================================ */
@media print {

    /* Reset to light theme for printing */
    :root {
        --bg-dark: #ffffff;
        --text: #1e293b;
        --text-muted: #475569;
        --bg-card: rgba(241, 245, 249, 0.9);
        --glass-border: #cbd5e1;
        --primary: #2563eb;
        --success: #059669;
        --danger: #dc2626;
        --warning: #d97706;
    }

    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    body {
        background: white !important;
        color: #1e293b !important;
        font-size: 12pt;
        line-height: 1.4;
    }

    /* Hide non-printable elements */
    .bg-animation,
    .floating-objects,
    .floating-menu,
    .bottom-nav,
    .nav-buttons,
    .modal,
    .toast,
    .toast-container,
    .tooltip,
    .tooltip-trigger,
    button:not(.print-show),
    .btn:not(.print-show),
    #gdrive-status,
    .fab,
    [data-action="add"],
    [onclick*="Modal"],
    [onclick*="edit"],
    [onclick*="delete"] {
        display: none !important;
    }

    /* Reset page layout for printing */
    .page-container,
    .page {
        position: static !important;
        transform: none !important;
        opacity: 1 !important;
        pointer-events: initial !important;
        overflow: visible !important;
    }

    .page:not(.active) {
        display: none !important;
    }

    .page-content {
        max-width: 100% !important;
        margin: 0 !important;
        padding: 20px !important;
    }

    /* Cards - light background for printing */
    .card {
        background: #f8fafc !important;
        border: 1px solid #e2e8f0 !important;
        box-shadow: none !important;
        break-inside: avoid;
        page-break-inside: avoid;
        margin-bottom: 16pt;
    }

    .card:hover {
        transform: none !important;
        box-shadow: none !important;
    }

    .card::before {
        display: none;
    }

    /* Bento grid - simplified for print */
    .bento-grid {
        display: block !important;
    }

    .bento-grid>* {
        margin-bottom: 16pt;
    }

    /* Text colors for light background */
    h1,
    h2,
    h3,
    h4 {
        color: #0f172a !important;
        background: none !important;
        -webkit-text-fill-color: #0f172a !important;
    }

    p,
    span,
    div,
    td,
    th,
    li {
        color: #334155 !important;
    }

    .text-muted,
    .text-secondary {
        color: #64748b !important;
    }

    /* Tables - clean borders for printing */
    table {
        border-collapse: collapse;
        width: 100%;
    }

    th,
    td {
        border: 1px solid #cbd5e1 !important;
        padding: 8pt 12pt !important;
        text-align: left;
    }

    th {
        background: #e2e8f0 !important;
        font-weight: 600;
    }

    tr:nth-child(even) {
        background: #f8fafc !important;
    }

    /* Charts - ensure they print */
    canvas {
        max-width: 100% !important;
        height: auto !important;
    }

    /* Journey summary cards - horizontal for print */
    .journey-summary-grid {
        display: flex !important;
        flex-wrap: wrap;
        gap: 8pt;
    }

    .journey-stat {
        flex: 1;
        min-width: 120pt;
        background: #f1f5f9 !important;
        border: 1px solid #e2e8f0 !important;
        padding: 8pt !important;
    }

    /* Success/Danger colors for print */
    .positive,
    .text-success {
        color: #059669 !important;
    }

    .negative,
    .text-danger {
        color: #dc2626 !important;
    }

    /* Page breaks */

    /* Header styling for print */
    .page-header h1 {
        font-size: 18pt !important;
        margin-bottom: 8pt;
    }

    .page-header p {
        font-size: 11pt !important;
        color: #64748b !important;
    }

    /* Print footer */
    @page {
        margin: 1in;

        @bottom-center {
            content: "WealthQuest Financial Dashboard";
        }

        @bottom-right {
            content: "Page " counter(page) " of " counter(pages);
        }
    }

    /* Hide step badges and decorative elements */
    .step-badge,
    .track-badge {
        display: none !important;
    }

    /* Ensure links show URL */
    a[href]:after {
        content: " (" attr(href) ")";
        font-size: 9pt;
        color: #64748b;
    }

    
    a[href^="javascript"]:after {
        content: "";
    }
}

/* ============================================
           20. FAB LABELS (Clarification)
           ============================================ */
.fab-option {
    position: relative;
    overflow: visible;
}

.fab-option::after {
    content: attr(data-label);
    position: absolute;
    right: 60px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(15, 23, 42, 0.9);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 1;
    /* Always show when option is visible */
    font-family: 'Inter', sans-serif;
}

/* Adjust position for mobile if needed */
@media (max-width: 480px) {
    .fab-option::after {
        font-size: 0.8rem;
        padding: 4px 10px;
        right: 50px;
    }
}

/* ============================================
           21. SUMMARY BREAKDOWN CHARTS
           - Doughnut charts for Income, Debts, Assets
           - External labels with percentages
           ============================================ */
.summary-chart-container {
    padding: 12px;
    margin-bottom: 12px;
}

.summary-chart__wrapper {
    position: relative;
    height: 220px;
    max-width: 100%;
    margin: 0 auto;
}

.summary-chart__wrapper canvas {
    position: relative;
    z-index: 1;
}

.summary-chart__center {
    position: absolute;
    top: 38%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
    z-index: 2;
}

.summary-chart__total-label {
    display: block;
    font-size: 0.55rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.summary-chart__total-value {
    display: block;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
}

.summary-chart__empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.summary-chart__empty-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

/* Mobile responsiveness for summary charts */
@media (max-width: 480px) {
    .summary-chart-container {
        padding: 8px;
        margin-bottom: 8px;
    }

    .summary-chart__wrapper {
        height: 160px;
    }

    .summary-chart__center {
        top: 32%;
    }

    .summary-chart__total-value {
        font-size: 0.85rem;
    }

    .summary-chart__total-label {
        font-size: 0.45rem;
    }

    .summary-chart__empty {
        padding: 20px 12px;
    }

    .summary-chart__empty-icon {
        font-size: 1.5rem;
        margin-bottom: 4px;
    }
}

/* Hero Card Pie Chart */
.hero-card__pie {
    display: flex;
    justify-content: center;
    margin: 10px 0 20px;
}

.hero-card__pie canvas {
    max-width: 120px;
    max-height: 120px;
}

/* ============================================
           22. PRIVACY MODE
           - Blur effect for social media sharing
           ============================================ */
.hero-card__privacy-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-card__privacy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.hero-card__privacy-btn:active {
    transform: scale(0.95);
}

/* Privacy mode - blur effect for safe social sharing */
.hero-card.privacy-mode .hero-card__networth-value,
.hero-card.privacy-mode .hero-card__split-value,
.hero-card.privacy-mode .hero-card__metric-value {
    filter: blur(8px);
    user-select: none;
    transition: all 0.3s ease;
}

/* Privacy indicator */

/* Value pulse animation for budget recalculation */
@keyframes valuePulse {
    0% {
        background-color: rgba(59, 130, 246, 0.4);
        transform: scale(1.05);
    }

    100% {
        background-color: transparent;
        transform: scale(1);
    }
}

.value-pulse {
    animation: valuePulse 0.4s ease-out;
    border-radius: 4px;
    padding: 0 4px;
}

/* Step progress bar */
.system-progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin: 8px 0 16px;
    overflow: hidden;
}

.system-progress-fill {
    height: 100%;
    background: var(--primary);
    transition: width 0.3s ease;
}