/* CSS Reset & Variables */
:root {
    --bg-primary: #090d16;
    --bg-secondary: #111726;
    --bg-card: rgba(23, 31, 50, 0.7);
    --border-color: rgba(255, 255, 255, 0.08);
    
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: rgba(99, 102, 241, 0.15);
    
    --success: #10b981;
    --success-hover: #059669;
    --success-light: rgba(16, 185, 129, 0.15);
    
    --warning: #f59e0b;
    --warning-hover: #d97706;
    --warning-light: rgba(245, 158, 11, 0.15);
    
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --danger-light: rgba(239, 68, 68, 0.15);
    
    --info: #0ea5e9;
    --info-light: rgba(14, 165, 233, 0.15);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --font-heading: 'Outfit', 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.25), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
    
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
}

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

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    border: 2px solid var(--bg-primary);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

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

/* Sidebar Styling */
.sidebar {
    width: 280px;
    background-color: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    padding: 24px;
    transition: all var(--transition-normal);
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
}

.logo-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--primary), #a855f7);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
}

.logo-text h1 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.logo-text span {
    font-size: 0.75rem;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    cursor: pointer;
    text-align: left;
    transition: all var(--transition-fast);
    width: 100%;
}

.menu-item i {
    width: 20px;
    height: 20px;
    transition: transform var(--transition-fast);
}

.menu-item:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.04);
}

.menu-item:hover i {
    transform: translateX(2px);
}

.menu-item.active {
    color: white;
    background: linear-gradient(135deg, var(--primary), rgba(99, 102, 241, 0.4));
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

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

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
    color: white;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

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

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

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

/* Main Content Styling */
.main-content {
    margin-left: 280px;
    flex-grow: 1;
    padding: 40px;
    min-height: 100vh;
    width: calc(100% - 280px);
}

/* Header Area */
.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.header-title h2 {
    font-family: var(--font-heading);
    font-size: 1.85rem;
    font-weight: 700;
    color: white;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}

.header-title p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.date-shifter {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 8px 12px;
    border-radius: var(--radius-md);
}

.date-shift-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.date-shift-btn:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.05);
}

.date-shift-btn i {
    width: 18px;
    height: 18px;
}

.date-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 8px;
}

.date-input-wrapper i {
    width: 16px;
    height: 16px;
    color: var(--primary);
}

.date-input-wrapper input[type="date"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* Content View Containers */
.views-container {
    position: relative;
    width: 100%;
}

.content-view {
    display: none;
    animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.content-view.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Card Styling (Premium Glassmorphism Style) */
.card {
    background-color: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    margin-bottom: 24px;
    transition: transform var(--transition-normal), border-color var(--transition-normal);
}

.card:hover {
    border-color: rgba(255, 255, 255, 0.12);
}

.card-header {
    padding: 24px;
}

.card-header.border-b {
    border-bottom: 1px solid var(--border-color);
}

.card-header h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    color: white;
    margin-bottom: 4px;
}

.card-subtitle {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.card-body {
    padding: 24px;
}

/* KPI Cards Layout */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.kpi-card {
    background-color: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.kpi-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.15);
}

.kpi-icon {
    width: 54px;
    height: 54px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.kpi-icon i {
    width: 24px;
    height: 24px;
}

/* Themes for KPIs */
.info-theme { background: linear-gradient(135deg, var(--info), #0284c7); box-shadow: 0 4px 10px rgba(14, 165, 233, 0.25); }
.warning-theme { background: linear-gradient(135deg, var(--warning), #d97706); box-shadow: 0 4px 10px rgba(245, 158, 11, 0.25); }
.success-theme { background: linear-gradient(135deg, var(--success), #059669); box-shadow: 0 4px 10px rgba(16, 185, 129, 0.25); }
.primary-theme { background: linear-gradient(135deg, var(--primary), #4f46e5); box-shadow: 0 4px 10px rgba(99, 102, 241, 0.25); }

.kpi-data {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.kpi-title {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 4px;
}

.kpi-value {
    font-family: var(--font-heading);
    font-size: 1.65rem;
    font-weight: 700;
    color: white;
    line-height: 1.2;
    margin-bottom: 4px;
}

.kpi-trend {
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.kpi-trend.positive { color: var(--success); }
.kpi-trend.negative { color: var(--danger); }
.kpi-trend.neutral { color: var(--warning); }

.kpi-trend i {
    width: 12px;
    height: 12px;
}

/* Dashboard Grids */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.dashboard-grid-three {
    display: grid;
    grid-template-columns: 2fr 1.2fr;
    gap: 24px;
    margin-bottom: 24px;
}

.col-span-2 {
    grid-column: span 2;
}

.chart-wrapper {
    position: relative;
    height: 320px;
    width: 100%;
}

/* Table Toolbar Controls */
.table-toolbar {
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 16px;
}

.search-box {
    position: relative;
    min-width: 300px;
}

.search-box i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-muted);
}

.search-box input {
    width: 100%;
    padding: 12px 16px 12px 42px;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: white;
    font-family: var(--font-body);
    font-size: 0.9rem;
    transition: all var(--transition-fast);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    background-color: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.15);
}

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

select {
    padding: 12px 16px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: white;
    font-family: var(--font-body);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

select:focus {
    outline: none;
    border-color: var(--primary);
}

/* Custom Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.btn-success {
    background-color: var(--success);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

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

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

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

.btn-lg {
    padding: 16px 28px;
    font-size: 1rem;
    border-radius: var(--radius-lg);
}

/* Table Design */
.table-responsive {
    overflow-x: auto;
    width: 100%;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}

.data-table th {
    background-color: rgba(255, 255, 255, 0.02);
    color: var(--text-secondary);
    font-weight: 600;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-color);
    letter-spacing: 0.02em;
    text-transform: uppercase;
    font-size: 0.75rem;
}

.data-table td {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.data-table tbody tr {
    transition: background-color var(--transition-fast);
}

.data-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 30px;
}

.badge-info { background-color: var(--info-light); color: #38bdf8; }
.badge-success { background-color: var(--success-light); color: #34d399; }
.badge-warning { background-color: var(--warning-light); color: #fbbf24; }
.badge-danger { background-color: var(--danger-light); color: #f87171; }
.badge-neutral { background-color: rgba(255, 255, 255, 0.08); color: var(--text-secondary); }

/* Talent Pool Badges */
.badge-staff-training { background-color: rgba(14, 165, 233, 0.15); color: #38bdf8; }     /* Biru muda / cyan */
.badge-staff-kontrak { background-color: rgba(20, 184, 166, 0.15); color: #2dd4bf; }     /* Teal */
.badge-calon-leader { background-color: rgba(245, 158, 11, 0.15); color: #fbbf24; }       /* Orange kekuningan */
.badge-leader { background-color: rgba(249, 115, 22, 0.15); color: #fb923c; }             /* Orange jingga */
.badge-calon-supervisor { background-color: rgba(16, 185, 129, 0.15); color: #34d399; }   /* Emerald / hijau cerah */
.badge-supervisor { background-color: rgba(4, 120, 87, 0.25); color: #059669; }           /* Hijau tua */
.badge-calon-manager { background-color: rgba(99, 102, 241, 0.2); color: #818cf8; }       /* Indigo */
.badge-manager { background-color: rgba(168, 85, 247, 0.2); color: #c084fc; }             /* Ungu / violet */

/* Table Pagination & Footer */
.table-footer {
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.pagination {
    display: flex;
    gap: 6px;
}

.page-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background-color: transparent;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.page-btn.active, .page-btn:hover {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

.page-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Action Buttons in Table */
.action-buttons {
    display: flex;
    gap: 8px;
}

.btn-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background-color: transparent;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-icon:hover {
    color: white;
}

.btn-icon.edit-btn:hover {
    background-color: var(--info-light);
    color: #38bdf8;
    border-color: #38bdf8;
}

.btn-icon.delete-btn:hover {
    background-color: var(--danger-light);
    color: #f87171;
    border-color: #f87171;
}

.btn-icon i {
    width: 16px;
    height: 16px;
}

/* Alert Lists & Ranking Styles */
.header-with-badge {
    display: flex;
    align-items: center;
    gap: 10px;
}

.scrollable-panel {
    max-height: 350px;
    overflow-y: auto;
    padding-right: 8px;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    gap: 12px;
}

.empty-state i {
    width: 48px;
    height: 48px;
    color: var(--text-muted);
}

.empty-state .success-icon {
    color: var(--success);
}

.alert-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.alert-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: background-color var(--transition-fast);
}

.alert-item:hover {
    background-color: rgba(255, 255, 255, 0.04);
}

.alert-emp-details {
    display: flex;
    flex-direction: column;
}

.alert-emp-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: white;
}

.alert-emp-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.alert-days-left {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Ranking List Styles */
.ranking-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.rank-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px;
    border-radius: var(--radius-md);
    transition: background-color var(--transition-fast);
}

.rank-item:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

.rank-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    background-color: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
}

.rank-item:nth-child(1) .rank-number {
    background: linear-gradient(135deg, #ffd700, #b8860b);
    color: #000;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
}

.rank-item:nth-child(2) .rank-number {
    background: linear-gradient(135deg, #c0c0c0, #808080);
    color: #000;
}

.rank-item:nth-child(3) .rank-number {
    background: linear-gradient(135deg, #cd7f32, #8b4513);
    color: white;
}

.rank-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.rank-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: white;
}

.rank-dept {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.rank-score {
    text-align: right;
}

.rank-score-val {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary);
}

.rank-score-label {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Performance Section CSS */
.performance-grid {
    display: grid;
    grid-template-columns: 2fr 1.2fr;
    gap: 32px;
}

.performance-table-body input {
    width: 80px;
    padding: 8px 10px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: white;
    font-family: var(--font-body);
    font-weight: 600;
    text-align: center;
}

.guideline-card {
    background-color: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.guideline-card h4 {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: white;
}

.guideline-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.guideline-list li {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.score-badge {
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    white-space: nowrap;
}

.score-badge.excellent { background-color: var(--primary-light); color: #818cf8; border: 1px solid rgba(99, 102, 241, 0.3); }
.score-badge.good { background-color: var(--success-light); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.score-badge.average { background-color: var(--warning-light); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.score-badge.poor { background-color: var(--danger-light); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }

.guideline-info strong {
    font-size: 0.85rem;
    color: white;
    display: block;
    margin-bottom: 2px;
}

.guideline-info p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Export Section */
.export-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.export-intro-card {
    text-align: center;
    padding: 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.export-illustration {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-xl);
    background-color: var(--success-light);
    color: var(--success);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.export-illustration i {
    width: 40px;
    height: 40px;
}

.export-intro-card h2 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: white;
}

.export-intro-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    max-width: 400px;
    margin-bottom: 32px;
}

.export-features-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    text-align: left;
    width: 100%;
    max-width: 400px;
    margin-bottom: 36px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.feature-item i {
    width: 18px;
    height: 18px;
    color: var(--success);
    flex-shrink: 0;
}

.export-actions {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
    max-width: 400px;
}

.doc-card {
    padding: 32px;
}

.doc-card h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 24px;
    color: white;
}

.steps-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.steps-list li {
    display: flex;
    gap: 16px;
}

.step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: var(--primary-light);
    color: var(--primary);
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.steps-list p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.steps-list strong {
    color: white;
}

.steps-list a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.steps-list a:hover {
    text-decoration: underline;
}

.info-alert {
    background-color: rgba(14, 165, 233, 0.06);
    border: 1px solid rgba(14, 165, 233, 0.2);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    gap: 14px;
}

.info-alert i {
    color: var(--info);
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.info-alert-content strong {
    display: block;
    font-size: 0.85rem;
    color: white;
    margin-bottom: 4px;
}

.info-alert-content p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Modal Overlay Styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(4, 7, 13, 0.75);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-normal);
    overflow-y: auto;
    padding: 40px 20px;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    width: 100%;
    max-width: 760px;
    display: flex;
    flex-direction: column;
    transform: translateY(20px);
    transition: transform var(--transition-normal);
    max-height: none;
    margin: auto;
    overflow: visible;
}

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

.modal-header {
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.05);
}

.modal-close i {
    width: 20px;
    height: 20px;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex-grow: 1;
}

.modal-footer {
    padding: 20px 24px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Form Styles inside Modal */
.form-section-title {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 18px;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-section-title::after {
    content: '';
    height: 1px;
    flex-grow: 1;
    background-color: var(--border-color);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 20px;
    margin-bottom: 28px;
}

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

.form-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group label .required {
    color: var(--danger);
}

.form-group input, .form-group select {
    padding: 10px 14px;
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: white;
    font-family: var(--font-body);
    font-size: 0.88rem;
    transition: all var(--transition-fast);
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: var(--primary);
    background-color: rgba(255, 255, 255, 0.04);
}

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

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

.toast {
    background-color: var(--bg-secondary);
    border-left: 4px solid var(--primary);
    border: 1px solid var(--border-color);
    border-left-width: 4px;
    border-radius: var(--radius-md);
    padding: 16px 20px;
    color: white;
    min-width: 300px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-xl);
    animation: slideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1), fadeOut 0.3s cubic-bezier(0.16, 1, 0.3, 1) 3.7s forwards;
}

.toast.toast-success { border-left-color: var(--success); }
.toast.toast-danger { border-left-color: var(--danger); }
.toast.toast-warning { border-left-color: var(--warning); }

.toast i {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

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

.toast-message {
    font-size: 0.88rem;
    font-weight: 500;
}

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

@keyframes fadeOut {
    to { transform: translateY(8px); opacity: 0; }
}

/* Responsive Overrides */
@media (max-width: 1200px) {
    .dashboard-grid, .dashboard-grid-three, .performance-grid, .export-grid {
        grid-template-columns: 1fr;
    }
    .col-span-2 {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 80px;
        padding: 20px 10px;
    }
    .logo-text, .menu-item span, .user-info {
        display: none;
    }
    .main-content {
        margin-left: 80px;
        width: calc(100% - 80px);
        padding: 20px;
    }
    .form-grid {
        grid-template-columns: 1fr;
    }
    .table-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .search-box {
        min-width: 100%;
    }
    .filters {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Lock Screen Styling */
.lock-screen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #05070c;
    background-image: radial-gradient(at 50% 50%, rgba(99, 102, 241, 0.15) 0px, transparent 50%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lock-screen-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.lock-card {
    background-color: rgba(23, 31, 50, 0.85);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 50px rgba(99, 102, 241, 0.1);
    animation: lockFadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes lockFadeIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.lock-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid var(--primary);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.2);
}

.lock-icon i {
    width: 28px;
    height: 28px;
}

.lock-card h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 8px;
}

.lock-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 24px;
    line-height: 1.4;
}

.btn-block {
    width: 100%;
    justify-content: center;
    padding: 12px;
    font-size: 0.95rem;
    margin-top: 10px;
}

/* ====================================================
   NEW HR ANALYTICS DASHBOARD EXTENSIONS
   ==================================================== */

/* Sidebar Section Headers */
.sidebar-section-title {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 22px;
    margin-bottom: 6px;
    padding-left: 12px;
    opacity: 0.85;
}

/* Funnel Chart Layout */
.funnel-stage {
    display: flex;
    align-items: center;
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.08) 0%, rgba(99, 102, 241, 0.02) 100%);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius-sm);
    padding: 10px 16px;
    position: relative;
    transition: all var(--transition-fast);
    margin-bottom: 8px;
}
.funnel-stage:hover {
    transform: translateX(4px);
    border-color: rgba(99, 102, 241, 0.25);
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.12) 0%, rgba(99, 102, 241, 0.04) 100%);
}
.funnel-stage-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: white;
    width: 150px;
}
.funnel-stage-bar-wrapper {
    flex-grow: 1;
    height: 14px;
    background-color: rgba(255, 255, 255, 0.03);
    border-radius: 30px;
    overflow: hidden;
    margin: 0 16px;
}
.funnel-stage-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #a855f7);
    border-radius: 30px;
    transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.funnel-stage-values {
    display: flex;
    gap: 12px;
    font-size: 0.82rem;
    font-weight: 700;
    font-family: var(--font-heading);
}
.funnel-stage-val {
    color: white;
}
.funnel-stage-pct {
    color: var(--success);
}

/* Heatmap cell coloring utilities */
.heatmap-cell-excellent {
    background-color: rgba(16, 185, 129, 0.08) !important;
    color: #34d399 !important;
    font-weight: 600;
}
.heatmap-cell-good {
    background-color: rgba(14, 165, 233, 0.06) !important;
    color: #38bdf8 !important;
}
.heatmap-cell-warning {
    background-color: rgba(245, 158, 11, 0.08) !important;
    color: #fbbf24 !important;
    font-weight: 600;
}
.heatmap-cell-critical {
    background-color: rgba(239, 68, 68, 0.08) !important;
    color: #f87171 !important;
    font-weight: 700;
}

/* Star Rating styling for Engagement */
.star-rating {
    display: inline-flex;
    gap: 2px;
    color: var(--warning);
}
.star-rating i {
    width: 14px;
    height: 14px;
    fill: currentColor;
}
.star-rating i.empty {
    fill: transparent;
    color: var(--text-muted);
}

/* Dashboard Settings & Manual Overrides Styling */
.override-row {
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    padding-bottom: 12px;
}
.override-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.override-toggle {
    cursor: pointer;
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
}
.override-row input[type="number"], .override-row input[type="text"] {
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    color: white;
    border-radius: var(--radius-sm);
    outline: none;
    text-align: right;
    transition: all var(--transition-fast);
}
.override-row input:focus {
    border-color: var(--primary);
    background-color: rgba(255, 255, 255, 0.04);
}
.override-row input:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    border-color: transparent;
    background-color: rgba(255, 255, 255, 0.01);
}

/* Checkboxes in employee modal */
#employee-form input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* ====================================================
   HIERARCHY ORG CHART STYLING
   ==================================================== */
.org-tree-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
    min-width: max-content;
}
.org-tree {
    display: flex;
    justify-content: center;
}
.org-tree ul {
    padding-top: 20px; 
    position: relative;
    transition: all 0.5s;
    display: flex;
    justify-content: center;
}
.org-tree li {
    text-align: center;
    list-style-type: none;
    position: relative;
    padding: 20px 10px 0 10px;
    transition: all 0.5s;
}
/* We will use ::before and ::after to draw the connector lines */
.org-tree li::before, .org-tree li::after {
    content: '';
    position: absolute; 
    top: 0; 
    right: 50%;
    border-top: 1px solid var(--border-color);
    width: 50%; 
    height: 20px;
}
.org-tree li::after {
    right: auto; 
    left: 50%;
    border-left: 1px solid var(--border-color);
}
/* Remove left-right connectors from elements without siblings */
.org-tree li:only-child::after, .org-tree li:only-child::before {
    display: none;
}
.org-tree li:only-child { 
    padding-top: 0;
}
.org-tree li:first-child::before, .org-tree li:last-child::after {
    border: 0 none;
}
/* Adding back the vertical connector to the last node */
.org-tree li:last-child::before {
    border-right: 1px solid var(--border-color);
    border-radius: 0 5px 0 0;
}
.org-tree li:first-child::after {
    border-radius: 5px 0 0 0;
}
/* Draw vertical connectors from parents down to children */
.org-tree ul ul::before {
    content: '';
    position: absolute; 
    top: 0; 
    left: 50%;
    border-left: 1px solid var(--border-color);
    width: 0; 
    height: 20px;
}
.org-node {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    display: inline-block;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 160px;
    box-shadow: var(--shadow-sm);
    position: relative;
    z-index: 10;
}
.org-node:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.25);
    background-color: rgba(255, 255, 255, 0.02);
}
.org-node .node-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
    margin: 0 auto 8px auto;
    display: block;
    background-color: var(--bg-secondary);
}
.org-node .node-name {
    font-weight: 600;
    color: white;
    font-size: 0.82rem;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}
.org-node .node-role {
    font-size: 0.72rem;
    color: var(--text-secondary);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}
.org-node .node-outlet {
    font-size: 0.68rem;
    color: var(--text-muted);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

.node-edit-btn:hover {
    background-color: var(--primary) !important;
    color: white !important;
    transform: scale(1.1);
}

/* --- External Spreadsheet Integration Styles --- */
#spreadsheet-iframe-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.spreadsheet-embed-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--text-secondary);
    z-index: 5;
}

/* Spinner Animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Sync Preview Table Highlights */
.sync-row-updated {
    background-color: rgba(16, 185, 129, 0.04);
}
.sync-row-no-change {
    opacity: 0.75;
}
.sync-row-unmatched {
    background-color: rgba(239, 68, 68, 0.04);
}

.sync-value-change {
    font-weight: 500;
}
.sync-value-old {
    color: var(--text-muted);
    text-decoration: line-through;
    font-size: 0.75rem;
    margin-right: 4px;
}
.sync-value-new {
    color: var(--success);
    font-weight: 600;
}

#btn-sync-external-attendance i {
    animation: none;
}
#btn-sync-external-attendance:hover i {
    animation: spin 2s linear infinite;
}
