
        /* ====== Layout Vars ====== */
        :root {
            --primary: #6366f1;
            --primary-dark: #4f46e5;
            --secondary: #f43f5e;
            --success: #10b981;
            --warning: #f59e0b;
            --danger: #ef4444;
            --dark: #1e293b;
            --light: #f8fafc;
            --gray-100: #f1f5f9;
            --gray-200: #e2e8f0;
            --gray-300: #cbd5e1;
            --gray-600: #475569;
            --gray-700: #334155;
            --gray-800: #1e293b;
            --radius: 12px;
            --shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);
            --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);
            --transition: all .3s cubic-bezier(.4, 0, .2, 1);
            --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);

            --sidebar-width: 280px;
            --sidebar-collapsed-width: 80px;
            --content-gap: 12px;
        }

        /* ====== Reset / base ====== */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Inter', system-ui, 'Segoe UI', sans-serif;
        }

        html,
        body {
            height: 100%;
        }

        body {
            color: var(--gray-800);
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            line-height: 1.6;
            display: block;
            padding-left: calc(var(--sidebar-width) + var(--content-gap));
        }

        /* ====== Sidebar ====== */
        .sidebar {
            position: fixed;
            top: 0;
            left: 0;
            width: var(--sidebar-width);
            height: 100vh;
            background: rgba(255, 255, 255, .95);
            backdrop-filter: blur(20px);
            border-right: 1px solid rgba(255, 255, 255, .2);
            overflow-y: auto;
            z-index: 1000;
            box-shadow: var(--shadow-lg);
            transition: var(--transition);
        }

        .sidebar-header {
            padding: 1.5rem;
            border-bottom: 1px solid var(--gray-200);
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .logo {
            display: flex;
            align-items: center;
            gap: .75rem;
            color: var(--primary);
            font-weight: 700;
            font-size: 1.25rem;
        }

        .toggle-sidebar {
            background: none;
            border: none;
            color: var(--gray-600);
            cursor: pointer;
            padding: .5rem;
            border-radius: var(--radius);
            transition: var(--transition);
        }

        .toggle-sidebar:hover {
            background: var(--gray-100);
            color: var(--primary);
        }

        .sidebar-nav {
            padding: 1rem 0;
        }

        .nav-section {
            margin-bottom: 1.5rem;
        }

        .nav-title {
            font-size: .75rem;
            text-transform: uppercase;
            letter-spacing: .05em;
            color: var(--gray-600);
            padding: 0 1.5rem;
            margin-bottom: .5rem;
        }

        .nav-item {
            display: flex;
            align-items: center;
            padding: .75rem 1.5rem;
            color: var(--gray-700);
            text-decoration: none;
            transition: var(--transition);
            position: relative;
        }

        .nav-item:hover {
            background: var(--gray-100);
            color: var(--primary);
        }

        .nav-item.active {
            background: rgba(99, 102, 241, .1);
            color: var(--primary);
            border-right: 3px solid var(--primary);
        }

        .nav-icon {
            width: 24px;
            height: 24px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-right: .75rem;
        }

        .nav-text {
            font-weight: 500;
        }

        .sidebar-footer {
            padding: 1rem 1.5rem;
            border-top: 1px solid var(--gray-200);
            margin-top: auto;
        }

        .user-profile {
            display: flex;
            align-items: center;
            gap: .75rem;
        }

        .user-avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: linear-gradient(135deg, var(--primary), var(--secondary));
            display: flex;
            align-items: center;
            justify-content: center;
            color: #fff;
            font-weight: 600;
        }

        /* ====== Main content ====== */
        .main-content {
            min-height: 100vh;
            display: flex;
            flex-direction: column;
        }

        .dashboard-container {
            max-width: none;
            width: 100%;
            padding: 2rem 2rem 2rem var(--content-gap);
        }

        /* ====== Header ====== */
        .dashboard-header {
            background: rgba(255, 255, 255, .95);
            backdrop-filter: blur(20px);
            border-radius: var(--radius);
            padding: 2rem;
            margin-bottom: 2rem;
            box-shadow: var(--shadow-lg);
            border: 1px solid rgba(255, 255, 255, .2);
            border-top-left-radius: 0;
            border-bottom-left-radius: 0;
        }

        .header-content {
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 1rem;
        }

        .welcome-section h1 {
            font-size: 2.5rem;
            font-weight: 800;
            background: linear-gradient(135deg, var(--primary), var(--secondary));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            margin-bottom: .5rem;
        }

        .welcome-section p {
            color: var(--gray-600);
            font-size: 1.1rem;
        }

        /* ====== Quick Stats ====== */
        .quick-stats {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 1.5rem;
            margin: 2rem 0;
        }

        .stat-card {
            background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
            padding: 1.75rem;
            border-radius: 16px;
            box-shadow:
                0 8px 30px rgba(0, 0, 0, 0.08),
                0 4px 12px rgba(0, 0, 0, 0.03);
            border: 1px solid rgba(255, 255, 255, 0.8);
            position: relative;
            overflow: hidden;
            transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            animation: cardIn 0.6s ease-out;
        }

        .stat-card::before {
            content: "";
            position: absolute;
            top: 0;
            left: 0;
            width: 4px;
            height: 100%;
            background: linear-gradient(135deg, var(--primary), var(--secondary));
            transition: transform 0.4s ease;
        }

        .stat-card:hover {
            transform: translateY(-8px);
            box-shadow:
                0 20px 40px rgba(0, 0, 0, 0.12),
                0 8px 20px rgba(0, 0, 0, 0.06);
        }

        .stat-card:hover::before {
            transform: scaleY(1.1);
        }

        .stat-number {
            font-size: 2.5rem;
            font-weight: 800;
            color: var(--primary);
            line-height: 1;
            margin-bottom: 0.5rem;
            text-shadow: 0 2px 10px rgba(99, 102, 241, 0.15);
            transition: all 0.3s ease;
        }

        .stat-card:hover .stat-number {
            transform: scale(1.05);
            background: linear-gradient(135deg, var(--primary), var(--secondary));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .stat-label {
            color: var(--gray-600);
            font-weight: 600;
            font-size: 0.9rem;
            letter-spacing: 0.05em;
            text-transform: uppercase;
            transition: color 0.3s ease;
        }

        .stat-card:hover .stat-label {
            color: var(--primary-dark);
        }

        /* ====== Dashboard Grid ====== */
        .dashboard-grid {
            display: grid;
            grid-template-columns: 2fr 1fr;
            gap: 2rem;
            margin-top: 2rem;
        }

        @media (max-width:1024px) {
            .dashboard-grid {
                grid-template-columns: 1fr;
            }
        }

        /* ====== Card Animations ====== */
        @keyframes cardIn {
            from {
                opacity: 0;
                transform: translateY(20px) scale(0.98);
            }

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

        @keyframes gradientShift {
            0% {
                background-position: 0% 50%;
            }

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

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

        /* ====== Content Cards ====== */
        .tasks-section,
        .reports-section,
        .quick-actions-section,
        .progress-section,
        .deadlines-section {
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.95));
            backdrop-filter: blur(20px);
            border-radius: 16px;
            padding: 2rem;
            margin-bottom: 2rem;
            box-shadow:
                0 8px 30px rgba(0, 0, 0, 0.08),
                0 4px 12px rgba(0, 0, 0, 0.03);
            border: 1px solid rgba(255, 255, 255, 0.8);
            position: relative;
            overflow: hidden;
            transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            animation: cardIn 0.6s ease-out;
        }

        .tasks-section::before,
        .reports-section::before,
        .quick-actions-section::before,
        .progress-section::before,
        .deadlines-section::before {
            content: "";
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 4px;
            background: linear-gradient(90deg, var(--primary), var(--secondary));
            background-size: 200% 100%;
            animation: gradientShift 3s ease infinite;
        }

        .tasks-section:hover,
        .reports-section:hover,
        .quick-actions-section:hover,
        .progress-section:hover,
        .deadlines-section:hover {
            transform: translateY(-5px);
            box-shadow:
                0 20px 40px rgba(0, 0, 0, 0.12),
                0 8px 20px rgba(0, 0, 0, 0.06);
        }

        /* ====== Section Headers ====== */
        .section-header {
            margin-bottom: 1.5rem;
        }

        .section-header h2 {
            font-size: 1.5rem;
            font-weight: 700;
            color: var(--gray-800);
            display: flex;
            align-items: center;
            gap: 0.75rem;
        }

        .section-header h2 i {
            color: var(--primary);
        }

        /* ====== Quick Actions Card ====== */
        .quick-actions-section {
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.95));
            border: 1px solid rgba(99, 102, 241, 0.1);
            box-shadow:
                0 10px 25px -5px rgba(99, 102, 241, 0.1),
                0 8px 10px -6px rgba(99, 102, 241, 0.05);
        }

        .quick-actions-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
            gap: 1rem;
        }

        .action-card {
            background: linear-gradient(135deg, #ffffff, #f8fafc);
            border-radius: 12px;
            padding: 1.25rem;
            display: flex;
            flex-direction: column;
            align-items: center;
            text-align: center;
            transition: all 0.3s ease;
            border: 1px solid rgba(99, 102, 241, 0.1);
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
            position: relative;
            overflow: hidden;
        }

        .action-card::before {
            content: "";
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 3px;
            background: linear-gradient(90deg, var(--primary), var(--secondary));
            transform: scaleX(0);
            transition: transform 0.3s ease;
        }

        .action-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
        }

        .action-card:hover::before {
            transform: scaleX(1);
        }

        .action-icon {
            width: 50px;
            height: 50px;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 0.75rem;
            font-size: 1.25rem;
            color: white;
            background: linear-gradient(135deg, var(--primary), var(--secondary));
            box-shadow: 0 4px 6px rgba(99, 102, 241, 0.3);
            transition: all 0.3s ease;
        }

        .action-card:hover .action-icon {
            transform: scale(1.1) rotate(5deg);
            box-shadow: 0 6px 12px rgba(99, 102, 241, 0.4);
        }

        .action-title {
            font-weight: 600;
            color: var(--gray-800);
            margin-bottom: 0.25rem;
        }

        .action-desc {
            font-size: 0.8rem;
            color: var(--gray-600);
        }

        /* ====== Weekly Progress Card ====== */
        .progress-section {
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.95));
            border: 1px solid rgba(16, 185, 129, 0.1);
            box-shadow:
                0 10px 25px -5px rgba(16, 185, 129, 0.1),
                0 8px 10px -6px rgba(16, 185, 129, 0.05);
        }

        .progress-list {
            display: flex;
            flex-direction: column;
            gap: 1.25rem;
        }

        .progress-item {
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
        }

        .progress-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .progress-label {
            font-weight: 600;
            color: var(--gray-800);
        }

        .progress-value {
            font-weight: 700;
            color: var(--success);
            font-size: 1.1rem;
        }

        .progress-bar {
            height: 8px;
            background: var(--gray-200);
            border-radius: 10px;
            overflow: hidden;
            position: relative;
        }

        .progress-fill {
            height: 100%;
            border-radius: 10px;
            background: linear-gradient(90deg, var(--success), #34d399);
            position: relative;
            transition: width 1.5s cubic-bezier(0.22, 0.61, 0.36, 1);
            width: 0;
        }

        .progress-fill::after {
            content: "";
            position: absolute;
            top: 0;
            left: 0;
            bottom: 0;
            right: 0;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
            animation: shimmer 2s infinite;
        }

        @keyframes shimmer {
            0% {
                transform: translateX(-100%);
            }

            100% {
                transform: translateX(100%);
            }
        }

        /* ====== Upcoming Deadlines Card ====== */
        .deadlines-section {
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.95));
            border: 1px solid rgba(245, 158, 11, 0.1);
            box-shadow:
                0 10px 25px -5px rgba(245, 158, 11, 0.1),
                0 8px 10px -6px rgba(245, 158, 11, 0.05);
        }

        .deadlines-list {
            display: flex;
            flex-direction: column;
            gap: 1rem;
        }

        .deadline-item {
            background: white;
            border-radius: 12px;
            padding: 1.25rem;
            display: flex;
            align-items: center;
            gap: 1rem;
            transition: all 0.3s ease;
            border: 1px solid var(--gray-200);
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
            position: relative;
            overflow: hidden;
        }

        .deadline-item::before {
            content: "";
            position: absolute;
            left: 0;
            top: 0;
            bottom: 0;
            width: 4px;
            background: linear-gradient(180deg, var(--warning), #f59e0b);
            border-radius: 4px 0 0 4px;
        }

        .deadline-item:hover {
            transform: translateX(5px);
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
        }

        .deadline-icon {
            width: 40px;
            height: 40px;
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(245, 158, 11, 0.1);
            color: var(--warning);
            font-size: 1.1rem;
        }

        .deadline-content {
            flex: 1;
        }

        .deadline-title {
            font-weight: 600;
            color: var(--gray-800);
            margin-bottom: 0.25rem;
        }

        .deadline-date {
            font-size: 0.85rem;
            color: var(--gray-600);
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .deadline-date i {
            color: var(--warning);
        }

        .deadline-urgency {
            padding: 0.25rem 0.75rem;
            border-radius: 20px;
            font-size: 0.75rem;
            font-weight: 600;
        }

        .urgency-high {
            background: rgba(239, 68, 68, 0.1);
            color: var(--danger);
        }

        .urgency-medium {
            background: rgba(245, 158, 11, 0.1);
            color: var(--warning);
        }

        .urgency-low {
            background: rgba(16, 185, 129, 0.1);
            color: var(--success);
        }

        /* ====== Footer ====== */
        .dashboard-footer {
            margin-top: auto;
            background: rgba(255, 255, 255, .95);
            backdrop-filter: blur(20px);
            border-top: 1px solid rgba(255, 255, 255, .2);
            width: 100%;
        }

        .footer-content {
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 1rem;
            padding: 1.5rem 2rem 1.5rem var(--content-gap);
        }

        .footer-link {
            color: var(--gray-600);
            text-decoration: none;
        }

        .footer-link:hover {
            color: var(--primary);
        }

        /* ====== Mobile Responsive ====== */
        @media (max-width:1024px) {
            body {
                padding-left: 0;
            }

            .dashboard-container {
                padding: 1rem;
            }
        }

        @media (max-width:768px) {
            .dashboard-header {
                padding: 1.5rem;
            }

            .welcome-section h1 {
                font-size: 2rem;
            }

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

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

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

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

        /* Reduce motion for accessibility */
        @media (prefers-reduced-motion: reduce) {

            .stat-card,
            .tasks-section,
            .reports-section,
            .quick-actions-section,
            .progress-section,
            .deadlines-section,
            .action-card,
            .deadline-item {
                animation: none;
                transition: none;
            }

            .stat-card:hover,
            .tasks-section:hover,
            .reports-section:hover,
            .quick-actions-section:hover,
            .progress-section:hover,
            .deadlines-section:hover,
            .action-card:hover,
            .deadline-item:hover {
                transform: none;
            }

            /* ====== Invoice Stats Section ====== */
            .invoice-stats-section {
                background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.95));
                backdrop-filter: blur(20px);
                border-radius: 16px;
                padding: 2rem;
                margin-bottom: 2rem;
                box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.03);
                border: 1px solid rgba(255, 255, 255, 0.8);
                position: relative;
                overflow: hidden;
                transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
                animation: cardIn 0.6s ease-out;
            }

            .invoice-stats-section::before {
                content: "";
                position: absolute;
                top: 0;
                left: 0;
                width: 100%;
                height: 4px;
                background: linear-gradient(90deg, #10b981, #059669);
                background-size: 200% 100%;
                animation: gradientShift 3s ease infinite;
            }

            .invoice-stats-section:hover {
                transform: translateY(-5px);
                box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12), 0 8px 20px rgba(0, 0, 0, 0.06);
            }

            /* Invoice Stats Grid */
            .invoice-stats-grid {
                display: grid;
                grid-template-columns: repeat(3, 1fr);
                gap: 1rem;
                margin-bottom: 1.5rem;
            }

            .invoice-stat {
                text-align: center;
                padding: 1rem;
                background: rgba(16, 185, 129, 0.1);
                border-radius: 12px;
                border: 1px solid rgba(16, 185, 129, 0.2);
            }

            .invoice-stat-value {
                font-size: 1.5rem;
                font-weight: 700;
                color: #10b981;
                margin-bottom: 0.25rem;
            }

            .invoice-stat-label {
                font-size: 0.8rem;
                color: var(--gray-600);
                font-weight: 600;
                text-transform: uppercase;
                letter-spacing: 0.05em;
            }

            /* Recent Invoices Mini List */
            .recent-invoices h4 {
                font-size: 1rem;
                font-weight: 600;
                color: var(--gray-800);
                margin-bottom: 1rem;
            }

            .invoice-list-mini {
                display: flex;
                flex-direction: column;
                gap: 0.75rem;
            }

            .invoice-item-mini {
                display: flex;
                align-items: center;
                justify-content: space-between;
                padding: 0.75rem;
                background: white;
                border-radius: 8px;
                border: 1px solid var(--gray-200);
                transition: all 0.3s ease;
            }

            .invoice-item-mini:hover {
                transform: translateX(5px);
                box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
            }

            .invoice-info-mini {
                flex: 1;
            }

            .invoice-title-mini {
                font-weight: 600;
                color: var(--gray-800);
                font-size: 0.9rem;
                margin-bottom: 0.25rem;
            }

            .invoice-meta-mini {
                display: flex;
                align-items: center;
                gap: 0.75rem;
                font-size: 0.8rem;
            }

            .invoice-amount-mini {
                font-weight: 600;
                color: var(--gray-700);
            }

            .invoice-status-mini {
                padding: 0.2rem 0.6rem;
                border-radius: 12px;
                font-size: 0.7rem;
                font-weight: 600;
                text-transform: uppercase;
            }

            .status-draft {
                background: rgba(59, 130, 246, 0.1);
                color: #3b82f6;
            }

            .status-pending {
                background: rgba(245, 158, 11, 0.1);
                color: #f59e0b;
            }

            .status-paid {
                background: rgba(16, 185, 129, 0.1);
                color: #10b981;
            }

            .status-overdue {
                background: rgba(239, 68, 68, 0.1);
                color: #ef4444;
            }

            .invoice-link {
                color: var(--gray-400);
                padding: 0.5rem;
                border-radius: 6px;
                transition: all 0.3s ease;
            }

            .invoice-link:hover {
                color: var(--primary);
                background: rgba(99, 102, 241, 0.1);
            }

            /* Empty Invoice State */
            .empty-invoice-state {
                text-align: center;
                padding: 2rem 1rem;
            }

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

            .empty-invoice-state p {
                color: var(--gray-600);
                margin-bottom: 1.5rem;
            }

            /* Upgrade Prompt Section */
            .upgrade-prompt-section {
                background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.95));
                backdrop-filter: blur(20px);
                border-radius: 16px;
                padding: 2rem;
                margin-bottom: 2rem;
                box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.03);
                border: 1px solid rgba(255, 255, 255, 0.8);
                position: relative;
                overflow: hidden;
            }

            .upgrade-prompt-section::before {
                content: "";
                position: absolute;
                top: 0;
                left: 0;
                width: 100%;
                height: 4px;
                background: linear-gradient(90deg, var(--primary), var(--secondary));
            }

            .upgrade-content {
                text-align: center;
            }

            .upgrade-icon {
                font-size: 3rem;
                margin-bottom: 1rem;
                opacity: 0.7;
            }

            .upgrade-content h3 {
                color: var(--gray-800);
                margin-bottom: 0.5rem;
                font-weight: 700;
            }

            .upgrade-content p {
                color: var(--gray-600);
                margin-bottom: 1.5rem;
            }

            .upgrade-features {
                display: flex;
                flex-direction: column;
                gap: 0.75rem;
                margin-bottom: 2rem;
            }

            .feature-item {
                display: flex;
                align-items: center;
                gap: 0.75rem;
                color: var(--gray-700);
            }

            .feature-item i {
                color: var(--success);
                font-size: 0.9rem;
            }

            .btn-block {
                display: block;
                width: 100%;
            }

            /* Responsive adjustments */
            @media (max-width: 768px) {
                .invoice-stats-grid {
                    grid-template-columns: 1fr;
                    gap: 0.75rem;
                }

                .invoice-stat {
                    padding: 0.75rem;
                }

                .invoice-stat-value {
                    font-size: 1.25rem;
                }
            }
       /* Top Navigation Styles */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: white;
    border-bottom: 1px solid #e5e7eb;
    z-index: 1000;
    display: none; /* Hidden by default on desktop */
}

.top-nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 1.5rem;
    max-width: 100%;
}

.top-nav-left .app-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: #3b82f6;
    font-weight: 600;
    font-size: 1.25rem;
}

.top-nav-left .app-logo i {
    font-size: 1.5rem;
}

.top-nav-center .quick-action-buttons {
    display: flex;
    gap: 0.5rem;
}

.top-nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-notifications .nav-icon-btn {
    position: relative;
    background: none;
    border: none;
    padding: 0.5rem;
    border-radius: 6px;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s;
}

.nav-notifications .nav-icon-btn:hover {
    background: #f3f4f6;
    color: #374151;
}

.nav-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-menu {
    position: relative;
}

.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.user-menu-btn:hover {
    background: #f3f4f6;
}

.user-avatar-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #3b82f6;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
}

.user-name-sm {
    font-weight: 500;
    color: #374151;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 280px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s;
    z-index: 1001;
}

.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
}

.user-avatar-md {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #3b82f6;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.125rem;
}

.user-info-md .user-name {
    font-weight: 600;
    color: #111827;
}

.user-info-md .user-email {
    font-size: 0.875rem;
    color: #6b7280;
}

.dropdown-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 0.5rem 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: #374151;
    transition: background-color 0.2s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.dropdown-item:hover {
    background: #f3f4f6;
}

.dropdown-item i {
    width: 16px;
    text-align: center;
    color: #6b7280;
}

.dropdown-item.text-danger {
    color: #ef4444;
}

.dropdown-item.text-danger i {
    color: #ef4444;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .top-nav {
        display: block; /* Show on mobile/tablet */
    }
    
    .sidebar {
        top: 60px; /* Push sidebar below top nav */
        height: calc(100vh - 60px);
    }
    
    .main-content {
        margin-top: 60px; /* Push main content below top nav */
    }
    
    .top-nav-center {
        display: none; /* Hide center actions on mobile */
    }
    
    .user-name-sm {
        display: none; /* Hide name on mobile */
    }
}

@media (max-width: 768px) {
    .top-nav-content {
        padding: 0 1rem;
    }
    
    .app-name {
        display: none; /* Hide app name on very small screens */
    }
}

/* Update existing main-content for top nav */
.main-content {
    margin-left: 280px;
    transition: margin-left 0.3s;
    min-height: 100vh;
    background: #f8fafc;
}

.main-content.expanded {
    margin-left: 80px;
}

@media (max-width: 1024px) {
    .main-content {
        margin-left: 0;
        margin-top: 60px; /* Account for top nav */
    }
}/* Upgrade Link Styles */
.nav-item.upgrade-link {
    position: relative;
    cursor: pointer;
}

.nav-item.upgrade-link:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(244, 63, 94, 0.1));
}

.nav-item.upgrade-link::after {
    content: '🔒';
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    opacity: 0.7;
}

.nav-item.upgrade-link:hover::before {
    content: 'Upgrade to access';
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: #374151;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    z-index: 1000;
}

.nav-item.upgrade-link:hover::after {
    content: '🔓';
    opacity: 1;
}

/* Subscription Badge Updates */
.subscription-badge.free {
    background: linear-gradient(135deg, #6b7280, #9ca3af);
}

.subscription-badge.pro {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

.subscription-badge.business {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.subscription-badge.enterprise {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

/* Make sure all sections are visible */
.nav-section {
    display: block !important;
} }
   /* assets/css/crm.css */
.crm-dashboard {
    padding: 20px;
    background: #f8f9fa;
    min-height: 100vh;
}

.dashboard-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 30px;
}

.dashboard-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.grid-col-span-2 {
    grid-column: span 2;
}

.grid-col-1 {
    grid-column: span 1;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.metric-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
}

.metric-value {
    font-size: 2rem;
    font-weight: bold;
    color: #2c3e50;
}

.metric-label {
    color: #7f8c8d;
    margin-bottom: 5px;
}

.metric-trend {
    font-size: 0.8rem;
    padding: 2px 8px;
    border-radius: 10px;
}

.metric-trend.positive {
    background: #d4edda;
    color: #155724;
}

.metric-trend.negative {
    background: #f8d7da;
    color: #721c24;
}

.pipeline-widget {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.widget-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 20px;
}

.pipeline-stages {
    display: flex;
    gap: 10px;
    overflow-x: auto;
}

.pipeline-stage {
    min-width: 200px;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    overflow: hidden;
}

.stage-header {
    padding: 10px;
    display: flex;
    justify-content: between;
    align-items: center;
}

.stage-value {
    padding: 10px;
    background: #f8f9fa;
    text-align: center;
    font-weight: bold;
}

.stage-deals {
    padding: 10px;
}

.deal-item {
    display: flex;
    justify-content: between;
    align-items: center;
    padding: 5px 0;
    border-bottom: 1px solid #f1f1f1;
}

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

.activity-timeline {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.activity-item {
    display: flex;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #f1f1f1;
}

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

.activity-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    flex-shrink: 0;
}

.activity-icon.call { background: #3498db; }
.activity-icon.email { background: #e74c3c; }
.activity-icon.meeting { background: #9b59b6; }
.activity-icon.system { background: #95a5a6; }

.activity-content {
    flex: 1;
}

.activity-time {
    font-size: 0.8rem;
    color: #7f8c8d;
}

/* Responsive design */
@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .grid-col-span-2 {
        grid-column: span 1;
    }
    
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .pipeline-stages {
        flex-direction: column;
    }
} 