/* Login & Register Pages - Professional & Responsive Design */

/* Reset and Base Styles */
.login-page {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #f8f9fa;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Main Container */
.container-login {
  display: flex;
  min-height: 100vh;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  position: relative;
}

.container-login::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="%23ffffff" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="%23ffffff" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="%23ffffff" opacity="0.05"/><circle cx="10" cy="60" r="0.5" fill="%23ffffff" opacity="0.05"/><circle cx="90" cy="40" r="0.5" fill="%23ffffff" opacity="0.05"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  pointer-events: none;
}

/* Left Side - Image Section */
.left {
  flex: 1;
  position: relative;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.login-image {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}


/* Right Side - Form Section */
.right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: #ffffff;
}

.login-container {
  width: 100%;
  max-width: 400px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1), 0 4px 20px rgba(0, 0, 0, 0.05);
  padding: 40px;
  position: relative;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Logo */
.logo {
  text-align: center;
  margin-bottom: 32px;
}

.logo img {
  width: 60px;
  height: 60px;
  object-fit: contain;
}

/* Title and Subtitle */
.title {
  font-size: 2rem;
  font-weight: 700;
  color: #111827;
  text-align: center;
  margin: 0 0 8px 0;
  line-height: 1.2;
  background: linear-gradient(135deg, #06befc 0%, #05a8d8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  font-size: 1rem;
  color: #6b7280;
  text-align: center;
  margin: 0 0 32px 0;
  line-height: 1.5;
  font-weight: 400;
}

/* Form Styles */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-group label i {
  color: #06befc;
  width: 16px;
  text-align: center;
}

.form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 1rem;
  color: #111827;
  background: #ffffff;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.form-group input:focus {
  outline: none;
  border-color: #06befc;
  box-shadow: 0 0 0 3px rgba(6, 190, 252, 0.1);
}

.form-group input::placeholder {
  color: #9ca3af;
}

/* Password Toggle */
.password-toggle {
  position: relative;
}

.password-toggle input {
  padding-right: 48px;
}

.password-toggle .toggle-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #6b7280;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: color 0.2s ease;
}

.password-toggle .toggle-btn:hover {
  color: #06befc;
}

/* Checkbox Styles */
.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 8px 0;
}

.checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #06befc;
  flex-shrink: 0;
  margin-top: 2px;
}

.checkbox-group label {
  font-size: 0.875rem;
  color: #6b7280;
  line-height: 1.4;
  cursor: pointer;
  margin: 0;
}

.checkbox-group label a {
  color: #06befc;
  text-decoration: none;
}

.checkbox-group label a:hover {
  text-decoration: underline;
}

/* Button Styles */
.btn-login {
  width: 100%;
  padding: 14px 24px;
  background: linear-gradient(135deg, #06befc 0%, #05a8d8 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(6, 190, 252, 0.3);
  margin-top: 8px;
}

.btn-login:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(6, 190, 252, 0.4);
}

.btn-login:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(6, 190, 252, 0.3);
}

/* Link Styles */
.login-links {
  text-align: center;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #e5e7eb;
}

.login-links p {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0 0 12px 0;
}

.login-links a {
  color: #06befc;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.login-links a:hover {
  color: #05a8d8;
  text-decoration: underline;
}

/* Alert Styles */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 500;
}

.alert-error {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.alert-success {
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
}

.alert i {
  font-size: 1rem;
  flex-shrink: 0;
}

/* Form Row for Register Page */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* Password Strength Indicator */
.password-strength {
  margin-top: 8px;
}

.strength-bar {
  width: 100%;
  height: 4px;
  background: #e5e7eb;
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 4px;
}

.strength-fill {
  height: 100%;
  width: 0%;
  transition: all 0.3s ease;
  border-radius: 2px;
}

.strength-text {
  font-size: 0.75rem;
  color: #6b7280;
  font-weight: 500;
}

/* Form Options */
.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 8px 0;
}

.remember-me {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: #6b7280;
  cursor: pointer;
}

.remember-me input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #06befc;
}

.forgot-password {
  color: #06befc;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.forgot-password:hover {
  color: #05a8d8;
  text-decoration: underline;
}

/* Terms Checkbox */
.terms-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.875rem;
  color: #6b7280;
  line-height: 1.4;
  cursor: pointer;
  margin: 0;
}

.terms-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #06befc;
  flex-shrink: 0;
  margin-top: 2px;
}

.terms-checkbox a {
  color: #06befc;
  text-decoration: none;
}

.terms-checkbox a:hover {
  text-decoration: underline;
}

/* Register Link */
.register-link {
  text-align: center;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #e5e7eb;
}

.register-link p {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0;
}

.register-link a {
  color: #06befc;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.register-link a:hover {
  color: #05a8d8;
  text-decoration: underline;
}

/* Description */
.description {
  margin-top: 16px;
  text-align: center;
}

.description .text {
  font-size: 0.75rem;
  color: #9ca3af;
  line-height: 1.4;
  margin: 0;
}

.description .text a {
  color: #06befc;
  text-decoration: none;
}

.description .text a:hover {
  text-decoration: underline;
}

/* ===== RESPONSIVE DESIGN ===== */

/* Mobile First - Small screens */
@media (max-width: 767px) {
  .container-login {
    flex-direction: column;
  }

  .left {
    min-height: 200px;
    flex: none;
  }


  .right {
    padding: 20px;
    flex: 1;
  }

  .login-container {
    padding: 24px;
    box-shadow: none;
    border: 1px solid #e5e7eb;
  }

  .title {
    font-size: 1.75rem;
  }

  .subtitle {
    font-size: 0.875rem;
  }

  .form-group input {
    padding: 14px 16px;
    font-size: 16px;
    /* Prevents zoom on iOS */
  }

  .btn-login {
    padding: 16px 24px;
    font-size: 1rem;
    min-height: 48px;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .checkbox-group {
    align-items: flex-start;
  }

  .checkbox-group label {
    font-size: 0.8rem;
  }
}

/* Mobile Landscape */
@media (max-width: 767px) and (orientation: landscape) {
  .left {
    min-height: 150px;
  }


  .login-container {
    padding: 20px;
  }

  .title {
    font-size: 1.5rem;
  }

  .subtitle {
    margin-bottom: 20px;
  }

  .login-form {
    gap: 16px;
  }
}

/* Tablet */
@media (min-width: 768px) and (max-width: 1023px) {
  .left {
    flex: 0.6;
  }

  .right {
    flex: 0.4;
    padding: 30px;
  }

  .login-container {
    padding: 32px;
  }


  .form-row {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .login-container {
    padding: 40px;
  }


  .form-row {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
}

/* Large Desktop */
@media (min-width: 1440px) {
  .login-container {
    max-width: 450px;
    padding: 48px;
  }

}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {

  .btn-login,
  .form-group input,
  .password-toggle .toggle-btn {
    transition: none;
  }

  .btn-login:hover {
    transform: none;
  }
}

@media (prefers-contrast: high) {
  .login-container {
    border: 2px solid #000;
  }

  .form-group input {
    border: 2px solid #000;
  }

  .btn-login {
    border: 2px solid #000;
  }
}

/* ===== TOUCH DEVICE OPTIMIZATIONS ===== */
@media (hover: none) and (pointer: coarse) {
  .btn-login:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(6, 190, 252, 0.3);
  }

  .form-group input {
    min-height: 48px;
    font-size: 16px;
  }

  .btn-login {
    min-height: 48px;
  }

  .password-toggle .toggle-btn {
    min-width: 44px;
    min-height: 44px;
  }
}

/* ===== LOADING STATES ===== */
.btn-login:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

.btn-login.loading {
  position: relative;
  color: transparent;
}

.btn-login.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }

  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* ===== FOCUS IMPROVEMENTS ===== */
.form-group input:focus,
.btn-login:focus,
.password-toggle .toggle-btn:focus {
  outline: 2px solid #06befc;
  outline-offset: 2px;
}

/* ===== HIGH CONTRAST MODE ===== */
@media (prefers-contrast: high) {
  .login-container {
    border: 2px solid #000;
  }

  .form-group input {
    border: 2px solid #000;
  }

  .btn-login {
    border: 2px solid #000;
    background: #000;
    color: #fff;
  }

  .title {
    color: #000;
    -webkit-text-fill-color: #000;
  }
}

/* ===== RESEND VERIFICATION STYLES ===== */
.resend-verification {
  text-align: center;
  margin: 20px 0;
  padding: 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.resend-verification p {
  color: #64748b;
  margin-bottom: 15px;
  font-size: 0.9rem;
}

.resend-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: center;
}

.resend-form .form-group {
  width: 100%;
  max-width: 300px;
}

.resend-form input[type="email"] {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.9);
  transition: all 0.3s ease;
}

.resend-form input[type="email"]:focus {
  outline: none;
  border-color: #06befc;
  box-shadow: 0 0 0 3px rgba(6, 190, 252, 0.1);
  background: white;
}

.btn-resend {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.btn-resend:hover {
  background: linear-gradient(135deg, #d97706, #b45309);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.3);
}

.btn-resend:active {
  transform: translateY(0);
}

/* ===== PRINT STYLES ===== */
@media print {
  .left {
    display: none;
  }

  .right {
    flex: 1;
    padding: 0;
  }

  .login-container {
    box-shadow: none;
    border: 1px solid #000;
  }
}