
    :root {
      --primary: #2563eb; --primary-dark: #1d4ed8; --success: #10b981; --warning: #f59e0b; --danger: #ef4444;
      --purple: #8b5cf6; --bg: #f8fafc; --card: #ffffff; --text: #0f172a; --text-secondary: #64748b;
      --border: #e2e8f0; --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1); --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    }
    * { margin: 0; padding: 0; box-sizing: border-box; }
    body { font-family: 'Inter', sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; }
    .app { display: flex; min-height: 100vh; }
    .sidebar { width: 260px; background: var(--card); border-right: 1px solid var(--border); position: fixed; height: 100vh; overflow-y: auto; z-index: 100; }
    .main { flex: 1; margin-left: 260px; padding: 24px 32px; max-width: calc(100% - 260px); }
    .logo { padding: 24px; border-bottom: 1px solid var(--border); }
    .logo h1 { font-size: 20px; font-weight: 800; color: var(--primary); display: flex; align-items: center; gap: 10px; }
    .logo p { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }
    .nav { padding: 16px 12px; }
    .nav-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 10px; cursor: pointer; transition: all 0.2s; color: var(--text-secondary); font-weight: 500; font-size: 14px; margin-bottom: 4px; }
    .nav-item:hover { background: #f1f5f9; color: var(--text); }
    .nav-item.active { background: #eff6ff; color: var(--primary); }
    .nav-item i { width: 20px; text-align: center; }
    .role-badge { margin: 16px; padding: 10px 16px; border-radius: 8px; font-size: 12px; font-weight: 600; text-align: center; }
    .role-broker { background: #dbeafe; color: #1e40af; }
    .role-partner { background: #fef3c7; color: #92400e; }
    .topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
    .topbar h2 { font-size: 24px; font-weight: 700; }
    .topbar-actions { display: flex; gap: 12px; }
    .btn { padding: 10px 18px; border-radius: 10px; border: none; font-weight: 600; font-size: 14px; cursor: pointer; transition: all 0.2s; display: inline-flex; align-items: center; gap: 8px; }
    .btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); }
    .btn-primary { background: var(--primary); color: white; }
    .btn-primary:hover { background: var(--primary-dark); }
    .btn-success { background: var(--success); color: white; }
    .btn-outline { background: white; border: 2px solid var(--border); color: var(--text); }
    .btn-danger { background: #fee2e2; color: #991b1b; }
    .btn-sm { padding: 6px 12px; font-size: 13px; }
    .stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 28px; }
    .stat-card { background: var(--card); padding: 24px; border-radius: 16px; box-shadow: var(--shadow); border: 1px solid var(--border); }
    .stat-header { display: flex; justify-content: space-between; align-items: start; margin-bottom: 12px; }
    .stat-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; }
    .stat-icon.blue { background: #dbeafe; color: var(--primary); }
    .stat-icon.green { background: #d1fae5; color: var(--success); }
    .stat-icon.orange { background: #fef3c7; color: var(--warning); }
    .stat-icon.purple { background: #ede9fe; color: var(--purple); }
    .stat-value { font-size: 28px; font-weight: 800; color: var(--text); }
    .stat-label { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }
    .pipeline { display: flex; gap: 16px; margin-bottom: 28px; overflow-x: auto; padding-bottom: 8px; }
    .pipeline-stage { flex: 1; min-width: 160px; background: var(--card); border: 2px solid var(--border); border-radius: 16px; padding: 20px; cursor: pointer; transition: all 0.2s; position: relative; }
    .pipeline-stage:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
    .pipeline-stage.active { border-color: var(--primary); background: #eff6ff; }
    .pipeline-stage .count { position: absolute; top: 12px; right: 12px; background: var(--primary); color: white; width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
    .pipeline-stage .stage-name { font-weight: 700; font-size: 14px; margin-bottom: 4px; }
    .pipeline-stage .stage-desc { font-size: 12px; color: var(--text-secondary); }
    .deals-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 20px; }
    .deal-card { background: var(--card); border-radius: 16px; border: 1px solid var(--border); box-shadow: var(--shadow); overflow: hidden; transition: all 0.2s; }
    .deal-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
    .deal-header { padding: 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: start; }
    .deal-title { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
    .deal-subtitle { font-size: 13px; color: var(--text-secondary); }
    .deal-status { padding: 4px 12px; border-radius: 20px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
    .status-inquiry { background: #dbeafe; color: #1e40af; }
    .status-found { background: #fef3c7; color: #92400e; }
    .status-pricing { background: #fce7f3; color: #9d174d; }
    .status-shipment { background: #e0e7ff; color: #3730a3; }
    .status-complete { background: #d1fae5; color: #065f46; }
    .status-cancelled { background: #fee2e2; color: #991b1b; }
    .deal-body { padding: 20px; }
    .deal-field { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #f1f5f9; font-size: 13px; }
    .deal-field:last-child { border-bottom: none; }
    .deal-field-label { color: var(--text-secondary); font-weight: 500; }
    .deal-field-value { font-weight: 600; }
    .masked { background: #1e293b; color: transparent; border-radius: 4px; padding: 2px 8px; user-select: none; font-family: monospace; }
    .profit-section { background: linear-gradient(135deg, #059669, #10b981); color: white; padding: 16px 20px; margin: 0 20px 20px; border-radius: 12px; }
    .profit-section .profit-label { font-size: 12px; opacity: 0.9; text-transform: uppercase; letter-spacing: 1px; }
    .profit-section .profit-value { font-size: 24px; font-weight: 800; margin-top: 4px; }
    .deal-actions { padding: 0 20px 20px; display: flex; gap: 8px; }
    .deal-actions .btn { flex: 1; justify-content: center; }
    .modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 1000; display: none; align-items: center; justify-content: center; backdrop-filter: blur(4px); }
    .modal-overlay.show { display: flex; }
    .modal { background: var(--card); border-radius: 20px; width: 90%; max-width: 560px; max-height: 90vh; overflow-y: auto; box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25); }
    .modal-header { padding: 24px 28px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
    .modal-header h3 { font-size: 18px; font-weight: 700; }
    .modal-close { width: 36px; height: 36px; border-radius: 10px; border: none; background: #f1f5f9; cursor: pointer; font-size: 18px; color: var(--text-secondary); }
    .modal-body { padding: 24px 28px; }
    .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
    .form-group { margin-bottom: 16px; }
    .form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text); }
    .form-group input, .form-group select, .form-group textarea { width: 100%; padding: 10px 14px; border: 2px solid var(--border); border-radius: 10px; font-size: 14px; font-family: inherit; transition: border-color 0.2s; background: white; }
    .form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--primary); }
    .form-group textarea { resize: vertical; min-height: 80px; }
    .security-banner { background: linear-gradient(90deg, #fef3c7, #fde68a); border: 1px solid #f59e0b; border-radius: 12px; padding: 16px 20px; margin-bottom: 24px; display: flex; align-items: center; gap: 12px; }
    .security-banner i { font-size: 20px; color: #92400e; }
    .security-banner div { font-size: 14px; color: #92400e; }
    .security-banner strong { display: block; margin-bottom: 2px; }
    .empty-state { text-align: center; padding: 80px 20px; }
    .empty-state i { font-size: 64px; color: #cbd5e1; margin-bottom: 20px; }
    .empty-state h3 { font-size: 20px; color: var(--text); margin-bottom: 8px; }
    .empty-state p { color: var(--text-secondary); }
    .task-card { background: #f0fdf4; border: 2px solid #bbf7d0; border-radius: 12px; padding: 16px; margin-top: 16px; }
    .task-card h4 { color: #166534; font-size: 14px; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
    .task-card p { color: #374151; font-size: 13px; }
    .toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 2000; display: flex; flex-direction: column; gap: 8px; }
    .toast { background: var(--text); color: white; padding: 14px 20px; border-radius: 12px; font-size: 14px; font-weight: 500; box-shadow: var(--shadow-lg); animation: fadeIn 0.3s ease-out; display: flex; align-items: center; gap: 10px; }
    .toast.success { background: var(--success); }
    .toast.error { background: var(--danger); }
    .search-bar { display: flex; gap: 12px; margin-bottom: 24px; }
    .search-input { flex: 1; padding: 12px 16px; border: 2px solid var(--border); border-radius: 12px; font-size: 14px; font-family: inherit; }
    .search-input:focus { outline: none; border-color: var(--primary); }
    .data-actions { display: flex; gap: 8px; margin-bottom: 20px; }
    .login-screen { position: fixed; inset: 0; background: linear-gradient(135deg, #1e3a8a, #2563eb); display: flex; align-items: center; justify-content: center; z-index: 3000; }
    .login-box { background: var(--card); padding: 48px; border-radius: 24px; width: 90%; max-width: 420px; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25); }
    .login-box h2 { font-size: 28px; margin-bottom: 8px; }
    .login-box p { color: var(--text-secondary); margin-bottom: 32px; }
    .login-box .form-group { margin-bottom: 20px; }
    .login-box input { padding: 14px; font-size: 16px; }
    .login-box button { width: 100%; padding: 14px; font-size: 16px; }
    .offline-badge { position: fixed; top: 20px; right: 20px; background: var(--warning); color: white; padding: 8px 16px; border-radius: 8px; font-size: 12px; font-weight: 600; z-index: 500; display: none; }
    @keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
    .animate-in { animation: fadeIn 0.3s ease-out; }
    @media (max-width: 1024px) { .sidebar { transform: translateX(-100%); transition: transform 0.3s; } .sidebar.open { transform: translateX(0); } .main { margin-left: 0; max-width: 100%; } .stats-grid { grid-template-columns: repeat(2, 1fr); } .deals-grid { grid-template-columns: 1fr; } }
