        :root {
            --bg-canvas: #FDFAF6;
            --teal-primary: #01937C;
            --text-dark: #1A1A1A;
            --border-subtle: #E5E7EB;
            --white: #FFFFFF;
        }

        body {
            font-family: 'Inter', sans-serif;
            background-color: var(--bg-canvas);
            color: var(--text-dark);
            margin: 0;
            overflow-x: hidden;
        }

        .iceberg { font-family: 'Iceberg', cursive; }

        /* --- LAYOUT STRUCTURE --- */
        .inbox-container {
            display: grid;
            grid-template-columns: 280px 1fr;
            min-height: 100vh;
        }

        @media (max-width: 1024px) {
            .inbox-container { grid-template-columns: 1fr; }
            .sidebar { display: none; }
        }

        .sidebar {
            background: var(--white);
            border-right: 1px solid var(--border-subtle);
            padding: 40px 20px;
            position: sticky;
            top: 0;
            height: 100vh;
            display: flex;
            flex-direction: column;
        }

        .nav-item {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px 20px;
            border-radius: 8px;
            margin-bottom: 8px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
            color: #666;
            font-size: 14px;
        }

        .nav-item:hover { background: #F3F4F6; color: var(--teal-primary); }
        .nav-item.active { background: #E6F4F2; color: var(--teal-primary); }

        /* --- HERO: COMPOSE WINDOW & ANIMATED BG --- */
        .hero-bg-animate {
            background: linear-gradient(-45deg, #FDFAF6, #f2f7f6, #fdfaf6, #e9f5f3);
            background-size: 400% 400%;
            animation: gradientBG 15s ease infinite;
        }

        @keyframes gradientBG {
            0% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
            100% { background-position: 0% 50%; }
        }

        .compose-window {
            background: var(--white);
            border: 1px solid var(--border-subtle);
            border-radius: 12px;
            box-shadow: 0 30px 60px -12px rgba(0,0,0,0.1);
            max-width: 1000px;
            margin: 0 auto;
            overflow: hidden;
            animation: slideUp 1s cubic-bezier(0.16, 1, 0.3, 1);
        }

        @keyframes slideUp {
            from { transform: translateY(80px); opacity: 0; }
            to { transform: translateY(0); opacity: 1; }
        }

        .compose-header {
            background: #F9FAFB;
            padding: 12px 20px;
            border-bottom: 1px solid var(--border-subtle);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .field-row {
            padding: 10px 20px;
            border-bottom: 1px solid #F3F4F6;
            display: flex;
            align-items: center;
            gap: 15px;
            font-size: 13px;
        }

        .field-label { color: #9CA3AF; width: 60px; font-weight: 600; }

        /* --- JOURNEY FLOW --- */
        .journey-line {
            position: absolute;
            left: 50%;
            top: 0;
            bottom: 0;
            width: 2px;
            background: repeating-linear-gradient(to bottom, var(--teal-primary), var(--teal-primary) 10px, transparent 10px, transparent 20px);
        }

        .node-circle {
            width: 50px;
            height: 50px;
            background: var(--white);
            border: 2px solid var(--teal-primary);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 10;
            transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        }

        .node-circle:hover { background: var(--teal-primary); color: white; transform: scale(1.2); }

        /* --- THREAD STYLING --- */
        .thread-indent {
            position: relative;
            margin-left: 40px;
            padding-left: 30px;
            border-left: 2px solid #E5E7EB;
        }

        .thread-indent::before {
            content: '';
            position: absolute;
            left: 0;
            top: 24px;
            width: 20px;
            height: 2px;
            background: #E5E7EB;
        }

        /* --- MODAL --- */
        #global-modal {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,0.6);
            backdrop-filter: blur(4px);
            z-index: 9999;
            align-items: center;
            justify-content: center;
            padding: 20px;
        }

        .modal-content {
            background: white;
            width: 100%;
            max-width: 800px;
            border-radius: 20px;
            max-height: 85vh;
            overflow-y: auto;
            position: relative;
        }

        .page-view { display: none; }
        .page-view.active { display: block; }

        /* --- CARD HOVER EFFECT --- */
        .email-card {
            transition: all 0.4s ease;
            max-height: 160px;
            overflow: hidden;
        }
        .email-card.expanded {
            max-height: 1000px;
            border-color: var(--teal-primary);
            box-shadow: 0 10px 30px rgba(1, 147, 124, 0.1);
        }

        /* --- FILTER PILLS --- */
        .filter-pill {
            padding: 8px 16px;
            border-radius: 20px;
            font-size: 12px;
            font-weight: 700;
            cursor: pointer;
            border: 1px solid #E5E7EB;
            transition: 0.2s;
        }
        .filter-pill.active {
            background: var(--teal-primary);
            color: white;
            border-color: var(--teal-primary);
        }
        /* Mobile sidebar toggle functionality */
@media (max-width: 1024px) {
    .inbox-container { 
        grid-template-columns: 1fr; 
    }
    
    .sidebar { 
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 280px;
        height: 100vh;
        z-index: 1000;
        background: var(--white);
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    }
    
    .sidebar.mobile-open {
        display: flex;
        transform: translateX(0);
    }
    
    /* Hamburger menu button */
    .mobile-menu-btn {
        display: flex;
        position: fixed;
        top: 20px;
        left: 20px;
        z-index: 1001;
        width: 40px;
        height: 40px;
        background: var(--teal-primary);
        border-radius: 8px;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        color: white;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
    
    /* Overlay when sidebar is open */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 999;
    }
    
    .sidebar-overlay.active {
        display: block;
    }
    
    /* Main content adjustment for mobile */
    .main-content {
        padding-top: 60px;
    }
}

@media (min-width: 1025px) {
    .mobile-menu-btn,
    .sidebar-overlay {
        display: none !important;
    }
    
    .sidebar {
        display: flex !important;
        transform: none !important;
        position: sticky;
    }
}
