/* Authentication System Styles */
.login-modal,
.admin-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
}

.login-container {
  background: white;
  padding: 50px 40px;
  border-radius: 20px;
  width: 90%;
  max-width: 550px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  text-align: center;
}

.login-header {
  text-align: center;
  margin-bottom: 40px;
}

.login-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #4A90E2 0%, #357ABD 100%);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 25px;
  box-shadow: 0 8px 25px rgba(74, 144, 226, 0.3);
}

.login-header h1 {
  margin: 0 0 15px 0;
  font-size: 32px;
  color: #2c3e50;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.login-header p {
  margin: 0 0 20px 0;
  color: #666;
  font-size: 18px;
  line-height: 1.4;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 12px;
  color: #666;
  z-index: 1;
}

.input-wrapper input {
  width: 100%;
  padding: 16px 16px 16px 50px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 18px;
  transition: border-color 0.3s;
  box-sizing: border-box;
}

.input-wrapper input:focus {
  outline: none;
  border-color: #4A90E2;
}

.password-toggle {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  color: #666;
  padding: 4px;
}

.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 14px;
  color: #666;
}

.checkbox-label input[type="checkbox"] {
  margin-right: 8px;
}

.form-options a {
  /* color: #007bff; */
  text-decoration: none;
  font-size: 14px;
}

.form-options a:hover {
  text-decoration: underline;
}

.help-text {
  color: #666;
  font-size: 14px;
  font-style: italic;
}

.login-button {
  width: 100%;
  padding: 14px;
  background: #4A90E2;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s;
}

.login-button:hover {
  background: #357ABD;
}

.repl-auth-container {
  margin: 30px 0;
  padding: 25px 0;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
}

.repl-auth-container iframe {
  width: 100% !important;
  border: none;
  border-radius: 12px;
  min-height: 60px;
}

.login-footer {
  text-align: center;
  margin-top: 25px;
  font-size: 14px;
  color: #888;
}

.error-message {
  background: #fee;
  color: #c33;
  padding: 12px;
  border-radius: 6px;
  margin: 15px 0;
  border: 1px solid #fcc;
  transition: opacity 0.3s ease;
}

.success-message {
  background: #efe;
  color: #363;
  padding: 12px;
  border-radius: 6px;
  margin: 15px 0;
  border: 1px solid #cfc;
  transition: opacity 0.3s ease;
}

.error-message {
  background-color: #fee;
  color: #c33;
  padding: 10px;
  border-radius: 5px;
  margin-top: 15px;
  border: 1px solid #fcc;
  font-size: 14px;
  text-align: center;
}

.login-footer a {
  color: #4A90E2;
  text-decoration: none;
  font-weight: 500;
}

.login-footer a:hover {
  text-decoration: underline;
}

.error-message {
  background: #ff4757;
  color: white;
  padding: 12px;
  border-radius: 6px;
  margin-top: 15px;
  text-align: center;
  font-size: 14px;
}

/* User Header Styles */
.user-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 15px 20px;
  border-bottom: 1px solid #ddd;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 15px;
  font-weight: 500;
}

.admin-badge {
  background: #ff6b6b;
  color: white;
  padding: 4px 12px;
  border-radius: 15px;
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.user-controls {
  display: flex;
  gap: 10px;
}

.admin-button,
.logout-button {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.admin-button {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.admin-button:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.logout-button {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.logout-button:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

/* Admin Panel Styles */
.admin-container {
  background: white;
  padding: 30px;
  border-radius: 12px;
  width: 100%;
  margin: auto 100px;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 2px solid #f0f0f0;
}

.admin-header h2 {
  margin: 0;
  color: #2c3e50;
  font-size: 24px;
  font-weight: 600;
}

.close-button {
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: #999;
  padding: 0;
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.close-button:hover {
  color: #333;
  background: #f0f0f0;
}

.admin-controls {
  margin-bottom: 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.create-user-button {
  background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.create-user-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(76, 175, 80, 0.4);
}

.users-table {
  overflow-x: auto;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
  width: 100%;
}

.users-table table {
  min-width: 1200px;
}

.users-table table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

.users-table th,
.users-table td {
  text-align: left;
  padding: 15px 12px;
  border-bottom: 1px solid #f0f0f0;
}

.users-table th {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  font-weight: 600;
  color: #495057;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.5px;
}

.users-table tbody tr:hover {
  background: #f8f9fa;
  transition: background-color 0.2s ease;
}

.status-badge {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-badge.active {
  background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
  color: #155724;
  border: 1px solid #c3e6cb;
}

.status-badge.inactive {
  background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
  color: #721c24;
  border: 1px solid #f5c6cb;
}


.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.edit-button,
.delete-button {
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.edit-button {
  background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
  color: #212529;
}

.edit-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(255, 193, 7, 0.4);
}

.delete-button {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  color: white;
}

.delete-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(220, 53, 69, 0.4);
}

/* Create User Form */
.create-user-form {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 25px;
  border-radius: 12px;
  margin-top: 25px;
  border: 1px solid #dee2e6;
}

.create-user-form h3 {
  margin: 0 0 20px 0;
  color: #495057;
  font-size: 20px;
  font-weight: 600;
}

.create-user-form input,
.create-user-form select {
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
  border: 2px solid #dee2e6;
  border-radius: 8px;
  font-size: 14px;
  box-sizing: border-box;
  transition: border-color 0.3s ease;
}

.password-input-container {
  position: relative;
  margin-bottom: 15px;
}

.password-input-container input {
  margin-bottom: 0;
  padding-right: 50px;
}

.password-input-container .password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
  color: #666;
}

.password-input-container .password-toggle:hover {
  color: #4A90E2;
}

.create-user-form input:focus,
.create-user-form select:focus {
  outline: none;
  border-color: #4A90E2;
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.form-buttons {
  display: flex;
  gap: 12px;
}

.form-buttons button {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.form-buttons button[type="submit"] {
  background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.form-buttons button[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(76, 175, 80, 0.4);
}

.form-buttons button[type="button"] {
  background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(108, 117, 125, 0.3);
}

.form-buttons button[type="button"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(108, 117, 125, 0.4);
}

/* Sort Controls */
.admin-controls select {
  padding: 10px 12px;
  border: 2px solid #dee2e6;
  border-radius: 6px;
  font-size: 14px;
  background: white;
  cursor: pointer;
  transition: border-color 0.3s ease;
}

.admin-controls select:focus {
  outline: none;
  border-color: #4A90E2;
}

.admin-controls label {
  font-weight: 600;
  color: #495057;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .login-container {
    padding: 30px 20px;
  }

  .admin-container {
    padding: 20px 15px;
    width: 98%;
  }

  .user-header {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
    padding: 15px;
  }

  .user-controls {
    width: 100%;
    justify-content: flex-end;
  }

  .users-table {
    font-size: 14px;
  }

  .actions {
    flex-direction: column;
  }

  .admin-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-controls>div {
    margin-top: 10px;
  }
}

/* Loading states */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Animation for modal appearance */
.admin-modal {
  animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Enhanced table styling */
.users-table tbody tr {
  transition: all 0.2s ease;
}

.users-table tbody tr:nth-child(even) {
  background: rgba(248, 249, 250, 0.5);
}

.users-table tbody tr:hover {
  background: #e3f2fd !important;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Admin panel specific styles ***This code is commented because this design is same as the code of line 300***  */
/* .admin-container {
  background: white;
  margin: 2% auto;
  padding: 30px;
  border-radius: 10px;
  width: 95%;
  max-width: 1200px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
} */

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 2px solid #eee;
}

.admin-controls {
  display: flex;
  gap: 15px;
  align-items: center;
  margin-bottom: 20px;
}

.create-user-button,
.edit-button,
.delete-button {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.3s;
}

.create-user-button {
  background: #4CAF50;
  color: white;
}

.edit-button {
  background: #2196F3;
  color: white;
}

.delete-button {
  background: #f44336;
  color: white;
}

.create-user-form {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  margin-top: 20px;
}

.create-user-form input,
.create-user-form select {
  width: 100%;
  padding: 10px;
  margin: 8px 0;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-sizing: border-box;
}

.form-buttons {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.close-button {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
}

.users-table {
  width: 100%;
  overflow-x: auto;
}

.users-table table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
}

.users-table th,
.users-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

.users-table th {
  background: #f5f5f5;
  font-weight: 600;
}

.status-badge {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.status-badge.active {
  background: #e8f5e8;
  color: #2e7d32;
}

.status-badge.inactive {
  background: #fff3e0;
  color: #f57c00;
}

.actions {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  min-width: 400px;
}

.user-header {
  background: #f8f9fa;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #dee2e6;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

.user-controls {
  display: flex;
  gap: 10px;
}

.admin-badge {
  background: #dc3545;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}

.admin-button,
.logout-button {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
}

.admin-button {
  background: #6c757d;
  color: white;
}

.logout-button {
  background: #dc3545;
  color: white;
}

.archive-button {
  background: #6c757d;
  color: white;
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.archive-button:hover {
  background: #5a6268;
}

.emergency-reset-button {
  background: #ff6b35;
  color: white;
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  margin-left: 5px;
}

/* Archived users modal styles */
#archivedModal .admin-container {
  max-width: 100%;
}

#archivedModal .users-table {
  margin-top: 20px;
}

#archivedModal .actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.password-input-container {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-container input {
  margin: 0;
}

/* shompod added these css for register modal here */
.register-modal {
  display: none;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
}

.register-modal .modal-content {
  background-color: #fff;
  margin: 10% auto;
  padding: 20px;
  width: 90%;
  max-width: 400px;
  border-radius: 8px;
  position: relative;
}

.register-modal .close-btn {
  position: absolute;
  right: 20px;
  top: 10px;
  font-size: 24px;
  cursor: pointer;
}

.register-modal .form-group {
  margin-bottom: 15px;
}

.register-modal label {
  display: block;
  margin-bottom: 5px;
}

.register-modal input {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.register-modal button[type="submit"] {
  width: 100%;
  padding: 10px;
  background-color: #4CAF50;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.register-modal button:hover[type="submit"] {
  background-color: #45a049;
}

.register-modal .login-link {
  margin-top: 15px;
  text-align: center;
}

.google-button {
  margin: 0px auto;
  width: 90%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background-color: white;
  color: #444;
  border: 1px solid #ccc;
  padding: 10px 16px;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.google-button:hover {
  background-color: #f5f5f5;
}

.google-button img {
  width: 20px;
  height: 20px;
}

/* shompod added these css for register modal here */