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

        :root {
            --primary: #4F46E5;
            --primary-dark: #4338CA;
            --secondary: #10B981;
            --danger: #EF4444;
            --warning: #F59E0B;
            --dark: #1F2937;
            --gray: #6B7280;
            --light: #F3F4F6;
            --white: #FFFFFF;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
            background: var(--light);
            color: var(--dark);
            line-height: 1.6;
        }

        .container {
            display: flex;
            height: 100vh;
        }

        .sidebar {
            width: 250px;
            background: var(--dark);
            padding: 20px;
            overflow-y: auto;
        }

        .logo {
            color: var(--white);
            font-size: 24px;
            font-weight: bold;
            margin-bottom: 30px;
            padding-bottom: 20px;
            border-bottom: 1px solid rgba(255,255,255,0.1);
        }

        .nav-item {
            color: var(--white);
            padding: 12px 16px;
            margin-bottom: 5px;
            border-radius: 8px;
            cursor: pointer;
            transition: background 0.3s;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .nav-item:hover {
            background: rgba(255,255,255,0.1);
        }

        .nav-item.active {
            background: var(--primary);
        }

        .sidebar-close {
            display: none;
            background: none;
            border: none;
            color: var(--white);
            font-size: 30px;
            position: absolute;
            top: 20px;
            right: 20px;
            cursor: pointer;
        }

        .main-content {
            flex: 1;
            padding: 30px;
            overflow-y: auto;
        }

        .header {
            margin-bottom: 30px;
        }

        .header h1 {
            font-size: 32px;
            margin-bottom: 10px;
        }

        .header p {
            color: var(--gray);
        }

        .btn {
            padding: 10px 20px;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            font-size: 14px;
            font-weight: 500;
            transition: all 0.3s;
            display: inline-flex;
            align-items: center;
            gap: 8px;
        }

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

        .btn-primary:hover {
            background: var(--primary-dark);
        }

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

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

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

        .card {
            background: var(--white);
            border-radius: 12px;
            padding: 20px;
            margin-bottom: 20px;
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
        }

        .grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 20px;
        }

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

        .form-group label {
            display: block;
            margin-bottom: 8px;
            font-weight: 500;
            color: var(--dark);
        }

        .form-group input,
        .form-group textarea,
        .form-group select {
            width: 100%;
            padding: 10px;
            border: 1px solid #D1D5DB;
            border-radius: 8px;
            font-size: 14px;
        }

        .form-group textarea {
            resize: vertical;
            min-height: 100px;
        }

        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0,0,0,0.5);
            z-index: 1000;
            align-items: center;
            justify-content: center;
        }

        .modal.active {
            display: flex;
        }

        .modal-content {
            background: var(--white);
            border-radius: 12px;
            padding: 30px;
            max-width: 600px;
            width: 90%;
            max-height: 90vh;
            overflow-y: auto;
        }

        .modal-header {
            margin-bottom: 20px;
            padding-bottom: 15px;
            border-bottom: 1px solid var(--light);
        }

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

        .client-card {
            border-left: 4px solid var(--primary);
            transition: transform 0.3s;
        }

        .client-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        }

        .client-name {
            font-size: 18px;
            font-weight: 600;
            margin-bottom: 8px;
        }

        .client-email {
            color: var(--gray);
            margin-bottom: 12px;
        }

        .project-badge {
            display: inline-block;
            padding: 4px 12px;
            background: var(--light);
            border-radius: 20px;
            font-size: 12px;
            margin-right: 8px;
            margin-bottom: 8px;
        }

        .status-badge {
            display: inline-block;
            padding: 4px 12px;
            border-radius: 20px;
            font-size: 12px;
            font-weight: 500;
        }

        .status-active {
            background: #D1FAE5;
            color: #065F46;
        }

        .status-pending {
            background: #FEF3C7;
            color: #92400E;
        }

        .status-completed {
            background: #DBEAFE;
            color: #1E40AF;
        }

        .task-item {
            display: flex;
            align-items: center;
            padding: 12px;
            background: var(--light);
            border-radius: 8px;
            margin-bottom: 10px;
        }

        .task-checkbox {
            width: 20px;
            height: 20px;
            margin-right: 12px;
        }

        .task-completed {
            text-decoration: line-through;
            opacity: 0.6;
        }

        .calendar-grid {
            display: grid;
            grid-template-columns: repeat(7, 1fr);
            gap: 10px;
        }

        .calendar-day {
            aspect-ratio: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            border: 1px solid var(--light);
            border-radius: 8px;
            cursor: pointer;
            position: relative;
        }

        .calendar-day:hover {
            background: var(--light);
        }

        .calendar-day.has-event::after {
            content: '';
            position: absolute;
            bottom: 4px;
            width: 4px;
            height: 4px;
            background: var(--primary);
            border-radius: 50%;
        }

        .tabs {
            display: flex;
            gap: 10px;
            margin-bottom: 20px;
            border-bottom: 1px solid var(--light);
        }

        .tab {
            padding: 10px 20px;
            cursor: pointer;
            border-bottom: 2px solid transparent;
            transition: all 0.3s;
        }

        .tab:hover {
            background: var(--light);
        }

        .tab.active {
            border-bottom-color: var(--primary);
            color: var(--primary);
        }

        .section {
            display: none;
        }

        .section.active {
            display: block;
        }

        .empty-state {
            text-align: center;
            padding: 40px;
            color: var(--gray);
        }

        .communication-item {
            border-left: 2px solid var(--light);
            padding-left: 20px;
            margin-left: 10px;
            position: relative;
            margin-bottom: 20px;
        }

        .communication-item::before {
            content: '';
            position: absolute;
            left: -6px;
            top: 0;
            width: 12px;
            height: 12px;
            background: var(--primary);
            border-radius: 50%;
        }

        .communication-date {
            font-size: 12px;
            color: var(--gray);
            margin-bottom: 5px;
        }

        .stats-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 20px;
            margin-bottom: 30px;
        }

        .stat-card {
            background: var(--white);
            padding: 20px;
            border-radius: 12px;
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
        }

        .stat-value {
            font-size: 32px;
            font-weight: bold;
            color: var(--primary);
        }

        .stat-label {
            color: var(--gray);
            margin-top: 5px;
        }

/* Mobile Header */
.mobile-header {
    display: none;
    background: var(--dark);
    padding: 15px 20px;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1001;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.mobile-logo {
    color: var(--white);
    font-size: 20px;
    font-weight: bold;
}

.menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--white);
    transition: 0.3s;
}

.menu-toggle.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.menu-toggle.open span:nth-child(2) {
    opacity: 0;
}
.menu-toggle.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Bottom Nav */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid var(--light);
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 5px;
    color: var(--gray);
    cursor: pointer;
    font-size: 10px;
    transition: color 0.3s;
}

.bottom-nav-item span {
    font-size: 20px;
    margin-bottom: 2px;
}

.bottom-nav-item.active {
    color: var(--primary);
}

/* Mobile Overlay */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1002;
    opacity: 0;
    pointer-events: none;
    transition: 0.3s;
}

.mobile-overlay.active {
    display: block;
    opacity: 1;
    pointer-events: auto;
}

/* Media Queries */
@media (max-width: 768px) {
    .mobile-header {
        display: flex;
    }

    .bottom-nav {
        display: grid;
    }

    .container {
        flex-direction: column;
        height: auto;
        padding-bottom: 80px; /* Space for bottom nav */
    }

    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        bottom: 0;
        width: 250px;
        z-index: 1003;
        transition: 0.3s;
        box-shadow: 4px 0 10px rgba(0,0,0,0.1);
    }

    .sidebar.active {
        left: 0;
    }

    .sidebar-close {
        display: block;
    }

    .sidebar .logo {
        display: none; /* Logo is in mobile header */
    }

    .main-content {
        padding: 15px;
        height: auto;
        overflow: visible;
    }

    .header h1 {
        font-size: 24px;
    }

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

    .stat-card {
        padding: 15px;
    }

    .stat-value {
        font-size: 24px;
    }

    .modal-content {
        width: 95%;
        padding: 20px;
        margin: 10px;
    }

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

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr !important;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }

    .header {
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .header .btn {
        margin-top: 10px;
    }
}