/* ========================================
   SMART RECRUIT — Dashboard Styles
   ======================================== */

:root {
    --primary: #4f46e5;
    --primary-light: #6366f1;
    --primary-dark: #3730a3;
    --primary-glow: rgba(99, 102, 241, 0.3);
    --accent: #06b6d4;
    --accent-light: #22d3ee;
    --surface: #f8fafc;
    --surface-card: #ffffff;
    --bg-dark: #0f172a;
    --bg-dark-2: #1e293b;
    --bg-dark-3: #334155;
    --text: #1e293b;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --border: #e2e8f0;
    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.1);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.1);
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.1);
    --info: #3b82f6;
    --info-bg: rgba(59, 130, 246, 0.1);
    --radius: 12px;
    --radius-lg: 16px;
    --sidebar-w: 260px;
    --topbar-h: 64px;
    --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.05);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--surface);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ---- Sidebar ---- */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-w);
    background: var(--bg-dark);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform 0.3s ease;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
}

.logo-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.85rem;
}

.sidebar-close {
    display: none;
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    font-size: 1.2rem;
    cursor: pointer;
}

.sidebar-nav {
    flex: 1;
    padding: 12px 12px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: 10px;
    color: rgba(255,255,255,0.55);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.sidebar-link:hover {
    color: rgba(255,255,255,0.85);
    background: rgba(255,255,255,0.06);
}

.sidebar-link.active {
    color: white;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    box-shadow: 0 4px 12px var(--primary-glow);
}

.sidebar-link i {
    width: 20px;
    text-align: center;
    font-size: 0.95rem;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.sidebar-back {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 500;
    transition: var(--transition);
}

.sidebar-back:hover {
    color: white;
    background: rgba(255,255,255,0.06);
}

/* ---- Main ---- */
.main {
    margin-left: var(--sidebar-w);
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

/* ---- Topbar ---- */
.topbar {
    position: sticky;
    top: 0;
    height: var(--topbar-h);
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    z-index: 50;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text);
    cursor: pointer;
    padding: 4px;
}

.topbar-title {
    font-size: 1.15rem;
    font-weight: 700;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px 14px;
    width: 260px;
    transition: var(--transition);
}

.topbar-search:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.topbar-search i {
    color: var(--text-light);
    font-size: 0.85rem;
}

.topbar-search input {
    border: none;
    outline: none;
    background: transparent;
    font-family: inherit;
    font-size: 0.85rem;
    color: var(--text);
    width: 100%;
}

.topbar-icon-btn {
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1rem;
    transition: var(--transition);
}

.topbar-icon-btn:hover {
    background: var(--surface);
    color: var(--text);
}

.notif-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--danger);
    border: 2px solid white;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px 6px 6px;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
}

.topbar-user:hover {
    background: var(--surface);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.2;
}

.user-status {
    font-size: 0.7rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 4px;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
}

/* ---- Page Content ---- */
.page-content {
    padding: 28px;
    min-height: calc(100vh - var(--topbar-h));
}

/* ---- Cards ---- */
.card {
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

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

.card-title {
    font-size: 0.95rem;
    font-weight: 700;
}

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

.stat-card {
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: 3px 3px 0 0;
}

.stat-card:nth-child(1)::before { background: var(--primary); }
.stat-card:nth-child(2)::before { background: var(--success); }
.stat-card:nth-child(3)::before { background: var(--warning); }
.stat-card:nth-child(4)::before { background: var(--info); }
.stat-card:nth-child(5)::before { background: var(--accent); }

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.stat-icon.primary { background: rgba(79,70,229,0.1); color: var(--primary); }
.stat-icon.success { background: var(--success-bg); color: var(--success); }
.stat-icon.warning { background: var(--warning-bg); color: var(--warning); }
.stat-icon.info { background: var(--info-bg); color: var(--info); }
.stat-icon.accent { background: rgba(6,182,212,0.1); color: var(--accent); }

.stat-info {
    flex: 1;
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--text);
}

/* ---- Charts Grid ---- */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 24px;
    margin-bottom: 28px;
}

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

.chart-card canvas {
    width: 100%;
    display: block;
}

.chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 16px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 3px;
}

/* ---- Funnel Visual ---- */
.funnel-visual {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px 0;
}

.funnel-step {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.88rem;
    color: white;
    transition: var(--transition);
}

.funnel-step:hover { transform: scale(1.01); }

.funnel-step:nth-child(1) { background: var(--primary); }
.funnel-step:nth-child(2) { background: var(--accent); margin: 0 5%; }
.funnel-step:nth-child(3) { background: var(--success); margin: 0 10%; }
.funnel-step:nth-child(4) { background: var(--warning); margin: 0 15%; }
.funnel-step:nth-child(5) { background: #8b5cf6; margin: 0 20%; }

.funnel-step .funnel-value {
    margin-left: auto;
    font-weight: 800;
}

/* ---- Tables ---- */
.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

thead th {
    text-align: left;
    padding: 12px 16px;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}

tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

tbody tr {
    transition: var(--transition);
}

tbody tr:hover {
    background: rgba(79, 70, 229, 0.02);
}

.candidate-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.candidate-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    flex-shrink: 0;
}

.candidate-name {
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
}

.candidate-name:hover {
    color: var(--primary);
}

/* ---- Status Badges ---- */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
}

.status-badge.applied { background: var(--info-bg); color: var(--info); }
.status-badge.screening { background: var(--warning-bg); color: var(--warning); }
.status-badge.shortlisted { background: rgba(139,92,246,0.1); color: #8b5cf6; }
.status-badge.interview { background: rgba(6,182,212,0.1); color: var(--accent); }
.status-badge.selected { background: var(--success-bg); color: var(--success); }
.status-badge.rejected { background: var(--danger-bg); color: var(--danger); }

/* ---- Match Score ---- */
.match-score {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    font-size: 0.85rem;
}

.match-bar {
    width: 48px;
    height: 6px;
    border-radius: 6px;
    background: var(--border);
    overflow: hidden;
}

.match-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.6s ease;
}

/* ---- Skills ---- */
.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.skill-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 500;
    background: rgba(79, 70, 229, 0.08);
    color: var(--primary);
}

/* ---- Source Tags ---- */
.source-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-muted);
}

.source-tag i { font-size: 0.9rem; }
.source-tag.linkedin { color: #0077b5; }
.source-tag.naukri { color: #4a90d9; }
.source-tag.company { color: var(--success); }
.source-tag.referral { color: var(--warning); }

/* ---- Action Buttons ---- */
.actions-cell {
    display: flex;
    gap: 6px;
}

.action-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    transition: var(--transition);
}

.action-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(79, 70, 229, 0.05);
}

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

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 10px 20px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    box-shadow: 0 2px 8px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-secondary {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #059669;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-warning {
    background: var(--warning);
    color: white;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.78rem;
    border-radius: 8px;
}

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

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

.filter-group label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.filter-select, .filter-input {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.82rem;
    color: var(--text);
    background: white;
    outline: none;
    transition: var(--transition);
}

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

/* ---- Form ---- */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group.full {
    grid-column: 1 / -1;
}

.form-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text);
}

.form-input, .form-select, .form-textarea {
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.88rem;
    color: var(--text);
    background: white;
    outline: none;
    transition: var(--transition);
}

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

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

/* ---- Pipeline / Kanban ---- */
.pipeline-board {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 20px;
}

.pipeline-column {
    min-width: 200px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

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

.pipeline-col-title {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pipeline-col-count {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 700;
    background: var(--border);
    color: var(--text-muted);
}

.pipeline-col-body {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 100px;
}

.pipeline-card {
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px;
    cursor: grab;
    transition: var(--transition);
}

.pipeline-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.pipeline-card.dragging {
    opacity: 0.5;
    transform: rotate(2deg);
}

.pipeline-card-name {
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.pipeline-card-job {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.pipeline-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pipeline-card-match {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--success);
}

.pipeline-card-source {
    font-size: 0.7rem;
    color: var(--text-light);
}

.pipeline-card-actions {
    display: flex;
    gap: 4px;
    margin-top: 8px;
}

.pipeline-move-btn {
    flex: 1;
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: white;
    font-family: inherit;
    font-size: 0.68rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
}

.pipeline-move-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(79,70,229,0.05);
}

/* ---- Candidate Profile ---- */
.profile-header {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.4rem;
    font-weight: 800;
    flex-shrink: 0;
}

.profile-info {
    flex: 1;
}

.profile-name {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.profile-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 12px;
}

.profile-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.profile-meta-item i {
    color: var(--text-light);
    width: 16px;
}

.profile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.profile-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

.profile-section {
    margin-bottom: 24px;
}

.profile-section h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-section h3 i {
    color: var(--primary);
    font-size: 0.85rem;
}

.profile-detail-row {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.88rem;
}

.profile-detail-label {
    width: 140px;
    color: var(--text-muted);
    font-weight: 500;
    flex-shrink: 0;
}

.profile-detail-value {
    color: var(--text);
    font-weight: 500;
}

/* ---- Timeline ---- */
.candidate-timeline {
    position: relative;
    padding-left: 28px;
}

.candidate-timeline::before {
    content: '';
    position: absolute;
    left: 9px;
    top: 4px;
    bottom: 4px;
    width: 2px;
    background: var(--border);
}

.timeline-step {
    position: relative;
    padding: 0 0 24px;
}

.timeline-step:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -28px;
    top: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.timeline-dot.completed {
    border-color: var(--success);
    background: var(--success);
    color: white;
}

.timeline-dot.completed i {
    font-size: 0.55rem;
}

.timeline-step-title {
    font-weight: 600;
    font-size: 0.88rem;
    margin-bottom: 2px;
}

.timeline-step-date {
    font-size: 0.78rem;
    color: var(--text-light);
}

/* ---- AI Screening ---- */
.ai-container {
    max-width: 800px;
    margin: 0 auto;
}

.ai-card {
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: 24px;
}

.ai-score-circle {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    position: relative;
}

.ai-score-ring {
    position: absolute;
    inset: 0;
}

.ai-score-ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.ai-score-ring circle {
    fill: none;
    stroke-width: 8;
    stroke-linecap: round;
}

.ai-score-ring .bg {
    stroke: var(--border);
}

.ai-score-ring .fg {
    stroke: var(--primary);
    transition: stroke-dashoffset 1.5s ease;
}

.ai-score-value {
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--primary);
    position: relative;
    z-index: 1;
}

.ai-score-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 24px;
}

.ai-skill-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.ai-skill-name {
    font-weight: 500;
    font-size: 0.9rem;
}

.ai-skill-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 600;
}

.ai-skill-status.match { color: var(--success); }
.ai-skill-status.missing { color: var(--danger); }

.ai-recommendation {
    background: var(--success-bg);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 12px;
    padding: 16px 20px;
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.ai-recommendation i {
    font-size: 1.2rem;
    color: var(--success);
}

.ai-recommendation p {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
}

.ai-disclaimer {
    margin-top: 20px;
    padding: 14px 18px;
    background: var(--warning-bg);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 10px;
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.ai-disclaimer i {
    color: var(--warning);
    margin-top: 2px;
}

.ai-analyzing {
    text-align: center;
    padding: 40px;
}

.ai-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

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

.ai-analyzing p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ---- Interview Cards ---- */
.interview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.interview-card {
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
    transition: var(--transition);
}

.interview-card:hover {
    box-shadow: var(--shadow-md);
}

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

.interview-card-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.8rem;
    font-weight: 700;
}

.interview-card-info h4 {
    font-size: 0.95rem;
    font-weight: 700;
}

.interview-card-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.interview-detail {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.interview-detail i {
    width: 16px;
    color: var(--text-light);
    text-align: center;
}

/* ---- Email Templates ---- */
.email-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.email-template-card {
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.email-template-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.email-template-card.active {
    border-color: var(--primary);
    background: rgba(79, 70, 229, 0.03);
}

.email-template-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: rgba(79, 70, 229, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--primary);
    margin: 0 auto 12px;
}

.email-template-card h4 {
    font-size: 0.85rem;
    font-weight: 600;
}

.email-preview {
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.email-preview-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

.email-preview-header h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.email-preview-header p {
    font-size: 0.95rem;
    font-weight: 700;
}

.email-preview-body {
    padding: 24px;
    white-space: pre-wrap;
    font-size: 0.88rem;
    line-height: 1.7;
    color: var(--text);
}

/* ---- Jobs Page ---- */
.jobs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}

.job-card {
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: var(--transition);
}

.job-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.job-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 12px;
}

.job-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.job-card .job-dept {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.job-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--success);
    margin-top: 6px;
}

.job-details {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 14px 0;
}

.job-detail {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.job-detail i {
    color: var(--text-light);
}

.job-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.job-apps-count {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--primary);
}

/* ---- Settings ---- */
.settings-section {
    margin-bottom: 32px;
}

.settings-section h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

.settings-row-label {
    font-size: 0.88rem;
    font-weight: 500;
}

.settings-row-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* Toggle */
.toggle {
    position: relative;
    width: 44px;
    height: 24px;
    background: var(--border);
    border-radius: 24px;
    cursor: pointer;
    transition: var(--transition);
}

.toggle.active {
    background: var(--primary);
}

.toggle::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: white;
    transition: var(--transition);
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.toggle.active::after {
    left: 23px;
}

/* ---- Duplicate Warning ---- */
.duplicate-warning {
    background: var(--warning-bg);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.duplicate-warning i {
    font-size: 1.5rem;
    color: var(--warning);
    margin-top: 2px;
}

.duplicate-warning h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #92400e;
}

.duplicate-warning p {
    font-size: 0.88rem;
    color: #78350f;
    margin-bottom: 4px;
}

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

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

.modal {
    background: var(--surface-card);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    transform: translateY(20px) scale(0.97);
    transition: transform 0.3s ease;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
}

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

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

.modal-title {
    font-size: 1.1rem;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--surface);
    color: var(--text);
}

.modal-body {
    padding: 24px;
}

/* ---- Toast ---- */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--bg-dark);
    color: white;
    padding: 14px 22px;
    border-radius: 12px;
    font-size: 0.88rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    animation: toastIn 0.3s ease forwards;
    min-width: 280px;
    max-width: 400px;
}

.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--danger); }
.toast.info { border-left: 4px solid var(--info); }
.toast.warning { border-left: 4px solid var(--warning); }

.toast i {
    font-size: 1rem;
}

.toast.success i { color: var(--success); }
.toast.error i { color: var(--danger); }
.toast.info i { color: var(--info); }
.toast.warning i { color: var(--warning); }

@keyframes toastIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes toastOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

/* ---- Empty State ---- */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    color: var(--border);
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}

.empty-state p {
    font-size: 0.88rem;
    max-width: 400px;
    margin: 0 auto;
}

/* ---- Analytics ---- */
.analytics-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.analytics-stat {
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    text-align: center;
}

.analytics-stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.2;
}

.analytics-stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-top: 4px;
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }

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

    .sidebar-close {
        display: block;
    }

    .main {
        margin-left: 0;
    }

    .topbar-toggle {
        display: block;
    }

    .pipeline-board {
        grid-template-columns: repeat(3, 1fr);
    }

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

@media (max-width: 768px) {
    .page-content {
        padding: 20px 16px;
    }

    .topbar {
        padding: 0 16px;
    }

    .topbar-search {
        display: none;
    }

    .user-info {
        display: none;
    }

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

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

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

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

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

    .pipeline-board {
        grid-template-columns: 1fr;
    }

    .profile-header {
        flex-direction: column;
    }

    .profile-actions {
        width: 100%;
    }

    .profile-actions .btn {
        flex: 1;
        justify-content: center;
    }
}
