/* Index/Login Page Styles - Full Screen */
* {
  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;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  width: 100%;
}

.container {
  width: 100%;
  max-width: 450px;
  padding: 20px;
}

/* Login Container - Full Screen Responsive */
.login-container {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
  text-align: center;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-header {
  margin-bottom: 40px;
}

.logo {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  box-shadow: 0 15px 30px rgba(102, 126, 234, 0.4);
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.05);
}

.logo i {
  font-size: 40px;
  color: white;
}

.login-header h1 {
  color: #2c3e50;
  font-size: 28px;
  margin-bottom: 12px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.login-header p {
  color: #666;
  font-size: 16px;
  line-height: 1.5;
  max-width: 300px;
  margin: 0 auto;
}

/* Form Styles - Full Screen */
.login-form {
  text-align: left;
  margin-bottom: 30px;
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  color: #333;
  font-weight: 600;
  font-size: 14px;
  gap: 8px;
}

.form-group label i {
  color: #667eea;
  font-size: 16px;
  width: 20px;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 16px 20px;
  border: 2px solid #e1e5e9;
  border-radius: 12px;
  font-size: 15px;
  transition: all 0.3s ease;
  background: white;
  color: #333;
  font-family: inherit;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
  transform: translateY(-2px);
}

.form-group input::placeholder {
  color: #999;
}

/* Login Button - Full Screen */
.login-btn {
  width: 100%;
  padding: 16px 24px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 8px;
  min-height: 56px;
}

.login-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 30px rgba(102, 126, 234, 0.4);
}

.login-btn:active {
  transform: translateY(-1px);
}

.login-btn i {
  font-size: 18px;
}

/* Login Footer */
.login-footer {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #e1e5e9;
}

.login-footer p {
  color: #666;
  font-size: 13px;
  margin: 0;
}

/* Responsive Design - Full Screen with Monitor Size Adaptation */
@media (min-width: 1920px) {
  /* Large monitors */
  .container {
    max-width: 500px;
    padding: 30px;
  }

  .login-container {
    padding: 50px;
    border-radius: 28px;
  }

  .logo {
    width: 100px;
    height: 100px;
  }

  .logo i {
    font-size: 50px;
  }

  .login-header h1 {
    font-size: 32px;
  }

  .login-header p {
    font-size: 18px;
  }

  .form-group input,
  .form-group select {
    padding: 18px 24px;
    font-size: 16px;
  }

  .login-btn {
    padding: 18px 28px;
    font-size: 18px;
    min-height: 60px;
  }
}

@media (min-width: 1440px) and (max-width: 1919px) {
  /* Standard desktop monitors */
  .container {
    max-width: 480px;
  }

  .login-container {
    padding: 45px;
  }
}

@media (min-width: 1024px) and (max-width: 1439px) {
  /* Medium desktop monitors */
  .container {
    max-width: 460px;
  }

  .login-container {
    padding: 40px;
  }
}

@media (max-width: 1023px) {
  /* Small desktop and tablets */
  .container {
    max-width: 450px;
    padding: 20px;
  }

  .login-container {
    padding: 35px;
  }
}

@media (max-width: 768px) {
  /* Tablets */
  body {
    padding: 15px;
  }

  .container {
    max-width: 400px;
    padding: 15px;
  }

  .login-container {
    padding: 30px;
    border-radius: 20px;
  }

  .logo {
    width: 70px;
    height: 70px;
  }

  .logo i {
    font-size: 35px;
  }

  .login-header h1 {
    font-size: 24px;
  }

  .login-header p {
    font-size: 15px;
  }

  .form-group input,
  .form-group select {
    padding: 14px 18px;
    font-size: 14px;
  }

  .login-btn {
    padding: 14px 20px;
    font-size: 15px;
    min-height: 50px;
  }
}

@media (max-width: 480px) {
  /* Mobile devices */
  body {
    padding: 10px;
  }

  .container {
    max-width: 100%;
    padding: 10px;
  }

  .login-container {
    padding: 25px 20px;
    border-radius: 16px;
  }

  .logo {
    width: 60px;
    height: 60px;
  }

  .logo i {
    font-size: 30px;
  }

  .login-header h1 {
    font-size: 22px;
  }

  .login-header p {
    font-size: 14px;
  }

  .form-group {
    margin-bottom: 20px;
  }

  .form-group input,
  .form-group select {
    padding: 12px 16px;
    font-size: 14px;
    border-radius: 10px;
  }

  .login-btn {
    padding: 12px 18px;
    font-size: 14px;
    min-height: 48px;
    border-radius: 10px;
  }

  .login-footer {
    padding-top: 15px;
  }

  .login-footer p {
    font-size: 12px;
  }
}

/* Animation for page load */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-container {
  animation: fadeInUp 0.6s ease-out;
}

/* Hover effects for interactive elements */
.form-group input:hover,
.form-group select:hover {
  border-color: #b8c2cc;
}

.login-btn:hover i {
  transform: translateX(2px);
  transition: transform 0.3s ease;
}

/* Focus states for accessibility */
.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

/* Loading state for button */
.login-btn.loading {
  pointer-events: none;
  opacity: 0.7;
}

.login-btn.loading i {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Login Toggle Buttons */
.login-toggle-buttons {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
  gap: 10px;
}

.toggle-btn {
  padding: 10px 20px;
  border: 1px solid #e1e5e9;
  border-radius: 8px;
  background-color: #f8f9fa;
  color: #6c757d;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toggle-btn:hover {
  background-color: #e9ecef;
  border-color: #adb5bd;
}

.toggle-btn.active {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border-color: #667eea;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.toggle-btn.active:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.3);
}

/* QR Scanner Section */
.qr-scanner-section {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
}

.qr-scanner-section .scanner-view {
  width: 100%;
  max-width: 400px; /* Adjust as needed */
  height: 300px; /* Adjust as needed */
  margin: 0 auto;
  padding: 0; /* Remove padding to let #reader fill */
  box-shadow: none; /* Remove shadow if not desired */
  border: none; /* Remove border if not desired */
  background: transparent; /* Ensure background is transparent */
}

.qr-scanner-section .scanner-frame {
  width: 100%;
  height: 100%;
  border: 3px solid #667eea;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-scanner-section #reader {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  border-radius: 12px;
}

.qr-scanner-section .scanner-controls {
  width: 100%;
  max-width: 400px; /* Match scanner-view width */
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.qr-scanner-section .control-group {
  width: 100%;
}

.qr-scanner-section .control-buttons {
  width: 100%;
  justify-content: center;
}
