/* style.css */

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); min-height: 100vh; padding: 20px; }

/* Login Page */ .login-container { min-height: 100vh; display: flex; justify-content: center; align-items: center; padding: 20px; }

.login-card { background: white; border-radius: 20px; padding: 40px; box-shadow: 0 15px 35px rgba(0,0,0,0.3); width: 100%; max-width: 400px; }

.login-header { text-align: center; margin-bottom: 30px; }

.login-header .icon { width: 80px; height: 80px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 15px; font-size: 2.5rem; }

.login-header h1 { color: #333; margin: 0 0 5px; font-size: 1.8rem; }

.login-header p { color: #666; margin: 0; }

.error-message { background: #f8d7da; color: #721c24; padding: 12px; border-radius: 8px; margin-bottom: 20px; text-align: center; }

.footer { text-align: center; margin-top: 20px; color: #666; font-size: 0.9rem; }

/* Form Elements */ .form-group { margin-bottom: 20px; }

.form-group label { display: block; margin-bottom: 8px; color: #333; font-weight: 600; }

.form-group input { width: 100%; padding: 15px; border: 2px solid #e0e0e0; border-radius: 10px; font-size: 1rem; transition: border-color 0.3s; }

.form-group input:focus { outline: none; border-color: #667eea; }

.form-group small { display: block; margin-top: 5px; color: #999; font-size: 0.85rem; }

.form-group input:disabled { background-color: #f5f5f5; color: #999; cursor: not-allowed; }

.btn-login { width: 100%; padding: 15px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; border: none; border-radius: 10px; font-size: 1.1rem; font-weight: bold; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; }

.btn-login:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4); }

select, textarea { width: 100%; padding: 12px; margin: 10px 0; border: 2px solid #ddd; border-radius: 8px; box-sizing: border-box; font-size: 1rem; font-family: inherit; }

select:focus, textarea:focus { border-color: #667eea; outline: none; }

label { display: block; margin-bottom: 5px; font-weight: bold; color: #333; }

/* Dashboard */ .container { max-width: 900px; margin: 0 auto; }

.header-card { background: white; border-radius: 20px; padding: 30px; box-shadow: 0 10px 30px rgba(0,0,0,0.2); margin-bottom: 20px; }

.user-info { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 15px; }

.user-details { display: flex; align-items: center; gap: 15px; }

.avatar { width: 70px; height: 70px; border-radius: 50%; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; display: flex; align-items: center; justify-content: center; font-size: 2rem; font-weight: bold; }

.user-text h2 { margin: 0; color: #333; font-size: 1.8rem; }

.user-text p { margin: 5px 0 0; color: #666; }

/* Clock */ .clock-container { text-align: center; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); padding: 20px; border-radius: 15px; color: white; min-width: 200px; }

.clock-time { font-size: 2.5rem; font-weight: bold; font-family: 'Courier New', monospace; }

.clock-date { font-size: 1rem; opacity: 0.9; }

.time-limits { display: flex; justify-content: center; gap: 30px; margin-top: 15px; padding-top: 15px; border-top: 1px solid rgba(255,255,255,0.3); }

.time-box { text-align: center; }

.time-box small { display: block; opacity: 0.8; font-size: 0.8rem; }

.time-box span { font-size: 1.2rem; font-weight: bold; }

/* Navigation */ .nav-buttons { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }

.btn { padding: 12px 20px; border: none; border-radius: 8px; font-weight: 600; cursor: pointer; transition: all 0.3s; text-decoration: none; display: inline-block; }

.btn:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0,0,0,0.2); }

.btn-primary { background: #667eea; color: white; } .btn-primary:hover { background: #5568d3; } .btn-success { background: #28a745; color: white; } .btn-success:hover { background: #218838; } .btn-profile { background: #6c757d; color: white; } .btn-history { background: #007bff; color: white; } .btn-logout { background: #e74c3c; color: white; } .btn-photo { background: #28a745; color: white; } .btn-secondary { background: #6c757d; color: white; } .btn-delete { background: #dc3545; color: white; padding: 8px 15px; border-radius: 6px; text-decoration: none; } .btn-delete:hover { background: #c82333; } .btn-danger { background-color: #dc3545; color: white; border: none; padding: 8px 15px; border-radius: 5px; cursor: pointer; display: inline-block; } .btn-danger:hover { background-color: #c82333; } .btn-sm { padding: 5px 10px; font-size: 0.85rem; }

/* Content Grid */ .content-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

@media (max-width: 768px) { .content-grid { grid-template-columns: 1fr; } }

.action-card { background: white; border-radius: 20px; padding: 25px; box-shadow: 0 10px 30px rgba(0,0,0,0.2); }

.action-card h3 { margin: 0 0 20px; color: #333; display: flex; align-items: center; gap: 10px; }

/* Camera Section */ #cameraSection { text-align: center; }

#cameraSection video, #cameraSection #photoPreview { width: 100%; max-width: 300px; height: 200px; border-radius: 10px; object-fit: cover; border: 3px solid #667eea; }

#cameraSection #photoPreview { display: none; }

.camera-section { background: #f8f9fa; padding: 20px; border-radius: 15px; width: 100%; max-width: 400px; }

.camera-section video, .camera-section canvas { width: 100%; border-radius: 10px; }

.camera-buttons { display: flex; gap: 10px; justify-content: center; }

/* Status Card */ .status-card { background: white; border-radius: 20px; padding: 25px; box-shadow: 0 10px 30px rgba(0,0,0,0.2); text-align: center; }

.status-badge { display: inline-block; padding: 10px 25px; border-radius: 25px; font-size: 1.2rem; font-weight: bold; margin: 10px 0; }

.status-present { background: #d4edda; color: #155724; } .status-illness { background: #fff3cd; color: #856404; } .status-permission { background: #d1ecf1; color: #0c5460; } .status-alpha { background: #f8d7da; color: #721c24; }

.time-details { margin-top: 15px; padding: 15px; background: #f8f9fa; border-radius: 10px; }

.time-details p { margin: 8px 0; color: #555; font-size: 1rem; }

/* Messages */ .message { padding: 15px; border-radius: 10px; margin-bottom: 20px; font-weight: bold; }

.message-success { background: #d4edda; color: #155724; } .message-error { background: #f8d7da; color: #721c24; }

/* History Page */ .history-container { max-width: 1200px; margin: 0 auto; padding: 20px; }

.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; background: white; padding: 20px 25px; border-radius: 15px; box-shadow: 0 5px 15px rgba(0,0,0,0.1); }

.page-title { display: flex; align-items: center; gap: 15px; }

.page-title h2 { color: #333; margin: 0; font-size: 1.5rem; }

/* Filter Form */ .filter-form { display: flex; gap: 15px; align-items: center; margin-bottom: 30px; background: white; padding: 20px; border-radius: 15px; box-shadow: 0 5px 15px rgba(0,0,0,0.1); }

.filter-form label { margin: 0; font-weight: 600; color: #333; }

.filter-form input { padding: 10px 15px; border: 2px solid #ddd; border-radius: 8px; font-size: 1rem; }

.filter-form input:focus { border-color: #667eea; outline: none; }

.inline-form { display: flex; gap: 15px; flex-wrap: wrap; }

.inline-form input { flex: 1; min-width: 150px; padding: 12px 15px; border: 2px solid #ddd; border-radius: 8px; font-size: 1rem; }

.inline-form input:focus { border-color: #667eea; outline: none; }

/* Summary Cards */ .summary-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 15px; margin-bottom: 25px; }

@media (max-width: 1200px) { .summary-grid { grid-template-columns: repeat(4, 1fr); } }

@media (max-width: 768px) { .summary-grid { grid-template-columns: repeat(2, 1fr); } }

.summary-card { background: white; border-radius: 15px; padding: 20px; text-align: center; box-shadow: 0 5px 15px rgba(0,0,0,0.1); transition: transform 0.2s; }

.summary-card:hover { transform: translateY(-3px); } .summary-card.total { border-left: 5px solid #667eea; } .summary-card.present { border-left: 5px solid #28a745; } .summary-card.sick { border-left: 5px solid #ffc107; } .summary-card.permission { border-left: 5px solid #17a2b8; } .summary-card.alpha { border-left: 5px solid #dc3545; }

.summary-card h3 { font-size: 2rem; margin: 0 0 5px; color: #333; }

.summary-card p { margin: 0; color: #666; font-size: 0.9rem; font-weight: 600; }

/* Tables */ .history-table, .data-table { width: 100%; border-collapse: collapse; background: white; }

.history-table { box-shadow: 0 10px 30px rgba(0,0,0,0.2); padding: 25px; border-radius: 20px; }

.data-table { box-shadow: 0 5px 15px rgba(0,0,0,0.1); }

.history-table h3 { color: #333; margin: 0 0 20px; font-size: 1.2rem; }

.history-table th, .data-table th { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 15px; text-align: left; font-weight: 600; }

.history-table th:first-child, .data-table th:first-child { border-radius: 10px 0 0 0; }

.history-table th:last-child, .data-table th:last-child { border-radius: 0 10px 0 0; }

.history-table td, .data-table td { padding: 15px; border-bottom: 1px solid #eee; color: #555; }

.history-table tr:hover, .data-table tr:hover { background: #f8f9fa; }

.history-table tr:last-child td:first-child, .data-table tr:last-child td:first-child { border-radius: 0 0 0 10px; }

.history-table tr:last-child td:last-child, .data-table tr:last-child td:last-child { border-radius: 0 0 10px 0; }

/* Table Badge */ .table-badge { display: inline-block; padding: 5px 12px; border-radius: 20px; font-size: 0.85rem; font-weight: bold; }

.badge-present { background: #d4edda; color: #155724; } .badge-sick { background: #fff3cd; color: #856404; } .badge-permission { background: #d1ecf1; color: #0c5460; } .badge-alpha { background: #f8d7da; color: #721c24; } .badge-libur { background-color: #fff3cd; color: #856404; }

/* Photo */ .photo-thumb { width: 50px; height: 50px; border-radius: 8px; object-fit: cover; cursor: pointer; border: 2px solid #ddd; transition: transform 0.2s; }

.photo-thumb:hover { transform: scale(1.1); border-color: #667eea; }

#photoModal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); z-index: 1000; justify-content: center; align-items: center; }

#photoModal img { max-width: 90%; max-height: 90%; border-radius: 15px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }

.table-responsive { overflow-x: auto; }

Holiday List */ .holiday-list { display: flex; flex-direction: column; gap: 20px; }

.holiday-month h4 { margin: 0 0 10px; padding-bottom: 10px; border-bottom: 2px solid #667eea; color: #333; }

.holiday-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 15px; }

.holiday-item { display: flex; align-items: center; gap: 15px; padding: 15px; background: #f8f9fa; border-radius: 10px; border-left: 4px solid #667eea; }

.holiday-date { display: flex; flex-direction: column; align-items: center; min-width: 60px; padding: 10px; background: #667eea; border-radius: 10px; color: white; }

.holiday-date .day { font-size: 1.5rem; font-weight: bold; }

.holiday-date .weekday { font-size: 0.8rem; }

.holiday-info h5 { margin: 0 0 5px; color: #333; }

/* Profile Page */ .form-section { margin-bottom: 30px; padding-bottom: 20px; border-bottom: 1px solid #eee; }

.form-section:last-of-type { border-bottom: none; }

.form-section h3 { margin: 0 0 20px; color: #333; font-size: 1.1rem; }

.photo-upload { display: flex; flex-direction: column; align-items: center; gap: 15px; padding: 20px; }

.photo-upload img, .photo-upload .photo-placeholder { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; border: 3px solid #667eea; }

.photo-placeholder { display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; font-size: 3rem; font-weight: bold; }

.photo-upload input[type="file"] { display: none; }

.photo-preview { width: 150px; height: 150px; border-radius: 50%; object-fit: cover; border: 4px solid #667eea; }

.photo-buttons { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

/* Modal */ .modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.5); }

.modal-content { background-color: #fefefe; margin: 10% auto; padding: 0; border-radius: 10px; width: 90%; max-width: 500px; box-shadow: 0 5px 15px rgba(0,0,0,0.3); }

.modal-header { padding: 20px; background: #667eea; color: white; border-radius: 10px 10px 0 0; display: flex; justify-content: space-between; align-items: center; }

.modal-header h3 { margin: 0; }

.close { color: white; font-size: 28px; font-weight: bold; cursor: pointer; }

.close:hover { color: #ccc; }

.modal-content form { padding: 20px; }

.modal-footer { padding: 15px 20px; display: flex; justify-content: flex-end; gap: 10px; }

/* Settings Section */ .settings-section { margin-bottom: 30px; padding: 20px; background: #f8f9fa; border-radius: 10px; }

.settings-section h4 { margin: 0 0 20px; padding-bottom: 10px; border-bottom: 2px solid #667eea; color: #333; }

/* Admin Layout */ .admin-container { display: flex; min-height: 100vh; }

.sidebar { width: 250px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 20px 0; position: fixed; height: 100vh; overflow-y: auto; }

.sidebar-header { padding: 0 20px 20px; border-bottom: 1px solid rgba(255,255,255,0.2); margin-bottom: 20px; }

.sidebar-header h3 { font-size: 1.3rem; margin: 0; }

.sidebar-menu { padding: 0 10px; }

.sidebar-menu a { display: block; padding: 15px 20px; color: white; text-decoration: none; border-radius: 10px; margin-bottom: 5px; transition: background 0.3s; }

.sidebar-menu a:hover, .sidebar-menu a.active { background: rgba(255,255,255,0.2); }

.sidebar-menu a.logout { background: rgba(220, 53, 69, 0.8); margin-top: 30px; }

.sidebar-menu a.logout:hover { background: #dc3545; }

.main-content { margin-left: 250px; flex: 1; padding: 30px; background: #f5f6fa; min-height: 100vh; }

/* Stats Grid */ .stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 30px; }

@media (max-width: 1024px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }

.stat-card { background: white; border-radius: 15px; padding: 25px; display: flex; align-items: center; gap: 20px; box-shadow: 0 5px 15px rgba(0,0,0,0.1); }

.stat-icon { width: 60px; height: 60px; border-radius: 15px; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; }

.stat-card:nth-child(1) .stat-icon { background: #e3f2fd; } .stat-card:nth-child(2) .stat-icon { background: #e8f5e9; } .stat-card:nth-child(3) .stat-icon { background: #fff3e0; } .stat-card:nth-child(4) .stat-icon { background: #ffebee; }

.stat-info h3 { font-size: 2rem; margin: 0; color: #333; }

.stat-info p { margin: 5px 0 0; color: #666; font-size: 0.9rem; }

/* Content Card */ .content-card { background: white; border-radius: 15px; padding: 25px; box-shadow: 0 5px 15px rgba(0,0,0,0.1); margin-bottom: 30px; }

.content-card h3 { margin: 0 0 20px; color: #333; font-size: 1.2rem; }

/* Form Row */ .form-row { display: flex; gap: 20px; margin-bottom: 20px; }

.form-row .form-group { flex: 1; }

@media (max-width: 768px) { .form-row { flex-direction: column; } }

/* Utility */ .no-data { text-align: center; padding: 40px; color: #666; }

.weekend-row { background-color: #fff3cd; }

.text-red { color: #dc3545; }

/* Responsive */ @media (max-width: 768px) { .sidebar { width: 200px; }
.main-content {
    margin-left: 200px;
    padding: 15px;
}

.stats-grid {
    grid-template-columns: 1fr;
}

.form-row {
    flex-direction: column;
}
}


