/**
 * WFH System - Purple Gradient Theme
 * Xintra-inspired dark purple admin dashboard
 */

/* === Base === */
body {
    background: #f8f7ff;
}

/* === Sidebar Dark Theme === */
.sidebar-dark {
    background: linear-gradient(180deg, #1e1145 0%, #2d1b69 50%, #1e1145 100%);
}

.sidebar-dark .sidebar-link {
    color: #c4b5fd;
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.sidebar-dark .sidebar-link:hover {
    background: rgba(139, 92, 246, 0.15);
    color: #e9d5ff;
}

.sidebar-dark .sidebar-link.active {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), rgba(168, 85, 247, 0.2));
    color: #fff;
    border-right: 3px solid #a78bfa;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.1);
}

/* === Glassmorphism Nav === */
.nav-glass {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(139, 92, 246, 0.1);
}

/* === Purple Gradient Buttons === */
.btn-primary {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    color: #fff;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #6d28d9, #5b21b6);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
    transform: translateY(-1px);
}

/* === Card Styles === */
.card {
    background: #fff;
    border-radius: 1rem;
    border: 1px solid rgba(139, 92, 246, 0.08);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(139, 92, 246, 0.02);
    transition: all 0.3s;
}

.card:hover {
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.08);
}

/* === Stat Cards === */
.stat-card {
    background: #fff;
    border-radius: 1rem;
    border: 1px solid rgba(139, 92, 246, 0.08);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #7c3aed, #a78bfa, #c084fc);
}

/* === Table Styles === */
.table-purple thead {
    background: linear-gradient(135deg, #f5f3ff, #ede9fe);
}

.table-purple thead th {
    color: #5b21b6;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.table-purple tbody tr:hover {
    background: #faf5ff;
}

/* === Form inputs focus purple === */
input:focus, select:focus, textarea:focus {
    --tw-ring-color: rgba(139, 92, 246, 0.5) !important;
    border-color: #a78bfa !important;
}

/* === Scrollbar === */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f5f3ff;
}

::-webkit-scrollbar-thumb {
    background: #c4b5fd;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a78bfa;
}

/* === Loading Spinner Purple === */
.spinner {
    border-color: rgba(255, 255, 255, 0.3) !important;
    border-top-color: #a78bfa !important;
}

/* === Auth Page Background === */
.auth-bg {
    background: linear-gradient(135deg, #1e1145 0%, #2d1b69 30%, #4c1d95 60%, #6d28d9 100%);
    position: relative;
}

.auth-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(168, 85, 247, 0.3), transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.2), transparent 40%),
        radial-gradient(circle at 50% 80%, rgba(192, 132, 252, 0.15), transparent 40%);
}

/* === Badge Styles === */
.badge-purple {
    background: linear-gradient(135deg, #ede9fe, #ddd6fe);
    color: #6d28d9;
}

/* === Floating particles effect for auth === */
.auth-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.auth-particles span {
    position: absolute;
    display: block;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    animation: float-up 15s linear infinite;
}

.auth-particles span:nth-child(1) { left: 25%; width: 80px; height: 80px; animation-delay: 0s; }
.auth-particles span:nth-child(2) { left: 10%; width: 20px; height: 20px; animation-delay: 2s; animation-duration: 12s; }
.auth-particles span:nth-child(3) { left: 70%; width: 20px; height: 20px; animation-delay: 4s; }
.auth-particles span:nth-child(4) { left: 40%; width: 60px; height: 60px; animation-delay: 0s; animation-duration: 18s; }
.auth-particles span:nth-child(5) { left: 65%; width: 20px; height: 20px; animation-delay: 0s; }
.auth-particles span:nth-child(6) { left: 75%; width: 110px; height: 110px; animation-delay: 3s; }
.auth-particles span:nth-child(7) { left: 35%; width: 150px; height: 150px; animation-delay: 7s; }
.auth-particles span:nth-child(8) { left: 50%; width: 25px; height: 25px; animation-delay: 15s; animation-duration: 45s; }
.auth-particles span:nth-child(9) { left: 20%; width: 15px; height: 15px; animation-delay: 2s; animation-duration: 35s; }
.auth-particles span:nth-child(10) { left: 85%; width: 150px; height: 150px; animation-delay: 0s; animation-duration: 11s; }

@keyframes float-up {
    0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    10% { opacity: 0.5; }
    90% { opacity: 0.2; }
    100% { transform: translateY(-100vh) rotate(720deg); opacity: 0; }
}

/* === Hero Gradient === */
.hero-gradient {
    background: linear-gradient(135deg, #1e1145 0%, #2d1b69 25%, #4c1d95 50%, #6d28d9 75%, #7c3aed 100%);
}

/* === Purple Gradient Text === */
.text-gradient-purple {
    background: linear-gradient(135deg, #c084fc, #e9d5ff, #c4b5fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* === Modal backdrop === */
.modal-backdrop {
    background: rgba(30, 17, 69, 0.6);
    backdrop-filter: blur(4px);
}

/* === Smooth page transitions === */
main, .auth-bg {
    animation: fadeIn 0.3s ease-out;
}

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