/* =============================================================
   auth.css — Login, register, forgot-password, reset-password styles
   @package Lotetree
   ============================================================= */

body{font-family:'Inter',sans-serif;background:linear-gradient(135deg,#f8f9fa 0%,#f0f7ff 100%);color:#222;line-height:1.6;min-height:100vh;display:flex;flex-direction:column}

/* Nav */
nav{display:flex;justify-content:space-between;align-items:center;padding:1.5rem 5%;max-width:1400px;margin:0 auto;width:100%}
.logo{font-size:1.5rem;font-weight:800;text-decoration:none;color:#222;letter-spacing:-1px}
.logo span{color:#3979f3}
.nav-links a{text-decoration:none;color:#222;font-weight:500;font-size:.95rem;transition:color .2s}
.nav-links a:hover{color:#3979f3}

/* Auth container */
.auth-container{flex:1;display:flex;align-items:center;justify-content:center;padding:2rem}
.auth-card{background:#fff;border-radius:24px;padding:3rem;width:100%;max-width:420px;box-shadow:0 20px 60px -20px rgba(57,121,243,.15),0 0 0 1px rgba(0,0,0,.03)}
.auth-header{text-align:center;margin-bottom:2rem}
.auth-header .icon{font-size:3rem;margin-bottom:1rem}
.auth-header h1{font-size:1.75rem;font-weight:800;margin-bottom:.5rem;letter-spacing:-.5px}
.auth-header p{color:#666;font-size:.95rem}

/* Messages */
.message{padding:1rem;border-radius:12px;margin-bottom:1.5rem;font-size:.9rem}
.message-error{background:#fef2f2;color:#dc2626;border:1px solid #fecaca}
.message-error div{margin-bottom:.25rem}
.message-error div:last-child{margin-bottom:0}
.message-success{background:#f0fdf4;color:#16a34a;border:1px solid #bbf7d0}

/* Form */
.auth-form{display:flex;flex-direction:column;gap:1.25rem}
.form-group{display:flex;flex-direction:column;gap:.5rem}
.form-group label{font-weight:600;font-size:.9rem;color:#333}
.form-group input{padding:.9rem 1rem;font-size:1rem;border:2px solid #e5e7eb;border-radius:12px;background:#f9fafb;transition:all .2s;font-family:inherit}
.form-group input:focus{outline:none;border-color:#3979f3;background:#fff}
.form-group input::placeholder{color:#9ca3af}

/* Login-specific row */
.form-row{display:flex;justify-content:space-between;align-items:center;font-size:.9rem}
.checkbox-label{display:flex;align-items:center;gap:.5rem;cursor:pointer;color:#555}
.checkbox-label input[type="checkbox"]{width:18px;height:18px;accent-color:#3979f3}
.forgot-link{color:#3979f3;text-decoration:none;font-weight:500}
.forgot-link:hover{text-decoration:underline}

/* Register-specific */
.username-input-wrapper{display:flex;align-items:center;background:#f9fafb;border:2px solid #e5e7eb;border-radius:12px;transition:all .2s;overflow:hidden}
.username-input-wrapper:focus-within{border-color:#3979f3;background:#fff}
.username-prefix{padding-left:1rem;color:#888;font-size:.95rem;font-weight:500;white-space:nowrap}
.username-input-wrapper input{border:none;background:transparent;padding-left:.25rem;flex:1}
.username-input-wrapper input:focus{border:none;background:transparent}
.username-status{font-size:.8rem;margin-top:.25rem;display:none}
.username-status.visible{display:block}
.username-status.available{color:#16a34a}
.username-status.unavailable{color:#dc2626}
.username-status.checking{color:#888}

/* Password strength */
.password-strength{height:4px;background:#e5e7eb;border-radius:2px;margin-top:.5rem;overflow:hidden}
.password-strength-bar{height:100%;width:0%;transition:all .3s;border-radius:2px}
.password-strength-bar.weak{width:33%;background:#dc2626}
.password-strength-bar.medium{width:66%;background:#f59e0b}
.password-strength-bar.strong{width:100%;background:#16a34a}

/* Reset password strength (slightly different class name) */
.password-bar{height:100%;width:0;border-radius:2px;transition:all .3s}
.password-bar.weak{width:33%;background:#dc2626}
.password-bar.medium{width:66%;background:#f59e0b}
.password-bar.strong{width:100%;background:#16a34a}

/* Forgot/reset back link */
.back-link{display:inline-flex;align-items:center;gap:.5rem;color:#666;text-decoration:none;font-size:.9rem;margin-bottom:1rem}
.back-link:hover{color:#3979f3}

/* Button */
.btn{padding:1rem 1.5rem;border-radius:12px;font-weight:600;font-size:1rem;text-decoration:none;transition:all .2s;cursor:pointer;border:none;display:inline-block;text-align:center;font-family:inherit}
.btn-primary{background:#3979f3;color:#fff!important}
.btn-primary:hover{background:#2860d4}
.btn-primary:disabled{background:#9ca3af;cursor:not-allowed}

/* Password toggle */
.password-wrapper{position:relative}
.password-wrapper input{width:100%;padding-right:3rem}
.toggle-password{position:absolute;right:12px;top:50%;transform:translateY(-50%);background:none;border:none;cursor:pointer;color:#888;padding:4px;display:flex;align-items:center}
.toggle-password:hover{color:#3979f3}

/* Turnstile */
.cf-turnstile{margin:0 auto}

/* Terms */
.terms{font-size:.8rem;color:#666;text-align:center}
.terms a{color:#3979f3;text-decoration:none}
.terms a:hover{text-decoration:underline}

/* Auth footer */
.auth-footer{text-align:center;margin-top:2rem;padding-top:1.5rem;border-top:1px solid #e5e7eb;font-size:.95rem;color:#666}
.auth-footer a{color:#3979f3;text-decoration:none;font-weight:600}
.auth-footer a:hover{text-decoration:underline}

/* Responsive */
@media(max-width:480px){
    .auth-card{padding:2rem 1.5rem}
    .nav-links{display:none}
}
