.login-page .login-main {
  min-height: calc(100vh - 140px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 24px 60px;
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-alt);
  border: 1px solid var(--border-warm);
  border-radius: var(--radius);
  padding: 40px 36px;
  box-shadow: var(--shadow-lg);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.login-card:hover {
  box-shadow: var(--shadow-hover);
}

.welcome-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 28px;
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border: 1px solid #a7f3d0;
  border-radius: var(--radius-sm);
  color: #047857;
}

.welcome-banner svg {
  flex-shrink: 0;
  margin-top: 2px;
  opacity: 0.8;
}

.welcome-banner strong {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 2px;
}

.welcome-banner span {
  font-size: 0.82rem;
  opacity: 0.9;
  line-height: 1.4;
}

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

.login-header h1 {
  font-size: clamp(1.6rem, 4vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-lead {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 14px 20px;
  font-size: 0.98rem;
  font-weight: 600;
  font-family: var(--font);
  color: var(--text);
  background: #fff;
  border: 1px solid var(--border-warm);
  border-radius: 980px;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease);
}

.btn-google:hover {
  transform: translateY(-1px);
  border-color: #dadce0;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  background: #fafafa;
}

.btn-google svg {
  flex-shrink: 0;
}

.btn-microsoft {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 14px 20px;
  margin-top: 10px;
  font-size: 0.98rem;
  font-weight: 600;
  font-family: var(--font);
  color: var(--text);
  background: #fff;
  border: 1px solid var(--border-warm);
  border-radius: 980px;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease);
}

.btn-microsoft:hover {
  transform: translateY(-1px);
  border-color: #8c8c8c;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  background: #fafafa;
}

.btn-microsoft svg {
  flex-shrink: 0;
}

.btn-apple {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 14px 20px;
  margin-top: 10px;
  font-size: 0.98rem;
  font-weight: 600;
  font-family: var(--font);
  color: #fff;
  background: #000;
  border: 1px solid #000;
  border-radius: 980px;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease);
}

.btn-apple:hover {
  transform: translateY(-1px);
  background: #1a1a1a;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
}

.btn-apple svg {
  flex-shrink: 0;
}

.login-oauth-hint {
  margin: 8px 0 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text-muted);
  text-align: center;
}

.login-provider-hint {
  margin: 10px 0 0;
  padding: 10px 12px;
  font-size: 0.82rem;
  line-height: 1.5;
  color: #1e3a5f;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 1px solid #93c5fd;
  border-radius: var(--radius-sm);
}

.login-provider-hint a {
  color: #1d4ed8;
  font-weight: 600;
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0 8px;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-warm);
}

.google-setup-help {
  margin-top: 16px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1px solid #fcd34d;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  color: #92400e;
  line-height: 1.55;
}

.google-setup-help strong {
  display: block;
  font-size: 0.88rem;
  margin-bottom: 6px;
  color: #78350f;
}

.google-setup-help ol {
  margin: 8px 0 8px 18px;
  padding: 0;
}

.google-setup-help li {
  margin-bottom: 4px;
}

.google-setup-note {
  margin: 10px 0 0;
  padding-top: 10px;
  border-top: 1px solid #fde68a;
  font-size: 0.78rem;
}

.google-setup-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 10px;
}

.google-setup-links a {
  color: #b45309;
  font-weight: 600;
  font-size: 0.78rem;
  text-decoration: none;
}

.google-setup-links a:hover {
  text-decoration: underline;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

.login-form label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}

.login-form input {
  padding: 14px 16px;
  border: 1px solid var(--border-warm);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.95rem;
  color: var(--text);
  background: #fffefb;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
  width: 100%;
}

.login-form input:hover {
  border-color: var(--accent-peach);
}

.login-form input:focus {
  outline: none;
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 3px rgba(107, 92, 231, 0.12);
  background: #fff;
}

.password-field {
  position: relative;
}

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

.toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: 8px;
  cursor: pointer;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}

.toggle-password:hover {
  color: var(--accent-purple);
  background: #f3f0ff;
}

.login-hint {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
  padding: 10px 12px;
  background: #faf6f0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.login-hint svg {
  flex-shrink: 0;
  margin-top: 1px;
  opacity: 0.6;
}

.form-hint-inline {
  margin: 6px 0 0;
  font-size: 0.8rem;
  line-height: 1.45;
  color: #64748b;
}

.login-same-password {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 4px 0 14px;
  font-size: 0.88rem;
  line-height: 1.45;
  color: #475569;
  cursor: pointer;
}

.login-same-password input {
  margin-top: 3px;
  accent-color: var(--accent, #4f8ef7);
}

.login-message {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
}

.login-message.error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.login-message.success {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.trial-signup-badge {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 14px;
  margin-bottom: 14px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border: 1px solid #6ee7b7;
  color: #047857;
}

.trial-signup-badge strong {
  font-size: 0.95rem;
  color: #065f46;
}

.trial-signup-badge span {
  font-size: 0.82rem;
  opacity: 0.9;
}

.trial-signup-badge[hidden] {
  display: none !important;
}

.subscription-expired-panel[hidden] {
  display: none !important;
}

.subscription-expired-panel {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1px solid #fcd34d;
  border-radius: var(--radius-sm);
  color: #92400e;
}

.subscription-expired-panel svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: #d97706;
}

.subscription-expired-content {
  flex: 1;
  min-width: 0;
}

.subscription-expired-content strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 6px;
  color: #78350f;
}

.subscription-expired-content p {
  font-size: 0.84rem;
  line-height: 1.5;
  margin: 0 0 8px;
}

.subscription-expired-plan {
  font-size: 0.82rem !important;
  opacity: 0.9;
}

.reactivate-btn {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 12px 18px;
  font-size: 0.92rem;
  font-weight: 600;
  font-family: var(--font);
  color: white;
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  border: none;
  border-radius: 980px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(217, 119, 6, 0.3);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), opacity 0.2s;
}

.reactivate-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(217, 119, 6, 0.4);
}

.reactivate-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.reactivate-pricing-link {
  display: block;
  margin-top: 10px;
  font-size: 0.82rem;
  font-weight: 500;
  color: #b45309;
  text-align: center;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.reactivate-pricing-link:hover {
  color: #92400e;
}

.login-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px 24px;
  font-size: 1.02rem;
  font-weight: 600;
  font-family: var(--font);
  color: white;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-purple) 50%, var(--accent-violet) 100%);
  background-size: 200% 200%;
  border: none;
  border-radius: 980px;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(79, 142, 247, 0.35);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background-position 0.5s var(--ease), opacity 0.3s;
}

.login-submit:hover:not(:disabled) {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 36px rgba(107, 92, 231, 0.4);
  background-position: 100% 50%;
}

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

.submit-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

.login-footer-note {
  margin-top: 24px;
  text-align: center;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.login-footer-note a {
  display: inline-block;
  margin-top: 6px;
  color: var(--accent-purple);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s var(--ease);
}

.login-footer-note a:hover {
  color: var(--accent-violet);
  text-decoration: underline;
}

@media (max-width: 480px) {
  .login-card {
    padding: 32px 24px;
  }
}
