/* ============================================
   HR HIRING PLATFORM — Premium Dark Theme
   ============================================ */

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ============================================
   CSS Custom Properties (Design Tokens)
   ============================================ */
:root {
    /* Background Gradients */
    --bg-primary: #0a0e1a;
    --bg-secondary: #111827;
    --bg-card: #1a1f35;
    --bg-card-hover: #1f2642;
    --bg-sidebar: #0d1225;
    --bg-input: #151b30;
    --bg-topbar: rgba(17, 24, 39, 0.85);

    /* Accent Colors */
    --accent-primary: #6366f1;
    --accent-primary-hover: #818cf8;
    --accent-secondary: #8b5cf6;
    --accent-green: #10b981;
    --accent-green-glow: rgba(16, 185, 129, 0.15);
    --accent-blue: #3b82f6;
    --accent-blue-glow: rgba(59, 130, 246, 0.15);
    --accent-yellow: #f59e0b;
    --accent-yellow-glow: rgba(245, 158, 11, 0.15);
    --accent-red: #ef4444;
    --accent-red-glow: rgba(239, 68, 68, 0.15);
    --accent-purple: #8b5cf6;
    --accent-purple-glow: rgba(139, 92, 246, 0.15);
    --accent-cyan: #06b6d4;

    /* Text Colors */
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-accent: #818cf8;

    /* Borders */
    --border-color: rgba(99, 102, 241, 0.12);
    --border-light: rgba(255, 255, 255, 0.06);

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 24px rgba(99, 102, 241, 0.15);

    /* Sizing */
    --sidebar-width: 260px;
    --topbar-height: 64px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === Light Theme === */
[data-theme="light"] {
    --bg-primary: #FFFFFF;
    --bg-secondary: #F8F9FA;
    --bg-card: #FFFFFF;
    --bg-card-hover: #F0F1F3;
    --bg-sidebar: #FFFFFF;
    --bg-input: #F3F4F6;
    --bg-topbar: rgba(255, 255, 255, 0.85);

    --accent-primary: #6366f1;
    --accent-primary-hover: #4f46e5;
    --accent-secondary: #7c3aed;

    --text-primary: #111827;
    --text-secondary: #6B7280;
    --text-muted: #9CA3AF;
    --text-accent: #4f46e5;

    --border-color: rgba(0, 0, 0, 0.08);
    --border-light: rgba(0, 0, 0, 0.05);

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 24px rgba(99, 102, 241, 0.1);
}

/* ============================================
   Reset & Base
   ============================================ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: var(--accent-primary);
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-primary-hover);
}

/* ============================================
   Auth Pages (Login/Register)
   ============================================ */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

.auth-wrapper::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at 30% 20%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
                radial-gradient(ellipse at 70% 80%, rgba(139, 92, 246, 0.06) 0%, transparent 50%),
                radial-gradient(ellipse at 50% 50%, rgba(6, 182, 212, 0.04) 0%, transparent 60%);
    animation: authBgPulse 15s ease-in-out infinite alternate;
}

@keyframes authBgPulse {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-2%, 1%) scale(1.05); }
}

.auth-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 460px;
    padding: 48px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    animation: authFadeIn 0.6s ease-out;
}

@keyframes authFadeIn {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.auth-card .logo {
    text-align: center;
    margin-bottom: 24px;
}

.auth-card .logo.auth-logo {
    max-width: 100%;
}

.auth-card .logo.auth-logo .auth-logo-img {
    display: inline-block;
    max-width: 180px;
    max-height: 40px;
    width: auto;
    height: auto;
    object-fit: contain;
    margin-bottom: 8px;
}

.auth-card .logo p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 6px;
}

.auth-card h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.auth-card .subtitle {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 28px;
}

/* ============================================
   Layout: Sidebar + Topbar + Main Content
   ============================================ */
.layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform var(--transition-slow);
}

.sidebar-brand {
    padding: 24px 20px;
    border-bottom: 1px solid var(--border-light);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 2px;
}

.sidebar-logo .sidebar-logo-img {
    height: 40px;
    width: auto;
}

.sidebar-logo .sidebar-logo-text {
    font-size: 1.25rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.sidebar-brand span.sidebar-panel-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.sidebar-nav .nav-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    padding: 16px 12px 8px;
    font-weight: 700;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition-normal);
    margin-bottom: 2px;
    position: relative;
}

.sidebar-nav a:hover {
    background: rgba(99, 102, 241, 0.08);
    color: var(--text-primary);
}

.sidebar-nav a.active {
    background: rgba(99, 102, 241, 0.12);
    color: var(--accent-primary-hover);
    font-weight: 600;
}

.sidebar-nav a.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    background: var(--accent-primary);
    border-radius: 0 3px 3px 0;
}

.sidebar-nav a .icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.sidebar-nav a .badge {
    margin-left: auto;
    background: var(--accent-primary);
    color: white;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.sidebar-footer {
    padding: 16px 12px;
    border-top: 1px solid var(--border-light);
}

.sidebar-footer .user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    transition: background var(--transition-normal);
}

.sidebar-footer .user-info:hover {
    background: rgba(99, 102, 241, 0.08);
}

.sidebar-footer .user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: white;
    flex-shrink: 0;
}

.sidebar-footer .user-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.sidebar-footer .user-role {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Main Content Area */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Topbar */
.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--topbar-height);
    background: var(--bg-topbar);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-left h1 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
}

.topbar-search {
    position: relative;
}

.topbar-search input {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 8px 16px 8px 38px;
    color: var(--text-primary);
    font-size: 0.85rem;
    width: 280px;
    transition: all var(--transition-normal);
    font-family: 'Inter', sans-serif;
}

.topbar-search input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    width: 340px;
}

.topbar-search input::placeholder {
    color: var(--text-muted);
}

.topbar-search .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-right .btn-topbar {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.15rem;
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    position: relative;
}

.topbar-right .btn-topbar:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--text-primary);
}

.topbar-right .btn-topbar .notification-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 7px;
    height: 7px;
    background: var(--accent-red);
    border-radius: 50%;
}

.hamburger {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.4rem;
    cursor: pointer;
    padding: 4px;
}

/* Page Content */
.page-content {
    padding: 28px 32px;
    flex: 1;
}

/* ============================================
   Stats Cards
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-normal);
    cursor: default;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-primary);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: 3px 3px 0 0;
}

.stat-card.indigo::before { background: linear-gradient(90deg, #6366f1, #818cf8); }
.stat-card.green::before { background: linear-gradient(90deg, #10b981, #34d399); }
.stat-card.blue::before { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.stat-card.purple::before { background: linear-gradient(90deg, #8b5cf6, #a78bfa); }
.stat-card.yellow::before { background: linear-gradient(90deg, #f59e0b, #fbbf24); }

.stat-card .stat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 16px;
}

.stat-card.indigo .stat-icon { background: rgba(99, 102, 241, 0.12); color: #818cf8; }
.stat-card.green .stat-icon { background: var(--accent-green-glow); color: #34d399; }
.stat-card.blue .stat-icon { background: var(--accent-blue-glow); color: #60a5fa; }
.stat-card.purple .stat-icon { background: var(--accent-purple-glow); color: #a78bfa; }
.stat-card.yellow .stat-icon { background: var(--accent-yellow-glow); color: #fbbf24; }

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 4px;
    letter-spacing: -0.02em;
}

.stat-card .stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ============================================
   Cards & Panels
   ============================================ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-normal);
}

.card:hover {
    border-color: rgba(99, 102, 241, 0.2);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light);
}

.card-header h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.card-header .card-action {
    font-size: 0.8rem;
    color: var(--accent-primary);
    font-weight: 600;
    cursor: pointer;
    transition: color var(--transition-fast);
}

.card-header .card-action:hover {
    color: var(--accent-primary-hover);
}

.card-body {
    padding: 24px;
}

.card-body.no-padding {
    padding: 0;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 28px;
}

.dashboard-grid.three-col {
    grid-template-columns: 2fr 1fr;
}

/* ============================================
   Charts Container
   ============================================ */
.chart-container {
    position: relative;
    width: 100%;
    height: 280px;
    padding: 12px;
}

/* ============================================
   Pipeline Bar
   ============================================ */
.pipeline-bar {
    display: flex;
    height: 10px;
    border-radius: 5px;
    overflow: hidden;
    background: var(--bg-input);
    margin: 16px 0;
}

.pipeline-bar .segment {
    height: 100%;
    transition: width var(--transition-slow);
}

.pipeline-bar .segment.applied { background: #6366f1; }
.pipeline-bar .segment.reviewing { background: #f59e0b; }
.pipeline-bar .segment.shortlisted { background: #3b82f6; }
.pipeline-bar .segment.interview { background: #8b5cf6; }
.pipeline-bar .segment.hired { background: #10b981; }
.pipeline-bar .segment.rejected { background: #ef4444; }

.pipeline-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 12px;
}

.pipeline-legend .legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.pipeline-legend .legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ============================================
   Tables
   ============================================ */
.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table thead th {
    padding: 14px 20px;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-light);
    white-space: nowrap;
}

table tbody tr {
    transition: background var(--transition-fast);
}

table tbody tr:hover {
    background: rgba(99, 102, 241, 0.04);
}

table tbody td {
    padding: 14px 20px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-light);
    white-space: nowrap;
}

table tbody td:first-child {
    color: var(--text-primary);
    font-weight: 500;
}

/* ============================================
   Status Badges
   ============================================ */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-badge.applied { background: rgba(99, 102, 241, 0.12); color: #818cf8; }
.status-badge.applied::before { background: #818cf8; }

.status-badge.reviewing { background: var(--accent-yellow-glow); color: #fbbf24; }
.status-badge.reviewing::before { background: #fbbf24; }

.status-badge.shortlisted { background: var(--accent-blue-glow); color: #60a5fa; }
.status-badge.shortlisted::before { background: #60a5fa; }

.status-badge.interview { background: var(--accent-purple-glow); color: #a78bfa; }
.status-badge.interview::before { background: #a78bfa; }

.status-badge.hired { background: var(--accent-green-glow); color: #34d399; }
.status-badge.hired::before { background: #34d399; }

.status-badge.rejected { background: var(--accent-red-glow); color: #f87171; }
.status-badge.rejected::before { background: #f87171; }

.status-badge.active { background: var(--accent-green-glow); color: #34d399; }
.status-badge.active::before { background: #34d399; }

.status-badge.draft { background: rgba(100, 116, 139, 0.15); color: #94a3b8; }
.status-badge.draft::before { background: #94a3b8; }

.status-badge.paused { background: var(--accent-yellow-glow); color: #fbbf24; }
.status-badge.paused::before { background: #fbbf24; }

.status-badge.closed { background: var(--accent-red-glow); color: #f87171; }
.status-badge.closed::before { background: #f87171; }

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-decoration: none;
    line-height: 1.2;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    box-shadow: 0 2px 12px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
    color: white;
}

.btn-secondary {
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.btn-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.3);
    color: white;
}

.btn-outline {
    background: transparent;
    color: var(--accent-primary);
    border: 1px solid var(--accent-primary);
}

.btn-outline:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-primary-hover);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 1rem;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.btn-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ============================================
   Forms
   ============================================ */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.form-control {
    width: 100%;
    padding: 11px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
    transition: all var(--transition-normal);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.form-control::placeholder {
    color: var(--text-muted);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8.825L.35 3.175l.7-.7L6 7.425l4.95-4.95.7.7z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-error {
    color: var(--accent-red);
    font-size: 0.78rem;
    margin-top: 4px;
}

.form-help {
    color: var(--text-muted);
    font-size: 0.78rem;
    margin-top: 4px;
}

/* Django form errors */
.errorlist {
    list-style: none;
    padding: 0;
    margin: 4px 0 0;
}

.errorlist li {
    color: var(--accent-red);
    font-size: 0.78rem;
    padding: 2px 0;
}

/* ============================================
   Job Cards
   ============================================ */
.jobs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}

.job-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.job-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md), var(--shadow-glow);
}

.job-card .job-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 14px;
}

.job-card .job-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.job-card .job-dept {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.job-card .job-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 14px 0;
}

.job-card .job-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.job-card .job-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 14px 0;
}

.skill-tag {
    padding: 3px 10px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-primary-hover);
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 500;
}

.job-card .job-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border-light);
}

.job-card .job-salary {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--accent-green);
}

.job-card .job-applicants {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* ============================================
   Candidate Profile Card
   ============================================ */
.profile-card {
    display: flex;
    gap: 24px;
    padding: 28px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.profile-info h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.profile-info .headline {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.profile-info .detail-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

/* ============================================
   Filter Bar
   ============================================ */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-bar input,
.filter-bar select {
    padding: 8px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-family: 'Inter', sans-serif;
    transition: border-color var(--transition-fast);
}

.filter-bar input:focus,
.filter-bar select:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.filter-bar 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 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8.825L.35 3.175l.7-.7L6 7.425l4.95-4.95.7.7z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}

/* ============================================
   Messages / Alerts
   ============================================ */
.messages {
    list-style: none;
    padding: 0;
    margin-bottom: 20px;
}

.alert {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: alertSlideIn 0.3s ease-out;
}

@keyframes alertSlideIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

/* ============================================
   Empty States
   ============================================ */
.empty-state {
    text-align: center;
    padding: 60px 32px;
    color: var(--text-muted);
}

.empty-state .empty-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 0.875rem;
    max-width: 400px;
    margin: 0 auto;
}

/* ============================================
   Hiring Donut / Big Number
   ============================================ */
.big-stat {
    text-align: center;
    padding: 32px;
}

.big-stat .big-number {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-green), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 8px;
}

.big-stat .big-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ============================================
   Detail Page
   ============================================ */
.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 28px;
}

.detail-header h1 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.detail-header .meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.detail-header .meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.detail-section {
    margin-bottom: 24px;
}

.detail-section h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-light);
}

.detail-section p,
.detail-section ul {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.8;
}

.detail-section ul {
    padding-left: 20px;
}

/* ============================================
   Pagination
   ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 28px;
}

.pagination a,
.pagination span {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.pagination a {
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.pagination a:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--accent-primary);
    color: var(--accent-primary-hover);
}

.pagination .current {
    background: var(--accent-primary);
    color: white;
}

/* ============================================
   Confirmation Box
   ============================================ */
.confirm-box {
    max-width: 500px;
    margin: 60px auto;
    text-align: center;
}

.confirm-box .confirm-icon {
    font-size: 3.5rem;
    margin-bottom: 20px;
}

.confirm-box h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.confirm-box p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* ============================================
   File Upload
   ============================================ */
.file-upload {
    position: relative;
}

.file-upload input[type="file"] {
    width: 100%;
    padding: 11px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
}

.file-upload input[type="file"]::file-selector-button {
    background: var(--accent-primary);
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    margin-right: 12px;
    font-family: 'Inter', sans-serif;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .dashboard-grid.three-col {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 99;
    }

    .sidebar-overlay.active {
        display: block;
    }

    .main-content {
        margin-left: 0;
    }

    .hamburger {
        display: block;
    }

    .topbar {
        padding: 0 16px;
    }

    .topbar-search {
        display: none;
    }

    .page-content {
        padding: 16px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .jobs-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .detail-header {
        flex-direction: column;
        gap: 16px;
    }

    .profile-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .auth-card {
        margin: 16px;
        padding: 28px;
    }

    .auth-card .logo.auth-logo .auth-logo-img {
        max-width: 140px;
        max-height: 32px;
    }

    table {
        font-size: 0.8rem;
    }

    table thead th,
    table tbody td {
        padding: 10px 12px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .btn-group {
        flex-direction: column;
    }

    .auth-card {
        padding: 24px 20px;
    }

    .auth-card .logo.auth-logo .auth-logo-img {
        max-width: 120px;
        max-height: 28px;
    }
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in-up {
    animation: fadeInUp 0.4s ease-out;
}

.stagger-1 { animation-delay: 0.05s; opacity: 0; animation-fill-mode: forwards; }
.stagger-2 { animation-delay: 0.1s; opacity: 0; animation-fill-mode: forwards; }
.stagger-3 { animation-delay: 0.15s; opacity: 0; animation-fill-mode: forwards; }
.stagger-4 { animation-delay: 0.2s; opacity: 0; animation-fill-mode: forwards; }
.stagger-5 { animation-delay: 0.25s; opacity: 0; animation-fill-mode: forwards; }

/* ============================================
   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(--accent-primary);
}

/* ============================================
   Utilities
   ============================================ */
.text-muted { color: var(--text-muted) !important; }
.text-primary { color: var(--accent-primary) !important; }
.text-green { color: var(--accent-green) !important; }
.text-red { color: var(--accent-red) !important; }
.text-yellow { color: var(--accent-yellow) !important; }
.text-center { text-align: center; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }

/* === Theme Toggle Button (Dashboard) === */
.theme-toggle-dash {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.25s ease;
    position: relative;
    line-height: 1;
}
.theme-toggle-dash:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: rotate(15deg);
}
.theme-toggle-dash:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}
.theme-toggle-dash .icon-sun,
.theme-toggle-dash .icon-moon {
    position: absolute;
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.theme-toggle-dash .icon-sun {
    opacity: 0;
    transform: scale(0.5) rotate(-90deg);
}
.theme-toggle-dash .icon-moon {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}
[data-theme="light"] .theme-toggle-dash .icon-sun {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}
[data-theme="light"] .theme-toggle-dash .icon-moon {
    opacity: 0;
    transform: scale(0.5) rotate(90deg);
}

/* === Smooth Theme Transition === */
html, html *, html *::before, html *::after {
    transition: background-color 300ms ease, color 300ms ease, border-color 300ms ease, box-shadow 300ms ease;
}
html.theme-transitioning, html.theme-transitioning *, html.theme-transitioning *::before, html.theme-transitioning *::after {
    transition: none !important;
}
