/* ==================== LOGIN PAGE ==================== */

/* Full-page split layout */
.login-page {
  display: flex;
  min-height: 100vh;
  font-family: 'Inter', 'Segoe UI', sans-serif;
}

/* Left branding panel */
.login-left {
  flex: 0 0 45%;
  background: linear-gradient(160deg, #1e3a5f 0%, #0f172a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  position: relative;
  overflow: hidden;
}

.login-left::before {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.08);
  top: -150px;
  right: -150px;
}

.login-left::after {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.06);
  bottom: -80px;
  left: -80px;
}

.login-left-content {
  position: relative;
  z-index: 1;
  max-width: 400px;
  color: #fff;
}

.login-brand-icon {
  margin-bottom: 1.5rem;
}

.login-brand-title {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 1rem;
  color: #fff;
}

.login-brand-desc {
  font-size: 1rem;
  color: #94a3b8;
  line-height: 1.7;
  margin-bottom: 2rem;
}

.login-features {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.login-feature-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: #cbd5e1;
}

/* Right form panel */
.login-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  background: #f8fafc;
}

.login-form-wrapper {
  width: 100%;
  max-width: 400px;
}

.login-form-header {
  margin-bottom: 2rem;
}

.login-form-header h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.4rem;
}

.login-form-header p {
  font-size: 0.95rem;
  color: #64748b;
}

/* Error alert */
.login-error {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

/* Form fields */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 0;
}

.login-field label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.4rem;
}

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

.login-input-icon {
  position: absolute;
  left: 0.85rem;
  pointer-events: none;
  color: #94a3b8;
}

.login-input-wrap input {
  width: 100%;
  padding: 0.7rem 0.85rem 0.7rem 2.6rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-size: 0.95rem;
  background: #fff;
  color: #0f172a;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.login-input-wrap input::placeholder {
  color: #a0aec0;
}

.login-input-wrap input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Toggle password */
.login-toggle-pw {
  position: absolute;
  right: 0.75rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
  color: #64748b;
}

.login-toggle-pw:hover {
  color: #334155;
}

/* Remember me */
.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.login-remember {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.875rem;
  color: #475569;
  cursor: pointer;
}

.login-remember input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #3b82f6;
  cursor: pointer;
}

/* Submit button */
.login-submit {
  width: 100%;
  padding: 0.8rem;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
}

.login-submit:hover:not(:disabled) {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
  transform: translateY(-1px);
}

.login-submit:active:not(:disabled) {
  transform: translateY(0);
}

.login-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Loading spinner */
.login-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: login-spin 0.6s linear infinite;
}

@keyframes login-spin {
  to { transform: rotate(360deg); }
}

/* Footer */
.login-footer {
  text-align: center;
  margin-top: 1.75rem;
  font-size: 0.9rem;
  color: #64748b;
}

.login-footer a {
  color: #2563eb;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s;
}

.login-footer a:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
  .login-page {
    flex-direction: column;
  }
  .login-left {
    flex: none;
    padding: 2rem 1.5rem;
    min-height: auto;
  }
  .login-brand-title {
    font-size: 1.5rem;
  }
  .login-brand-desc {
    display: none;
  }
  .login-features {
    display: none;
  }
  .login-right {
    padding: 2rem 1.5rem;
  }
}

@media (max-width: 480px) {
  .login-left {
    padding: 1.5rem 1rem;
  }
  .login-right {
    padding: 1.5rem 1rem;
  }
  .login-form-header h2 {
    font-size: 1.4rem;
  }
}

/* ==================== REGISTRATION PAGE ==================== */

.regis-bg {
  min-height: 100vh;
  background: linear-gradient(135deg, #f8fafc, #f1f8f4 80%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.regis-card {
  display: flex;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  max-width: 900px;
  width: 100%;
  overflow: hidden;
}

.regis-left {
  background: #22543d;
  color: #fff;
  flex: 1 1 40%;
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.regis-left h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.regis-benefit-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem 0;
}

.regis-benefit-list li {
  margin-bottom: 1rem;
  font-size: 1rem;
  display: flex;
  align-items: center;
}

.regis-note {
  background: #2f855a;
  border-radius: 8px;
  padding: 0.8rem 1rem;
  font-size: 0.95rem;
  margin-top: auto;
  color: #e6fffa;
}

.regis-right {
  flex: 1 1 60%;
  padding: 2.5rem 2rem;
  background: #f9fafb;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.regis-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #22543d;
  margin-bottom: 0.2rem;
}

.regis-desc {
  color: #4b5563;
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

.regis-form .regis-row {
  display: flex;
  gap: 1rem;
}

.regis-form .input-group {
  flex: 1 1 0;
  margin-bottom: 1.1rem;
}

.regis-form label {
  display: block;
  font-size: 0.95rem;
  color: #374151;
  margin-bottom: 0.4rem;
}

.regis-form input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 1rem;
  background: #fff;
  transition: border 0.2s;
}

.regis-form input:focus {
  border: 1.5px solid #22543d;
  outline: none;
  background: #f0fff4;
}

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

.show-password-btn {
  background: none;
  border: none;
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  color: #22543d;
  cursor: pointer;
  padding: 0;
}

.checkbox-group {
  display: flex;
  align-items: flex-start;
  margin-bottom: 1.2rem;
  font-size: 0.95rem;
}

.checkbox-group input {
  margin-right: 0.5rem;
  margin-top: 0.2rem;
}

.btn-login {
  width: 100%;
  background: #22543d;
  color: white;
  border: none;
  padding: 0.85rem;
  border-radius: 6px;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 0.2rem;
  transition: background 0.2s;
}

.btn-login:hover {
  background: #1c4532;
}

.regis-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.97rem;
}

.regis-footer a {
  color: #22543d;
  text-decoration: none;
  font-weight: 500;
}

@media (max-width: 900px) {
  .regis-card {
    flex-direction: column;
    max-width: 500px;
  }
  .regis-left, .regis-right {
    padding: 2rem 1.2rem;
  }
  .regis-left {
    border-radius: 16px 16px 0 0;
  }
  .regis-right {
    border-radius: 0 0 16px 16px;
  }
}
