:root {
    --primary: #0a1628;
    --primary-light: #1a2a4a;
    --primary-dark: #07101d;
    --accent: #c9a84c;
    --accent-hover: #b8953e;
    --accent-light: #e8d5a5;
    --text: #1e293b;
    --text-light: #64748b;
    --text-muted: #94a3b8;
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 70px;
    --header-height: 70px;
    --border-radius: 12px;
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
    --transition: all 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    background: var(--gray-50);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6,
.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    color: var(--primary);
}

.text-accent { color: var(--accent); }
.text-primary { color: var(--primary) !important; }
.bg-primary { background-color: var(--primary) !important; }
.bg-accent { background-color: var(--accent) !important; }

/* Sidebar */
.sidebar {
    position: fixed; top: 0; left: 0; height: 100vh;
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--white); z-index: 1040; transition: var(--transition);
    display: flex; flex-direction: column; box-shadow: var(--shadow-lg);
}
.sidebar.collapsed { width: var(--sidebar-collapsed-width); }

.sidebar-header {
    padding: 1.5rem; border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex; align-items: center; gap: 0.75rem;
    min-height: var(--header-height);
}
.sidebar-header .logo-icon {
    width: 40px; height: 40px; background: var(--accent);
    border-radius: 10px; display: flex; align-items: center;
    justify-content: center; color: var(--primary);
    font-size: 1.1rem; flex-shrink: 0; font-weight: 900;
}
.sidebar-header .logo-text {
    font-weight: 700; font-size: 1.2rem; white-space: nowrap;
    overflow: hidden; transition: var(--transition);
}
.sidebar-header .logo-text span { color: var(--accent); }
.sidebar.collapsed .logo-text { opacity: 0; width: 0; }

.sidebar-toggle {
    background: none; border: none; color: var(--white);
    font-size: 1.2rem; cursor: pointer; padding: 0.5rem;
    border-radius: 8px; transition: var(--transition); margin-left: auto;
}
.sidebar-toggle:hover { background: rgba(255,255,255,0.1); }

.sidebar-menu { flex: 1; padding: 1rem 0; overflow-y: auto; }
.sidebar-menu .nav-link {
    color: rgba(255,255,255,0.85); padding: 0.85rem 1.5rem;
    display: flex; align-items: center; gap: 0.85rem;
    text-decoration: none; font-weight: 500; font-size: 0.95rem;
    transition: var(--transition); border-left: 3px solid transparent;
    white-space: nowrap;
}
.sidebar-menu .nav-link:hover,
.sidebar-menu .nav-link.active {
    color: var(--white); background: rgba(201,168,76,0.15);
    border-left-color: var(--accent);
}
.sidebar-menu .nav-link i { width: 20px; text-align: center; font-size: 1.1rem; }
.sidebar-menu .nav-text { transition: var(--transition); }
.sidebar.collapsed .nav-text { opacity: 0; width: 0; overflow: hidden; }

.sidebar-footer {
    padding: 1rem 1.5rem; border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.85rem; color: rgba(255,255,255,0.6);
}
.sidebar.collapsed .sidebar-footer { text-align: center; padding: 1rem 0.5rem; }
.sidebar.collapsed .sidebar-footer span { display: none; }

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width); transition: var(--transition);
    min-height: 100vh; display: flex; flex-direction: column;
}
.sidebar.collapsed + .main-content { margin-left: var(--sidebar-collapsed-width); }

/* Header */
.header {
    height: var(--header-height); background: var(--white);
    border-bottom: 1px solid var(--gray-200); display: flex;
    align-items: center; justify-content: space-between;
    padding: 0 2rem; position: sticky; top: 0; z-index: 1030;
    box-shadow: var(--shadow);
}
.header-left { display: flex; align-items: center; gap: 1rem; }
.header-title { font-size: 1.4rem; font-weight: 700; color: var(--primary); margin: 0; }
.header-right { display: flex; align-items: center; gap: 1rem; }

.search-box { position: relative; }
.search-box input {
    padding: 0.6rem 1rem 0.6rem 2.5rem; border: 2px solid var(--gray-200);
    border-radius: 10px; font-size: 0.9rem; width: 220px;
    transition: var(--transition); background: var(--gray-50);
}
.search-box input:focus {
    outline: none; border-color: var(--accent);
    background: var(--white); width: 260px;
}
.search-box i {
    position: absolute; left: 0.9rem; top: 50%;
    transform: translateY(-50%); color: var(--text-light);
}

.header-actions { display: flex; align-items: center; gap: 0.5rem; }
.header-btn {
    width: 42px; height: 42px; border-radius: 10px; border: none;
    background: var(--gray-100); color: var(--text);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: var(--transition); position: relative;
}
.header-btn:hover { background: var(--accent); color: var(--primary); }
.header-btn .badge {
    position: absolute; top: -4px; right: -4px;
    font-size: 0.7rem; padding: 0.2rem 0.4rem;
}

.user-menu {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.5rem; border-radius: 10px;
    cursor: pointer; transition: var(--transition);
}
.user-menu:hover { background: var(--gray-100); }
.user-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    display: flex; align-items: center; justify-content: center;
    color: var(--primary); font-weight: 600; font-size: 0.9rem;
}
.user-info { line-height: 1.2; }
.user-name { font-weight: 600; font-size: 0.95rem; color: var(--primary); }
.user-role { font-size: 0.8rem; color: var(--text-light); }

/* Page Content */
.page-content { flex: 1; padding: 2rem; }

/* Stats Cards */
.stats-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem; margin-bottom: 2rem;
}
.stat-card {
    background: var(--white); border-radius: var(--border-radius);
    padding: 1.5rem; box-shadow: var(--shadow);
    display: flex; align-items: center; gap: 1rem;
    transition: var(--transition); border: 1px solid var(--gray-200);
}
.stat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.stat-icon {
    width: 56px; height: 56px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; flex-shrink: 0;
}
.stat-icon.primary { background: rgba(10,22,40,0.1); color: var(--primary); }
.stat-icon.accent { background: rgba(201,168,76,0.15); color: var(--accent); }
.stat-icon.success { background: rgba(16,185,129,0.15); color: var(--success); }
.stat-icon.warning { background: rgba(245,158,11,0.15); color: var(--warning); }
.stat-info h3 {
    font-size: 1.8rem; font-weight: 800; margin-bottom: 0.25rem; color: var(--primary);
}
.stat-info p { font-size: 0.9rem; color: var(--text-light); margin: 0; }
.stat-change {
    font-size: 0.8rem; display: flex; align-items: center; gap: 0.25rem; margin-top: 0.5rem;
}
.stat-change.positive { color: var(--success); }
.stat-change.negative { color: var(--danger); }

/* Table Styles */
.table-container {
    background: var(--white); border-radius: var(--border-radius);
    box-shadow: var(--shadow); overflow: hidden;
    margin-bottom: 2rem; border: 1px solid var(--gray-200);
}
.table-header {
    padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--gray-200);
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 1rem;
}
.table-title { font-size: 1.2rem; font-weight: 700; margin: 0; color: var(--primary); }
.table-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

.btn-accent {
    background: var(--accent); color: var(--primary); border: none;
    padding: 0.5rem 1.25rem; border-radius: 8px; font-weight: 600;
    font-size: 0.9rem; display: inline-flex; align-items: center;
    gap: 0.5rem; transition: var(--transition); cursor: pointer;
}
.btn-accent:hover { background: var(--accent-hover); transform: translateY(-2px); }

.btn-outline-primary {
    background: transparent; color: var(--primary);
    border: 2px solid var(--primary); padding: 0.5rem 1.25rem;
    border-radius: 8px; font-weight: 600; font-size: 0.9rem;
    display: inline-flex; align-items: center; gap: 0.5rem;
    transition: var(--transition); cursor: pointer;
}
.btn-outline-primary:hover { background: var(--primary); color: var(--white); }

.table-responsive { overflow-x: auto; }
.table { margin: 0; min-width: 800px; }
.table thead th {
    background: var(--gray-100); color: var(--text); font-weight: 600;
    font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.5px;
    padding: 1rem 1.25rem; border-bottom: 2px solid var(--gray-200);
}
.table tbody td {
    padding: 1rem 1.25rem; border-bottom: 1px solid var(--gray-200);
    font-size: 0.95rem; vertical-align: middle;
}
.table tbody tr:hover { background: var(--gray-50); }
.table tbody tr:last-child td { border-bottom: none; }

/* Status Badges */
.badge {
    font-weight: 600; font-size: 0.75rem; padding: 0.35rem 0.75rem;
    border-radius: 6px; text-transform: uppercase; letter-spacing: 0.3px;
}
.badge-success { background: rgba(16,185,129,0.15); color: var(--success); }
.badge-warning { background: rgba(245,158,11,0.15); color: var(--warning); }
.badge-danger { background: rgba(239,68,68,0.15); color: var(--danger); }
.badge-info { background: rgba(59,130,246,0.15); color: var(--info); }
.badge-primary { background: rgba(10,22,40,0.1); color: var(--primary); }

/* Action Buttons */
.action-btns { display: flex; gap: 0.5rem; }
.action-btn {
    width: 34px; height: 34px; border-radius: 8px; border: none;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: var(--transition); font-size: 0.9rem;
}
.action-btn.view { background: rgba(59,130,246,0.15); color: var(--info); }
.action-btn.edit { background: rgba(245,158,11,0.15); color: var(--warning); }
.action-btn.delete { background: rgba(239,68,68,0.15); color: var(--danger); }
.action-btn:hover { transform: translateY(-2px); }

/* Candidate Card */
.candidate-card {
    background: var(--white); border-radius: var(--border-radius);
    padding: 1.5rem; box-shadow: var(--shadow); display: flex;
    gap: 1.25rem; align-items: center; margin-bottom: 1rem;
    border: 1px solid var(--gray-200); transition: var(--transition);
}
.candidate-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.candidate-avatar {
    width: 60px; height: 60px; border-radius: 50%;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    display: flex; align-items: center; justify-content: center;
    color: var(--primary); font-weight: 700; font-size: 1.3rem; flex-shrink: 0;
}
.candidate-details { flex: 1; min-width: 0; }
.candidate-name {
    font-weight: 700; font-size: 1.1rem; color: var(--primary);
    margin-bottom: 0.25rem;
}
.candidate-role { color: var(--accent); font-weight: 600; font-size: 0.9rem; margin-bottom: 0.5rem; }
.candidate-meta { display: flex; gap: 1rem; font-size: 0.85rem; color: var(--text-light); }
.candidate-meta span { display: flex; align-items: center; gap: 0.3rem; }
.candidate-actions { display: flex; gap: 0.5rem; }

/* Charts Container */
.charts-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem; margin-bottom: 2rem;
}
.chart-card {
    background: var(--white); border-radius: var(--border-radius);
    padding: 1.5rem; box-shadow: var(--shadow); border: 1px solid var(--gray-200);
}
.chart-header {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem;
}
.chart-title { font-size: 1.1rem; font-weight: 700; color: var(--primary); margin: 0; }

/* Form Styles */
.form-card {
    background: var(--white); border-radius: var(--border-radius);
    padding: 2rem; box-shadow: var(--shadow); border: 1px solid var(--gray-200);
    margin-bottom: 2rem;
}
.form-card-title {
    font-size: 1.3rem; font-weight: 700; color: var(--primary);
    margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--gray-200);
}
.form-label { font-weight: 600; color: var(--primary); font-size: 0.9rem; margin-bottom: 0.5rem; }
.form-control, .form-select {
    padding: 0.75rem 1rem; border: 2px solid var(--gray-200);
    border-radius: 10px; font-size: 1rem; transition: var(--transition);
    background: var(--gray-50);
}
.form-control:focus, .form-select:focus {
    outline: none; border-color: var(--accent); background: var(--white);
    box-shadow: 0 0 0 3px rgba(201,168,76,0.15);
}

/* Pagination */
.pagination { justify-content: center; margin-top: 1.5rem; }
.page-link {
    color: var(--text); border-color: var(--gray-200); padding: 0.5rem 1rem;
    margin: 0 0.25rem; border-radius: 8px !important; transition: var(--transition);
}
.page-link:hover, .page-item.active .page-link {
    background: var(--accent); border-color: var(--accent); color: var(--primary);
}

/* Modal Customization */
.modal-content { border-radius: var(--border-radius); border: none; box-shadow: var(--shadow-lg); }
.modal-header { border-bottom: 1px solid var(--gray-200); padding: 1.25rem 1.5rem; }
.modal-title { font-family: 'Playfair Display', serif; font-weight: 700; color: var(--primary); }
.modal-body { padding: 1.5rem; }
.modal-footer { border-top: 1px solid var(--gray-200); padding: 1rem 1.5rem; }

/* Responsive */
@media (max-width: 992px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.mobile-open { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .sidebar.collapsed + .main-content, .sidebar + .main-content { margin-left: 0; }
    .header { padding: 0 1rem; }
    .search-box input { width: 180px; }
    .search-box input:focus { width: 200px; }
    .charts-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .page-content { padding: 1rem; }
    .stats-grid { grid-template-columns: 1fr; }
    .table-header { flex-direction: column; align-items: stretch; }
    .table-actions { justify-content: center; }
    .search-box { width: 100%; }
    .search-box input { width: 100%; }
    .search-box input:focus { width: 100%; }
    .header-right { gap: 0.5rem; }
    .header-btn { width: 38px; height: 38px; }
    .user-info { display: none; }
}
@media (max-width: 576px) {
    .sidebar-header { padding: 1rem; }
    .candidate-card { flex-direction: column; text-align: center; }
    .candidate-actions { justify-content: center; }
    .action-btns { justify-content: center; }
}

/* Overlay for mobile sidebar */
.sidebar-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5); z-index: 1035;
    opacity: 0; visibility: hidden; transition: var(--transition);
}
.sidebar-overlay.active { opacity: 1; visibility: visible; }

/* Animations */
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.animate-fade-in { animation: fadeIn 0.4s ease forwards; }

/* Custom Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--gray-100); }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-light); }

/* Step Wizard */
.step-wizard { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; overflow-x: auto; padding-bottom: 8px; }
.step-item { display: flex; flex-direction: column; align-items: center; min-width: 56px; }
.step-num {
    width: 34px; height: 34px; border-radius: 50%; display: flex;
    align-items: center; justify-content: center; font-size: .8rem;
    font-weight: 700; border: 2px solid var(--gray-200);
    background: var(--white); color: var(--text-muted); transition: .3s;
}
.step-item.active .step-num { background: var(--accent); border-color: var(--accent); color: var(--primary); }
.step-item.done .step-num { background: var(--success); border-color: var(--success); color: var(--white); }
.step-label { font-size: .65rem; color: var(--text-muted); margin-top: 4px; text-align: center; white-space: nowrap; }
.step-item.active .step-label { color: var(--accent); font-weight: 600; }
.step-line { flex: 1; height: 2px; background: var(--gray-200); margin: 0 4px; margin-bottom: 18px; }
.step-line.done { background: var(--success); }
.form-step { display: none; }
.form-step.active { display: block; }
.step-card { border-radius: 12px; border: none; box-shadow: var(--shadow); }
.step-header {
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    color: var(--primary); border-radius: 12px 12px 0 0;
    padding: 1rem 1.5rem; font-weight: 700;
}

/* Upload Zone */
.upload-zone {
    border: 2px dashed var(--gray-200); border-radius: 10px;
    padding: 1.5rem; text-align: center; cursor: pointer;
    transition: var(--transition); background: var(--gray-50);
}
.upload-zone:hover { border-color: var(--accent); background: rgba(201,168,76,0.05); }

/* Profile Header */
.profile-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 16px; padding: 2rem; color: var(--white);
}
.profile-avatar {
    width: 110px; height: 110px; border-radius: 50%;
    object-fit: cover; border: 4px solid var(--accent);
}
.profile-avatar-placeholder {
    width: 110px; height: 110px; border-radius: 50%;
    background: var(--accent); display: flex; align-items: center;
    justify-content: center; font-size: 2.5rem; font-weight: 900;
    color: var(--primary); border: 4px solid rgba(255,255,255,0.3);
}
.detail-label {
    font-size: .72rem; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: .5px; font-weight: 600;
}
.detail-value { font-size: .95rem; font-weight: 500; }
.status-badge { font-size: .8rem; padding: .4em .8em; }
.doc-thumb {
    width: 80px; height: 80px; object-fit: cover;
    border-radius: 8px; border: 2px solid var(--gray-200);
}
.video-card {
    border-radius: 10px; overflow: hidden;
    border: 1px solid var(--gray-200);
}
.video-card video { width: 100%; height: 200px; object-fit: cover; }
.section-title {
    font-size: .8rem; text-transform: uppercase;
    letter-spacing: 1px; color: var(--text-muted);
    font-weight: 700; border-bottom: 2px solid var(--accent);
    padding-bottom: 4px; margin-bottom: 1rem;
}
.progress-bar-label { font-size: .65rem; }

/* Star Rating */
.star-rating span { cursor: pointer; font-size: 1.2rem; color: var(--gray-200); transition: color .15s; }
.star-rating span.active, .star-rating span:hover { color: var(--accent); }

/* Print Styles */
@media print {
    .sidebar, .header, .btn, .header-toggler, .no-print { display: none !important; }
    #main { margin-left: 0 !important; }
    .card { box-shadow: none !important; border: 1px solid var(--gray-200) !important; }
}