/* ==========================================================================
   WARM EDITORIAL CRAFT AUTHENTICATION (Sign in & Registration)
   Artisanal paper canvas, Newsreader serif, tactile white split card,
   deep forest pine (#234737) and warm neutral accents.
   ========================================================================== */

*, :after, :before {
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
}

body.premium-auth-body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: #FAF8F5;
  color: #1C1A17;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  overflow-x: hidden;
  padding: 20px;
}

.ambient-glow {
  display: none !important;
}

.premium-auth-container {
  width: 100%;
  max-width: 1000px;
  display: flex;
  justify-content: center;
  z-index: 1;
}

.glass-card {
  display: flex;
  width: 100%;
  background: #FFFFFF;
  border: 1px solid #ECE8E1;
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.02);
  overflow: hidden;
  min-height: 560px;
}

/* Left Side - Marketing / Editorial Presentation (Dark Forest Pine) */
.glass-marketing-side {
  flex: 1.1;
  padding: 50px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(165deg, #1C332A 0%, #11211B 100%);
  border-right: 1px solid rgba(0, 0, 0, 0.12);
  position: relative;
  overflow: hidden;
}

.glass-marketing-side::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -30%;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(46, 82, 67, 0.3) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.glass-marketing-side .logo img {
  max-width: 180px;
  margin-bottom: 32px;
}

.marketing-headline {
  font-family: 'Newsreader', Georgia, serif;
  font-style: italic;
  font-size: 38px;
  font-weight: 500;
  color: #FAF8F5;
  margin-bottom: 14px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.marketing-subhead {
  font-size: 15px;
  color: #A8B8B0;
  margin-bottom: 32px;
  line-height: 1.6;
}

.marketing-illustration {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

/* Right Side - Form */
.glass-form-side {
  flex: 1;
  padding: 40px 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #FFFFFF;
}

.glass-form-inner {
  width: 100%;
}

.glass-form-inner .panel-title {
  margin-bottom: 22px;
}

.glass-form-inner .panel-title .form-logo {
  max-width: 140px;
  margin-bottom: 16px;
  display: none;
}

.glass-form-inner .panel-title h3 {
  font-family: 'Newsreader', Georgia, serif;
  font-style: italic;
  font-size: 30px;
  font-weight: 500;
  color: #1C1A17;
  margin: 0 0 6px 0;
  letter-spacing: -0.02em;
}

.glass-form-inner p.error {
  background-color: #FDF0EC;
  border: 1px solid #F8D3C8;
  color: #9C382E;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 16px;
  position: relative;
}

.craft-form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #403E3A;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.premium-form input[type="text"],
.premium-form input[type="email"],
.premium-form input[type="password"],
.premium-form input[type="number"],
.premium-form .form-control {
  width: 100% !important;
  display: block !important;
  box-sizing: border-box !important;
  background: #FFFFFF !important;
  border: 1px solid #E2DDD5 !important;
  color: #1C1A17 !important;
  border-radius: 10px !important;
  padding: 11px 14px !important;
  font-size: 14px !important;
  height: 46px !important;
  line-height: 22px !important;
  box-shadow: none !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
  font-family: inherit !important;
}

.premium-form input[type="text"]:focus,
.premium-form input[type="email"]:focus,
.premium-form input[type="password"]:focus,
.premium-form input[type="number"]:focus,
.premium-form .form-control:focus {
  border-color: #234737 !important;
  box-shadow: 0 0 0 3px rgba(35, 71, 55, 0.1) !important;
  outline: none !important;
}

.premium-form input[type="text"]::placeholder,
.premium-form input[type="email"]::placeholder,
.premium-form input[type="password"]::placeholder,
.premium-form .form-control::placeholder {
  color: #8A8780 !important;
  opacity: 0.85 !important;
}

.premium-form input.error,
.premium-form .form-control.error {
  border-color: #9C382E !important;
  background-color: #FFF9F8 !important;
  box-shadow: 0 0 0 3px rgba(156, 56, 46, 0.1) !important;
}

em.invalid {
  display: block !important;
  font-style: normal !important;
  font-size: 12px !important;
  color: #9C382E !important;
  margin-top: 5px !important;
  font-weight: 500 !important;
}

.craft-auth-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #FAF8F5;
  border: 1px solid #ECE8E1;
  border-radius: 8px;
  padding: 9px 12px;
  margin: 14px 0 12px 0;
  font-size: 12.5px;
  color: #5C5954;
  line-height: 1.4;
}

.craft-auth-hint i {
  color: #1E6548;
  font-size: 14px;
  flex-shrink: 0;
}

.craft-terms-notice {
  font-size: 12px;
  color: #8A8780;
  line-height: 1.5;
  margin-bottom: 18px;
}

.craft-terms-notice a {
  color: #1E6548;
  font-weight: 500;
  text-decoration: underline;
}

.craft-terms-notice a:hover {
  color: #183327;
}

#password_meter {
  font-size: 12px;
  font-weight: 600;
  transition: all 0.2s ease;
  letter-spacing: 0.01em;
}

/* Password View/Hide Toggle Button & Input Wrap */
.password-input-wrap {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
}

.password-input-wrap input[type="password"],
.password-input-wrap input[type="text"] {
  padding-right: 42px !important;
}

.password-toggle-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: #8A8780 !important;
  cursor: pointer;
  padding: 8px !important;
  margin: 0 !important;
  height: auto !important;
  width: auto !important;
  font-size: 15px !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease, transform 0.15s ease !important;
  z-index: 5;
}

.password-toggle-btn:hover {
  color: #234737 !important;
  background: transparent !important;
  box-shadow: none !important;
  transform: translateY(-50%) scale(1.1) !important;
}

.password-toggle-btn:focus {
  outline: none !important;
  color: #234737 !important;
}

/* Robust Multi-Segment Strength Meter */
.password-strength-container {
  margin-top: 6px;
  margin-bottom: 6px;
}

.password-strength-bars {
  display: flex;
  gap: 5px;
  height: 4px;
  width: 100%;
  border-radius: 2px;
  overflow: hidden;
  margin-top: 4px;
}

.strength-bar-segment {
  flex: 1;
  height: 100%;
  background: #E5E0D8;
  border-radius: 2px;
  transition: background-color 0.25s ease;
}

/* Strength Rule Checklist */
.password-rules-list {
  margin: 8px 0 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 10px;
  font-size: 11.5px;
  color: #8A8780;
}

.password-rule-item {
  display: flex;
  align-items: center;
  gap: 5px;
  transition: color 0.2s ease;
}

.password-rule-item i {
  font-size: 11px;
  width: 12px;
  text-align: center;
}

.password-rule-item.valid {
  color: #1E6548;
  font-weight: 500;
}

.password-rule-item.valid i {
  color: #1E6548;
}

/* Password Confirmation Match Feedback */
#password_match_feedback {
  font-size: 12px;
  font-weight: 500;
  margin-top: 4px;
  display: none;
}

#password_match_feedback.match-success {
  color: #1E6548;
  display: block;
}

#password_match_feedback.match-error {
  color: #DC2626;
  display: block;
}

.craft-error-alert {
  background-color: #FDF0EC;
  border: 1px solid #F8D3C8;
  color: #9C382E;
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 20px;
  line-height: 1.45;
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.craft-error-alert i {
  flex-shrink: 0;
  margin-top: 2px;
  font-size: 15px;
}

.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
  font-size: 13px;
}

.remember-me {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #5C5954;
}

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

.remember-me label {
  margin: 0;
  font-weight: 400;
  cursor: pointer;
}

.forgot-link {
  color: #1E6548;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s ease;
}

.forgot-link:hover {
  color: #183327;
  text-decoration: underline;
}

/* Submit Button - Forest Pine */
.glass-form-side button[type="submit"],
.glass-form-side input[type="submit"],
.signup-btn,
#signup-submit-button,
.craft-submit-btn,
#login-submit-button {
  width: 100% !important;
  background-color: #234737 !important;
  background-image: none !important;
  border: 1px solid #234737 !important;
  color: #FFFFFF !important;
  font-size: 14.5px !important;
  font-weight: 600 !important;
  padding: 12px !important;
  height: 48px !important;
  border-radius: 10px !important;
  cursor: pointer !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
  transition: all 0.15s ease !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.glass-form-side button[type="submit"]:hover,
.glass-form-side input[type="submit"]:hover,
.signup-btn:hover,
#signup-submit-button:hover,
.craft-submit-btn:hover,
#login-submit-button:hover {
  background-color: #183327 !important;
  border-color: #183327 !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(35, 71, 55, 0.15) !important;
}

#passkey-login-btn {
  border: 1px solid #E2DDD5 !important;
  background: #FFFFFF !important;
  color: #1C1A17 !important;
  border-radius: 10px !important;
  padding: 11px !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  transition: all 0.15s ease !important;
}

#passkey-login-btn:hover {
  background: #FAF8F5 !important;
  border-color: #D6D0C5 !important;
}

.trailing {
  margin-top: 24px;
  text-align: center;
  font-size: 13.5px;
  color: #6E6B65;
}

.trailing a {
  color: #1E6548;
  font-weight: 600;
  text-decoration: none;
}

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

.trailing footer {
  margin-top: 24px;
  font-size: 11.5px;
  color: #8A8780;
}

.trailing footer a {
  color: #6E6B65;
  font-weight: 400;
}

/* Responsive */
@media (max-width: 850px) {
  .glass-card {
    flex-direction: column;
  }
  .glass-marketing-side {
    padding: 30px;
    border-right: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.15);
  }
  .glass-form-side {
    padding: 30px;
  }
  .marketing-headline {
    font-size: 28px;
  }
}