/* HR Nexus - Custom Styles */

:root {
    --primary-50: #f5f3ff;
    --primary-100: #ede9fe;
    --primary-200: #ddd6fe;
    --primary-300: #c4b5fd;
    --primary-400: #a78bfa;
    --primary-500: #8b5cf6;
    --primary-600: #7c3aed;
    --primary-700: #6d28d9;
    --primary-800: #5b21b6;
    --primary-900: #4c1d95;
    --dark-900: #0f0f14;
    --dark-800: #16161d;
    --dark-700: #1e1e28;
    --dark-600: #252532;
    --dark-500: #2d2d3d;
}

/* Base Styles */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-600) var(--dark-700);
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--dark-700);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-600);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-500);
}

/* Sidebar Navigation Scrollbar */
#sidebarNav::-webkit-scrollbar {
    width: 4px;
}

#sidebarNav::-webkit-scrollbar-track {
    background: transparent;
}

#sidebarNav::-webkit-scrollbar-thumb {
    background: rgba(124, 58, 237, 0.3);
    border-radius: 2px;
}

#sidebarNav::-webkit-scrollbar-thumb:hover {
    background: rgba(124, 58, 237, 0.5);
}

/* Glassmorphism Cards */
.glass-card {
    background: rgba(30, 30, 40, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(124, 58, 237, 0.15);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 
                inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.glass-card-hover {
    transition: all 0.3s ease;
}

.glass-card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(124, 58, 237, 0.15),
                0 8px 32px rgba(0, 0, 0, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.05);
    border-color: rgba(124, 58, 237, 0.3);
}

/* Stat Cards */
.stat-card {
    background: linear-gradient(135deg, rgba(30, 30, 40, 0.9) 0%, rgba(37, 37, 50, 0.9) 100%);
    border: 1px solid rgba(124, 58, 237, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-600), var(--primary-400));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: rgba(124, 58, 237, 0.3);
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.1);
}

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

.stat-icon.primary {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.2), rgba(124, 58, 237, 0.1));
    color: var(--primary-400);
}

.stat-icon.success {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(34, 197, 94, 0.1));
    color: #4ade80;
}

.stat-icon.warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(245, 158, 11, 0.1));
    color: #fbbf24;
}

.stat-icon.danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(239, 68, 68, 0.1));
    color: #f87171;
}

/* Form Styles */
.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(37, 37, 50, 0.8);
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: 12px;
    color: white;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2);
}

.form-input::placeholder {
    color: #6b7280;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #d1d5db;
    margin-bottom: 0.5rem;
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
    color: white;
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.4);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.5);
}

.btn-secondary {
    background: rgba(37, 37, 50, 0.8);
    color: #d1d5db;
    border: 1px solid rgba(124, 58, 237, 0.2);
}

.btn-secondary:hover {
    background: rgba(45, 45, 61, 0.9);
    border-color: rgba(124, 58, 237, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #16a34a, #15803d);
    color: white;
    box-shadow: 0 4px 14px rgba(22, 163, 74, 0.4);
}

.btn-success:hover {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    box-shadow: 0 6px 20px rgba(22, 163, 74, 0.5);
}

.btn-danger {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: white;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.4);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.5);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

/* Table Styles */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.data-table th {
    background: rgba(37, 37, 50, 0.9);
    color: #a78bfa;
    font-weight: 600;
    text-align: left;
    padding: 1rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid rgba(124, 58, 237, 0.2);
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(124, 58, 237, 0.1);
    color: #d1d5db;
}

.data-table tr:hover td {
    background: rgba(124, 58, 237, 0.05);
}

.data-table tr:last-child td {
    border-bottom: none;
}

/* Badge Styles */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
}

.badge-success {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-info {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-primary {
    background: rgba(124, 58, 237, 0.15);
    color: #a78bfa;
    border: 1px solid rgba(124, 58, 237, 0.3);
}

/* Status Indicators */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.online {
    background: #22c55e;
    box-shadow: 0 0 8px #22c55e;
}

.status-dot.offline {
    background: #6b7280;
}

.status-dot.busy {
    background: #ef4444;
    box-shadow: 0 0 8px #ef4444;
}

/* Card Styles */
.content-card {
    background: rgba(30, 30, 40, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(124, 58, 237, 0.1);
    border-radius: 16px;
    overflow: hidden;
}

.content-card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(124, 58, 237, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.content-card-body {
    padding: 1.5rem;
}

/* Progress Bar */
.progress-bar {
    height: 8px;
    background: rgba(37, 37, 50, 0.8);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-600), var(--primary-400));
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* Achievement Badges */
.achievement-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(37, 37, 50, 0.6);
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.achievement-badge:hover {
    transform: scale(1.05);
    border-color: rgba(124, 58, 237, 0.4);
}

.achievement-badge.locked {
    opacity: 0.5;
    filter: grayscale(1);
}

.achievement-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.3), rgba(124, 58, 237, 0.1));
}

/* Fingerprint Scanner Animation */
.fingerprint-scanner {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 3px solid rgba(124, 58, 237, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.fingerprint-scanner:hover {
    border-color: rgba(124, 58, 237, 0.6);
    box-shadow: 0 0 30px rgba(124, 58, 237, 0.3);
}

.fingerprint-scanner.scanning {
    animation: scanPulse 1.5s ease-in-out infinite;
}

.fingerprint-scanner.success {
    border-color: #22c55e;
    box-shadow: 0 0 30px rgba(34, 197, 94, 0.4);
}

@keyframes scanPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(124, 58, 237, 0.4);
    }
    50% {
        box-shadow: 0 0 0 20px rgba(124, 58, 237, 0);
    }
}

/* Toast Notifications */
.toast {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: rgba(30, 30, 40, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    animation: slideInRight 0.3s ease-out;
    max-width: 400px;
}

.toast.success {
    border-left: 4px solid #22c55e;
}

.toast.error {
    border-left: 4px solid #ef4444;
}

.toast.warning {
    border-left: 4px solid #f59e0b;
}

.toast.info {
    border-left: 4px solid #3b82f6;
}

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

/* Modal Styles */
.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(124, 58, 237, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(124, 58, 237, 0.1);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* Tab Styles */
.tab-container {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem;
    background: rgba(37, 37, 50, 0.6);
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.tab {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #9ca3af;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    background: transparent;
}

.tab:hover {
    color: #d1d5db;
    background: rgba(124, 58, 237, 0.1);
}

.tab.active {
    color: white;
    background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

/* Chart Container */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* Navigation Items */
.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    color: #9ca3af;
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
}

.nav-item:hover {
    color: #d1d5db;
    background: rgba(124, 58, 237, 0.1);
}

.nav-item.active {
    color: white;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.3), rgba(124, 58, 237, 0.1));
    border: 1px solid rgba(124, 58, 237, 0.3);
}

.nav-item svg {
    width: 20px;
    height: 20px;
}

/* Dropdown Styles */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 200px;
    background: rgba(30, 30, 40, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    z-index: 50;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.dropdown.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #d1d5db;
    transition: all 0.2s ease;
    cursor: pointer;
}

.dropdown-item:hover {
    background: rgba(124, 58, 237, 0.1);
    color: white;
}

.dropdown-item:first-child {
    border-radius: 12px 12px 0 0;
}

.dropdown-item:last-child {
    border-radius: 0 0 12px 12px;
}

/* Calendar Styles */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.calendar-day:hover {
    background: rgba(124, 58, 237, 0.1);
}

.calendar-day.present {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

.calendar-day.absent {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.calendar-day.late {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

.calendar-day.leave {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

/* Animations for stats */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-number {
    animation: countUp 0.5s ease-out;
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(124, 58, 237, 0.2);
    border-top-color: var(--primary-500);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, rgba(37, 37, 50, 0.8) 25%, rgba(45, 45, 61, 0.8) 50%, rgba(37, 37, 50, 0.8) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 8px;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    .stat-card {
        padding: 1rem;
    }
    
    .data-table {
        font-size: 0.875rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.75rem;
    }
}

/* Print Styles */
@media print {
    .sidebar,
    .top-bar,
    .btn {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
    }
}

/* Flatpickr Customization */
.flatpickr-calendar {
    background: rgba(30, 30, 40, 0.95) !important;
    border: 1px solid rgba(124, 58, 237, 0.2) !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4) !important;
}

.flatpickr-day {
    color: #d1d5db !important;
}

.flatpickr-day:hover {
    background: rgba(124, 58, 237, 0.2) !important;
}

.flatpickr-day.selected {
    background: var(--primary-600) !important;
    border-color: var(--primary-600) !important;
}

.flatpickr-months .flatpickr-month {
    background: transparent !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months {
    color: white !important;
}

.flatpickr-weekday {
    color: #a78bfa !important;
}

/* Custom Scrollbar for Modals */
.modal-scroll::-webkit-scrollbar {
    width: 6px;
}

.modal-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.modal-scroll::-webkit-scrollbar-thumb {
    background: rgba(124, 58, 237, 0.3);
    border-radius: 3px;
}

.modal-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(124, 58, 237, 0.5);
}
