/* RESET */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* PAGE */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* CONTAINER */
.login-container {
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  width: 100%;
  max-width: 900px;
  min-height: 600px;
  display: flex;
  flex-direction: row;
  overflow: hidden;
}

/* LEFT SIDE (Login) */
.login-left {
  flex: 1;
  min-width: 0;
  padding: 50px 40px;
  display: flex;
  flex-direction: column;
  background: white;
}

.login-header { text-align: center; margin-bottom: 30px; }
.logo { font-size: 28px; font-weight: 700; color: #333; margin-bottom: 8px; }
.subtitle { color: #666; font-size: 14px; }

.form-group { margin-bottom: 20px; }
label { display: block; font-size: 14px; font-weight: 500; color: #333; margin-bottom: 8px; }
input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e1e8ed;
  border-radius: 8px;
  font-size: 15px;
  transition: all 0.3s ease;
  outline: none;
}
input:focus { border-color: #667eea; box-shadow: 0 0 0 3px rgba(102,126,234,0.1); }
input::placeholder { color: #aab8c2; }

.error-message {
  display: none;
  background: #fee; color: #c33;
  padding: 12px 16px; border-radius: 8px; font-size: 14px; margin-bottom: 20px; border-left: 4px solid #c33;
}

.login-button {
  width: 100%; padding: 14px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white; border: none; border-radius: 8px; font-size: 16px; font-weight: 600; cursor: pointer;
  transition: all 0.3s ease; box-shadow: 0 4px 15px rgba(102,126,234,0.4);
}
.login-button:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(102,126,234,0.6); }
.login-button:active { transform: translateY(0); }

.footer-text { text-align: center; margin-top: 24px; font-size: 13px; color: #666; }

.icon-wrapper {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  width: 60px; height: 60px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; margin: 0 auto 20px;
}
.icon { width: 30px; height: 30px; color: white; }

/* Google Sign In (custom button) */
.google-signin-btn {
  width: 100%; padding: 14px 20px;
  background: white; color: #333; border: 1px solid #e0e0e0; border-radius: 8px;
  font-size: 15px; font-weight: 600; cursor: pointer; transition: all 0.3s ease;
  display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 16px;
}
.google-signin-btn:hover { background: #f8f8f8; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.google-signin-btn:active { transform: translateY(0); }
.google-icon { width: 20px; height: 20px; }

/* Hide Google auto-rendered button if GIS script injects it */
.g_id_signin, .abcRioButton { display: none !important; }

/* OR Divider */
.or-divider {
  display: flex; align-items: center; margin: 24px 0; color: #999; font-size: 13px; font-weight: 500;
}
.or-divider::before, .or-divider::after { content: ''; flex: 1; height: 1px; background: #e0e0e0; }
.or-divider::before { margin-right: 12px; } .or-divider::after { margin-left: 12px; }

/* Hidden middle divider */
.login-divider { display: none; }

/* RIGHT SIDE (Signup panel) */
.login-right {
  flex: 1;
  min-width: 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 50px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  text-align: center;
}
.login-right h2 { font-size: 32px; font-weight: 700; color: white; margin-bottom: 16px; }
.login-right p { color: white; font-size: 16px; margin-bottom: 32px; line-height: 1.6; opacity: 0.95; }

.signup-section h3 { font-size: 32px; font-weight: 700; color: white; margin-bottom: 16px; }
.signup-section p { color: white; font-size: 16px; margin-bottom: 32px; opacity: 0.95; line-height: 1.6; }

.signup-btn {
  background: white; color: #667eea; padding: 14px 32px; border: none; border-radius: 8px;
  font-size: 15px; font-weight: 600; cursor: pointer; transition: all 0.3s ease;
}
.signup-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.2); }
.signup-btn:active { transform: translateY(0); }

/* Forgot Password (modal + triggers) */
.forgot-password-wrapper { text-align: center; margin-top: 16px; }
.forgot-password, #forgtPasswordBtn {
  width: auto; padding: 0; background: transparent; color: #667eea; border: none;
  font-size: 14px; font-weight: 500; cursor: pointer; text-decoration: none; transition: all 0.2s ease;
}
.forgot-password:hover, #forgtPasswordBtn:hover { color: #764ba2; text-decoration: underline; }
.forgot-password:active, #forgtPasswordBtn:active { opacity: 0.7; }
.divider { height: 1px; background: #e1e8ed; margin: 24px 0 16px 0; }

/* Modal */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); backdrop-filter: blur(4px); z-index: 10000; align-items: center; justify-content: center; }
.modal-overlay.active { display: flex; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-content { background: white; border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,0.3); width: 90%; max-width: 450px; max-height: 90vh; overflow-y: auto; animation: slideUp 0.3s ease; }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 24px 24px 16px; border-bottom: 1px solid #e1e8ed; }
.modal-header h2 { font-size: 20px; font-weight: 600; color: #333; margin: 0; }
.close-modal { background: transparent; border: none; font-size: 28px; color: #666; cursor: pointer; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 4px; transition: all 0.2s ease; }
.close-modal:hover { background: #f5f5f5; color: #333; }
.modal-body { padding: 24px; }
.modal-description { color: #666; font-size: 14px; margin-bottom: 20px; line-height: 1.5; }
.modal-footer { display: flex; gap: 12px; padding: 16px 24px 24px; justify-content: flex-end; }
.btn-cancel, .btn-submit { padding: 10px 20px; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; border: none; transition: all 0.3s ease; }
.btn-cancel { background: #f5f5f5; color: #333; }
.btn-cancel:hover { background: #e1e8ed; }
.btn-submit { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; box-shadow: 0 2px 8px rgba(102,126,234,0.3); }
.btn-submit:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(102,126,234,0.5); }
.btn-submit:active { transform: translateY(0); }
.success-message { display: none; background: #d4edda; color: #155724; padding: 12px 16px; border-radius: 8px; font-size: 14px; margin-top: 16px; border-left: 4px solid #28a745; }

/* RESPONSIVE */
@media (max-width: 640px) {
  .login-container { flex-direction: column; max-width: 420px; min-height: auto; }
  .login-left, .login-right { width: 100%; min-width: 0; }
  /* If you want signup above form on phones, uncomment: */
  /* .login-right { order: -1; } */
}

@media (max-width: 1024px) and (min-width: 641px) {
  .login-right { padding: 40px 30px; }
}

/* Smooth swap animation for whole card */
.login-container {
  transition: opacity 300ms ease, transform 300ms ease;
}

/* animate out (current view) */
.login-container.swap-out {
  opacity: 0;
  transform: translateY(10px) scale(0.98);
}

/* animate in (new view) */
.login-container.swap-in {
  opacity: 0;
  transform: translateY(-10px) scale(0.98);
}
.login-container.swap-in-active {
  opacity: 1;
  transform: translateY(0) scale(1);
}


