/* Import Google Fonts - Outfit */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --primary-gradient: linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%);
    --sidebar-bg: #1e1b4b; /* deep indigo dark mode look */
    --body-bg: #f8fafc;
    --card-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    --hover-shadow: 0 20px 25px -5px rgba(79, 70, 229, 0.1), 0 10px 10px -5px rgba(79, 70, 229, 0.04);
    --font-primary: 'Outfit', sans-serif;
}

body {
    background-color: var(--body-bg);
    font-family: var(--font-primary);
    color: #334155;
    overflow-x: hidden;
}

/* Sidebar Styling */
#wrapper {
    display: flex;
    width: 100%;
    align-items: stretch;
    transition: all 0.3s ease;
}

#sidebar {
    min-width: 260px;
    max-width: 260px;
    background: var(--sidebar-bg);
    color: #e0e7ff;
    transition: all 0.3s ease;
    box-shadow: 4px 0 15px rgba(0,0,0,0.1);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    z-index: 1000;
}

#sidebar.active {
    margin-left: -260px;
}

#sidebar .sidebar-header {
    padding: 24px 20px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

#sidebar .sidebar-header h3 {
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: 0.5px;
    margin: 0;
    background: linear-gradient(to right, #ffffff, #c7d2fe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

#sidebar ul.components {
    padding: 20px 10px;
    flex-grow: 1;
}

#sidebar ul li {
    list-style: none;
    margin-bottom: 5px;
}

#sidebar ul li a {
    padding: 12px 15px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    color: #94a3b8;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease-in-out;
    font-weight: 500;
}

#sidebar ul li a i {
    margin-right: 12px;
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
    transition: transform 0.2s;
}

#sidebar ul li a:hover, 
#sidebar ul li.active > a {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

#sidebar ul li a:hover i {
    transform: scale(1.15);
}

#sidebar ul li.active > a {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

#sidebar .sidebar-footer {
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.15);
    border-top: 1px solid rgba(255,255,255,0.08);
}

/* Page Content */
#content {
    width: 100%;
    min-height: 100vh;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

/* Top Navbar */
.navbar {
    padding: 15px 25px;
    background: #ffffff !important;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
}

.navbar-brand-btn {
    background: #f1f5f9;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    color: #475569;
    transition: all 0.2s;
}

.navbar-brand-btn:hover {
    background: #e2e8f0;
    color: #1e293b;
}

/* Dashboard Cards */
.stat-card {
    background: #ffffff;
    border: none;
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    position: relative;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-gradient);
}

.stat-card-danger::after { background: linear-gradient(135deg, #ef4444 0%, #f87171 100%); }
.stat-card-success::after { background: linear-gradient(135deg, #10b981 0%, #34d399 100%); }
.stat-card-warning::after { background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%); }
.stat-card-info::after { background: linear-gradient(135deg, #06b6d4 0%, #22d3ee 100%); }

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

/* Glassmorphism Login */
.login-body {
    background: radial-gradient(circle at 10% 20%, #4338ca 0%, #1e1b4b 90.1%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    width: 100%;
    max-width: 450px;
    overflow: hidden;
}

.login-header {
    background: var(--primary-gradient);
    padding: 30px;
    color: white;
    text-align: center;
}

.login-header h2 {
    font-weight: 700;
    margin: 0;
    font-size: 1.6rem;
}

.login-header p {
    margin: 5px 0 0 0;
    opacity: 0.8;
    font-size: 0.9rem;
}

/* Form Styles */
.form-control, .form-select {
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.form-control:focus, .form-select:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.btn-primary {
    background: var(--primary-gradient);
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s;
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.2);
}

.btn-primary:hover {
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.3);
    transform: translateY(-1px);
}

/* Custom Table Styling */
.table-responsive-custom {
    background: #ffffff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--card-shadow);
}

.table-custom {
    width: 100%;
    margin-bottom: 0;
}

.table-custom th {
    font-weight: 600;
    color: #475569;
    border-bottom: 2px solid #f1f5f9;
    padding: 15px 10px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table-custom td {
    padding: 15px 10px;
    color: #334155;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
}

.table-custom tbody tr:hover {
    background-color: #f8fafc;
}

/* Status Badges */
.badge-status {
    padding: 6px 12px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.75rem;
    display: inline-block;
    text-transform: uppercase;
}

.badge-hadir { background-color: #d1fae5; color: #065f46; }
.badge-sakit { background-color: #fee2e2; color: #991b1b; }
.badge-izin { background-color: #fef3c7; color: #92400e; }
.badge-alpha { background-color: #f3f4f6; color: #1f2937; }

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #sidebar {
        margin-left: -260px;
    }
    #sidebar.active {
        margin-left: 0;
    }
    #wrapper.active #sidebar {
        margin-left: 0;
    }
}
