/* ============================================
   Salient Marketing - Rank Tracker
   Dark Theme Dashboard
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    /* Core colors */
    --bg-primary: #0f1117;
    --bg-secondary: #1a1d27;
    --bg-tertiary: #232733;
    --bg-card: #1e2130;
    --bg-card-hover: #252a3a;
    --bg-input: #161824;
    
    /* Borders */
    --border-color: #2a2e3d;
    --border-light: #343850;
    
    /* Text */
    --text-primary: #e8eaef;
    --text-secondary: #9499ad;
    --text-muted: #5d6277;
    --text-white: #ffffff;
    
    /* Accent colors */
    --accent-primary: #6366f1;
    --accent-primary-hover: #818cf8;
    --accent-primary-glow: rgba(99, 102, 241, 0.15);
    
    /* Status colors */
    --green: #22c55e;
    --green-bg: rgba(34, 197, 94, 0.12);
    --green-soft: #4ade80;
    --red: #ef4444;
    --red-bg: rgba(239, 68, 68, 0.12);
    --red-soft: #f87171;
    --yellow: #eab308;
    --yellow-bg: rgba(234, 179, 8, 0.12);
    --orange: #f97316;
    --orange-bg: rgba(249, 115, 22, 0.12);
    --blue: #3b82f6;
    --blue-bg: rgba(59, 130, 246, 0.12);
    
    /* Rank bucket colors */
    --rank-1-3: #22c55e;
    --rank-4-10: #84cc16;
    --rank-11-20: #eab308;
    --rank-21-50: #f97316;
    --rank-51plus: #ef4444;
    
    /* Sizing */
    --sidebar-width: 260px;
    --header-height: 60px;
    --radius: 10px;
    --radius-sm: 6px;
    --radius-lg: 14px;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.3);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.4);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.15);
}

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

html { font-size: 14px; scroll-behavior: smooth; }

body {
    font-family: 'DM Sans', -apple-system, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-primary-hover); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--text-white); }

/* ---- Layout ---- */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* ---- Sidebar ---- */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transition: transform 0.3s ease;
}

.sidebar-brand {
    padding: 20px 22px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-brand-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--accent-primary), #a855f7);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    color: white;
    flex-shrink: 0;
}

.sidebar-brand h1 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-white);
    letter-spacing: -0.3px;
}

.sidebar-brand span {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 400;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.nav-section-title {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-muted);
    padding: 12px 12px 8px;
    font-weight: 600;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 13.5px;
    font-weight: 500;
    transition: all 0.2s;
    margin-bottom: 2px;
    cursor: pointer;
}

.nav-item:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--accent-primary-glow);
    color: var(--accent-primary-hover);
}

.nav-item svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    opacity: 0.7;
}

.nav-item.active svg { opacity: 1; }

.nav-item .badge {
    margin-left: auto;
    background: var(--bg-tertiary);
    color: var(--text-muted);
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.nav-item.active .badge {
    background: var(--accent-primary);
    color: white;
}

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

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: var(--radius-sm);
}

.sidebar-user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 13px;
    color: white;
}

.sidebar-user-info { flex: 1; }
.sidebar-user-info .name { font-size: 13px; font-weight: 500; color: var(--text-primary); }
.sidebar-user-info .role { font-size: 11px; color: var(--text-muted); }

/* ---- Main Content ---- */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

/* ---- Top Header ---- */
.top-header {
    height: var(--header-height);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.page-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-white);
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-title .breadcrumb {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 400;
}

.page-title .breadcrumb a {
    color: var(--text-secondary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn svg { width: 16px; height: 16px; }

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

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-color);
}
.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-light);
}

.btn-success {
    background: var(--green);
    color: white;
}
.btn-success:hover { background: #16a34a; color: white; }

.btn-danger {
    background: transparent;
    color: var(--red);
    border-color: var(--red);
}
.btn-danger:hover { background: var(--red-bg); }

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: none;
    padding: 8px 12px;
}
.btn-ghost:hover { color: var(--text-primary); background: var(--bg-tertiary); }

.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-lg { padding: 12px 24px; font-size: 15px; }

/* ---- Page Container ---- */
.page-container {
    padding: 28px;
}

/* ---- Cards ---- */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
}

.card-header {
    padding: 18px 22px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-white);
}

.card-body { padding: 22px; }
.card-body.no-pad { padding: 0; }

/* ---- Stat Cards ---- */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px 22px;
    transition: all 0.2s;
}

.stat-card:hover {
    border-color: var(--border-light);
    box-shadow: var(--shadow-sm);
}

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

.stat-card .value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-white);
    font-family: 'JetBrains Mono', monospace;
}

.stat-card .change {
    font-size: 13px;
    font-weight: 600;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.stat-card .change.up { color: var(--green); }
.stat-card .change.down { color: var(--red); }
.stat-card .change.neutral { color: var(--text-muted); }

/* ---- Data Table ---- */
.data-table-wrapper {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead th {
    padding: 12px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
    position: sticky;
    top: 0;
}

.data-table thead th:hover { color: var(--text-secondary); }
.data-table thead th.sorted { color: var(--accent-primary-hover); }

.data-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background 0.15s;
}

.data-table tbody tr:hover { background: var(--bg-card-hover); }
.data-table tbody tr:last-child { border-bottom: none; }

.data-table tbody td {
    padding: 12px 16px;
    font-size: 13px;
    color: var(--text-primary);
    white-space: nowrap;
}

.data-table .keyword-cell {
    font-weight: 500;
    color: var(--text-white);
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.data-table .rank-cell {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 500;
    font-size: 13px;
}

.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    padding: 3px 8px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 600;
}

.rank-badge.top3 { background: var(--green-bg); color: var(--green); }
.rank-badge.top10 { background: rgba(132, 204, 22, 0.12); color: #84cc16; }
.rank-badge.top20 { background: var(--yellow-bg); color: var(--yellow); }
.rank-badge.top50 { background: var(--orange-bg); color: var(--orange); }
.rank-badge.top100 { background: var(--red-bg); color: var(--red); }
.rank-badge.norank { background: var(--bg-tertiary); color: var(--text-muted); }

.change-indicator {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 12px;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
}

.change-indicator.up { color: var(--green); }
.change-indicator.down { color: var(--red); }
.change-indicator.same { color: var(--text-muted); }

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

/* ---- Filters Bar ---- */
.filters-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-group label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    white-space: nowrap;
}

/* ---- Form Elements ---- */
.form-input, .form-select {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 9px 14px;
    font-size: 13px;
    font-family: inherit;
    color: var(--text-primary);
    transition: all 0.2s;
    width: 100%;
}

.form-input:focus, .form-select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-primary-glow);
}

.form-input::placeholder { color: var(--text-muted); }

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235d6277' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    cursor: pointer;
}

.form-select option {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-inline { width: auto; }

/* ---- Search Input ---- */
.search-input-wrap {
    position: relative;
}

.search-input-wrap svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

.search-input-wrap .form-input {
    padding-left: 36px;
}

/* ---- Modal ---- */
.modal-overlay {
    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;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 620px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    transform: translateY(20px) scale(0.98);
    transition: transform 0.25s;
}

.modal-overlay.active .modal {
    transform: translateY(0) scale(1);
}

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

.modal-header h3 { font-size: 16px; font-weight: 600; color: var(--text-white); }

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
}
.modal-close:hover { color: var(--text-primary); background: var(--bg-tertiary); }

.modal-body { padding: 24px; }
.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ---- Import CSV Specific ---- */
.csv-preview-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    margin: 16px 0;
}

.csv-preview-table th, .csv-preview-table td {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    text-align: left;
}

.csv-preview-table th {
    background: var(--bg-tertiary);
    color: var(--text-muted);
    font-weight: 600;
}

.csv-preview-table td { color: var(--text-secondary); }

.column-mapper {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 10px;
    align-items: center;
    margin: 8px 0;
}

.column-mapper .arrow {
    color: var(--text-muted);
    font-size: 18px;
}

.upload-zone {
    border: 2px dashed var(--border-light);
    border-radius: var(--radius);
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg-input);
}

.upload-zone:hover, .upload-zone.dragover {
    border-color: var(--accent-primary);
    background: var(--accent-primary-glow);
}

.upload-zone svg {
    width: 40px;
    height: 40px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.upload-zone p { color: var(--text-secondary); font-size: 14px; }
.upload-zone .hint { color: var(--text-muted); font-size: 12px; margin-top: 6px; }

/* ---- Status Badge ---- */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.status-badge.active { background: var(--green-bg); color: var(--green); }
.status-badge.inactive { background: var(--red-bg); color: var(--red); }
.status-badge.paused { background: var(--yellow-bg); color: var(--yellow); }

.status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

/* ---- Chart Container ---- */
.chart-container {
    position: relative;
    height: 300px;
    padding: 16px;
}

/* ---- Empty State ---- */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state svg {
    width: 60px;
    height: 60px;
    color: var(--text-muted);
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-muted);
    font-size: 13px;
    max-width: 400px;
    margin: 0 auto 20px;
}

/* ---- Alerts / Flash ---- */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideDown 0.3s ease;
}

.alert-success { background: var(--green-bg); color: var(--green); border: 1px solid rgba(34,197,94,0.2); }
.alert-error { background: var(--red-bg); color: var(--red); border: 1px solid rgba(239,68,68,0.2); }
.alert-info { background: var(--blue-bg); color: var(--blue); border: 1px solid rgba(59,130,246,0.2); }

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---- Pagination ---- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 22px;
    border-top: 1px solid var(--border-color);
}

.pagination-info {
    font-size: 12px;
    color: var(--text-muted);
}

.pagination-buttons {
    display: flex;
    gap: 4px;
}

.pagination-buttons .btn {
    min-width: 36px;
    justify-content: center;
    padding: 6px 10px;
}

.pagination-buttons .btn.active {
    background: var(--accent-primary);
    color: white;
}

/* ---- Loading Spinner ---- */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* ---- Tooltip ---- */
[data-tooltip] {
    position: relative;
}

[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    box-shadow: var(--shadow-md);
    z-index: 10;
}

/* ---- Responsive ---- */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px;
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .mobile-menu-toggle { display: block; }
    .page-container { padding: 16px; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .filters-bar { flex-direction: column; align-items: stretch; }
}

/* ---- Login Page ---- */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    padding: 20px;
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
}

.login-card .logo {
    text-align: center;
    margin-bottom: 32px;
}

.login-card .logo .icon {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--accent-primary), #a855f7);
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 22px;
    color: white;
    margin-bottom: 14px;
}

.login-card .logo h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-white);
}

.login-card .logo p {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ---- Misc Utilities ---- */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-small { font-size: 12px; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.gap-1 { gap: 8px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }
.w-100 { width: 100%; }
.hidden { display: none !important; }
.mono { font-family: 'JetBrains Mono', monospace; }

/* ---- Tab Navigation ---- */
.tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.tab {
    padding: 12px 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    margin-bottom: -1px;
}

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

/* ---- Progress Bar ---- */
.progress-bar {
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar .fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* ---- Client Grid ---- */
.client-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

.client-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px;
    transition: all 0.2s;
    cursor: pointer;
}

.client-card:hover {
    border-color: var(--border-light);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.client-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.client-card-header h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-white);
}

.client-card .meta {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.client-card .meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.client-card .stats-row {
    display: flex;
    gap: 16px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border-color);
}

.client-card .stat-mini {
    font-size: 12px;
    color: var(--text-muted);
}

.client-card .stat-mini strong {
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
}

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

/* ---- Column Mapper for Import ---- */
.mapper-row {
    display: grid;
    grid-template-columns: 1fr 30px 1fr;
    gap: 10px;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.mapper-row:last-child { border-bottom: none; }

.mapper-csv-col {
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 500;
    background: var(--bg-tertiary);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
}

.mapper-arrow {
    text-align: center;
    color: var(--text-muted);
}

/* Large import modal */
.modal.modal-lg {
    max-width: 850px;
}

/* Step indicator */
.steps {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
}

.step {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
}

.step.active { color: var(--accent-primary-hover); }
.step.done { color: var(--green); }

.step-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
}

.step.active .step-num {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

.step.done .step-num {
    background: var(--green);
    border-color: var(--green);
    color: white;
}

.step-divider {
    width: 30px;
    height: 1px;
    background: var(--border-color);
}
