/* Kinetic Enterprise Design System Style */

/* Theme Variables Definition */
:root {
    /* Fonts */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-heading: 'Hanken Grotesk', 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Theme Colors (Light Mode Default) */
    --bg-app: #f8f9ff;
    --bg-surface: #ffffff;
    --bg-header: #ffffff;
    --bg-sidebar: #f1f5f9;
    --bg-sidebar-hover: #e2e8f0;
    
    --border-color: #e2e8f0;
    --border-card: rgba(0, 83, 219, 0.05);

    /* Text Colors */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --text-inverse: #ffffff;

    /* Brand Colors */
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;
    --primary-on: #ffffff;
    --primary-container: #dbeafe;
    --primary-container-text: #1e40af;

    /* Functional Colors */
    --success: #22c55e;
    --success-light: #f0fdf4;
    --success-text: #166534;
    
    --danger: #ef4444;
    --danger-light: #fef2f2;
    --danger-text: #991b1b;
    
    --warning: #f59e0b;
    --warning-light: #fefbeb;
    --warning-text: #92400e;

    /* Elevations & Shadows */
    --shadow-sm: 0px 1px 3px rgba(0, 0, 0, 0.05), 0px 10px 15px -5px rgba(0, 0, 0, 0.03);
    --shadow-md: 0px 4px 6px -1px rgba(0, 0, 0, 0.05), 0px 2px 4px -2px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0px 20px 25px -5px rgba(15, 23, 42, 0.08), 0px 10px 10px -5px rgba(15, 23, 42, 0.04);
    
    /* Shapes & Radii */
    --radius-sm: 0.25rem; /* 4px */
    --radius-md: 0.5rem;  /* 8px */
    --radius-lg: 1rem;   /* 16px */
    --radius-full: 9999px;

    /* Layout Dimens */
    --header-height: 4rem; /* 64px */
    --sidebar-width: 17.5rem; /* 280px */
}

/* Dark Mode Variables Override */
html.dark {
    --bg-app: #090d16;
    --bg-surface: #111827;
    --bg-header: #111827;
    --bg-sidebar: #0f172a;
    --bg-sidebar-hover: #1e293b;
    
    --border-color: #1e293b;
    --border-card: rgba(255, 255, 255, 0.05);

    /* Text Colors */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-inverse: #090d16;

    /* Brand Colors */
    --primary: #3b82f6;
    --primary-hover: #60a5fa;
    --primary-light: rgba(59, 130, 246, 0.15);
    --primary-container: rgba(59, 130, 246, 0.2);
    --primary-container-text: #93c5fd;

    /* Functional Colors (Dark mode friendly) */
    --success: #10b981;
    --success-light: rgba(16, 185, 129, 0.12);
    --success-text: #34d399;
    
    --danger: #ef4444;
    --danger-light: rgba(239, 68, 68, 0.12);
    --danger-text: #f87171;
    
    --warning: #f59e0b;
    --warning-light: rgba(245, 158, 11, 0.12);
    --warning-text: #fbbf24;

    /* Shadows */
    --shadow-sm: 0px 4px 6px rgba(0, 0, 0, 0.2), 0 0 1px rgba(255, 255, 255, 0.1);
    --shadow-md: 0px 10px 15px -3px rgba(0, 0, 0, 0.3), 0px 4px 6px -2px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0px 25px 50px -12px rgba(0, 0, 0, 0.5);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    height: 100%;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-app);
    color: var(--text-primary);
    line-height: 1.5;
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s ease, color 0.3s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Custom Scrollbars */
.custom-scrollbar::-webkit-scrollbar,
body *::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track,
body *::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb,
body *::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover,
body *::-webkit-scrollbar-thumb:hover {
    background-color: var(--text-muted);
}

/* Button & Links resets */
button {
    font-family: inherit;
    border: none;
    background: none;
    cursor: pointer;
    outline: none;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Icon configuration */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 22;
    vertical-align: middle;
    display: inline-block;
}

/* ==========================================
   App Layout & Header
   ========================================== */
.app-header {
    height: var(--header-height);
    background-color: var(--bg-header);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: var(--shadow-sm);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.header-left, .header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* App Logo Styling */
.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--primary);
    letter-spacing: -0.02em;
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    color: var(--primary);
    padding: 0.35rem;
    border-radius: var(--radius-md);
}

/* Header Search Bar */
.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    color: var(--text-muted);
    pointer-events: none;
}

.search-container input {
    background-color: var(--bg-app);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.5rem 1rem 0.5rem 2.25rem;
    font-size: 0.875rem;
    width: 20rem;
    transition: all 0.2s ease;
    font-family: var(--font-sans);
}

.search-container input:focus {
    background-color: var(--bg-surface);
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Header User Profile */
.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-left: 1px solid var(--border-color);
    padding-left: 1rem;
}

.profile-info {
    display: flex;
    flex-direction: column;
    text-align: right;
}

.profile-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.profile-role {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.profile-img {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: var(--radius-full);
    object-cover: cover;
    border: 2px solid var(--border-color);
}

/* General Icon Button styling */
.icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    transition: background-color 0.2s ease, color 0.2s ease;
}

.icon-btn:hover {
    background-color: var(--bg-sidebar-hover);
    color: var(--text-primary);
}

.notification-btn {
    position: relative;
}

.notification-badge {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    width: 0.5rem;
    height: 0.5rem;
    background-color: var(--danger);
    border-radius: var(--radius-full);
    border: 1.5px solid var(--bg-surface);
}

/* Dark Mode Icon display rules */
#theme-toggle .dark-icon {
    display: none;
}

html.dark #theme-toggle .light-icon {
    display: none;
}

html.dark #theme-toggle .dark-icon {
    display: block;
}

/* Main Layout Grid */
.app-layout {
    display: flex;
    flex: 1;
    height: calc(100vh - var(--header-height));
    overflow: hidden;
    position: relative;
}

/* ==========================================
   Sidebar styling (Filters)
   ========================================== */
.app-sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-surface);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    gap: 1.75rem;
    overflow-y: auto;
    transition: transform 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
    z-index: 40;
}

.sidebar-section {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* Select Form Dropdown */
.custom-select-wrapper {
    position: relative;
}

.form-select {
    width: 100%;
    background-color: var(--bg-app);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.5rem 1.75rem 0.5rem 0.75rem;
    font-size: 0.875rem;
    outline: none;
    font-family: var(--font-sans);
    appearance: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.form-select:focus {
    border-color: var(--primary);
    background-color: var(--bg-surface);
}

.custom-select-wrapper::after {
    content: "expand_more";
    font-family: 'Material Symbols Outlined';
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
    font-size: 1.25rem;
}

/* Checkbox Lists */
.checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.checkbox-container {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 1.75rem;
    font-size: 0.875rem;
    color: var(--text-primary);
    cursor: pointer;
    user-select: none;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkbox-checkmark {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 1.125rem;
    width: 1.125rem;
    background-color: var(--bg-app);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.checkbox-container:hover input ~ .checkbox-checkmark {
    border-color: var(--text-muted);
}

.checkbox-container input:checked ~ .checkbox-checkmark {
    background-color: var(--primary);
    border-color: var(--primary);
}

.checkbox-checkmark::after {
    content: "";
    position: absolute;
    display: none;
    left: 0.35rem;
    top: 0.15rem;
    width: 0.25rem;
    height: 0.5rem;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-container input:checked ~ .checkbox-checkmark::after {
    display: block;
}

.checkbox-text {
    font-weight: 500;
}

/* Status Filter Quick Pills */
.status-pills {
    display: grid;
    grid-template-cols: 1fr 1fr;
    gap: 0.375rem;
}

.status-pill-btn {
    padding: 0.4rem 0.75rem;
    background-color: var(--bg-app);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    transition: all 0.2s ease;
}

.status-pill-btn:hover {
    border-color: var(--text-muted);
    color: var(--text-primary);
}

.status-pill-btn.active {
    background-color: var(--primary);
    color: var(--primary-on);
    border-color: var(--primary);
}

/* Buttons style */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    text-align: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
}

.btn:active {
    transform: scale(0.97);
}

.btn-icon {
    font-size: 1.125rem;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--primary-on);
}

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

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

.btn-secondary:hover {
    background-color: var(--bg-sidebar-hover);
}

.btn-danger {
    background-color: var(--danger-light);
    color: var(--danger-text);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
    background-color: var(--danger);
    color: var(--text-inverse);
}

.btn-full {
    width: 100%;
}

/* Sidebar Widgets */
.sidebar-widget {
    background: linear-gradient(135deg, var(--bg-app) 0%, var(--bg-surface) 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.widget-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
}

.widget-icon {
    font-size: 1.25rem;
}

.widget-title {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--text-primary);
}

.widget-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.widget-event {
    border-left: 2.5px solid var(--primary);
    padding-left: 0.6rem;
    margin-left: 0.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.event-time {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--primary);
}

.event-name {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
}

.event-role {
    display: block;
    font-size: 0.6875rem;
    color: var(--text-secondary);
}

/* Mobile Sidebar Overlays */
.mobile-only {
    display: none;
}

/* ==========================================
   Main Workspace Container
   ========================================== */
.app-main {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.main-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

/* ==========================================
   Overview Statistics Section
   ========================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

.stat-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.stat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius-md);
}

.stat-icon-wrapper.blue {
    background-color: var(--primary-light);
    color: var(--primary);
}

.stat-icon-wrapper.green {
    background-color: var(--success-light);
    color: var(--success);
}

.stat-icon-wrapper.red {
    background-color: var(--danger-light);
    color: var(--danger);
}

.stat-icon-wrapper.orange {
    background-color: var(--warning-light);
    color: var(--warning);
}

.stat-trend {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-full);
}

.stat-trend.green {
    background-color: var(--success-light);
    color: var(--success-text);
}

.stat-trend.red {
    background-color: var(--danger-light);
    color: var(--danger-text);
}

.stat-trend.gray {
    background-color: var(--bg-app);
    color: var(--text-secondary);
}

.trend-icon {
    font-size: 0.875rem !important;
}

.stat-body {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.15;
}

.stat-label {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-top: 0.15rem;
}

/* ==========================================
   Candidate List & Controls
   ========================================== */
.candidates-section {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.header-titles {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-heading {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
}

.results-badge {
    font-size: 0.75rem;
    font-weight: 600;
    background-color: var(--primary-light);
    color: var(--primary);
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-full);
}

.view-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* View Switcher toggle */
.view-toggle {
    display: flex;
    background-color: var(--bg-app);
    padding: 0.2rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.view-btn {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: calc(var(--radius-md) - 2px);
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.view-btn:hover {
    color: var(--text-primary);
}

.view-btn.active {
    background-color: var(--bg-surface);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

/* Active filters summary container */
.active-filters-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background-color: var(--bg-app);
    border-bottom: 1px solid var(--border-color);
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.active-filters-summary:empty {
    display: none;
}

.summary-chip {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 500;
}

.summary-chip-remove {
    cursor: pointer;
    font-size: 0.875rem !important;
    color: var(--text-muted);
}

.summary-chip-remove:hover {
    color: var(--danger);
}

/* Container for listing elements */
.candidates-table-container {
    overflow-x: auto;
    width: 100%;
}

/* Empty State Styling */
.empty-state {
    padding: 4rem 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.empty-icon {
    font-size: 3rem !important;
    color: var(--text-muted);
}

.empty-title {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.empty-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    max-width: 20rem;
}

/* ==========================================
   Candidate Table View
   ========================================== */
.candidates-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.candidates-table th {
    background-color: var(--bg-app);
    padding: 0.75rem 1.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

.candidates-table td {
    padding: 1rem 1.5rem;
    font-size: 0.875rem;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.candidates-table tr {
    transition: background-color 0.15s ease;
}

.candidates-table tbody tr:hover {
    background-color: var(--bg-app);
}

/* Candidate Profile Info cell */
.candidate-cell-profile {
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

.cell-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius-full);
    object-fit: cover;
    font-weight: 700;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

.cell-avatar.gradient-fallback {
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary) 0%, #60a5fa 100%);
}

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

.cell-name {
    font-weight: 600;
    color: var(--text-primary);
}

.cell-email {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Skill pills inside cell */
.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    max-width: 15rem;
}

.skill-tag {
    font-size: 0.6875rem;
    font-weight: 500;
    background-color: var(--bg-app);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 0.15rem 0.4rem;
    border-radius: var(--radius-sm);
}

.skill-tag.more-skills {
    font-weight: 600;
    color: var(--primary);
    background-color: var(--primary-light);
    border-color: rgba(37, 99, 235, 0.15);
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
}

.status-badge::before {
    content: "";
    width: 0.375rem;
    height: 0.375rem;
    border-radius: var(--radius-full);
}

.status-badge.accepted {
    background-color: var(--success-light);
    color: var(--success-text);
}

.status-badge.accepted::before {
    background-color: var(--success);
}

.status-badge.rejected {
    background-color: var(--danger-light);
    color: var(--danger-text);
}

.status-badge.rejected::before {
    background-color: var(--danger);
}

.status-badge.pending {
    background-color: var(--warning-light);
    color: var(--warning-text);
}

.status-badge.pending::before {
    background-color: var(--warning);
}

/* Row Actions */
.row-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.25rem;
}

.action-btn {
    width: 2rem;
    height: 2rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.action-btn:hover {
    background-color: var(--bg-sidebar-hover);
    color: var(--text-primary);
}

.action-btn.accept:hover {
    background-color: var(--success-light);
    color: var(--success);
}

.action-btn.reject:hover {
    background-color: var(--danger-light);
    color: var(--danger);
}

.action-btn.view:hover {
    background-color: var(--primary-light);
    color: var(--primary);
}

/* ==========================================
   Candidate Grid View
   ========================================== */
.candidates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    padding: 1.5rem;
}

.candidate-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

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

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

.card-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
}

.card-avatar {
    width: 4rem;
    height: 4rem;
    border-radius: var(--radius-full);
    object-fit: cover;
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    border: 3px solid var(--bg-app);
}

.card-avatar.gradient-fallback {
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary) 0%, #60a5fa 100%);
}

.card-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.card-role {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--primary);
}

.card-exp {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.card-skills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.25rem;
    margin-top: 0.25rem;
}

.card-bottom {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    border-t: 1px solid var(--border-color);
    padding-top: 0.875rem;
    margin-top: auto;
}

/* ==========================================
   Candidate Details Modal Styling
   ========================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(9, 13, 22, 0.4);
    backdrop-filter: blur(8px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.modal-container {
    background-color: var(--bg-surface);
    width: 95%;
    max-width: 32rem; /* 512px */
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    position: relative;
    transform: scale(0.95) translateY(10px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-height: 90vh;
    overflow-y: auto;
}

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

.modal-close {
    position: absolute;
    right: 1.25rem;
    top: 1.25rem;
    width: 2rem;
    height: 2rem;
    border-radius: var(--radius-full);
    background-color: var(--bg-app);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.modal-close:hover {
    background-color: var(--bg-sidebar-hover);
    color: var(--text-primary);
}

.modal-body {
    padding: 2.25rem;
}

/* Modal Internal Layout */
.modal-profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.modal-avatar {
    width: 5.5rem;
    height: 5.5rem;
    border-radius: var(--radius-lg); /* Rounded-xl design system */
    object-fit: cover;
    font-size: 2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    border: 4px solid var(--bg-app);
}

.modal-avatar.gradient-fallback {
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary) 0%, #60a5fa 100%);
}

.modal-name {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.modal-title-role {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--primary);
}

.modal-status-badge {
    margin-top: 0.25rem;
}

/* Modal Details List styling */
.modal-details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.modal-detail-card {
    background-color: var(--bg-app);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.modal-detail-label {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.15rem;
}

.modal-detail-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Modal Skills */
.modal-section {
    margin-bottom: 1.5rem;
}

.modal-section-title {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.modal-skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.modal-skill-pill {
    font-size: 0.75rem;
    font-weight: 600;
    background-color: var(--primary-light);
    color: var(--primary-container-text);
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(37, 99, 235, 0.1);
}

/* Modal Summary text */
.modal-summary-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Contact lists */
.modal-contacts {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background-color: var(--bg-app);
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.contact-item .material-symbols-outlined {
    font-size: 1.125rem;
    color: var(--text-muted);
}

/* Modal Actions footer */
.modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

/* Modal Skeleton Loader */
.modal-skeleton {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.skeleton-avatar {
    width: 5.5rem;
    height: 5.5rem;
    border-radius: var(--radius-lg);
    background-color: var(--border-color);
    animation: skeleton-pulse 1.5s infinite;
}

.skeleton-line {
    background-color: var(--border-color);
    border-radius: var(--radius-sm);
    animation: skeleton-pulse 1.5s infinite;
}

.skeleton-line.title {
    width: 60%;
    height: 1.25rem;
}

.skeleton-line.subtitle {
    width: 40%;
    height: 0.875rem;
}

.skeleton-line.paragraph {
    width: 90%;
    height: 4rem;
    margin-top: 1rem;
}

@keyframes skeleton-pulse {
    0% { opacity: 0.6; }
    50% { opacity: 0.3; }
    100% { opacity: 0.6; }
}

/* ==========================================
   Toast Feedback Notifications
   ========================================== */
.toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 110;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
}

.toast {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.875rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: var(--shadow-lg);
    pointer-events: auto;
    animation: toast-slide-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    transition: all 0.3s ease;
    max-width: 22rem;
}

.toast.removing {
    opacity: 0;
    transform: translateY(15px) scale(0.9);
}

.toast-icon {
    font-size: 1.25rem;
}

.toast.success {
    border-left: 4px solid var(--success);
}
.toast.success .toast-icon {
    color: var(--success);
}

.toast.danger {
    border-left: 4px solid var(--danger);
}
.toast.danger .toast-icon {
    color: var(--danger);
}

.toast.info {
    border-left: 4px solid var(--primary);
}
.toast.info .toast-icon {
    color: var(--primary);
}

.toast-message {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-primary);
}

@keyframes toast-slide-in {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ==========================================
   Responsive Rules & Media Queries
   ========================================== */

/* Breakpoint for Mobile layout adjustments (under 768px) */
@media (max-width: 768px) {
    .mobile-only {
        display: inline-flex !important;
    }
    
    .app-header {
        padding: 0 1rem;
    }
    
    /* Move profile info out on mobile to save space */
    .profile-info {
        display: none;
    }

    /* Hide desktop search */
    .search-container {
        display: none;
    }

    .app-layout {
        position: relative;
    }

    /* Mobile Sidebar Drawer styling */
    .app-sidebar {
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        transform: translateX(-100%);
        width: 16.5rem;
        height: 100%;
        border-right: 1px solid var(--border-color);
        box-shadow: var(--shadow-lg);
    }

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

    /* Overlay backdrop */
    .sidebar-overlay {
        position: absolute;
        inset: 0;
        background-color: rgba(9, 13, 22, 0.4);
        backdrop-filter: blur(4px);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
        z-index: 35;
    }

    .sidebar-overlay.open {
        opacity: 1;
        pointer-events: all;
    }

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

    .sidebar-title {
        font-family: var(--font-heading);
        font-size: 1rem;
        font-weight: 700;
        color: var(--text-primary);
    }

    /* Stats Grid spacing */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.875rem;
    }

    .stat-card {
        padding: 1rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }

    /* List modifications for mobile */
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        padding: 1rem;
    }

    .view-controls {
        width: 100%;
        justify-content: space-between;
    }

    /* Hide table view entirely on small screens */
    #view-toggle-table {
        display: none !important;
    }

    .candidates-table-container {
        overflow: visible;
    }

    /* Override table design and force cards layout on mobile */
    .candidates-table,
    .candidates-table thead,
    .candidates-table tbody,
    .candidates-table th,
    .candidates-table td,
    .candidates-table tr {
        display: block;
        width: 100%;
    }

    .candidates-table thead {
        display: none; /* Hide header */
    }

    .candidates-table tbody tr {
        border-bottom: 1px solid var(--border-color);
        padding: 1rem;
        position: relative;
    }

    .candidates-table td {
        border: none;
        padding: 0.25rem 0;
    }

    .candidates-table td:first-child {
        padding-bottom: 0.5rem;
    }

    /* Custom labels prefix */
    .candidates-table td[data-label]::before {
        content: attr(data-label) ": ";
        font-weight: 600;
        color: var(--text-muted);
        font-size: 0.75rem;
        margin-right: 0.5rem;
        text-transform: uppercase;
    }
    
    .candidates-table td.px-lg.py-4.text-right {
        padding-top: 0.75rem;
        border-top: 1px dashed var(--border-color);
        margin-top: 0.5rem;
    }

    .row-actions {
        justify-content: flex-start !important;
        gap: 0.5rem;
    }
    
    .row-actions button {
        width: auto !important;
        padding: 0.35rem 0.75rem !important;
        font-size: 0.75rem !important;
        border-radius: var(--radius-sm) !important;
    }

    .row-actions button span {
        font-size: 1rem !important;
    }
}

/* Tablet Layout Adjustments (768px to 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}
