/* ── Reset & Variables ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg:        #0a0e1a;
    --surface:   #111827;
    --surface2:  #1e2538;
    --surface3:  #252d42;
    --border:    #2a3350;
    --border2:   #3a4565;
    --accent:    #7c5cfc;
    --accent2:   #a78bfa;
    --accent-bg: rgba(124, 92, 252, 0.12);
    --blue:      #3b82f6;
    --green:     #22c55e;
    --green-bg:  rgba(34, 197, 94, 0.12);
    --red:       #ef4444;
    --red-bg:    rgba(239, 68, 68, 0.12);
    --yellow:    #eab308;
    --yellow-bg: rgba(234, 179, 8, 0.12);
    --orange:    #f97316;
    --pink:      #ec4899;
    --text:      #e8e8f0;
    --text2:     #c0c0d0;
    --muted:     #8888a0;
    --radius:    10px;
    --radius-sm: 6px;
    --sidebar-w: 260px;
    --transition: 0.2s ease;
}

html, body { height: 100%; }
body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

/* ── Layout ──────────────────────────────────────────────────────────── */
.app {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* ── Sidebar ─────────────────────────────────────────────────────────── */
.sidebar {
    width: var(--sidebar-w);
    min-width: var(--sidebar-w);
    background: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    z-index: 100;
    transition: transform var(--transition);
}

.sidebar-header {
    padding: 20px 16px;
    border-bottom: 1px solid var(--border);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}

.sidebar-nav {
    flex: 1;
    padding: 8px 0;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: var(--muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all var(--transition);
    border-left: 3px solid transparent;
}

.nav-item:hover {
    color: var(--text);
    background: var(--surface2);
}

.nav-item.active {
    color: var(--accent);
    background: var(--accent-bg);
    border-left-color: var(--accent);
}

.nav-item svg { flex-shrink: 0; }

.nav-sub {
    padding-left: 20px;
    font-size: 12px;
}

.nav-section-label {
    padding: 16px 16px 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--muted);
    text-transform: uppercase;
}

.nav-section-label .creator-count {
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
}

.creators-list {
    max-height: 240px;
    overflow-y: auto;
}

.creators-list::-webkit-scrollbar {
    width: 4px;
}

.creators-list::-webkit-scrollbar-track {
    background: transparent;
}

.creators-list::-webkit-scrollbar-thumb {
    background: var(--border2);
    border-radius: 2px;
}

.avatar-sm {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}

.sidebar-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--border);
}

/* ── Sidebar Toggle (mobile) ─────────────────────────────────────────── */
.sidebar-toggle {
    display: none;
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 200;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    padding: 8px;
    cursor: pointer;
}

/* ── Main Content ────────────────────────────────────────────────────── */
.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 32px;
    min-width: 0;
}

/* ── Page Header ─────────────────────────────────────────────────────── */
.page-header {
    margin-bottom: 24px;
}

.page-header h1 {
    font-size: 24px;
    font-weight: 700;
}

.page-subtitle {
    color: var(--muted);
    font-size: 14px;
    margin-top: 4px;
}

.back-link {
    color: var(--muted);
    text-decoration: none;
    font-size: 13px;
    display: inline-block;
    margin-bottom: 12px;
    transition: color var(--transition);
}

.back-link:hover { color: var(--accent); }

.creator-header-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.avatar-lg {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--blue));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    flex-shrink: 0;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--blue));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    flex-shrink: 0;
}

.username {
    color: var(--muted);
    font-size: 13px;
}

.header-stats {
    margin-left: auto;
    display: flex;
    gap: 24px;
}

.header-stat {
    text-align: center;
}

.header-stat-label {
    display: block;
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.header-stat-value {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
}

/* ── Stats Bar ───────────────────────────────────────────────────────── */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stats-bar-sm {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    transition: border-color var(--transition);
}

.stat-card:hover { border-color: var(--border2); }

.stat-label {
    font-size: 12px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
}

.stat-accent { border-left: 3px solid var(--accent); }
.stat-blue { border-left: 3px solid var(--blue); }
.stat-purple { border-left: 3px solid var(--accent2); }
.stat-green { border-left: 3px solid var(--green); }
.stat-yellow { border-left: 3px solid var(--yellow); }

/* ── Filter / Controls Bar ───────────────────────────────────────────── */
.filter-bar, .controls-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px 14px;
    flex: 1;
    max-width: 400px;
    transition: border-color var(--transition);
}

.search-input-wrapper:focus-within { border-color: var(--accent); }

.search-input-wrapper svg { color: var(--muted); flex-shrink: 0; }

.search-input-wrapper input,
.table-controls input {
    background: none;
    border: none;
    color: var(--text);
    font-size: 14px;
    outline: none;
    width: 100%;
    font-family: inherit;
}

.search-input-wrapper input::placeholder,
.table-controls input::placeholder {
    color: var(--muted);
}

.date-range {
    display: flex;
    align-items: center;
    gap: 8px;
}

.date-range label, .select-wrapper label, .sort-wrapper label {
    font-size: 12px;
    color: var(--muted);
    white-space: nowrap;
}

.date-range input[type="date"],
.select-wrapper select,
.sort-wrapper select {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    padding: 8px 12px;
    font-size: 13px;
    font-family: inherit;
    outline: none;
    transition: border-color var(--transition);
}

.date-range input[type="date"]:focus,
.select-wrapper select:focus,
.sort-wrapper select:focus {
    border-color: var(--accent);
}

/* Color scheme for date inputs */
input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
}

.quick-ranges {
    display: flex;
    gap: 6px;
}

.select-wrapper, .sort-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── Buttons ─────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn:hover { border-color: var(--border2); background: var(--surface2); }

.btn-primary {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.btn-primary:hover { background: #6a4fe0; }

.btn-sm { padding: 5px 10px; font-size: 12px; }

.btn-sm.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: var(--muted);
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.btn-ghost:hover { color: var(--text); background: var(--surface2); }

/* ── Creator Grid ────────────────────────────────────────────────────── */
.creator-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
}

.creator-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    cursor: pointer;
    transition: all var(--transition);
}

.creator-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.creator-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.creator-info h3 {
    font-size: 16px;
    font-weight: 600;
}

.rank-badge {
    margin-left: auto;
    background: var(--accent-bg);
    color: var(--accent);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.creator-card-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 12px;
}

.mini-stat-label {
    display: block;
    font-size: 11px;
    color: var(--muted);
}

.mini-stat-value {
    font-size: 15px;
    font-weight: 600;
}

.sparkline-container {
    height: 50px;
    margin-top: 4px;
}

.sparkline-container canvas {
    width: 100% !important;
    height: 100% !important;
}

/* ── Trend Indicators ────────────────────────────────────────────────── */
.trend-up { color: var(--green); }
.trend-down { color: var(--red); }
.trend-flat { color: var(--muted); }

/* ── Tabs ────────────────────────────────────────────────────────────── */
.tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
}

.tab {
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--muted);
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}

.tab:hover { color: var(--text); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }

.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ── Charts ──────────────────────────────────────────────────────────── */
.chart-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.chart-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}

.chart-card h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text2);
}

.chart-card canvas {
    width: 100% !important;
    height: 250px !important;
}

.chart-large { grid-column: 1 / -1; }
.chart-large canvas { height: 300px !important; }

.chart-small canvas { height: 250px !important; }
.chart-half { }
.chart-full { grid-column: 1 / -1; }

@media (min-width: 900px) {
    .chart-row:has(.chart-large):has(.chart-small) {
        grid-template-columns: 2fr 1fr;
    }
    .chart-large { grid-column: auto; }
}

/* ── Tables ──────────────────────────────────────────────────────────── */
.section {
    margin-bottom: 32px;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.section-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.badge {
    background: var(--accent-bg);
    color: var(--accent);
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.table-controls {
    margin-bottom: 12px;
}

.table-controls input {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    max-width: 300px;
}

.table-controls input:focus { border-color: var(--accent); }

.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table thead {
    background: var(--surface2);
}

.data-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.data-table td {
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text2);
}

.data-table tbody tr {
    transition: background var(--transition);
}

.data-table tbody tr:hover { background: var(--surface2); }

.data-table tbody tr:last-child td { border-bottom: none; }

.clickable-row { cursor: pointer; }

.sortable-th {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 20px !important;
}

.sortable-th::after {
    content: '⇅';
    position: absolute;
    right: 6px;
    font-size: 10px;
    opacity: 0.3;
}

.sortable-th.sort-active::after { opacity: 1; }
.sortable-th.sort-asc::after { content: '↑'; }
.sortable-th.sort-desc::after { content: '↓'; }

.amount { font-family: 'SF Mono', 'Fira Code', monospace; font-weight: 600; }

.type-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    background: var(--surface3);
    color: var(--text2);
    text-transform: capitalize;
}

.type-trial { background: var(--green-bg); color: var(--green); }
.type-tracking { background: var(--accent-bg); color: var(--accent); }
.type-campaign { background: rgba(168, 85, 247, 0.15); color: #a855f7; }

.url-cell {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    color: var(--muted);
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}

.status-ok { background: var(--green); }
.status-pending { background: var(--yellow); }
.status-error { background: var(--red); }

/* ── Empty / Error / Loading States ──────────────────────────────────── */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    gap: 16px;
    color: var(--muted);
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.error-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 20px;
    gap: 12px;
    color: var(--muted);
}

.error-icon { font-size: 36px; }
.error-text { color: var(--red); }

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--muted);
    font-size: 14px;
}

.muted-text { color: var(--muted); font-size: 12px; margin-top: 8px; }

/* ── Modal ───────────────────────────────────────────────────────────── */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    width: 100%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.modal-lg { max-width: 800px; }

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 { font-size: 16px; }

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        transform: translateX(-100%);
    }

    .sidebar.open { transform: translateX(0); }

    .sidebar-toggle { display: block; }

    .main-content { padding: 16px; padding-top: 56px; }

    .stats-bar { grid-template-columns: repeat(2, 1fr); }

    .creator-grid { grid-template-columns: 1fr; }

    .chart-row { grid-template-columns: 1fr; }

    .chart-large { grid-column: auto; }

    .creator-header-bar { flex-direction: column; align-items: flex-start; }
    .header-stats { margin-left: 0; }

    .controls-bar { flex-direction: column; align-items: stretch; }

    .date-range { flex-wrap: wrap; }

    .tabs { gap: 0; }
    .tab { padding: 8px 14px; font-size: 13px; }
}

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

/* ── Scrollbar ───────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border2); }

/* ── Prospects: Header ───────────────────────────────────────────────── */
.prospects-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

/* ── Prospects: Scan Progress Banner ─────────────────────────────────── */
.scan-progress-banner {
    background: var(--surface);
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    padding: 14px 20px;
    margin-bottom: 24px;
}

.scan-progress-content {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
}

.spinner-sm {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    flex-shrink: 0;
}

.scan-progress-bar-wrapper {
    width: 100%;
    height: 4px;
    background: var(--surface3);
    border-radius: 2px;
    overflow: hidden;
}

.scan-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    border-radius: 2px;
    transition: width 0.4s ease;
}

/* ── Prospects: Filter Toggle ────────────────────────────────────────── */
.toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    white-space: nowrap;
}

.toggle-wrapper input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
    cursor: pointer;
}

.toggle-label {
    font-size: 13px;
    color: var(--text2);
}

/* ── Prospects: Creator Cell ─────────────────────────────────────────── */
.creator-cell {
    max-width: 280px;
}

.creator-link {
    color: var(--accent2);
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: color var(--transition);
}

.creator-link:hover {
    color: var(--accent);
    text-decoration: underline;
}

.bio-snippet {
    font-size: 11px;
    color: var(--muted);
    margin-top: 4px;
    line-height: 1.4;
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* ── Prospects: Niche Tags ───────────────────────────────────────────── */
.niche-tags-row {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

.niche-tag {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 500;
    background: var(--surface3);
    color: var(--muted);
    text-transform: capitalize;
}

/* ── Prospects: Platform Badge ───────────────────────────────────────── */
.platform-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.platform-of {
    background: rgba(59, 130, 246, 0.12);
    color: var(--blue);
}

.platform-fansly {
    background: rgba(236, 72, 153, 0.12);
    color: var(--pink);
}

/* ── Prospects: Instagram Link ───────────────────────────────────────── */
.ig-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--pink);
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    transition: color var(--transition);
}

.ig-link:hover {
    color: #f472b6;
    text-decoration: underline;
}

.ig-icon {
    flex-shrink: 0;
}

/* ── Prospects: Score Badge ──────────────────────────────────────────── */
.score-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
}

.score-high {
    background: var(--green-bg);
    color: var(--green);
}

.score-mid {
    background: var(--yellow-bg);
    color: var(--yellow);
}

.score-low {
    background: var(--red-bg);
    color: var(--red);
}

/* ── Prospects: Source Label ─────────────────────────────────────────── */
.source-label {
    font-size: 11px;
    color: var(--muted);
    font-family: 'SF Mono', 'Fira Code', monospace;
}

/* ── Prospects: Status Select ────────────────────────────────────────── */
.status-select {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    padding: 4px 8px;
    font-size: 11px;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    transition: border-color var(--transition);
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238888a0' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 6px center;
    padding-right: 22px;
}

.status-select:focus {
    border-color: var(--accent);
}

/* Status-specific select styling */
.prospect-status-new {
    border-color: var(--border2);
    color: var(--muted);
}

.prospect-status-reached {
    border-color: var(--blue);
    color: var(--blue);
    background-color: rgba(59, 130, 246, 0.08);
}

.prospect-status-noresponse {
    border-color: var(--yellow);
    color: var(--yellow);
    background-color: rgba(234, 179, 8, 0.08);
}

.prospect-status-negotiations {
    border-color: var(--accent);
    color: var(--accent2);
    background-color: var(--accent-bg);
}

.prospect-status-signed {
    border-color: var(--green);
    color: var(--green);
    background-color: var(--green-bg);
}

.prospect-status-notinterested {
    border-color: var(--red);
    color: var(--red);
    background-color: var(--red-bg);
}

/* ── Prospects: Actions ──────────────────────────────────────────────── */
.actions-cell {
    white-space: nowrap;
    display: flex;
    gap: 4px;
}

.btn-icon {
    padding: 4px 6px;
    position: relative;
}

.notes-indicator {
    position: absolute;
    top: 2px;
    right: 2px;
    color: var(--accent);
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
}

/* ── Prospects: Archived Row ─────────────────────────────────────────── */
.archived-row {
    opacity: 0.5;
}

.archived-row:hover {
    opacity: 0.75;
}

/* ── Prospects: Notes Modal ──────────────────────────────────────────── */
.notes-textarea {
    width: 100%;
    min-height: 150px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    padding: 12px;
    font-size: 13px;
    font-family: inherit;
    line-height: 1.6;
    resize: vertical;
    outline: none;
    transition: border-color var(--transition);
}

.notes-textarea:focus {
    border-color: var(--accent);
}

.notes-textarea::placeholder {
    color: var(--muted);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 16px;
}

/* ── Commission Calculator ──────────────────────────────────────────────── */

.employee-toggle-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.employee-toggle-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
    user-select: none;
}

.employee-toggle-item:hover {
    border-color: var(--accent);
}

.employee-toggle-item.excluded {
    opacity: 0.45;
    background: var(--bg);
}

.employee-toggle-item input[type="checkbox"] {
    accent-color: var(--accent);
    cursor: pointer;
}

.emp-remove-btn {
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    font-size: 11px;
    padding: 0 2px;
    margin-left: auto;
    opacity: 0;
    transition: opacity 0.15s, color 0.15s;
}

.employee-toggle-item:hover .emp-remove-btn { opacity: 1; }
.emp-remove-btn:hover { color: var(--red, #ef4444); }

.config-table td { vertical-align: middle; }

.config-select {
    width: 100%;
    padding: 5px 8px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg);
    color: var(--fg);
    font-size: 12px;
    cursor: pointer;
}

.config-select:focus { border-color: var(--accent); outline: none; }

.config-input {
    width: 100%;
    padding: 5px 8px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg);
    color: var(--fg);
    font-size: 12px;
    text-align: center;
}

.config-input:focus { border-color: var(--accent); outline: none; }

.row-excluded { opacity: 0.4; }

.marker-badge {
    display: inline-block;
    padding: 1px 6px;
    margin-left: 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    font-family: monospace;
    background: rgba(168, 85, 247, 0.15);
    color: #a855f7;
}

.shift-assign-badge {
    display: inline-block;
    padding: 1px 6px;
    margin-left: 4px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    background: rgba(59, 130, 246, 0.12);
    color: #3b82f6;
}

.shift-assign-badge.unassigned {
    background: rgba(234, 179, 8, 0.12);
    color: #eab308;
}

.shift-assign-badge.auto {
    background: rgba(234, 179, 8, 0.12);
    color: #eab308;
    border: 1px dashed rgba(234, 179, 8, 0.4);
}

.ua-note {
    font-size: 10px;
    color: var(--muted);
    margin-top: 2px;
    font-style: italic;
}

.unassigned-warning {
    padding: 8px 12px;
    margin-bottom: 12px;
    border-radius: 8px;
    background: rgba(59, 130, 246, 0.08);
    color: #60a5fa;
    font-size: 13px;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.lock-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 12px;
    border-radius: 8px;
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: #22c55e;
    font-size: 13px;
    font-weight: 500;
}

.lock-btn {
    font-size: 12px;
}

.ratio-badge, .commission-rate-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
}

.tier-top { background: rgba(34, 197, 94, 0.15); color: #22c55e; }
.tier-mid { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.tier-low { background: rgba(234, 179, 8, 0.15); color: #eab308; }
.tier-none { background: rgba(107, 114, 128, 0.1); color: var(--muted); }

/* Commission rate tier colors */
.comm-tier-7 { background: rgba(34, 197, 94, 0.15); color: #22c55e; }
.comm-tier-6 { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.comm-tier-5 { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.comm-tier-3 { background: rgba(234, 179, 8, 0.15); color: #eab308; }
.comm-tier-2 { background: rgba(239, 68, 68, 0.15); color: #ef4444; }

.commission-detail-table th.shift-header {
    text-align: center;
    border-bottom: none;
    padding-bottom: 2px;
    font-size: 12px;
}

.commission-detail-table th.sub-header {
    font-size: 11px;
    font-weight: 500;
    color: var(--muted);
    padding-top: 2px;
}

.commission-detail-table td {
    font-size: 13px;
}

.multi-select {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 200px;
    padding: 8px 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    user-select: none;
    transition: border-color 0.15s;
}

.multi-select:hover { border-color: var(--accent); }

.multi-select-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.multi-select-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 50;
    min-width: 240px;
    margin-top: 4px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    overflow: hidden;
}

.multi-select-dropdown.open { display: block; }

.multi-select-search-wrap { padding: 8px 10px 4px; }

.multi-select-search {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg);
    color: var(--fg);
    font-size: 13px;
    outline: none;
}

.multi-select-search:focus { border-color: var(--accent); }

.multi-select-actions {
    display: flex;
    gap: 4px;
    padding: 4px 10px;
    border-bottom: 1px solid var(--border);
}

.multi-select-options {
    max-height: 220px;
    overflow-y: auto;
    padding: 4px 0;
}

.multi-select-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.1s;
}

.multi-select-option:hover { background: var(--hover); }

.multi-select-option input[type="checkbox"] {
    accent-color: var(--accent);
    cursor: pointer;
}
