* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #f5f5f7; color: #1d1d1f; line-height: 1.5; }
.container { max-width: 1100px; margin: 0 auto; padding: 20px; }

/* Header */
.header { background: linear-gradient(135deg, #1a1a2e, #16213e); color: white; padding: 30px; border-radius: 16px; margin-bottom: 24px; }
.header h1 { font-size: 24px; font-weight: 700; margin-bottom: 4px; }
.header .subtitle { color: #a0a0b0; font-size: 14px; }
.stats-row { display: flex; gap: 20px; margin-top: 16px; flex-wrap: wrap; }
.stat-box { background: rgba(255,255,255,0.08); padding: 12px 16px; border-radius: 10px; min-width: 120px; }
.stat-box .num { font-size: 28px; font-weight: 700; color: #4fc3f7; }
.stat-box .label { font-size: 12px; color: #a0a0b0; text-transform: uppercase; letter-spacing: 0.5px; }

/* Intro text */
.intro-text { background: #f0f4ff; border-radius: 10px; padding: 12px 16px; margin-bottom: 16px; font-size: 13px; color: #444; line-height: 1.5; }
.intro-text p { margin: 0; }

/* Filters */
.filters { background: white; padding: 16px 20px; border-radius: 12px; margin-bottom: 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.filter-group { display: flex; align-items: center; gap: 6px; }
.filter-group label { font-size: 13px; font-weight: 600; color: #666; }
.filter-group select, .filter-group input { padding: 6px 10px; border: 1px solid #ddd; border-radius: 8px; font-size: 13px; background: #fafafa; }
.filter-group input[type="text"] { width: 180px; }
.filter-btn { padding: 6px 14px; border: 1px solid #ddd; border-radius: 8px; font-size: 13px; cursor: pointer; background: #fafafa; transition: all 0.15s; }
.filter-btn:hover { background: #e8e8e8; }
.filter-btn.active { background: #1a1a2e; color: white; border-color: #1a1a2e; }

/* Tabs */
.tabs { display: flex; gap: 4px; margin-bottom: 16px; }
.tab { padding: 8px 16px; border-radius: 8px; font-size: 14px; cursor: pointer; border: none; background: white; color: #666; font-weight: 500; transition: all 0.15s; }
.tab:hover { background: #e8e8e8; }
.tab.active { background: #1a1a2e; color: white; }
.tab .count { background: rgba(255,255,255,0.2); padding: 1px 7px; border-radius: 10px; font-size: 12px; margin-left: 4px; }

/* Role cards */
.role-card { background: white; border-radius: 12px; padding: 16px 20px; margin-bottom: 10px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); border-left: 4px solid transparent; transition: all 0.15s; }
.role-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.role-card.top-pick { border-left-color: #4caf50; }
.role-card.watchlist { border-left-color: #ff9800; }
.role-card.selected { border-left-color: #2196f3; background: #f0f7ff; }
.badge-new { background: #e3f2fd; color: #1565c0; font-size: 10px; font-weight: 700; letter-spacing: 0.5px; }

.role-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.role-title { font-size: 16px; font-weight: 600; color: #1d1d1f; }
.role-company { font-size: 14px; color: #666; margin-top: 2px; }
.role-meta { display: flex; gap: 12px; margin-top: 8px; flex-wrap: wrap; }
.role-meta span { font-size: 12px; color: #888; display: flex; align-items: center; gap: 4px; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 600; }
.badge-score { background: #e8f5e9; color: #2e7d32; }
.badge-score.high { background: #c8e6c9; }
.badge-source { background: #f3e5f5; color: #7b1fa2; }
.badge-category { background: #fff3e0; color: #e65100; }

.role-reasons { margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; }
.reason-tag { background: #f0f0f0; color: #555; padding: 2px 8px; border-radius: 4px; font-size: 11px; }

.role-actions { margin-top: 10px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.btn { padding: 6px 14px; border-radius: 8px; font-size: 13px; cursor: pointer; border: 1px solid #ddd; background: white; transition: all 0.15s; text-decoration: none; color: #333; display: inline-block; }
.btn:hover { background: #f0f0f0; }
.btn-primary { background: #1a1a2e; color: white; border-color: #1a1a2e; }
.btn-primary:hover { background: #2a2a4e; }
.btn-select { background: white; }
.btn-select.selected { background: #2196f3; color: white; border-color: #2196f3; }

.description { font-size: 13px; color: #888; margin-top: 8px; max-height: 0; overflow: hidden; transition: max-height 0.3s; }
.description.open { max-height: 200px; }

/* Watchlist panel */
.watchlist-panel { background: white; border-radius: 12px; padding: 20px; margin-bottom: 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.watchlist-panel h3 { font-size: 16px; margin-bottom: 12px; }
.watchlist-item { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid #f0f0f0; }
.watchlist-item:last-child { border-bottom: none; }
.watchlist-item .company { font-weight: 500; }
.watchlist-item .status { font-size: 13px; color: #888; }
.watchlist-item .status.has-roles { color: #2e7d32; font-weight: 500; }

/* Selection bar */
.selection-bar { position: fixed; bottom: 0; left: 0; right: 0; background: #1a1a2e; color: white; padding: 12px 20px; display: none; align-items: center; justify-content: space-between; z-index: 100; box-shadow: 0 -2px 10px rgba(0,0,0,0.2); }
.selection-bar.visible { display: flex; }
.selection-bar .count { font-weight: 700; }
.selection-bar .actions { display: flex; gap: 8px; }
.selection-bar .btn { background: rgba(255,255,255,0.15); color: white; border-color: rgba(255,255,255,0.3); }
.selection-bar .btn:hover { background: rgba(255,255,255,0.25); }

/* Manual checks */
.manual-list { list-style: none; }
.manual-list li { padding: 6px 0; font-size: 14px; }
.manual-list a { color: #1565c0; text-decoration: none; }
.manual-list a:hover { text-decoration: underline; }

/* Loading state */
.loading { text-align: center; padding: 60px; color: #999; }
.loading .spinner { display: inline-block; width: 40px; height: 40px; border: 3px solid #e0e0e0; border-top-color: #1a1a2e; border-radius: 50%; animation: spin 0.8s linear infinite; margin-bottom: 16px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Empty state */
.empty { text-align: center; padding: 40px; color: #999; }

/* Coach dashboard */
.scan-list { list-style: none; }
.scan-card { background: white; border-radius: 12px; padding: 20px; margin-bottom: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); display: flex; justify-content: space-between; align-items: center; transition: all 0.15s; cursor: pointer; text-decoration: none; color: inherit; }
.scan-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.1); transform: translateY(-1px); }
.scan-card .name { font-size: 18px; font-weight: 600; }
.scan-card .date { font-size: 14px; color: #888; margin-top: 2px; }
.scan-card .stats { text-align: right; }
.scan-card .stat-pill { display: inline-block; padding: 4px 10px; border-radius: 8px; font-size: 12px; font-weight: 600; margin-left: 6px; }
.scan-card .stat-roles { background: #e8f5e9; color: #2e7d32; }
.scan-card .stat-selected { background: #e3f2fd; color: #1565c0; }
.scan-card .stat-picks { background: #fff3e0; color: #e65100; }

/* Feedback buttons */
.feedback-group { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; }
.feedback-label { font-size: 12px; color: #888; margin-right: 2px; }
.btn-feedback { padding: 4px 10px; font-size: 11px; border-radius: 6px; background: #f5f5f5; border: 1px solid #e0e0e0; cursor: pointer; transition: all 0.15s; line-height: 1.4; font-weight: 500; }
.btn-feedback:hover { background: #e8e8e8; }
.btn-feedback.active.good { background: #c8e6c9; border-color: #4caf50; color: #2e7d32; }
.btn-feedback.active.maybe { background: #fff9c4; border-color: #ffc107; color: #f57f17; }
.btn-feedback.active.bad { background: #ffcdd2; border-color: #f44336; color: #c62828; }

/* Notes input */
.notes-input { width: 100%; padding: 6px 10px; border: 1px solid #ddd; border-radius: 8px; font-size: 12px; margin-top: 6px; font-family: inherit; resize: none; }
.notes-input:focus { outline: none; border-color: #2196f3; }

/* Dismissed roles section */
.dismissed-section { margin-top: 20px; margin-bottom: 20px; }
.dismissed-toggle { background: #f5f5f5; border: 1px solid #e0e0e0; border-radius: 10px; padding: 10px 16px; font-size: 14px; font-weight: 500; color: #666; cursor: pointer; width: 100%; text-align: left; transition: all 0.15s; }
.dismissed-toggle:hover { background: #eee; }
.role-card.dismissed { opacity: 0.6; border-left-color: #e0e0e0; }
.role-card.dismissed:hover { opacity: 0.85; }

/* Landing page */
.landing-card { background: white; border-radius: 12px; padding: 40px; margin-bottom: 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); text-align: center; }
.landing-card h2 { font-size: 20px; font-weight: 600; color: #1d1d1f; margin-bottom: 12px; }
.landing-card p { font-size: 15px; color: #666; max-width: 500px; margin: 0 auto; }

/* Breadcrumbs */
.breadcrumb { display: flex; align-items: center; gap: 6px; margin-bottom: 16px; font-size: 13px; flex-wrap: wrap; }
.breadcrumb a { color: #1565c0; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep { color: #bbb; }
.breadcrumb .current { color: #666; font-weight: 500; }

/* Footer */
.site-footer { text-align: center; padding: 24px; font-size: 12px; color: #999; letter-spacing: 0.5px; }

/* Responsive */
@media (max-width: 768px) {
    .stats-row { gap: 10px; }
    .stat-box { min-width: 80px; padding: 8px 12px; }
    .stat-box .num { font-size: 22px; }
    .filters { flex-direction: column; }
    .role-header { flex-direction: column; }
    .scan-card { flex-direction: column; align-items: flex-start; gap: 8px; }
    .scan-card .stats { text-align: left; }
}

@media (max-width: 640px) {
    .container { padding: 12px; }
    .filters { flex-wrap: wrap; gap: 8px; }
    .filter-group { flex: 1 1 calc(50% - 4px); min-width: 120px; }
    .filter-group input, .filter-group select { width: 100%; }
    .role-header { flex-direction: column; gap: 8px; }
    .role-actions { flex-wrap: wrap; gap: 6px; }
    .feedback-group { flex-wrap: wrap; width: 100%; }
    .stats-row { flex-wrap: wrap; }
    .stat-box { flex: 1 1 calc(50% - 8px); }
    .tabs { flex-wrap: wrap; }
    .selection-bar { flex-direction: column; gap: 8px; text-align: center; }
}
