/* Shared Muuvin authentication surfaces. Gradients welcome; solid actions guide. */
.auth-page {
  min-height: calc(100vh - 70px);
  padding: 48px 20px 64px;
  background-color: #1a365d;
  background-image: url('../images/auth-possibilities.svg'), linear-gradient(135deg, #1a365d 0%, #2d5a7a 100%);
  background-position: center top;
  background-size: 1440px 1000px, auto;
  background-repeat: no-repeat;
  color: var(--navy-900);
  font-family: 'Roboto', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}
.auth-page *, .auth-policy * { box-sizing: border-box; }
.auth-card {
  width: 100%; max-width: 540px; margin: 0 auto;
  background: #fff; border: 1px solid var(--gray-200);
  border-radius: 24px; overflow: hidden; box-shadow: var(--shadow-md);
}
.auth-card.register-card { max-width: 720px; }
.auth-header {
  position: relative; min-height: 206px; padding: 40px 184px 40px 32px;
  background: linear-gradient(120deg, var(--sky-200), var(--sky-100) 45%, var(--pink-200));
  border-bottom: 1px solid var(--sky-200);
}
.auth-header h1 { color: var(--navy-800); font-size: 30px; font-weight: 800; line-height: 1.15; letter-spacing: -.025em; margin: 0 0 12px; }
.auth-header p { color: var(--navy-800); margin: 0; font-size: 15px; line-height: 1.6; }
.auth-mascot-scene { position: absolute; right: 18px; top: 50%; width: 150px; height: 158px; transform: translateY(-50%); pointer-events: none; isolation: isolate; }
.auth-mascot-scene::before { content: ''; position: absolute; inset: 16px 9px 7px; border-radius: 50%; background: linear-gradient(145deg, #fff9, var(--sky-200) 48%, var(--pink-300)); box-shadow: inset 0 0 0 1px #fff9, 0 12px 26px #394c8014; }
.auth-mascot-scene::after { content: ''; position: absolute; bottom: 9px; left: 42px; width: 66px; height: 10px; border-radius: 50%; background: #394c8024; filter: blur(3px); }
.auth-mascot-orbit { position: absolute; inset: 26px -3px 22px; border: 1px solid #ffffffb3; border-radius: 50%; transform: rotate(-28deg); }
.auth-mascot { position: absolute; z-index: 1; left: 16px; top: 3px; width: 118px; height: 140px; object-fit: contain; filter: drop-shadow(0 6px 5px #394c8020); animation: auth-mascot-float 6s ease-in-out infinite; }
.auth-mascot-spark { position: absolute; z-index: 2; color: var(--navy-600); line-height: 1; }
.auth-mascot-spark--one { top: 11px; right: 9px; font-size: 23px; }
.auth-mascot-spark--two { bottom: 32px; left: 3px; font-size: 15px; color: #fff; }
.auth-mascot-home { position: absolute; z-index: 2; right: -1px; bottom: 14px; display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid #fff; border-radius: 12px; background: #ffffffe6; color: var(--navy-700); box-shadow: 0 4px 12px #394c8014; transform: rotate(9deg); font-size: 16px; }
@keyframes auth-mascot-float { 0%,100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-7px) rotate(2deg); } }

.auth-body { padding: 32px; }
.auth-page .form-group { margin: 0 0 22px; min-width: 0; }
.auth-page .form-row { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
.auth-page .form-label { display: block; color: var(--navy-800); font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.auth-page .form-label i { color: var(--navy-600); margin-right: 6px; font-size: 13px; }
.auth-page input:not([type="checkbox"]):not([type="hidden"]), .auth-page select {
  display: block; width: 100%; min-width: 0; min-height: 48px;
  border: 1px solid var(--gray-300); border-radius: var(--radius-sm);
  background: #fff; color: var(--navy-900); padding: 12px 14px;
  font: inherit; transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.auth-page input::placeholder { color: var(--gray-500); opacity: 1; }
.auth-page input:focus, .auth-page select:focus { outline: 2px solid var(--navy-600); outline-offset: 2px; border-color: var(--sky-500); box-shadow: none; }
.auth-page input[aria-invalid="true"] { border-color: var(--red-500); }
.auth-page .form-text { display: block; color: var(--gray-600); font-size: 13px; line-height: 1.5; margin-top: 8px; }
.auth-page .form-text ul { padding-left: 18px; margin: 4px 0; }
.auth-page :is(.btn-login,.btn-register,.btn-reset,.btn-confirm) {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; min-height: 50px; padding: 13px 18px;
  background: var(--navy-700); color: #fff; border: 1px solid var(--navy-700);
  border-radius: var(--radius-sm); font: inherit; font-weight: 700;
  text-align: center; text-decoration: none; cursor: pointer;
  transition: background var(--t-fast), box-shadow var(--t-fast);
}
.auth-page :is(.btn-login,.btn-register,.btn-reset,.btn-confirm):hover { background: var(--navy-800); color: #fff; box-shadow: var(--shadow-sm); }
.auth-page a { color: var(--navy-700); font-weight: 600; text-underline-offset: 3px; }
.auth-page a:hover { color: var(--navy-900); text-decoration: underline; }
.auth-page :is(a,button):focus-visible, .auth-policy button:focus-visible { outline: 3px solid var(--navy-600); outline-offset: 4px; }
.auth-page :is(.register-link,.login-link,.back-login,.resend-section,.home-link) { text-align: center; border-top: 1px solid var(--gray-200); margin-top: 24px; padding-top: 22px; font-size: 14px; color: var(--gray-600); }
.auth-page :is(.register-link,.login-link,.back-login,.resend-section) p { margin: 0; }
.auth-page .forgot-password { text-align: center; margin-top: 20px; font-size: 14px; }
.auth-page .errorlist { list-style: none; padding: 10px 12px; margin: 0 0 10px; background: var(--red-100); color: #8c3030; border-radius: 8px; font-size: 14px; }
.auth-page .non-field-errors { margin-bottom: 20px; }
.auth-page :is(.info-box,.success-box,.security-notice,.password-requirements) { background: var(--sky-50); border: 1px solid var(--sky-200); border-radius: var(--radius-md); padding: 18px; margin-bottom: 24px; color: var(--navy-800); font-size: 14px; }
.auth-page :is(.info-box,.success-box,.password-requirements) ul { padding-left: 20px; margin: 10px 0 0; }
.auth-page :is(.info-box,.success-box,.password-requirements) li { margin: 8px 0; }
.auth-page .security-notice { margin: 24px 0 0; }
.auth-page .message-text { color: var(--gray-600); margin-bottom: 24px; }
.auth-page :is(.success-icon,.error-icon) { text-align: center; font-size: 36px; margin-bottom: 18px; color: var(--navy-600); }
.auth-page .error-icon { color: var(--red-500); }
.auth-page .invalid-link h2 { font-size: 22px; color: var(--navy-800); }
.auth-page .invalid-link p { color: var(--gray-600); }
.auth-page .terms-privacy-section { padding: 18px; background: var(--sky-50); border: 1px solid var(--sky-200); border-radius: var(--radius-md); margin: 4px 0 24px; }
.auth-page .checkbox-group + .checkbox-group { margin-top: 12px; }
.auth-page .checkbox-wrapper { display: flex; gap: 12px; align-items: flex-start; }
.auth-page input[type="checkbox"] { flex: 0 0 20px; width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--navy-700); }
.auth-page .checkbox-label { color: var(--gray-700); font-size: 14px; line-height: 1.7; cursor: pointer; }
.auth-page .policy-link { display: inline; padding: 0; border: 0; background: none; color: var(--navy-700); font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.auth-policy { display: none; position: fixed; inset: 0; z-index: 1100; background: rgba(30,43,74,.55); padding: 24px; overflow-y: auto; font-family: 'Roboto',system-ui,sans-serif; }
.auth-policy .modal-content { width: 100%; max-width: 800px; margin: 24px auto; background: #fff; border: 1px solid var(--gray-200); border-radius: 20px; overflow: hidden; }
.auth-policy .modal-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; background: linear-gradient(120deg,var(--sky-100),var(--pink-100)); padding: 20px 24px; }
.auth-policy .modal-title { font-size: 22px; color: var(--navy-800); margin: 0; }
.auth-policy .modal-close { border: 0; background: #fff; border-radius: 50%; width: 44px; height: 44px; flex-shrink: 0; font-size: 28px; color: var(--navy-700); cursor: pointer; }
.auth-policy .modal-body { padding: 24px; max-height: 65vh; overflow-y: auto; color: var(--gray-700); line-height: 1.7; }
.auth-policy :is(h2,h3,h4,a) { color: var(--navy-700); }
.auth-policy h2 { font-size: 22px; margin-top: 28px; }
.auth-policy h3 { font-size: 18px; margin-top: 22px; }
.auth-policy h4 { font-size: 16px; }
.auth-policy :is(.definition-box,.contact-box) { padding: 16px; border-radius: 10px; background: var(--sky-50); margin: 16px 0; }
@media (max-width: 600px) {
  .auth-page { padding: 24px 16px 40px; }
  .auth-card { border-radius: 20px; }
  .auth-header { padding: 24px 22px 28px; text-align: center; }
  .auth-header h1 { font-size: 26px; }
  .auth-header p { font-size: 14px; }
  .auth-mascot-scene { position: relative; top: auto; right: auto; transform: none; margin: 0 auto 18px; }
  .auth-body { padding: 24px 22px; }
  .auth-page .form-row { grid-template-columns: 1fr; gap: 0; }
  .auth-policy { padding: 12px; }
  .auth-policy .modal-content { margin: 12px auto; }
  .auth-policy .modal-body { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) { .auth-page * { transition: none !important; animation: none !important; } }

/* Login welcome: two lines of headline, one line of supporting text. */
.auth-header.login-header h1 { font-size: 40px; line-height: 1.08; max-width: 9em; margin-bottom: 16px; }
.auth-header.login-header p { font-size: 16px; line-height: 1.5; }
@media (max-width: 600px) {
  .auth-header.login-header h1 { font-size: 36px; max-width: 9em; margin-left: auto; margin-right: auto; }
}

body:has(.auth-page) .muuvin-footer { margin-top: 0; }
