/* =====================================================
   STOKVEL SOCIETY — AUTH SECTION (Unified with Dashboard v2.1.1)
   Version: 2.1.1 - FULL WIDTH MOBILE
   Namespace: .auth-section
   ===================================================== */

/* ============= GLOBAL WRAPPER ============= */
.auth-section {
    background: linear-gradient(135deg, #083421, #0f5c3a, #147445) !important;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-family: 'Inter', 'Segoe UI', Roboto, -apple-system, sans-serif;
    position: relative;
    overflow: hidden;
}

/* Subtle Twinkling Stars */
.auth-section::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(1.5px 1.5px at 20% 30%, rgba(255,255,255,0.4) 50%, transparent 100%),
        radial-gradient(1.2px 1.2px at 40% 70%, rgba(255,255,255,0.3) 50%, transparent 100%),
        radial-gradient(1px 1px at 60% 20%, rgba(255,255,255,0.5) 50%, transparent 100%),
        radial-gradient(1.3px 1.3px at 80% 50%, rgba(255,255,255,0.35) 50%, transparent 100%),
        radial-gradient(1.1px 1.1px at 30% 80%, rgba(255,255,255,0.4) 50%, transparent 100%),
        radial-gradient(1.4px 1.4px at 70% 10%, rgba(255,255,255,0.45) 50%, transparent 100%),
        radial-gradient(1px 1px at 10% 40%, rgba(255,255,255,0.3) 50%, transparent 100%),
        radial-gradient(1.2px 1.2px at 90% 90%, rgba(255,255,255,0.35) 50%, transparent 100%),
        radial-gradient(1px 1px at 15% 60%, rgba(255,255,255,0.4) 50%, transparent 100%),
        radial-gradient(1.3px 1.3px at 55% 85%, rgba(255,255,255,0.3) 50%, transparent 100%),
        radial-gradient(1px 1px at 85% 25%, rgba(255,255,255,0.5) 50%, transparent 100%),
        radial-gradient(1.2px 1.2px at 45% 35%, rgba(255,255,255,0.35) 50%, transparent 100%);
    background-size: 250px 250px;
    animation: multiTwinkle 5s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}

/* Enhanced Multi-layered Twinkle Animation */
@keyframes multiTwinkle {
    0%, 100% {
        opacity: 0.3;
        filter: brightness(0.8);
    }
    25% {
        opacity: 0.6;
        filter: brightness(1.2);
    }
    50% {
        opacity: 0.4;
        filter: brightness(1);
    }
    75% {
        opacity: 0.7;
        filter: brightness(1.3);
    }
}

/* Add a second layer of stars with different timing */
.auth-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(1px 1px at 25% 35%, rgba(255,255,255,0.25) 50%, transparent 100%),
        radial-gradient(1.2px 1.2px at 65% 75%, rgba(255,255,255,0.2) 50%, transparent 100%),
        radial-gradient(0.8px 0.8px at 45% 15%, rgba(255,255,255,0.3) 50%, transparent 100%),
        radial-gradient(1.1px 1.1px at 75% 45%, rgba(255,255,255,0.15) 50%, transparent 100%),
        radial-gradient(0.9px 0.9px at 35% 85%, rgba(255,255,255,0.25) 50%, transparent 100%),
        radial-gradient(1px 1px at 85% 5%, rgba(255,255,255,0.3) 50%, transparent 100%);
    background-size: 300px 300px;
    animation: delayedTwinkle 7s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes delayedTwinkle {
    0%, 100% {
        opacity: 0.2;
    }
    33% {
        opacity: 0.4;
    }
    66% {
        opacity: 0.25;
    }
}

/* Ensure auth container stays above stars */
.auth-section .auth-container {
    position: relative;
    z-index: 10;
}

/* ============= CONTAINER & CARD ============= */
.auth-section .auth-container {
    width: 100%;
    max-width: 480px;
    position: relative;
    z-index: 2;
    margin: 0 auto;
    padding: 0 16px;
    box-sizing: border-box;
}

.auth-section .auth-container.wide {
    max-width: 520px;
}

.auth-section .auth-container.register-wide {
    max-width: 780px;
}

.auth-section .auth-card {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 20px 28px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    animation: authCardSlide 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: visible;
    width: 100%;
    box-sizing: border-box;
}

.auth-section .auth-card::before {
    display: none;
}

/* ============= HEADER ============= */
.auth-section .auth-header { 
  text-align: center; 
  margin-bottom: 20px;
}

/* Compact header applies to ALL auth forms */
.auth-section .auth-header {
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: left;
  margin-bottom: 16px;
}

/* Header text element used for stacked layout when logo is present */
.auth-section .auth-header-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}   

.auth-section .auth-logo {
  width: 52px !important;
  height: 52px !important;
  font-size: 20px !important;
  margin: 0 !important;
  flex-shrink: 0;
}

.auth-section .auth-title {
  font-size: 20px !important;
  margin-bottom: 2px !important;
  white-space: nowrap;
}

.auth-section .auth-subtitle {
  font-size: 12px !important;
  margin: 0 !important;
} 

.auth-section .auth-header .auth-header-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-section .auth-logo {
  width: 90px; 
  height: 90px;
  background: linear-gradient(135deg, #147445, #0d8b5e);
  border-radius: 22px;
  margin: 0 auto 28px;
  display: flex; 
  align-items: center; 
  justify-content: center;
  color: white; 
  font-size: 36px; 
  font-weight: 700;
  border: 3px solid rgba(255,255,255,0.8);
  box-shadow: 0 8px 32px rgba(20,116,69,0.4);
}

/* logo text sway+pulse */
.auth-section .auth-logo .auth-logo-text {
  display: inline-block;
  animation: authLogoSwayPulse 2s ease-in-out infinite;
}

@keyframes authLogoSwayPulse {
  0%,100% { transform: rotate(-4deg) scale(0.95); }
  50%       { transform: rotate(4deg)  scale(1.08); }
}

.auth-section .auth-title {
  color: #147445;
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 8px;
}

.auth-section .auth-subtitle {
  color: #64748b;
  font-size: 16px;
  margin: 0;
  font-weight: 500;
}

/* ============= FORM STYLES ============= */
.auth-section .auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-section .register-form {
  gap: 8px;
}

.auth-section .form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.auth-section label {
  color: #334155;
  font-weight: 600;
  font-size: 14px;
}

/* INPUT STYLES - CRITICAL FIX */
.auth-section input[type="text"],
.auth-section input[type="password"],
.auth-section input[type="email"],
.auth-section .auth-input {
  width: 100%;
  padding: 9px 12px;
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  background: rgba(255,255,255,0.95);
  font-size: 16px;
  color: #1e293b;
  transition: all 0.3s ease;
  font-family: inherit;
  box-sizing: border-box;
}

.auth-section input:focus,
.auth-section .auth-input:focus {
  outline: none;
  border-color: #147445;
  box-shadow: 0 0 0 4px rgba(20,116,69,0.15);
  background: rgba(255,255,255,0.98);
  transform: translateY(-2px);
}

.auth-section input::placeholder,
.auth-section .auth-input::placeholder {
  color: #94a3b8;
  opacity: 0.8;
}

/* ============= BUTTONS ============= */
.auth-section .auth-button {
  width: 100%;
  padding: 11px 24px;
  border: none;
  border-radius: 16px;
  background: linear-gradient(135deg, #147445, #0d8b5e);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 8px 25px rgba(20,116,69,0.4);
  font-family: inherit;
}

.auth-section .auth-button:hover {
  background: linear-gradient(135deg, #0d8b5e, #147445);
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(20,116,69,0.5);
}

.auth-section .auth-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* ============= REMEMBER ME CHECKBOX ============= */
.auth-section .remember-group {
  margin: 10px 0 20px 0;
}

.auth-section .checkbox-label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-weight: 500;
  color: #475569;
}

.auth-section .checkbox-label input[type="checkbox"] {
  display: none;
}

.auth-section .checkmark {
  width: 20px;
  height: 20px;
  border: 2px solid #cbd5e1;
  border-radius: 6px;
  position: relative;
  transition: all 0.3s ease;
}

.auth-section .checkbox-label input[type="checkbox"]:checked + .checkmark {
  background: #147445;
  border-color: #147445;
}

.auth-section .checkbox-label input[type="checkbox"]:checked + .checkmark::after {
  content: '✓';
  position: absolute;
  color: white;
  font-size: 14px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* ============= LINKS ============= */
.auth-section .auth-links {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(226,232,240,0.5);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-section .auth-link {
  color: #147445;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.auth-section .auth-link.accent {
  color: #0d8b5e;
  font-weight: 700;
}

.auth-section .auth-link:hover {
  color: #0f5c36;
  transform: translateX(2px);
}

/* ============= REGISTRATION FORM FIXES ============= */
.register-form label:after {
    content: " *";
    color: #dc2626;
    font-weight: 700;
}

.register-form .form-group.full-width {
    grid-column: 1 / -1;
    width: 100%;
}

/* Enhanced password hint */
.register-form .field-hint {
    color: #64748b;
    font-size: 12px;
    margin-top: 4px;
    display: block;
}

.auth-section .auth-text {
  color: #64748b;
  font-weight: 500;
}

/* ============= MESSAGES ============= */
.auth-section .auth-message {
  padding: 18px;
  border-radius: 14px;
  margin-bottom: 24px;
  font-weight: 600;
  text-align: center;
  animation: authFadeIn 0.5s ease;
}

.auth-section .auth-message.error {
  background: linear-gradient(135deg, rgba(239,68,68,0.1), rgba(220,38,38,0.05));
  color: #dc2626;
  border: 1px solid rgba(220,38,38,0.2);
}

.auth-section .auth-message.success {
  background: linear-gradient(135deg, rgba(20,116,69,0.15), rgba(13,139,94,0.08));
  color: #147445;
  border: 1px solid rgba(20,116,69,0.2);
}

.auth-section .auth-message ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.auth-section .auth-message li {
  margin: 5px 0;
}

@keyframes authFadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============= PROFESSIONAL REGISTRATION FORM ============= */
.auth-section .register-form .form-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 10px;
}

.auth-section .register-form .form-column {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.auth-section .register-form .full-width {
  grid-column: 1 / -1;
}

/* Field hints and labels */
.auth-section .field-hint {
  display: block;
  font-size: 12px;
  color: #64748b;
  margin-top: 4px;
  font-weight: 400;
}

.auth-section label {
  color: #334155;
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.auth-section label:after {
  content: '*';
  color: #dc2626;
  font-weight: 700;
}

/* Form footer with privacy notice */
.auth-section .form-footer {
  margin-top: 10px;
  text-align: center;
}

.auth-section .privacy-notice {
  font-size: 13px;
  color: #64748b;
  margin-top: 16px;
  line-height: 1.4;
}

.auth-section .privacy-notice a {
  color: #147445;
  text-decoration: none;
  font-weight: 500;
}

.auth-section .privacy-notice a:hover {
  text-decoration: underline;
}

/* Enhanced input styling for better UX */
.auth-section .auth-input {
  transition: all 0.3s ease;
}

.auth-section .auth-input:valid {
  border-color: #d1d5db;
}

.auth-section .auth-input:invalid:not(:focus):not(:placeholder-shown) {
  border-color: #fca5a5;
}

/* Focus states for better accessibility */
.auth-section .auth-input:focus {
  outline: none;
  border-color: #147445;
  box-shadow: 0 0 0 3px rgba(20, 116, 69, 0.1);
  background: rgba(255, 255, 255, 0.98);
  transform: translateY(-1px);
}

/* Loading state for form submission */
.auth-section .auth-form.processing {
  opacity: 0.7;
  pointer-events: none;
}

.auth-section .auth-form.processing .auth-button {
  position: relative;
  color: transparent;
}

.auth-section .auth-form.processing .auth-button:after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  top: 50%;
  left: 50%;
  margin-left: -10px;
  margin-top: -10px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  border-right-color: transparent;
  animation: button-spinner 0.8s linear infinite;
}

@keyframes button-spinner {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ============= NOTIFICATIONS & SPINNER ============= */
.auth-notification {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  padding: 12px 24px;
  border-radius: 8px;
  color: #fff;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 100;
  font-weight: 600;
}

.auth-notification.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.auth-notification.success { 
  background-color: #147445; 
}

.auth-notification.error { 
  background-color: #c0392b; 
}

.auth-spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
}

.auth-spinner .spinner {
  animation: rotate 1s linear infinite;
  width: 100%;
  height: 100%;
}

.auth-spinner .path {
  stroke: #fff;
  stroke-linecap: round;
  animation: dash 1.5s ease-in-out infinite;
}

@keyframes rotate { 
  100% { transform: rotate(360deg); } 
}

@keyframes dash {
  0% { stroke-dasharray: 1,150; stroke-dashoffset: 0; }
  50% { stroke-dasharray: 90,150; stroke-dashoffset: -35; }
  100% { stroke-dasharray: 90,150; stroke-dashoffset: -124; }
}

/* ============================================================
   RESPONSIVE — consolidated, ordered large → small
   ============================================================ */

/* Wide desktop — constrain the section itself */
@media (min-width: 1200px) {
    .auth-section {
        padding: 40px 20px;
    }
}

/* Desktop */
@media (min-width: 769px) {
    .auth-section {
        padding: 20px 16px;
        min-height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .auth-section .auth-card {
        border-radius: 20px;
        box-shadow: 0 20px 40px rgba(0,0,0,0.1) !important;
        border: 1px solid rgba(255,255,255,0.2) !important;
    }

    .auth-section .auth-container.register-wide {
        max-width: 780px;
    }
}

/* Tablet */
@media (max-width: 1024px) {
    .auth-section .auth-container.register-wide {
        max-width: 680px;
    }
}

/* Mobile landscape + small tablets */
@media (max-width: 768px) {
    .auth-section {
        padding: 16px !important;
        min-height: 100vh;
        display: flex;
        align-items: flex-start;
        justify-content: center;
        padding-top: max(16px, env(safe-area-inset-top)) !important;
        padding-bottom: max(16px, env(safe-area-inset-bottom)) !important;
    }

    .auth-section .auth-container,
    .auth-section .auth-container.wide,
    .auth-section .auth-container.register-wide {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .auth-section .auth-card {
        border-radius: 16px !important;
        padding: 28px 20px !important;
        box-shadow: 0 8px 24px rgba(0,0,0,0.08) !important;
        overflow: visible !important;
    }

    .auth-section .auth-logo {
        width: 60px !important;
        height: 60px !important;
        font-size: 24px !important;
        margin-bottom: 12px !important;
    }

    .auth-section .auth-title {
        font-size: 24px !important;
    }

    .auth-section .auth-subtitle {
        font-size: 13px !important;
    }

    .auth-section input[type="text"],
    .auth-section input[type="password"],
    .auth-section input[type="email"],
    .auth-section input[type="tel"],
    .auth-section .auth-input {
        font-size: 16px !important;
        padding: 13px 14px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .auth-section .auth-button {
        padding: 14px 16px !important;
        font-size: 15px !important;
    }

    .auth-section .register-form .form-columns {
        display: flex !important;
        flex-direction: column !important;
        gap: 0 !important;
    }

    .auth-section .register-form .form-column {
        width: 100% !important;
    }

    .auth-section .form-group {
        margin-bottom: 10px !important;
    }

    .auth-section::before,
    .auth-section::after {
        animation: none;
        opacity: 0.3;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .auth-section .auth-card {
        padding: 24px 16px !important;
        border-radius: 12px !important;
    }

    .auth-section .auth-title,
    .auth-section .auth-subtitle {
        white-space: normal;
        font-size: 18px !important;
    }
    .auth-section .auth-subtitle {
        font-size: 11px !important;
    }

    .auth-section .form-group--inline {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* Very small — older Android, iPhone SE gen1 */
@media (max-width: 360px) {
    .auth-section .auth-card {
        padding: 20px 14px !important;
    }

    .auth-section .auth-title {
        font-size: 20px !important;
    }

    .auth-section .auth-input {
        padding: 11px 12px !important;
    }
}

/* =====================================================
   ULTRA-COMPACT AUTH FORMS - SPACE REDUCTION FIX (RESTORED)
   ===================================================== */

@media (max-width: 768px) {
    /* DRAMATIC SPACE REDUCTION - FORM FIELDS */
    .auth-section .form-group {
        margin-bottom: 6px !important;
        gap: 4px !important;
    }
    
    /* Ultra-compact form layout */
    .auth-section .auth-form {
        gap: 8px !important;
    }
    
    /* Tighter input spacing */
    .auth-section input[type="text"],
    .auth-section input[type="password"],
    .auth-section input[type="email"],
    .auth-section .auth-input {
        padding: 10px 12px !important;
        border-radius: 8px !important;
        font-size: 16px !important;
        min-height: 44px !important;
    }
    
    /* Reduce label spacing */
    .auth-section label {
        margin-bottom: 2px !important;
        font-size: 13px !important;
    }
    
    /* Compact header */
    .auth-section .auth-header {
        margin-bottom: 16px !important;
        padding: 0 !important;
    }
    
    .auth-section .auth-logo {
        width: 48px !important;
        height: 48px !important;
        font-size: 20px !important;
        margin: 0 auto 12px !important;
        border-radius: 12px !important;
    }
    
    .auth-section .auth-title {
        font-size: 1.4rem !important;
        margin-bottom: 4px !important;
    }
    
    .auth-section .auth-subtitle {
        font-size: 0.8rem !important;
        margin: 0 !important;
    }
    
    /* Compact buttons */
    .auth-section .auth-button {
        padding: 12px 16px !important;
        margin-top: 4px !important;
        min-height: 46px !important;
        border-radius: 10px !important;
        font-size: 15px !important;
    }
    
    /* Tighter checkbox spacing */
    .auth-section .remember-group {
        margin: 4px 0 8px 0 !important;
    }
    
    .auth-section .checkbox-label {
        gap: 8px !important;
        padding: 6px 0 !important;
        font-size: 13px !important;
    }
    
    /* Compact links section */
    .auth-section .auth-links {
        margin-top: 16px !important;
        padding-top: 12px !important;
        gap: 10px !important;
        font-size: 13px !important;
    }
    
    .auth-section .auth-link {
        padding: 6px 0 !important;
    }
    
    /* Reduce message spacing */
    .auth-section .auth-message {
        padding: 12px !important;
        margin-bottom: 16px !important;
        font-size: 13px !important;
    }
    
    /* REGISTRATION FORM SPECIFIC COMPACTION */
    .auth-section .register-form .form-columns {
        gap: 8px !important;
        margin-bottom: 6px !important;
    }
    
    .auth-section .register-form .form-column {
        gap: 8px !important;
    }
    
    /* Field hints - smaller */
    .auth-section .field-hint {
        font-size: 11px !important;
        margin-top: 2px !important;
    }
    
    /* Privacy notice - more compact */
    .auth-section .privacy-notice {
        margin-top: 10px !important;
        font-size: 11px !important;
        line-height: 1.3 !important;
    }
    
    /* Remove any remaining excessive padding */
    .auth-section .auth-card {
        padding: 20px 16px !important;
    }
}

/* ============= EXTRA COMPACT FOR SMALL MOBILE ============= */
@media (max-width: 480px) {
    .auth-section .auth-card {
        padding: 16px 12px !important;
    }
    
    .auth-section .form-group {
        margin-bottom: 4px !important;
    }
    
    .auth-section .auth-form {
        gap: 6px !important;
    }
    
    .auth-section input[type="text"],
    .auth-section input[type="password"],
    .auth-section input[type="email"],
    .auth-section .auth-input {
        padding: 8px 10px !important;
        min-height: 42px !important;
    }
    
    .auth-section .auth-button {
        padding: 10px 14px !important;
        min-height: 44px !important;
    }
    
    .auth-section .auth-logo {
        width: 42px !important;
        height: 42px !important;
        font-size: 18px !important;
        margin-bottom: 8px !important;
    }
    
    .auth-section .auth-title {
        font-size: 1.2rem !important;
    }
}

/* ============= LOGIN FORM - EXTRA TIGHT ============= */
@media (max-width: 768px) {
    .auth-form:not(.register-form) .form-group {
        margin-bottom: 5px !important;
    }
    
    .auth-form:not(.register-form) .remember-group {
        margin: 2px 0 6px 0 !important;
    }
    
    .auth-form:not(.register-form) .auth-button {
        margin-top: 2px !important;
    }
    
    .auth-form:not(.register-form) + .auth-links {
        margin-top: 12px !important;
        padding-top: 8px !important;
    }
}

/* ============================================================
   INPUT VALIDATION STATES — .valid / .invalid
   ============================================================ */

/* Valid input — green border + subtle glow */
.auth-section .auth-input.valid {
    border-color: #147445 !important;
    box-shadow: 0 0 0 3px rgba(20, 116, 69, 0.12) !important;
    background-color: #f0fff6 !important;
}

/* Invalid input — red border + subtle glow */
.auth-section .auth-input.invalid {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12) !important;
    background-color: #fff5f5 !important;
}

/* Shake animation for invalid fields */
@keyframes ss-shake {
    0%, 100% { transform: translateX(0); }
    20%       { transform: translateX(-5px); }
    40%       { transform: translateX(5px); }
    60%       { transform: translateX(-4px); }
    80%       { transform: translateX(4px); }
}

.auth-section .auth-input.shake {
    animation: ss-shake 0.4s ease-in-out;
}

/* Field-level error messages */
.auth-section .field-error {
    color: #dc2626;
    font-size: 12px;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.auth-section .field-error::before {
    content: '⚠';
    font-size: 11px;
}


/* ============================================================
   PASSWORD INPUT WRAPPER & TOGGLE BUTTON
   Full reset — kills any theme colour bleed (blue, orange, etc.)
   ============================================================ */
.auth-section .password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-section .password-input-wrapper .auth-input {
    padding-right: 50px;
}

.auth-section .password-input-wrapper {
    overflow: visible !important;
}

.auth-section button.password-toggle,
.auth-section .password-input-wrapper button,
.auth-section .password-toggle {
    position: absolute !important;
    right: 2px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 40px !important;
    height: 40px !important;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    border: none !important;
    border-radius: 6px !important;
    box-shadow: none !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #475569 !important;
    font-size: 15px !important;
    padding: 0 !important;
    margin: 0 !important;
    outline: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    transition: color 0.2s ease !important;
    flex-shrink: 0 !important;
    align-self: center !important;
    z-index: 10 !important;
    background: transparent !important;
    /* Ensure icon stays visible against any input background colour */
    text-shadow: 0 0 3px rgba(255,255,255,0.8) !important;
}

.auth-section button.password-toggle:hover,
.auth-section .password-toggle:hover {
    background: transparent !important;
    background-color: transparent !important;
    color: #147445 !important;
    transform: translateY(-50%) !important;
    box-shadow: none !important;
}

.auth-section button.password-toggle:focus,
.auth-section .password-toggle:focus {
    background: transparent !important;
    background-color: transparent !important;
    color: #147445 !important;
    outline: none !important;
    box-shadow: none !important;
}

.auth-section button.password-toggle.active,
.auth-section .password-toggle.active {
    color: #147445 !important;
    background: transparent !important;
    background-color: transparent !important;
}

.auth-section .password-toggle i {
    pointer-events: none;
    line-height: 1;
}

/* Remember me + forgot password inline row */
.auth-section .form-group--inline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}

.auth-section .remember-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #64748b;
    font-weight: normal;
    margin: 0;
}

.auth-section .remember-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #147445;
    cursor: pointer;
    margin: 0;
}

.auth-section .forgot-link {
    font-size: 14px;
    color: #147445;
    text-decoration: none;
    white-space: nowrap;
}

.auth-section .forgot-link:hover {
    text-decoration: underline;
}

@media (max-width: 480px) {
    .auth-section .form-group--inline {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}