/* Staff Attendance Management System Styles */

:root {
    --primary-color: #4CAF50;
    --warning-color: #FFC107;
    --danger-color: #F44336;
    --info-color: #2196F3;
    --light-gray: #f8f9fa;
    --dark-gray: #6c757d;
    --border-color: #dee2e6;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--light-gray);
}

/* Login Page Styles */
.login-page {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--info-color) 100%);
    min-height: 100vh;
}

.login-card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

.login-card .card-body {
    padding: 2rem;
}

/* Staff Mobile Interface */
.staff-page {
    padding-bottom: 80px; /* Space for bottom nav */
}

.staff-header {
    background: var(--primary-color);
    color: white;
    padding: 1rem;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.staff-content {
    padding: 1rem;
    min-height: calc(100vh - 150px);
}

/* Bottom Navigation for Staff */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid var(--border-color);
    padding: 0.5rem 0;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.bottom-nav-item {
    flex: 1;
    text-align: center;
    padding: 0.5rem;
    text-decoration: none;
    color: var(--dark-gray);
    transition: all 0.3s ease;
}

.bottom-nav-item:hover,
.bottom-nav-item.active {
    color: var(--primary-color);
    text-decoration: none;
}

.bottom-nav-item i {
    display: block;
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}

.bottom-nav-item span {
    font-size: 0.75rem;
    display: block;
}

/* Admin Interface */
.admin-page {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 250px;
    background: #343a40;
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    transition: all 0.3s ease;
}

.admin-sidebar.collapsed {
    width: 70px;
}

.admin-sidebar .sidebar-header {
    padding: 1rem;
    border-bottom: 1px solid #495057;
    text-align: center;
}

.admin-sidebar .nav-link {
    color: #adb5bd;
    padding: 0.75rem 1rem;
    border-radius: 0;
    transition: all 0.3s ease;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    color: white;
    background-color: var(--primary-color);
}

.admin-sidebar .nav-link i {
    margin-right: 0.5rem;
    width: 20px;
}

.admin-content {
    flex: 1;
    margin-left: 250px;
    transition: all 0.3s ease;
}

.admin-content.expanded {
    margin-left: 70px;
}

.admin-topbar {
    background: white;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.admin-main {
    padding: 1.5rem;
}

/* Notification Bell */
.notification-bell {
    position: relative;
    margin-right: 1rem;
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-dropdown {
    width: 350px;
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    background: white;
    transition: background 0.3s ease;
}

.notification-item.unread {
    background: #e8f4f8;
}

.notification-item:hover {
    background: var(--light-gray);
}

/* Cards */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 1rem;
}

.card-header {
    background: white;
    border-bottom: 1px solid var(--border-color);
    border-radius: 10px 10px 0 0 !important;
    font-weight: 600;
}

.stat-card {
    text-align: center;
    padding: 1.5rem;
    border-radius: 15px;
    color: white;
    margin-bottom: 1rem;
}

.stat-card.present { background: var(--primary-color); }
.stat-card.absent { background: var(--danger-color); }
.stat-card.late { background: var(--warning-color); }
.stat-card.leave { background: var(--info-color); }

.stat-card h3 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.stat-card p {
    margin: 0;
    font-size: 1.1rem;
}

/* Buttons */
.btn {
    border-radius: 8px;
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #45a049;
    border-color: #45a049;
    transform: translateY(-2px);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 12px;
}

/* Check-in/out buttons */
.checkin-btn, .checkout-btn {
    width: 100%;
    padding: 1.5rem;
    font-size: 1.2rem;
    border-radius: 15px;
    margin-bottom: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.checkin-btn {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

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

.checkin-btn:disabled,
.checkout-btn:disabled {
    opacity: 0.6;
    transform: none;
}

/* Forms */
.form-control {
    border-radius: 8px;
    border: 1px solid var(--border-color);
    padding: 0.75rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(76, 175, 80, 0.25);
}

/* Tables */
.table {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.table thead th {
    background: var(--light-gray);
    border: none;
    font-weight: 600;
    padding: 1rem;
}

.table td {
    padding: 1rem;
    vertical-align: middle;
    border-top: 1px solid var(--border-color);
}

/* Status badges */
.badge {
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-weight: 500;
}

/* Profile Picture */
.profile-pic {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.profile-pic-lg {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .admin-sidebar {
        transform: translateX(-100%);
        width: 100%;
    }
    
    .admin-sidebar.show {
        transform: translateX(0);
    }
    
    .admin-content {
        margin-left: 0;
    }
    
    .admin-topbar {
        padding: 0.5rem 1rem;
    }
    
    .admin-main {
        padding: 1rem;
    }
    
    .notification-dropdown {
        width: 300px;
    }
    
    .stat-card h3 {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .staff-content {
        padding: 0.5rem;
    }
    
    .card {
        margin-bottom: 0.5rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-card h3 {
        font-size: 1.5rem;
    }
    
    .notification-dropdown {
        width: calc(100vw - 2rem);
    }
}

/* Loading Spinner */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

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

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

::-webkit-scrollbar-track {
    background: var(--light-gray);
}

::-webkit-scrollbar-thumb {
    background: var(--dark-gray);
    border-radius: 3px;
}

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

/* Animations */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

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

.slide-up {
    animation: slideUp 0.3s ease-in-out;
}

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

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.toast {
    min-width: 300px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Current Time Display */
.current-time {
    font-size: 2rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.current-date {
    font-size: 1.2rem;
    text-align: center;
    color: var(--dark-gray);
    margin-bottom: 2rem;
}

/* Working Hours Info */
.working-hours {
    background: var(--info-color);
    color: white;
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 1rem;
}

/* Attendance Status */
.attendance-status {
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 1rem;
    font-weight: 600;
}

.attendance-status.checked-in {
    background: rgba(76, 175, 80, 0.1);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.attendance-status.not-checked-in {
    background: rgba(244, 67, 54, 0.1);
    color: var(--danger-color);
    border: 1px solid var(--danger-color);
}

/* Export Buttons */
.export-btn {
    margin-left: 0.5rem;
}

.export-btn:first-child {
    margin-left: 0;
}

/* Leave Status Colors */
.leave-pending { color: var(--warning-color); }
.leave-approved { color: var(--primary-color); }
.leave-rejected { color: var(--danger-color); }

/* Utility Classes */
.text-primary { color: var(--primary-color) !important; }
.text-success { color: var(--primary-color) !important; }
.text-warning { color: var(--warning-color) !important; }
.text-danger { color: var(--danger-color) !important; }
.text-info { color: var(--info-color) !important; }

.bg-primary { background-color: var(--primary-color) !important; }
.bg-success { background-color: var(--primary-color) !important; }
.bg-warning { background-color: var(--warning-color) !important; }
.bg-danger { background-color: var(--danger-color) !important; }
.bg-info { background-color: var(--info-color) !important; }

.border-primary { border-color: var(--primary-color) !important; }
.border-success { border-color: var(--primary-color) !important; }
.border-warning { border-color: var(--warning-color) !important; }
.border-danger { border-color: var(--danger-color) !important; }
.border-info { border-color: var(--info-color) !important; }

/* Touch Friendly */
@media (hover: none) and (pointer: coarse) {
    .btn, .form-control, .bottom-nav-item {
        min-height: 44px;
    }
    
    .table td, .table th {
        padding: 1rem 0.5rem;
    }
}
