/* Attendance Management System - Premium Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary-gradient: linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%);
    --accent-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --warning-gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --danger-gradient: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    --dark-gradient: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    
    --body-bg: #f8fafc;
    --sidebar-bg: #ffffff;
    --card-bg: #ffffff;
    
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
    --shadow-indigo: 0 10px 20px -5px rgba(79, 70, 229, 0.25);
    
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--body-bg);
    color: var(--text-main);
    overflow-x: hidden;
}

/* Sidebar Navigation */
.wrapper {
    display: flex;
    align-items: stretch;
    width: 100vw;
    min-height: 100vh;
}

#sidebar {
    min-width: 260px;
    max-width: 260px;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    transition: var(--transition-smooth);
    z-index: 1000;
}

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

#sidebar .sidebar-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
}

#sidebar ul.components {
    padding: 20px 0;
}

#sidebar ul p {
    color: var(--text-muted);
    padding: 10px 24px;
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin: 0;
}

#sidebar ul li a {
    padding: 12px 24px;
    font-size: 0.925rem;
    display: flex;
    align-items: center;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    border-left: 4px solid transparent;
    transition: var(--transition-smooth);
}

#sidebar ul li a i {
    margin-right: 12px;
    font-size: 1.1rem;
}

#sidebar ul li a:hover, #sidebar ul li.active a {
    color: #4f46e5;
    background: #f1f5f9;
    border-left-color: #4f46e5;
}

/* Page Content */
#content {
    width: 100%;
    min-height: 100vh;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
}

.top-navbar {
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding: 16px 24px;
}

/* Cards & Statistics */
.stat-card {
    border: none;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
    overflow: hidden;
}

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

.stat-card .card-body {
    padding: 24px;
}

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

/* Form Styles */
.form-control, .form-select {
    padding: 10px 14px;
    font-size: 0.9rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: var(--transition-smooth);
}

.form-control:focus, .form-select:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.btn-primary {
    background: var(--primary-gradient);
    border: none;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 8px;
    box-shadow: var(--shadow-indigo);
    transition: var(--transition-smooth);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px -5px rgba(79, 70, 229, 0.4);
}

.btn-success {
    background: var(--accent-gradient);
    border: none;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 8px;
}

.btn-danger {
    background: var(--danger-gradient);
    border: none;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 8px;
}

/* Glassmorphism Login Container */
.login-bg {
    background: radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.08) 0%, rgba(248, 250, 252, 1) 90%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    border: none;
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 40px;
    width: 100%;
    max-width: 480px;
}

.login-logo {
    font-size: 1.8rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 24px;
    text-align: center;
}

.login-tabs .nav-link {
    border: none;
    color: var(--text-muted);
    font-weight: 600;
    padding: 12px 20px;
    border-radius: 12px;
    transition: var(--transition-smooth);
}

.login-tabs .nav-link.active {
    background: #f1f5f9;
    color: #4f46e5;
}

/* Tables styling */
.table-responsive {
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    background: #ffffff;
    border: 1px solid var(--border-color);
}

.custom-table {
    margin-bottom: 0;
}

.custom-table th {
    background-color: #f8fafc;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
}

.custom-table td {
    padding: 16px 24px;
    vertical-align: middle;
    color: var(--text-main);
    border-bottom: 1px solid var(--border-color);
}

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

.custom-table tbody tr {
    transition: var(--transition-smooth);
}

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

/* Badges */
.badge-present {
    background-color: rgba(16, 185, 129, 0.1);
    color: #10b981;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 30px;
    font-size: 0.75rem;
}

.badge-absent {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 30px;
    font-size: 0.75rem;
}

/* Circular Progress Chart */
.progress-ring-container {
    position: relative;
    width: 140px;
    height: 140px;
}

.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring__circle {
    transition: stroke-dashoffset 0.35s;
    transform-origin: 50% 50%;
}

.progress-ring-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
}

/* Custom switch for attendance */
.attendance-switch {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.attendance-switch input {
    display: none;
}

.attendance-slider {
    width: 80px;
    height: 36px;
    background-color: #ef4444;
    border-radius: 18px;
    position: relative;
    transition: var(--transition-smooth);
    padding: 4px;
    box-sizing: border-box;
}

.attendance-slider::before {
    content: 'A';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-weight: 700;
    font-size: 0.8rem;
    transition: var(--transition-smooth);
}

.attendance-knob {
    width: 28px;
    height: 28px;
    background-color: white;
    border-radius: 50%;
    transition: var(--transition-smooth);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.attendance-switch input:checked + .attendance-slider {
    background-color: #10b981;
}

.attendance-switch input:checked + .attendance-slider .attendance-knob {
    transform: translateX(44px);
}

.attendance-switch input:checked + .attendance-slider::before {
    content: 'P';
    left: 12px;
    right: auto;
}

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