/* ========================================================= */
/* === GLOBAL STYLES ====================================== */
/* ========================================================= */
html, body {
  width: 100%;
  margin: 0;
  padding: 0;
  overflow: auto;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  background: linear-gradient(135deg, #5f8fce, #82a8e1);
  font-family: "Poppins", Arial, sans-serif;
  min-height: 100vh;
  box-sizing: border-box;
}

/* ========================================================= */
/* === PAGE LAYOUT & CARDS ================================ */
/* ========================================================= */
.home-page {
  height: 100vh;
  padding: 0;
  margin: 0;
  background: linear-gradient(135deg, #5f8fce, #82a8e1);
  display: flex;
  justify-content: center;
  align-items: center;
}

.login-page {
  height: 100vh;
  padding: 0;
  margin: 0;
  background: linear-gradient(135deg, #4f82c2, #739fdd);
  display: flex;
  justify-content: center;
  align-items: center;
}

.admin-page {
  background: #eef3fc;
  min-height: 100vh;
  padding: 20px 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
  overflow-y: auto;
}

/* Card Containers */
.card,
.admin-card,
.home-card,
.login-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 18px rgba(0,0,0,0.1);
  box-sizing: border-box;
  margin: 20px auto;
}

.card {
  max-width: 900px;
  padding: 25px;
  width: 100%;
}

.admin-card {
  max-width: 900px;
  padding: 25px 20px;
  width: 100%;
  margin-bottom: 25px;
}

.home-card {
  width: 800px;
  max-width: 90%;
  height: 800px;
  background: #fff;
  padding: 30px 25px;
  border-radius: 16px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.18);
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: 0.3s ease;
  margin: 20px;
}

.login-card {
  width: 800px;
  max-width: 90%;
  min-height: 520px;
  padding: 45px 30px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: 0.3s ease;
  margin: 20px auto;
}

/* ========================================================= */
/* === HOME PAGE SPECIFIC STYLES ========================== */
/* ========================================================= */
.home-card h1 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.home-card .subtitle {
  font-size: 1.1rem;
  color: #555;
  margin-bottom: 25px;
}

.home-card .btn,
.home-card .btn-secondary {
  width: 100%;
  padding: 14px;
  font-size: 1rem;
  margin: 10px 0;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: 0.2s;
}

.home-card .btn {
  background: #007bff;
  color: #fff;
}

.home-card .btn:hover {
  background: #005fcc;
}

.home-card .btn-secondary {
  background: #6c757d;
  color: #fff;
}

.home-card .btn-secondary:hover {
  background: #555;
}

/* ========================================================= */
/* === TYPOGRAPHY ========================================= */
/* ========================================================= */
.card h2,
.admin-card h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 15px;
  color: #222;
}

.login-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: #222;
}

.footer-text {
  margin-top: 20px;
  font-size: 1.70rem;
  color: #666;
  line-height: 1.4;
}

@media (max-width: 600px) {
  .footer-text {
    font-size: 2.2rem;
  }
}

.footer-text .heart {
  color: #e63946;
  font-weight: bold;
}

.footer-link {
  color: #007bff;
  text-decoration: none;
  font-weight: 600;
}

.footer-link:hover {
  text-decoration: underline;
}

/* ========================================================= */
/* === HEADER & TOP ACTIONS =============================== */
/* ========================================================= */
.top-actions {
  width: 100%;
  max-width: 900px;
  margin: 20px auto 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background: #007bff;
  color: #fff;
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.15);
  flex-wrap: wrap;
  box-sizing: border-box;
}

.top-actions h1 {
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0;
}

.top-actions #adminName {
  margin-right: 10px;
  font-weight: 600;
  font-size: 1.1rem;
  white-space: nowrap;
}

.top-actions .admin-info {
  font-size: 1.1rem;
  font-weight: 600;
}

/* ========================================================= */
/* === FORM ELEMENTS ====================================== */
/* ========================================================= */
label {
  display: block;
  margin-top: 10px;
  font-weight: 600;
}

input,
select {
  width: 100%;
  padding: 12px;
  margin-top: 6px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
  background: #fafafa;
  box-sizing: border-box;
}

input:disabled {
  background-color: #f8f9fa;
  cursor: not-allowed;
  opacity: 0.6;
}

.search-input {
  padding: 8px;
  width: 280px;
}

/* ========================================================= */
/* === BUTTONS ============================================ */
/* ========================================================= */
button {
  padding: 12px 24px;
  margin: 10px 0;
  cursor: pointer;
  font-size: 16px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  transition: 0.3s;
}

button:disabled {
  background-color: #6c757d;
  cursor: not-allowed;
  opacity: 0.6;
}

button[type="submit"],
.login-btn,
.home-card .btn {
  margin-top: 18px;
  padding: 12px;
  width: 100%;
  background: #007bff;
  color: #fff;
}

button[type="submit"]:hover,
.login-btn:hover,
.home-card .btn:hover {
  background: #10AE57;
}

.back-btn {
  width: 100%;
  margin-bottom: 18px;
  height: 45px;
  border-radius: 10px;
  background: #10AE57;
  color: white;
  margin: 20px 0;
}

#logoutBtn {
  padding: 8px 14px;
  border: none;
  border-radius: 6px;
  background: #f44336;
  color: #fff;
  cursor: pointer;
  font-weight: 600;
  white-space: nowrap;
}

#logoutBtn:hover {
  background: #d93227;
}

/* Action Buttons */
.action-btn,
.admin-btn {
  padding: 6px 12px;
  font-size: 0.85rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  margin-right: 6px;
  white-space: nowrap;
}

.disable-btn,
.admin-btn.disable {
  background: #ff9800;
  color: white;
}

.disable-btn:hover,
.admin-btn.disable:hover {
  background: #e58900;
}

.delete-btn,
.admin-btn.delete {
  background: #f44336;
  color: white;
}

.delete-btn:hover,
.admin-btn.delete:hover {
  background: #d32f2f;
}

.export-btn {
  padding: 8px 12px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  background: #28a745;
  color: #fff;
  font-weight: 600;
}

.export-btn:hover {
  background: #218838;
}

#clearSearch {
  padding: 8px 12px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  background: #dc3545;
  color: #fff;
  font-weight: 600;
  margin-top: 15px;
}

/* ========================================================= */
/* === TABLES ============================================= */
/* ========================================================= */
table {
  width: 100%;
  margin-top: 15px;
  border-collapse: collapse;
  table-layout: auto;
}

.admin-table {
  min-width: 700px;
}

.attendance-table {
  width: 100%;
  border-collapse: collapse;
}

thead {
  background: #007bff;
  color: rgb(5, 5, 5);
}

th, td {
  padding: 12px;
  border: 1px solid #ddd;
  text-align: left;
  font-size: 0.95rem;
}

.admin-table th,
.admin-table td {
  border: 1px solid #000000;
}

tbody tr:nth-child(even) {
  background: #f7faff;
}

.admin-table tr:nth-child(even) {
  background: #f4f8ff;
}

.attendance-table thead tr {
  background: #00a4f6;
}

/* Clickable User Name in Table */
.admin-table td .open-history {
  color: #00b3ff;
  text-decoration: underline;
  cursor: pointer;
  font-weight: 600;
}

.admin-table td .open-history:hover,
.admin-table td .open-history:focus {
  color: #00b3ff;
  outline: none;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ========================================================= */
/* === MESSAGES & STATUS ================================== */
/* ========================================================= */
#msg,
.login-message,
.message-container {
  margin-top: 10px;
  font-weight: 600;
}

.login-message {
  color: red;
}

.logOutText {
  color: red;
  font-weight: bold;
  margin-top: 20px;
}

/* GPS Status Styles */

/* ========================================================= */
/* === GPS LOCATION STYLES ================================ */
/* ========================================================= */

.gps-status {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.gps-status.success {
    background: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.gps-status.error {
    background: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.gps-status.warning {
    background: #fff3cd;
    border-color: #ffeaa7;
    color: #856404;
}

.gps-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
}

.gps-icon {
    font-size: 18px;
    transition: all 0.3s ease;
}

.location-info {
    margin-top: 8px;
    font-size: 12px;
    opacity: 0.8;
}

/* Location requirements info */
.location-requirements {
    background: #e7f3ff;
    border: 1px solid #b3d9ff;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    font-size: 14px;
}

.location-requirements h4 {
    margin: 0 0 10px 0;
    color: #0066cc;
    font-size: 16px;
}

.location-requirements ul {
    margin: 0;
    padding-left: 20px;
    text-align: left;
}

.location-requirements li {
    margin-bottom: 5px;
    color: #555;
}


/* ========================================================= */
/* === LAYOUT COMPONENTS ================================== */
/* ========================================================= */
.search-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 15px;
  font-family: Arial, sans-serif;
  text-align: center;
}

.pagination-controls button {
  padding: 5px 10px;
  cursor: pointer;
  border: 1px solid #ccc;
  background: #f5f5f5;
  border-radius: 5px;
}

.pagination-controls button:hover {
  background: #e0e0e0;
}

.pagination-controls select {
  padding: 4px 6px;
  border-radius: 5px;
  border: 1px solid #ccc;
}

.table-title {
  margin-top: 12px;
}

/* ========================================================= */
/* === MODALS ============================================= */
/* ========================================================= */
#attendanceModal,
#editUserModal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  justify-content: center;
  align-items: center;
  z-index: 9999;
}


.photo-enlarged {
  position: fixed;
  z-index: 1001;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  display: none;
  justify-content: center;
  align-items: center;
}

/* Modal Content - PROPERLY CENTERED */
#attendanceModal .modal-content,
#editUserModal .modal-content,
.photo-modal-content {
  background: #fff;
  border-radius: 12px;
  width: 90%;
  max-width: 600px;
  padding: 20px 25px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.25);
  max-height: 90vh;
  overflow-y: auto;
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.photo-modal-content {
  max-width: 800px;
}

.photo-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #ddd;
}

.photo-modal-header h3 {
  margin: 0;
  color: #333;
}

/* Modal Elements */
#attendanceModal h3 {
  margin-top: 0;
  font-size: 1.5rem;
  margin-bottom: 15px;
  text-align: center;
}

#attendanceModal input[type="date"] {
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
}

#editUserModal input,
#editUserModal select {
  width: 100%;
  padding: 6px 8px;
  margin-bottom: 10px;
  border-radius: 4px;
  border: 1px solid #ccc;
}

#editUserModal button {
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 5px;
  border: none;
  background-color: #007bff;
  color: #fff;
}

/* Close Buttons */
#attendanceModal .close-btn,
.close-photo-modal,
#editUserModal .close-btn {
  position: absolute;
  top: 12px;
  right: 15px;
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  color: #333;
  background: none;
  border: none;
}

.close-photo-modal {
  font-size: 28px;
  color: #aaa;
}

.close-photo-modal:hover {
  color: #000;
}

.photo-enlarged .close-enlarged {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  background: none;
  border: none;
}

/* Photo Grid */
.photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
  margin-top: 15px;
}


.photo-enlarged img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 8px;
}


/* ========================================================= */
/* === RESPONSIVE DESIGN ================================== */
/* ========================================================= */
@media (max-width: 768px) {
  .home-page {
    height: auto;
    min-height: 100vh;
    padding: 20px 0;
    align-items: flex-start;
  }
  
  .home-card {
    width: 95%;
    max-width: 95%;
    padding: 25px 20px;
    margin: 10px auto;
    min-height: auto;
  }
  
  .home-card h1 {
    font-size: 1.8rem;
    margin-bottom: 8px;
  }
  
  .home-card .subtitle {
    font-size: 1rem;
    margin-bottom: 20px;
  }
  
  .home-card .btn,
  .home-card .btn-secondary {
    padding: 12px;
    font-size: 0.95rem;
    margin: 8px 0;
  }
  
  .footer-text {
    font-size: 0.8rem;
    margin-top: 15px;
  }
}

@media (max-width: 700px) {
  .top-actions {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }

  .card,
  .admin-card {
    width: 95%;
    padding: 15px;
  }

  table,
  th,
  td {
    font-size: 0.85rem;
    padding: 6px;
  }

  .admin-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    min-width: auto;
    width: 100%;
  }

  /* Hide columns except Name, Status, Actions ONLY in admin table */
  .admin-table th:nth-child(1),
  .admin-table th:nth-child(4),
  .admin-table th:nth-child(5),
  .admin-table th:nth-child(6),
  .admin-table td:nth-child(1),
  .admin-table td:nth-child(4),
  .admin-table td:nth-child(5),
  .admin-table td:nth-child(6) {
    display: none;
  }

  .search-row {
    flex-direction: column;
    align-items: stretch;
  }

  .search-input {
    width: 100%;
  }

  #attendanceModal .filter-row {
    flex-direction: column;
    align-items: center;
  }

  #attendanceModal table th,
  #attendanceModal table td {
    font-size: 0.85rem;
    padding: 6px;
  }
}

@media (max-width: 480px) {
  .home-card {
    padding: 20px 15px;
    border-radius: 12px;
  }
  
  .home-card h1 {
    font-size: 1.6rem;
  }
  
  .home-card .subtitle {
    font-size: 0.95rem;
    margin-bottom: 15px;
  }
  
  .home-card .btn,
  .home-card .btn-secondary {
    padding: 11px;
    font-size: 0.9rem;
  }
  
  .footer-text {
    font-size: 0.75rem;
    line-height: 1.3;
  }

  #attendanceModal .filter-row {
    flex-direction: column;
    align-items: center;
  }

  #attendanceModal table th,
  #attendanceModal table td {
    font-size: 0.85rem;
    padding: 6px;
  }

  /* Modal adjustments for mobile */
  #attendanceModal .modal-content,
  #editUserModal .modal-content,
  .photo-modal-content {
    width: 95%;
    padding: 15px 20px;
  }

  .photo-modal-content {
    max-width: 95%;
  }
}

@media (max-width: 360px) {
  .home-card {
    padding: 15px 12px;
  }
  
  .home-card h1 {
    font-size: 1.4rem;
  }
  
  .home-card .subtitle {
    font-size: 0.9rem;
  }
  
  .footer-text {
    font-size: 0.7rem;
  }

  /* Further modal adjustments for very small screens */
  #attendanceModal .modal-content,
  #editUserModal .modal-content,
  .photo-modal-content {
    width: 98%;
    padding: 12px 15px;
  }

  .photos-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

/* ========================================================= */
/* === STAFF DASHBOARD SPECIFIC STYLES ==================== */
/* ========================================================= */
/* ========================================================= */
/* === USER PROFILE & AVATAR STYLES ======================= */
/* ========================================================= */
.user-profile-section {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 25px;
  border: 1px solid #e9ecef;
}

.user-profile-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #dee2e6;
}

.user-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #007bff, #0056b3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  font-weight: bold;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.user-info {
  flex: 1;
}

.user-name {
  font-size: 1.3rem;
  font-weight: 700;
  color: #333;
  margin: 0 0 5px 0;
}

.user-staff-id {
  font-size: 0.9rem;
  color: #666;
  margin: 0;
  font-weight: 500;
}

.user-role {
  display: inline-block;
  padding: 4px 12px;
  background: #e7f3ff;
  color: #007bff;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 5px;
}

.profile-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.profile-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.profile-btn.update-password {
  background: #28a745;
  color: white;
}

.profile-btn.update-password:hover {
  background: #218838;
}

.profile-btn.edit-profile {
  background: #17a2b8;
  color: white;
}

.profile-btn.edit-profile:hover {
  background: #138496;
}

.profile-btn.secondary {
  background: #6c757d;
  color: white;
}

.profile-btn.secondary:hover {
  background: #545b62;
}

/* Password Update Modal */
#passwordModal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

#passwordModal .modal-content {
  background: #fff;
  border-radius: 12px;
  width: 90%;
  max-width: 450px;
  padding: 25px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.25);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.password-form-group {
  margin-bottom: 20px;
}

.password-form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
}

.password-form-group input {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.password-form-group input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

.password-strength {
  margin-top: 8px;
  font-size: 0.8rem;
}

.password-strength.weak {
  color: #dc3545;
}

.password-strength.medium {
  color: #ffc107;
}

.password-strength.strong {
  color: #28a745;
}

.password-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 25px;
}

.password-actions .btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}

.password-actions .btn-primary {
  background: #007bff;
  color: white;
}

.password-actions .btn-primary:hover {
  background: #0056b3;
}

.password-actions .btn-secondary {
  background: #6c757d;
  color: white;
}

.password-actions .btn-secondary:hover {
  background: #545b62;
}

.password-message {
  margin-top: 15px;
  padding: 10px;
  border-radius: 6px;
  font-weight: 600;
  text-align: center;
}

.password-message.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.password-message.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Quick Stats */
.user-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
  margin-top: 20px;
}

.stat-card {
  background: white;
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  border: 1px solid #e9ecef;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #007bff;
  margin-bottom: 5px;
}

/* ========================================================= */
/* === EYE BLINK =================================== */  
/* staff.css - Staff Dashboard Specific Styles */
.card {
    
    text-align: center;
}

p {
    font-weight: 600;
    margin: 10px 0;
}

/* Camera Section */

video {
    width: 100%;
    max-width: 320px;
    border-radius: 10px;
    background: black;
}

#captureBtn {
    display: none;
    padding: 10px 22px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
}
/* Hide captured image completely */
#capturedPhoto {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
}

/* Attendance Status */
.attendance-status {
    margin: 15px 0;
}

#currentStatus {
    font-weight: 600;
    font-size: 1.1rem;
    padding: 8px 12px;
    border-radius: 6px;
    background: #f8f9fa;
}

.eye-point {
    position: absolute;
    width: 6px;
    height: 6px;
    background: #dc3545;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}
/* ========================================================= */
/* === ADMIN DASHBOARDS ========================= */
/* ========================================================= */
/* === ADMIN DASHBOARD ENHANCEMENTS ======================= */
/* ========================================================= */

/* Statistics Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.stat-card.large {
    text-align: center;
    padding: 25px 20px;
}

.stat-card.medium {
    display: flex;
    align-items: center;
    gap: 15px;
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.stat-card.medium .stat-icon {
    font-size: 2rem;
    margin-bottom: 0;
}

.stat-content {
    flex: 1;
}

.stat-card.medium .stat-value {
    font-size: 1.8rem;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

/* Quick Actions */
.action-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}
/* ========================================================= */
/* === ACTION BUTTONS - IMPROVED COLORS =================== */
/* ========================================================= */

/* Base Action Button Styles */
.action-btn {
  padding: 8px 16px;
  font-size: 0.85rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  margin: 2px 4px;
  white-space: nowrap;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 80px;
}

/* Edit Button - Blue */
.action-btn.edit {
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: white;
  border: 1px solid #2980b9;
}

.action-btn.edit:hover {
  background: linear-gradient(135deg, #2980b9, #2471a3);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

.action-btn.edit:active {
  transform: translateY(0);
}

/* View Photos Button - Teal */
.action-btn.photos {
  background: linear-gradient(135deg, #1abc9c, #16a085);
  color: white;
  border: 1px solid #16a085;
}

.action-btn.photos:hover {
  background: linear-gradient(135deg, #16a085, #149174);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(26, 188, 156, 0.3);
}

.action-btn.photos:active {
  transform: translateY(0);
}

/* Disable Button - Orange */
.action-btn.disable {
  background: linear-gradient(135deg, #e67e22, #d35400);
  color: white;
  border: 1px solid #d35400;
}

.action-btn.disable:hover {
  background: linear-gradient(135deg, #d35400, #ba4a00);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(230, 126, 34, 0.3);
}

.action-btn.disable:active {
  transform: translateY(0);
}

/* Enable Button - Green */
.action-btn.enable {
  background: linear-gradient(135deg, #27ae60, #229954);
  color: white;
  border: 1px solid #229954;
}

.action-btn.enable:hover {
  background: linear-gradient(135deg, #229954, #1e8449);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(39, 174, 96, 0.3);
}

.action-btn.enable:active {
  transform: translateY(0);
}

/* Reset Device Button - Purple */
.action-btn.reset {
  background: linear-gradient(135deg, #9b59b6, #8e44ad);
  color: white;
  border: 1px solid #8e44ad;
}

.action-btn.reset:hover {
  background: linear-gradient(135deg, #8e44ad, #7d3c98);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(155, 89, 182, 0.3);
}

.action-btn.reset:active {
  transform: translateY(0);
}

/* Check-in Button - Success Green */
.action-btn.checkin {
  background: linear-gradient(135deg, #2ecc71, #27ae60);
  color: white;
  border: 1px solid #27ae60;
}

.action-btn.checkin:hover {
  background: linear-gradient(135deg, #27ae60, #229954);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(46, 204, 113, 0.3);
}

.action-btn.checkin:active {
  transform: translateY(0);
}

/* Check-out Button - Warning Orange */
.action-btn.checkout {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: white;
  border: 1px solid #c0392b;
}

.action-btn.checkout:hover {
  background: linear-gradient(135deg, #c0392b, #a93226);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(231, 76, 60, 0.3);
}

.action-btn.checkout:active {
  transform: translateY(0);
}

/* View History Button - Info Blue */
.action-btn.view-history {
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: white;
  border: 1px solid #2980b9;
}

.action-btn.view-history:hover {
  background: linear-gradient(135deg, #2980b9, #2471a3);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

.action-btn.view-history:active {
  transform: translateY(0);
}

/* Delete Button - Danger Red */
.action-btn.delete {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: white;
  border: 1px solid #c0392b;
}

.action-btn.delete:hover {
  background: linear-gradient(135deg, #c0392b, #a93226);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(231, 76, 60, 0.3);
}

.action-btn.delete:active {
  transform: translateY(0);
}

/* Button Icons */
.action-btn i {
  font-size: 0.9em;
}

/* Button Group Styling */
.action-buttons-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

/* Responsive Action Buttons */
@media (max-width: 768px) {
  .action-btn {
    padding: 6px 12px;
    font-size: 0.8rem;
    min-width: 70px;
  }
  
  .action-buttons-group {
    gap: 6px;
  }
}

@media (max-width: 480px) {
  .action-btn {
    padding: 5px 10px;
    font-size: 0.75rem;
    min-width: 65px;
  }
}
.action-btn.primary {
    background: #007bff;
    color: white;
}

.action-btn.primary:hover {
    background: #0056b3;
}

.action-btn.secondary {
    background: #6c757d;
    color: white;
}

.action-btn.secondary:hover {
    background: #545b62;
}

/* Recent Activity */
.recent-activity {
    max-height: 300px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.activity-item:hover {
    background-color: #f8f9fa;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.activity-icon.checkin {
    background: #d4edda;
    color: #155724;
}

.activity-icon.checkout {
    background: #fff3cd;
    color: #856404;
}

.activity-details {
    flex: 1;
}

.activity-user {
    font-weight: 600;
    color: #333;
}

.activity-action {
    font-size: 0.85rem;
    color: #666;
}

.activity-time {
    font-size: 0.8rem;
    color: #999;
}


/* Enhanced Table Styles */
.table-container {
    overflow-x: auto;
    margin-top: 15px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.admin-table th {
    background: #007bff;
    color: white;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
}

.admin-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e9ecef;
    font-size: 0.9rem;
}

.admin-table tr:hover {
    background-color: #f8f9fa;
}

/* Status Badges */
.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.present {
    background: #d4edda;
    color: #155724;
}

.status-badge.absent {
    background: #f8d7da;
    color: #721c24;
}

.status-badge.checked-in {
    background: #fff3cd;
    color: #856404;
}

.status-badge.active {
    background: #d1ecf1;
    color: #0c5460;
}

.status-badge.inactive {
    background: #e2e3e5;
    color: #383d41;
}

/* Modal Enhancements */
.modal-content.large {
    max-width: 800px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px 15px;
    border-bottom: 1px solid #e9ecef;
}

.modal-header h3 {
    margin: 0;
    color: #333;
}

.modal-body {
    padding: 20px 25px;
    max-height: 70vh;
    overflow-y: auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

/* Responsive Design */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-row {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-btn {
        justify-content: center;
    }
    
    .search-row {
        flex-direction: column;
    }
    
    .filter-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .form-actions {
        flex-direction: column;
    }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.empty-state .icon {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-state h3 {
    margin: 0 0 10px 0;
    color: #333;
}

.empty-state p {
    margin: 0;
    font-size: 0.95rem;
}

/* ========================================================= */
/* === ADMIN DASHBOARD SPECIFIC STYLES ==================== */
/* ========================================================= */

/* Search and Filter Rows */
.search-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 15px;
}

.search-input {
  padding: 8px;
  width: 280px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.filter-row {
  margin-bottom: 15px;
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.filter-row label {
  font-weight: bold;
  margin-right: 5px;
}

.filter-row select {
  padding: 6px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.pagination-controls {
  margin-top: 15px;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.pagination-btn {
  padding: 6px 12px;
  border: 1px solid #ddd;
  background: white;
  border-radius: 4px;
  cursor: pointer;
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Statistics Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

.stat-card {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  gap: 15px;
}

.stat-card.large {
  grid-column: span 1;
}

.stat-icon {
  font-size: 2em;
}

.stat-value {
  font-size: 1.8em;
  font-weight: bold;
  color: #2c3e50;
}

.stat-label {
  color: #7f8c8d;
  font-size: 0.9em;
}

.stats-row {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.stat-card.medium {
  flex: 1;
  min-width: 200px;
}

.action-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.action-btn {
  padding: 10px 15px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
}

.action-btn.primary {
  background: #3498db;
  color: white;
}

.action-btn.secondary {
  background: #95a5a6;
  color: white;
}

.recent-activity {
  max-height: 300px;
  overflow-y: auto;
}

.activity-item {
  display: flex;
  align-items: center;
  padding: 10px;
  border-bottom: 1px solid #ecf0f1;
  gap: 15px;
}

.activity-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
}

.activity-icon.checkin {
  background: #27ae60;
}

.activity-icon.checkout {
  background: #e74c3c;
}

.activity-details {
  flex: 1;
}

.activity-user {
  font-weight: bold;
}

.activity-time {
  color: #7f8c8d;
  font-size: 0.9em;
}

.table-container {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin: 15px 0;
}

.admin-table th,
.admin-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

.admin-table th {
  background: #10AE57;
  font-weight: bold;
}

.status-badge {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.8em;
  font-weight: bold;
}

.status-badge.active {
  background: #d4edda;
  color: #155724;
}

.status-badge.inactive {
  background: #f8d7da;
  color: #721c24;
}

.status-badge.present {
  background: #d1ecf1;
  color: #0c5460;
}

.status-badge.checked-out {
  background: #fff3cd;
  color: #856404;
}

.status-badge.absent {
  background: #f8d7da;
  color: #721c24;
}

.admin-btn {
  padding: 6px 12px;
  margin: 2px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8em;
}

.admin-btn.view-history {
  background: #3498db;
  color: white;
}

.admin-btn.edit {
  background: #f39c12;
  color: white;
}

.admin-btn.disable {
  background: #e74c3c;
  color: white;
}

.admin-btn.enable {
  background: #27ae60;
  color: white;
}

.admin-btn.checkin {
  background: #27ae60;
  color: white;
}

.admin-btn.checkout {
  background: #e74c3c;
  color: white;
}

.admin-btn.reset {
  background: #9b59b6;
  color: white;
}

.admin-btn.photos {
  background: #3498db;
  color: white;
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #7f8c8d;
}

.empty-state .icon {
  font-size: 3em;
  margin-bottom: 10px;
}

.loading-text {
  text-align: center;
  padding: 20px;
  color: #7f8c8d;
}

.error-text {
  text-align: center;
  padding: 20px;
  color: #e74c3c;
}

.top-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.admin-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

.admin-card {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  margin-bottom: 20px;
}

.add-user-section {
  background: #f8f9fa;
  margin-bottom: 20px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-bottom: 15px;
}

.btn {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  font-size: 14px;
}

.btn-primary {
  background: #3498db;
  color: white;
}

.btn-secondary {
  background: #10AE57;
  color: white;
}

.btn-danger {
  background: #e74c3c;
  color: white;
}

.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: white;
  margin: 5% auto;
  padding: 0;
  border-radius: 8px;
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
}

.modal-content.large {
  max-width: 800px;
}

.modal-content.photo-modal {
  max-width: 90%;
  width: 1000px;
}
.modal-header {
  padding: 15px 20px;
  border-bottom: 1px solid #ddd;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.5em;
  cursor: pointer;
  color: #7f8c8d;
}


.modal-body {
  padding: 20px;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-sizing: border-box;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.attendance-table {
  width: 100%;
  border-collapse: collapse;
}

.attendance-table th,
.attendance-table td {
  padding: 10px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

.attendance-table th {
  background: #f8f9fa;
  font-weight: bold;
}

.filter-controls {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.filter-controls input {
  padding: 6px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.export-buttons {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.msg {
  padding: 10px;
  margin: 10px 0;
  border-radius: 4px;
  text-align: center;
}

.clickable-name {
  cursor: pointer;
  text-decoration: underline;
  color: #0073ff;
}

.clickable-name.inactive {
  color: red;
}

/* Loading states */
.loading-text {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
}

/* ========================================================= */
/* === PHOTO MODAL STYLES ================================= */
/* ========================================================= */

/* Photo Modal Styles */
.photo-modal {
    max-width: 90%;
    width: 1200px;
    max-height: 90vh;
}

.photos-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    max-height: 70vh;
    overflow-y: auto;
    padding: 10px;
}

.photo-item {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.photo-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.photo-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    cursor: pointer;
    background: #f8f9fa;
}

.photo-image.loaded {
    background: transparent;
}

.photo-image.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    color: #6c757d;
    padding: 20px;
    text-align: center;
}

.placeholder-content {
    line-height: 1.4;
}

.placeholder-icon {
    font-size: 24px;
    margin-bottom: 8px;
}

.placeholder-text {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}

.placeholder-filename {
    font-size: 10px;
    color: #999;
    margin-bottom: 4px;
    word-break: break-all;
}

.placeholder-subtext {
    font-size: 11px;
    color: #dc3545;
}

.photo-info {
    padding: 12px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.photo-type {
    font-weight: bold;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 4px;
}

.photo-type.checkin {
    background: #d4edda;
    color: #155724;
}

.photo-type.checkout {
    background: #f8d7da;
    color: #721c24;
}

.photo-type.unknown {
    background: #e2e3e5;
    color: #383d41;
}

.photo-timestamp {
    font-size: 12px;
    color: #6c757d;
}

.no-photos {
    text-align: center;
    padding: 40px;
    color: #6c757d;
    grid-column: 1 / -1;
}

.no-photos h4 {
    margin-bottom: 8px;
    color: #495057;
}

/* Enlarged Photo Modal */
.modal-content.transparent {
    background: transparent;
    border: none;
    box-shadow: none;
    max-width: 95vw;
    max-height: 95vh;
}

.modal-header-right {
    display: flex;
    justify-content: flex-end;
    padding: 10px;
    position: absolute;
    top: 0;
    right: 0;
    z-index: 1000;
}

.close-btn-white {
    background: rgba(0,0,0,0.7);
    color: white;
    border: 2px solid white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.close-btn-white:hover {
    background: rgba(0,0,0,0.9);
}

.enlarged-photo {
    max-width: 100%;
    max-height: 95vh;
    object-fit: contain;
    border-radius: 8px;
}

/* Loading states */
.photo-image:not(.loaded):not(.placeholder) {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Responsive design for photo modal */
@media (max-width: 1200px) {
    .photos-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .photos-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .photos-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .photo-modal {
        max-width: 95%;
        margin: 10px;
    }
    
    .photo-image {
        height: 150px;
    }
}

@media (max-width: 480px) {
    .photos-container {
        grid-template-columns: 1fr;
    }
}


/* ========================================================= */
/* === export============================ */
/* New Export Modal Styles */
.export-summary {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 10px;
}

.summary-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    background: white;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stat-label {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 1.5em;
    font-weight: bold;
    color: #007bff;
}

.export-options {
    margin-bottom: 20px;
}

.option-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 10px;
}

.export-option-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.export-option-btn:hover {
    border-color: #007bff;
    background: #f8f9ff;
    transform: translateY(-2px);
}

.export-option-btn.pdf:hover {
    border-color: #dc3545;
    background: #fff5f5;
}

.export-option-btn.excel:hover {
    border-color: #28a745;
    background: #f8fff9;
}

.export-option-btn span {
    font-size: 2em;
    margin-bottom: 10px;
}
.preview-container {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    background: white;
}


.preview-header span,
.preview-row span {
    display: table-cell;
    padding: 8px 12px;
    border-bottom: 1px solid #e9ecef;
}

.preview-row:hover {
    background: #f8f9fa;
}

/* View All Attendance Modal Styles */
.filter-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.filter-controls-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 15px 0;
}

.filter-actions {
    display: flex;
    gap: 10px;
}

.export-section {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.export-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.results-summary {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    padding: 10px;
    background: #e7f3ff;
    border-radius: 6px;
}

.result-stat {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Modal sizes */
.modal-content.medium {
    max-width: 700px;
}

/* No data message */
.no-data {
    text-align: center;
    padding: 40px;
    color: #6c757d;
    font-style: italic;
}

.blink-status.error {
    border-color: #dc3545;
    background: #f8d7da;
}

.blink-status.warning {
    border-color: #ffc107;
    background: #fff3cd;
}

.blink-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.blink-icon {
    font-size: 24px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.blink-text {
    font-weight: 600;
    color: #333;
}

.blink-progress {
    margin-top: 10px;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: #e9ecef;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 5px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #20c997);
    width: 0%;
    transition: width 0.5s ease;
    border-radius: 5px;
}


/* Face Detection Overlay */
.face-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.face-box {
    position: absolute;
    border: 2px solid #28a745;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(40, 167, 69, 0.5);
}

.eye-marker {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #dc3545;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

#faceCanvas {
    position: absolute;
    top: 20px;
    left: 20px;
    width: calc(100% - 40px);
    height: calc(100% - 40px);
    pointer-events: none;
}

/* Enhanced Capture Button */
#captureBtn:disabled {
    background: #6c757d !important;
    cursor: not-allowed;
    opacity: 0.7;
}

#captureBtn.enabled {
    background: linear-gradient(135deg, #28a745, #20c997) !important;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
    animation: pulse-button 1.5s infinite;
}

@keyframes pulse-button {
    0% { box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(40, 167, 69, 0); }
    100% { box-shadow: 0 0 0 0 rgba(40, 167, 69, 0); }
}

/* Face Positioning Circle Styles */
#facePositionOverlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

/* Camera Container with positioning */
#cameraContainer {
    position: relative;
    display: none;
    flex-direction: column;
    align-items: center;
    background: #1a1a1a;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    overflow: hidden;
}

#cameraFeed {
    width: 100%;
    max-width: 640px;
    border-radius: 10px;
    transform: scaleX(-1); /* Mirror the video */
    background: #000;
    position: relative;
    z-index: 1;
}

/* Face detection status */
.face-detection-status {
    text-align: center;
    margin: 10px 0;
    font-weight: bold;
}

.face-detection-status.detected {
    color: #28a745;
}

.face-detection-status.not-detected {
    color: #dc3545;
}

/* Position instructions */
.position-instructions {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px;
    border-radius: 5px;
    margin: 10px 0;
    text-align: center;
}

.position-instructions h4 {
    margin: 0 0 5px 0;
    color: #ff9900;
}

.position-instructions p {
    margin: 0;
    font-size: 14px;
}

/* Blink status area (reused for face detection status) */
.blink-status {
    background: rgba(248, 249, 250, 0.9);
    border-radius: 10px;
    padding: 15px;
    margin: 15px 0;
    border: 2px solid #dee2e6;
    width: 100%;
    max-width: 640px;
}

.blink-status.detecting {
    border-color: #ffc107;
    background: rgba(255, 243, 205, 0.9);
}

.blink-status.success {
    border-color: #28a745;
    background: rgba(212, 237, 218, 0.9);
}

/* Manual blink button (keep hidden) */
.manual-blink-btn {
    display: none !important;
}

/* New button styles for export actions */
.action-btn.success {
    background-color: #28a745;
    color: white;
}

.action-btn.success:hover {
    background-color: #218838;
}

.action-btn.info {
    background-color: #17a2b8;
    color: white;
}

.action-btn.info:hover {
    background-color: #138496;
}

/* Export progress indicator */
.export-progress {
    display: none;
    margin: 10px 0;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 5px;
    border-left: 4px solid #007bff;
}

.export-progress.active {
    display: block;
}

.progress-text {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.progress-bar-inline {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill-inline {
    height: 100%;
    background: #007bff;
    width: 0%;
    transition: width 0.3s ease;
}

/* Toast notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.toast {
    background: white;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-left: 5px solid #28a745;
    min-width: 300px;
    animation: slideIn 0.3s ease;
}

.toast.error {
    border-left-color: #dc3545;
}

.toast.warning {
    border-left-color: #ffc107;
}

.toast.info {
    border-left-color: #17a2b8;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Export filter modal */
.export-filter-modal {
    max-width: 600px;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 15px 0;
}

.filter-group {
    margin-bottom: 15px;
}

.filter-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.filter-group select,
.filter-group input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.export-format-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 20px 0;
}

.format-btn {
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.format-btn:hover {
    border-color: #007bff;
    background: #f8f9fa;
}

.format-btn.selected {
    border-color: #007bff;
    background: #e7f3ff;
}

.format-icon {
    font-size: 24px;
}

.format-label {
    font-weight: 500;
    font-size: 14px;
}

.format-desc {
    font-size: 12px;
    color: #666;
    text-align: center;
}

/* Preview section */
.export-preview {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.preview-count {
    font-size: 14px;
    color: #666;
}

.preview-table {
    background: white;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #dee2e6;
}

.preview-row {
    display: grid;
    grid-template-columns: 25% 15% 20% 20% 20%;
    padding: 10px 15px;
    border-bottom: 1px solid #dee2e6;
}

.preview-row:last-child {
    border-bottom: none;
}

.preview-row.header {
    background: #800020;
    color: white;
    font-weight: bold;
}

.preview-row:nth-child(even):not(.header) {
    background: #f8f9fa;
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}