:root{--primary: #7c5cfc;--primary-light: #ece8ff;--green: #3ecf8e;--red: #e74c3c;--orange: #f39c12;--bg: #f5f6fa;--card: #fff;--text: #333;--text-light: #777;--border: #e8e8e8;--sidebar-w: 240px}*{box-sizing:border-box;margin:0;padding:0}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;background:var(--bg);color:var(--text)}.login-screen{display:flex;align-items:center;justify-content:center;min-height:100vh}.login-box{background:var(--card);border-radius:16px;box-shadow:0 4px 24px #0000001a;width:400px;max-width:90vw;overflow:hidden}.login-box-header{background:linear-gradient(135deg,#7c5cfc,#5b3fe0);padding:28px 40px 24px;text-align:center}.login-box-wordmark{font-size:26px;font-weight:800;letter-spacing:-1px;color:#fff;display:block;margin-bottom:6px}.login-box-subtitle{font-size:13px;color:#ffffffbf;font-weight:400}.login-box-body{padding:28px 40px 32px}.login-box h1,.login-box p{display:none}.login-box-body .login-tabs,.login-tabs{display:flex;gap:8px;margin-bottom:20px}.login-tabs button{flex:1;padding:10px;border:2px solid var(--border);background:var(--card);border-radius:8px;cursor:pointer;font-size:14px;font-weight:500}.login-tabs button.active{border-color:var(--primary);color:var(--primary);background:var(--primary-light)}label{display:block;font-size:13px;font-weight:500;margin-bottom:4px;color:var(--text-light)}input,select,textarea{width:100%;padding:10px 12px;border:1px solid var(--border);border-radius:8px;font-size:14px;margin-bottom:12px}input:focus,select:focus,textarea:focus{outline:none;border-color:var(--primary);box-shadow:0 0 0 3px #7c5cfc26}.btn{padding:10px 20px;border:none;border-radius:8px;font-size:14px;font-weight:500;cursor:pointer;transition:.15s}.btn-primary{background:var(--primary);color:#fff}.btn-primary:hover{opacity:.9}.btn-green{background:var(--green);color:#fff}.btn-red{background:var(--red);color:#fff}.btn-sm{padding:6px 12px;font-size:12px}.btn-outline{background:transparent;border:1px solid var(--border);color:var(--text)}.btn-outline:hover{background:var(--bg)}.error-msg{color:var(--red);font-size:13px;margin-bottom:12px}.app{display:flex;min-height:100vh}.sidebar{width:var(--sidebar-w);background:var(--card);border-right:1px solid var(--border);padding:20px 0;position:fixed;top:0;left:0;bottom:0;overflow-y:auto}.sidebar-brand{padding:20px 20px 4px}.sidebar-wordmark{font-size:22px;font-weight:800;letter-spacing:-1px;color:var(--primary);display:block;line-height:1}.sidebar-product{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.8px;color:var(--text-light);margin-top:3px;display:block}.sidebar h2{display:none}.sidebar .role-label{padding:0 20px;font-size:12px;color:var(--text-light);margin-bottom:20px;margin-top:16px}.sidebar nav a{display:flex;align-items:center;gap:10px;padding:10px 20px;color:var(--text);text-decoration:none;font-size:14px;border-left:3px solid transparent;transition:.15s}.sidebar nav a:hover{background:var(--bg)}.sidebar nav a.active{border-left-color:var(--primary);background:var(--primary-light);color:var(--primary);font-weight:500}.sidebar .badge{background:var(--red);color:#fff;font-size:11px;padding:2px 7px;border-radius:10px;margin-left:auto}.sidebar .logout{margin-top:20px;padding:0 20px}.main{margin-left:var(--sidebar-w);flex:1;padding:24px}.stats-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:16px;margin-bottom:24px}.stat-card{background:var(--card);padding:20px;border-radius:10px;box-shadow:0 1px 4px #0000000d}.stat-card .value{font-size:28px;font-weight:700;color:var(--primary)}.stat-card .label{font-size:13px;color:var(--text-light);margin-top:4px}.table-wrap{background:var(--card);border-radius:10px;box-shadow:0 1px 4px #0000000d;overflow-x:auto}table{width:100%;border-collapse:collapse}th{text-align:left;padding:12px 16px;font-size:12px;text-transform:uppercase;color:var(--text-light);border-bottom:2px solid var(--border)}td{padding:12px 16px;font-size:14px;border-bottom:1px solid var(--border)}tr:hover{background:#fafafa}.status-badge{display:inline-block;padding:3px 10px;border-radius:12px;font-size:12px;font-weight:500}.status-new{background:#e3f2fd;color:#1976d2}.status-matched{background:#e8f5e9;color:#388e3c}.status-contacted{background:#fff3e0;color:#f57c00}.status-won{background:#e8f5e9;color:#2e7d32}.status-lost{background:#fce4ec;color:#c62828}.status-archived{background:#f0f0f0;color:#888}.status-pending{background:#fff3e0;color:#f57c00}.status-approved{background:#e8f5e9;color:#388e3c}.status-rejected{background:#fce4ec;color:#c62828}.toolbar{display:flex;gap:12px;margin-bottom:16px;align-items:center;flex-wrap:wrap}.toolbar h2{font-size:20px;margin-right:auto}.search-input{width:250px;margin-bottom:0}.filter-select{width:160px;margin-bottom:0}.panel{background:var(--card);border-radius:10px;box-shadow:0 1px 4px #0000000d;padding:24px;margin-bottom:24px}.panel h3{margin-bottom:16px;font-size:18px}.field-row{display:flex;gap:16px;margin-bottom:12px}.field-row .field{flex:1}.field-label{font-size:12px;color:var(--text-light);margin-bottom:2px}.field-value{font-size:14px}.match-card{background:var(--bg);border-radius:8px;padding:16px;margin-bottom:12px;border-left:4px solid var(--green)}.match-card .rank{font-size:12px;color:var(--text-light);text-transform:uppercase}.match-card .expert-name{font-weight:600;font-size:16px}.match-card .score{color:var(--green);font-weight:600}.match-card .reasoning{font-size:14px;color:var(--text-light);margin-top:8px}.reviews-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:16px}.review-card{background:#fff;border-radius:12px;padding:20px;cursor:pointer;transition:box-shadow .15s,transform .15s;border:1px solid var(--border)}.reviews-pagination{display:flex;align-items:center;justify-content:center;gap:8px;margin-top:20px}.reviews-pagination button{min-width:36px;height:36px;border-radius:8px;border:1px solid var(--border);background:#fff;cursor:pointer;font-size:14px;transition:.15s}.reviews-pagination button:hover{background:var(--bg)}.reviews-pagination button.active{background:var(--primary);color:#fff;border-color:var(--primary)}.reviews-pagination button:disabled{opacity:.4;cursor:default}.reviews-pagination span{font-size:13px;color:var(--text-light)}.review-card:hover{box-shadow:0 4px 12px #00000014;transform:translateY(-1px)}.review-card .stars{color:#f5a623;font-size:16px}.review-card .headline{font-weight:600;margin:4px 0;font-size:15px}.review-card .meta{font-size:12px;color:var(--text-light)}.review-card .review-preview{font-size:13px;color:var(--text);margin:10px 0 0;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;line-height:1.5}.review-expanded{position:fixed;top:0;left:0;right:0;bottom:0;background:#0006;z-index:1000;display:flex;align-items:center;justify-content:center;padding:24px}.review-expanded-inner{background:#fff;border-radius:16px;padding:32px;max-width:600px;width:100%;max-height:80vh;overflow-y:auto;box-shadow:0 20px 60px #0003}.review-expanded-inner .stars{color:#f5a623;font-size:20px}.review-expanded-inner .headline{font-weight:600;font-size:18px;margin:8px 0}.review-expanded-inner .meta{font-size:13px;color:var(--text-light);margin-bottom:16px}.review-expanded-inner .review-full{font-size:15px;line-height:1.6;margin:16px 0}.review-expanded-inner .review-details{font-size:13px;color:var(--text-light);margin:12px 0;display:flex;gap:16px;flex-wrap:wrap}.report-composer{display:flex;flex-direction:column;gap:16px}.report-composer textarea{width:100%;min-height:80px;border:1px solid var(--border);border-radius:8px;padding:12px;font-size:14px;font-family:inherit;resize:vertical}.report-composer textarea:focus{outline:none;border-color:var(--primary);box-shadow:0 0 0 3px #4361ee1f}.report-date-row{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.report-date-row label{font-size:13px;color:var(--text-light)}.report-date-row input[type=date]{border:1px solid var(--border);border-radius:6px;padding:6px 10px;font-size:13px}.report-actions{display:flex;gap:10px;align-items:center}.report-output{margin-top:20px}.report-output .report-rendered{background:#fff;border:1px solid var(--border);border-radius:10px;padding:28px 32px;line-height:1.6}.report-output .report-rendered h2{font-size:22px;margin:0 0 16px;color:#1a1a2e}.report-output .report-rendered h3{font-size:17px;margin:24px 0 12px;color:#333;border-bottom:1px solid #eee;padding-bottom:6px}.report-output .report-rendered table{width:100%;border-collapse:collapse;margin:12px 0}.report-output .report-rendered th,.report-output .report-rendered td{padding:8px 12px;border-bottom:1px solid #e5e7eb;text-align:left;font-size:13px}.report-output .report-rendered th{font-weight:600;color:var(--text-light);text-transform:uppercase;font-size:11px}.report-output .report-rendered tr:hover{background:#fafafa}.report-output .report-rendered ul{padding-left:20px}.report-output .report-rendered li{margin-bottom:6px;font-size:14px}.saved-reports-list{margin-top:24px}.saved-report-item{display:flex;align-items:center;gap:12px;padding:12px 16px;border:1px solid var(--border);border-radius:8px;margin-bottom:8px;cursor:pointer;transition:.15s}.saved-report-item:hover{background:var(--bg);border-color:var(--primary)}.saved-report-item .report-title{flex:1;font-weight:500;font-size:14px}.saved-report-item .report-date{font-size:12px;color:var(--text-light)}.saved-report-item .report-range{font-size:11px;color:var(--text-light);background:var(--bg);padding:2px 8px;border-radius:4px}.saved-report-item .delete-report{color:var(--red);border:none;background:none;cursor:pointer;font-size:16px;padding:4px 8px;border-radius:4px}.saved-report-item .delete-report:hover{background:#fce4ec}.report-loading{display:flex;align-items:center;gap:10px;padding:20px;color:var(--text-light);font-size:14px}.report-loading .spinner{width:20px;height:20px;border:2px solid var(--border);border-top-color:var(--primary);border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.report-suggestions{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}.report-suggestions button{background:var(--bg);border:1px solid var(--border);border-radius:6px;padding:6px 12px;font-size:12px;cursor:pointer;color:var(--text);transition:.15s}.report-suggestions button:hover{border-color:var(--primary);color:var(--primary);background:var(--primary-light)}.profile-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}@media (max-width: 768px){.profile-grid{grid-template-columns:1fr}}.section{display:none}.section.active{display:block}tr.clickable{cursor:pointer}th.sortable{cursor:pointer;-webkit-user-select:none;user-select:none;white-space:nowrap}th.sortable:hover{color:var(--primary)}th.sortable:after{content:" ↕";font-size:10px;opacity:.3}th.sortable.asc:after{content:" ↑";opacity:.7}th.sortable.desc:after{content:" ↓";opacity:.7}.back-link{color:var(--primary);text-decoration:none;font-size:14px;display:inline-block;margin-bottom:16px}.back-link:hover{text-decoration:underline}.edit-modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:#0006;z-index:1000;display:flex;align-items:center;justify-content:center;animation:fadeIn .15s}.edit-modal{background:#fff;border-radius:16px;padding:28px;width:480px;max-width:90vw;max-height:85vh;overflow-y:auto;box-shadow:0 8px 40px #00000026;animation:slideUp .2s}.edit-modal h3{font-size:18px;margin:0 0 20px;color:#222}.edit-modal label{font-size:13px;font-weight:500;color:#666;margin-bottom:4px;display:block}.edit-modal input,.edit-modal select,.edit-modal textarea{width:100%;padding:10px 12px;border:1px solid #ddd;border-radius:8px;font-size:14px;margin-bottom:14px;font-family:inherit}.edit-modal input:focus,.edit-modal select:focus,.edit-modal textarea:focus{outline:none;border-color:#00a898;box-shadow:0 0 0 3px #00a8981f}.edit-modal textarea{resize:vertical;min-height:100px}.edit-modal-btns{display:flex;gap:8px;justify-content:flex-end;margin-top:4px}.edit-modal-btns .btn{min-width:80px}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes slideUp{0%{transform:translateY(16px);opacity:0}to{transform:translateY(0);opacity:1}}.editable{position:relative;cursor:pointer;transition:background .15s;border-radius:8px}.editable:hover{background:#f8f8f8}.editable:after{content:"";position:absolute;top:8px;right:8px;width:24px;height:24px;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7'/%3E%3Cpath d='M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z'/%3E%3C/svg%3E") center/16px no-repeat;opacity:0;transition:opacity .15s;border-radius:4px}.editable:hover:after{opacity:1}.chat-fab{position:fixed;bottom:24px;right:24px;width:56px;height:56px;border-radius:50%;background:#00a898;color:#fff;border:none;cursor:pointer;box-shadow:0 4px 16px #00a89859;display:flex;align-items:center;justify-content:center;z-index:900;transition:transform .15s}.chat-fab:hover{transform:scale(1.08)}.chat-fab svg{width:24px;height:24px}.chat-panel{position:fixed;bottom:92px;right:24px;width:420px;max-width:calc(100vw - 48px);height:520px;max-height:calc(100vh - 120px);background:#fff;border-radius:16px;box-shadow:0 8px 40px #00000026;z-index:900;display:none;flex-direction:column;overflow:hidden}.chat-panel.open{display:flex;animation:slideUp .2s}.chat-header{padding:16px 20px;background:#00a898;color:#fff;font-weight:600;font-size:15px;display:flex;align-items:center;justify-content:space-between;flex-shrink:0}.chat-header button{background:none;border:none;color:#fff;cursor:pointer;font-size:20px;opacity:.7}.chat-header button:hover{opacity:1}.chat-messages{flex:1;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:12px}.chat-msg{max-width:85%;padding:10px 14px;border-radius:12px;font-size:14px;line-height:1.6;word-wrap:break-word}.chat-msg.user{align-self:flex-end;background:#00a898;color:#fff;border-bottom-right-radius:4px}.chat-msg.assistant{align-self:flex-start;background:#f5f5f5;color:#333;border-bottom-left-radius:4px}.chat-msg.assistant table{width:100%;border-collapse:collapse;margin:8px 0;font-size:13px}.chat-msg.assistant th,.chat-msg.assistant td{padding:4px 8px;border-bottom:1px solid #ddd;text-align:left}.chat-msg.assistant th{font-weight:600;font-size:12px;color:#666}.chat-msg.assistant code{background:#e8e8e8;padding:1px 4px;border-radius:3px;font-size:13px}.chat-msg.typing{color:#999;font-style:italic}.chat-input-wrap{padding:12px 16px;border-top:1px solid #eee;display:flex;gap:8px;flex-shrink:0}.chat-input-wrap input{flex:1;padding:10px 14px;border:1px solid #ddd;border-radius:24px;font-size:14px;outline:none;font-family:inherit}.chat-input-wrap input:focus{border-color:#00a898}.chat-input-wrap button{width:40px;height:40px;border-radius:50%;background:#00a898;color:#fff;border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0}.chat-input-wrap button:disabled{opacity:.4;cursor:not-allowed}.help-content{max-width:800px}.help-content h2{font-size:22px;margin:0 0 20px}.help-section{background:var(--card);border-radius:12px;padding:24px;margin-bottom:16px;border:1px solid var(--border)}.help-section h3{font-size:16px;margin:0 0 12px;color:var(--primary)}.help-section p,.help-section li{font-size:14px;line-height:1.7;color:#555}.help-section ul{padding-left:20px;margin:8px 0}.help-section li{margin-bottom:6px}.help-section strong{color:var(--text)}.help-section code{background:#f5f5f5;padding:2px 6px;border-radius:4px;font-size:13px}.help-q{font-weight:600;color:var(--text);margin-bottom:4px}.help-a{margin-bottom:16px;color:#555;font-size:14px;line-height:1.7}.help-a:last-child{margin-bottom:0}
