        * { margin: 0; padding: 0; box-sizing: border-box; }
        
        :root {
            --primary: #BF5700;
            --primary-dark: #993F00;
            --success: #10b981;
            --warning: #f59e0b;
            --danger: #ef4444;
            --gray-50: #f9fafb;
            --gray-100: #f3f4f6;
            --gray-200: #e5e7eb;
            --gray-600: #4b5563;
            --gray-700: #374151;
            --gray-900: #111827;
        }
        
        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            background: var(--gray-50);
            color: var(--gray-900);
        }
        
        /* Sidebar */
        .sidebar {
            position: fixed;
            left: 0;
            top: 0;
            bottom: 0;
            width: 260px;
            background: white;
            border-right: 1px solid var(--gray-200);
            z-index: 100;
            transition: transform 0.3s ease;
        }
        
        .mobile-toggle {
            display: none;
            position: fixed;
            left: 10px;
            top: 10px;
            width: 50px;
            height: 50px;
            background: var(--primary);
            color: white;
            border: none;
            border-radius: 50%;
            cursor: pointer;
            align-items: center;
            justify-content: center;
            z-index: 1001;
            box-shadow: 0 4px 12px rgba(0,0,0,0.3);
            font-size: 20px;
        }
        
        .mobile-toggle i {
            transition: transform 0.3s ease;
        }
        
        .mobile-toggle:active {
            transform: scale(0.95);
        }
        
        .logo {
            padding: 24px;
            font-size: 20px;
            font-weight: 700;
            color: var(--primary);
            border-bottom: 1px solid var(--gray-200);
        }
        
        .logo i { margin-right: 10px; }
        
        .nav-item {
            display: flex;
            align-items: center;
            padding: 12px 24px;
            color: var(--gray-700);
            cursor: pointer;
            gap: 12px;
            border-left: 3px solid transparent;
            transition: all 0.2s;
        }
        
        .nav-item:hover { background: var(--gray-50); color: var(--primary); }
        .nav-item.active { background: #eef2ff; color: var(--primary); border-left-color: var(--primary); font-weight: 600; }
        .nav-item i { width: 20px; }
        
        /* Main */
        .main { margin-left: 260px; }
        
        .header {
            background: white;
            border-bottom: 1px solid var(--gray-200);
            padding: 16px 32px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            position: sticky;
            top: 0;
            z-index: 90;
        }
        
        .header-actions {
            display: flex;
            align-items: center;
            gap: 12px;
        }
        
        .search-bar {
            flex: 1;
            max-width: 500px;
            position: relative;
            display: none;
        }
        
        .search-bar input {
            width: 100%;
            padding: 10px 40px;
            border: 1px solid var(--gray-200);
            border-radius: 8px;
            font-size: 16px;
        }
        
        .search-bar i {
            position: absolute;
            left: 14px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--gray-600);
        }
        
        .btn {
            padding: 10px 18px;
            border: none;
            border-radius: 8px;
            font-weight: 600;
            font-size: 14px;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 8px;
        }
        
        .btn-primary { background: var(--primary); color: white; }
        .btn-primary:hover { background: var(--primary-dark); }
        
        .btn-logout { 
            background: var(--primary); 
            color: white; 
        }
        .btn-logout:hover { 
            background: var(--primary-dark); 
        }
        
        .btn-secondary { 
            background: var(--gray-100); 
            color: var(--gray-700); 
            border: 1px solid var(--gray-200);
        }
        .btn-secondary:hover { 
            background: var(--gray-200); 
        }
        .inline-editable {
            min-width: 120px;
            outline: none;
            cursor: text;
            border-radius: 6px;
            padding: 4px 6px;
            border: 1px solid transparent;
        }
        .inline-editable:focus {
            background: var(--gray-100);
            border: 1px solid var(--primary);
        }
        .inline-select {
            width: 100%;
            padding: 6px 8px;
            border: 1px solid var(--gray-200);
            border-radius: 6px;
            font-size: 14px;
            background: white;
        }
        .inline-select:focus {
            border-color: var(--primary);
            outline: none;
        }
        .inline-date {
            width: 100%;
            padding: 6px 8px;
            border: 1px solid var(--gray-200);
            border-radius: 6px;
            font-size: 14px;
            background: white;
        }
        .inline-date:focus {
            border-color: var(--primary);
            outline: none;
        }
        .amount-cell {
            text-align: right;
        }
        .notes-table td:nth-child(1) {
            min-width: 180px;
        }
        .notes-table td:nth-child(2) {
            min-width: 140px;
        }
        .notes-table td:nth-child(3) {
            min-width: 160px;
        }
        .notes-table td:nth-child(4),
        .notes-table td:nth-child(5) {
            width: 25%;
            white-space: pre-wrap;
        }
        .notes-table td:nth-child(6) {
            min-width: 170px;
        }
        .notes-table td:nth-child(7) {
            min-width: 140px;
        }
        .action-buttons {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
            align-items: center;
        }
        .pending-row {
            background: #fff7ed;
        }
        .action-buttons form {
            display: inline;
        }
        .action-btn {
            padding: 6px 12px;
            font-size: 12px;
            text-decoration: none;
        }
        
        /* Content */
        .content { display: none; padding: 32px; }
        .content.active { display: block; }
        
        /* Stats */
        .stats {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 20px;
            margin-bottom: 32px;
        }
        
        .stat-card {
            background: white;
            border-radius: 12px;
            padding: 24px;
            border: 1px solid var(--gray-200);
        }
        
        .stat-header {
            display: flex;
            justify-content: space-between;
            margin-bottom: 16px;
        }
        
        .stat-icon {
            width: 48px;
            height: 48px;
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 20px;
        }
        
        .stat-icon.primary { background: #eef2ff; color: var(--primary); }
        .stat-icon.success { background: #d1fae5; color: var(--success); }
        .stat-icon.warning { background: #fef3c7; color: var(--warning); }
        
        .stat-value {
            font-size: 32px;
            font-weight: 700;
            margin-bottom: 4px;
        }
        
        .stat-label {
            font-size: 14px;
            color: var(--gray-600);
        }
        .stat-subtext {
            margin-top: 4px;
            font-size: 12px;
            color: var(--gray-600);
        }
        .stat-edit-btn {
            margin-top: 12px;
            padding: 6px 10px;
            font-size: 12px;
            border-radius: 999px;
            border: 1px solid var(--gray-200);
            background: white;
            color: var(--gray-700);
            cursor: pointer;
            transition: all 0.2s ease;
        }
        .stat-edit-btn:hover {
            border-color: var(--primary);
            color: var(--primary);
        }
        
        /* Pipeline */
        .pipeline {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            gap: 20px;
            overflow-x: auto;
        }
        
        .pipeline-col {
            background: var(--gray-50);
            border-radius: 8px;
            padding: 16px;
            min-height: 400px;
        }
        
        .col-header {
            display: flex;
            justify-content: space-between;
            margin-bottom: 16px;
            padding-bottom: 12px;
            border-bottom: 2px solid var(--gray-200);
        }
        
        .col-title {
            font-weight: 600;
            font-size: 14px;
            text-transform: uppercase;
        }
        
        .col-count {
            background: white;
            padding: 2px 8px;
            border-radius: 12px;
            font-size: 12px;
            font-weight: 600;
        }
        
        .partner-card {
            background: white;
            border: 1px solid var(--gray-200);
            border-radius: 8px;
            padding: 14px;
            margin-bottom: 12px;
            cursor: pointer;
            transition: all 0.2s;
        }
        
        .partner-card:hover {
            box-shadow: 0 4px 12px rgba(0,0,0,0.1);
            border-color: var(--primary);
        }
        
        .partner-name {
            font-weight: 600;
            margin-bottom: 6px;
        }
        
        .partner-email {
            font-size: 12px;
            color: var(--gray-600);
        }
        
        .partner-amount {
            color: var(--success);
            font-weight: 600;
            margin-top: 8px;
        }
        
        /* Section */
        .section {
            background: white;
            border-radius: 12px;
            border: 1px solid var(--gray-200);
            margin-bottom: 24px;
        }
        
        .section-header {
            padding: 20px 24px;
            border-bottom: 1px solid var(--gray-200);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .section-title {
            font-size: 18px;
            font-weight: 600;
        }
        
        .empty-state {
            padding: 40px;
            text-align: center;
            background: var(--gray-50);
            border: 1px dashed var(--gray-300);
            border-radius: 12px;
            color: var(--gray-600);
            display: grid;
            gap: 8px;
            justify-items: center;
        }
        
        .empty-state i {
            font-size: 32px;
            color: var(--primary);
        }
        
        .empty-title {
            font-weight: 600;
            font-size: 16px;
            color: var(--gray-700);
        }
        
        .empty-message {
            font-size: 14px;
            color: var(--gray-600);
        }
        
        .section-body {
            padding: 24px;
        }
        
        /* Table */
        table {
            width: 100%;
            border-collapse: collapse;
        }
        
        th {
            text-align: left;
            padding: 12px;
            background: var(--gray-50);
            font-size: 12px;
            text-transform: uppercase;
            font-weight: 600;
            border-bottom: 1px solid var(--gray-200);
        }
        
        td {
            padding: 16px 12px;
            border-bottom: 1px solid var(--gray-100);
        }
        
        tr:hover {
            background: var(--gray-50);
        }
        
        /* Badge */
        .badge {
            display: inline-block;
            padding: 4px 10px;
            border-radius: 12px;
            font-size: 12px;
            font-weight: 600;
        }
        
        .badge-success { background: #d1fae5; color: #065f46; }
        .badge-warning { background: #fef3c7; color: #92400e; }
        .badge-info { background: #dbeafe; color: #1e40af; }
        
        /* Modal */
        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.5);
            z-index: 1000;
            align-items: center;
            justify-content: center;
        }
        
        .modal.active { display: flex; }
        
        .modal-content {
            background: white;
            border-radius: 12px;
            max-width: 600px;
            width: 90%;
            max-height: 90vh;
            overflow-y: auto;
        }
        
        .modal-header {
            padding: 24px;
            border-bottom: 1px solid var(--gray-200);
            display: flex;
            justify-content: space-between;
        }
        
        .modal-title {
            font-size: 20px;
            font-weight: 600;
        }
        
        .modal-close {
            background: none;
            border: none;
            font-size: 24px;
            cursor: pointer;
        }
        
        .modal-body {
            padding: 24px;
        }
        
        .form-group {
            margin-bottom: 20px;
        }
        
        .form-label {
            display: block;
            margin-bottom: 8px;
            font-weight: 600;
            font-size: 14px;
        }
        
        .form-control {
            width: 100%;
            padding: 10px 14px;
            border: 1px solid var(--gray-200);
            border-radius: 8px;
        }
        
        .form-control:focus {
            outline: none;
            border-color: var(--primary);
        }
        
        /* Charts */
        .charts {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
            gap: 24px;
            margin-top: 24px;
        }
        
        .chart-card {
            background: white;
            border-radius: 12px;
            padding: 24px;
            border: 1px solid var(--gray-200);
        }
        
        .chart-title {
            font-size: 16px;
            font-weight: 600;
            margin-bottom: 20px;
        }
        
        /* Uploads */
        .uploads-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 20px;
        }
        
        .upload-card {
            background: white;
            border: 1px solid var(--gray-200);
            border-radius: 12px;
            padding: 20px;
            display: flex;
            align-items: center;
            gap: 16px;
            transition: all 0.2s;
        }
        
        .upload-card:hover {
            box-shadow: 0 4px 12px rgba(0,0,0,0.1);
            border-color: var(--primary);
        }
        
        .upload-icon {
            width: 50px;
            height: 50px;
            border-radius: 10px;
            background: var(--gray-50);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 24px;
            color: var(--primary);
        }
        
        .upload-info {
            flex: 1;
            min-width: 0;
        }
        
        .upload-name {
            font-weight: 600;
            font-size: 14px;
            margin-bottom: 4px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        
        .upload-meta {
            font-size: 12px;
            color: var(--gray-600);
        }
        
        .upload-actions {
            display: flex;
            gap: 8px;
        }
        
        /* Mobile Styles */
        @media (max-width: 768px) {
            .mobile-toggle {
                display: flex;
            }
            
            .sidebar {
                transform: translateX(-260px);
            }
            
            .sidebar.visible {
                transform: translateX(0);
            }
            
            .main {
                margin-left: 0;
            }
            
            .header {
                padding: 16px;
                flex-wrap: wrap;
                gap: 12px;
                justify-content: flex-end;
            }
            
            .header-actions {
                order: 1;
                display: flex;
                gap: 8px;
                flex-wrap: wrap;
            }
            
            .header .btn {
                white-space: nowrap;
            }
            
            .header .search-bar {
                order: 3;
                flex: 1 1 100%;
                max-width: 100%;
                margin: 0;
            }
            
            .content {
                padding: 16px;
            }
            
            .section-header {
                padding: 16px;
                flex-direction: column;
                gap: 12px;
                align-items: stretch !important;
            }
            
            .section-header > div {
                width: 100%;
            }
            
            .section-header > div[style*="display: flex"] {
                flex-direction: column;
                width: 100% !important;
            }
            
            .section-header select {
                width: 100% !important;
            }
            
            .section-header .btn {
                width: 100%;
                justify-content: center;
            }
            
            .section-body {
                padding: 16px;
                overflow-x: auto;
            }
            
            /* Make tables scrollable on mobile */
            table {
                min-width: 800px;
            }
            
            .stats {
                grid-template-columns: 1fr;
            }
            
            .action-buttons {
                flex-direction: column;
                gap: 4px;
            }
            
            .action-btn {
                width: 100%;
                justify-content: center;
            }
            
            .btn {
                font-size: 13px;
                padding: 8px 14px;
            }
            
            .charts {
                grid-template-columns: 1fr;
            }
        }
