/* assets/css/auth.css - Complete Auth Styles */

/* Auth Container */
.auth-container {
    max-width: 500px;
    width: 100%;
    margin: 50px auto;
    animation: fadeIn 0.5s ease;
    box-sizing: border-box;
}

.auth-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    overflow: hidden;
    width: 100%;
}

.auth-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 30px;
    text-align: center;
}

.auth-header i {
    font-size: 60px;
    color: white;
    margin-bottom: 15px;
}

.auth-header h2 {
    color: white;
    margin: 0;
    font-size: 28px;
}

.auth-header p {
    color: rgba(255,255,255,0.9);
    margin: 10px 0 0;
}

.auth-body {
    padding: 30px;
}

/* ============================================
   FIXED: Form Elements - All inputs same size
   ============================================ */
.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.form-group label i {
    color: #667eea;
    margin-right: 5px;
    width: 18px;
}

/* ===== IMPORTANT: All input fields styling ===== */
.form-group input:not([type="submit"]):not([type="button"]) {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s;
    background: white;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
}

.form-group input.error {
    border-color: #dc3545;
    background: #fff5f5;
}

.form-group input.valid {
    border-color: #28a745;
    background: #f0f9f0;
}

/* Input with password toggle (special handling) */
.input-wrapper {
    position: relative;
    width: 100%;
}

.input-wrapper input {
    width: 100%;
    padding: 12px 40px 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s;
    box-sizing: border-box;
}

.input-wrapper input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
}

.input-wrapper input.error {
    border-color: #dc3545;
    background: #fff5f5;
}

.input-wrapper input.valid {
    border-color: #28a745;
    background: #f0f9f0;
}

/* Password Toggle Button */
.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #999;
    background: none;
    border: none;
    font-size: 16px;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-password:hover {
    color: #667eea;
}

/* Password Strength Meter */
.password-strength {
    margin-top: 8px;
    height: 4px;
    border-radius: 2px;
    overflow: hidden;
}

.strength-bar {
    height: 100%;
    width: 0%;
    transition: width 0.3s;
}

.strength-weak { background: #dc3545; width: 25%; }
.strength-fair { background: #f57c00; width: 50%; }
.strength-good { background: #ffc107; width: 75%; }
.strength-strong { background: #28a745; width: 100%; }

.strength-text {
    font-size: 11px;
    margin-top: 5px;
    display: block;
}

/* Password Requirements Box */
.password-requirements {
    background: #f8f9fa;
    padding: 12px 15px;
    border-radius: 8px;
    margin-top: 10px;
    font-size: 12px;
}

.password-requirements p {
    margin: 0 0 8px 0;
    font-weight: 600;
    color: #666;
}

.password-requirements p i {
    color: #667eea;
    margin-right: 5px;
}

.requirement {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
    color: #999;
    font-size: 11px;
    transition: all 0.3s;
}

.requirement i {
    font-size: 10px;
    width: 14px;
}

.requirement.valid {
    color: #28a745;
}

.requirement.valid i:before {
    content: "\f00c";
}

/* Alert Messages */
.alert {
    padding: 12px 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s ease;
}

.alert-error {
    background: #fef5f5;
    border-left: 4px solid #dc3545;
    color: #721c24;
}

.alert-success {
    background: #f0f9f0;
    border-left: 4px solid #28a745;
    color: #155724;
}

.alert-info {
    background: #e7f3ff;
    border-left: 4px solid #2196f3;
    color: #0c5460;
}

.alert i {
    font-size: 18px;
    flex-shrink: 0;
}

.alert div {
    flex: 1;
}

/* Info Box */
.info-box {
    background: #e7f3ff;
    border-left: 4px solid #2196f3;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #0c5460;
}

.info-box i {
    font-size: 18px;
    flex-shrink: 0;
}

/* Buttons */
.btn-auth {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
    box-sizing: border-box;
}

.btn-auth:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102,126,234,0.4);
}

.btn-auth:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Links */
.auth-link {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.auth-link a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.auth-link a:hover {
    text-decoration: underline;
}

/* OTP Input */
.otp-input {
    font-size: 32px;
    letter-spacing: 10px;
    text-align: center;
    padding: 15px;
    width: 100%;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    margin: 20px 0;
    font-family: monospace;
    box-sizing: border-box;
}

.otp-input:focus {
    border-color: #667eea;
    outline: none;
}

/* Timer */
.timer {
    font-size: 14px;
    color: #666;
    margin-top: 15px;
    text-align: center;
}

.resend-link {
    text-align: center;
    margin-top: 20px;
}

.resend-link button {
    background: none;
    border: none;
    color: #667eea;
    cursor: pointer;
    font-size: 14px;
    padding: 5px 10px;
}

.resend-link button:hover {
    text-decoration: underline;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   RESPONSIVE DESIGN - FIXED FOR MOBILE
   ============================================ */

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) {
    .auth-container {
        max-width: 450px;
        margin: 40px auto;
    }
    
    .auth-body {
        padding: 25px;
    }
}

/* Mobile (max-width: 768px) */
@media (max-width: 768px) {
    * {
        box-sizing: border-box;
    }
    
    .auth-container {
        margin: 0;
        padding: 20px 15px;
        max-width: 100%;
        width: 100%;
    }
    
    .auth-card {
        border-radius: 16px;
        width: 100%;
        overflow: hidden;
    }
    
    .auth-header {
        padding: 25px 20px;
    }
    
    .auth-header i {
        font-size: 45px;
        margin-bottom: 12px;
    }
    
    .auth-header h2 {
        font-size: 24px;
    }
    
    .auth-header p {
        font-size: 13px;
        margin-top: 8px;
    }
    
    .auth-body {
        padding: 20px;
    }
    
    .form-group {
        margin-bottom: 18px;
    }
    
    .form-group label {
        font-size: 13px;
        margin-bottom: 6px;
    }
    
    /* All inputs on mobile - FIXED WIDTH */
    .form-group input:not([type="submit"]):not([type="button"]),
    .input-wrapper input {
        width: 100%;
        padding: 12px 15px;
        font-size: 14px;
        border-radius: 8px;
    }
    
    .input-wrapper input {
        padding: 12px 40px 12px 15px;
    }
    
    .toggle-password {
        right: 12px;
    }
    
    .btn-auth {
        padding: 12px;
        font-size: 15px;
        border-radius: 8px;
    }
    
    .password-requirements {
        padding: 10px 12px;
        margin-top: 8px;
    }
    
    .password-requirements p {
        font-size: 11px;
        margin-bottom: 6px;
    }
    
    .requirement {
        font-size: 10px;
        gap: 6px;
        margin-bottom: 4px;
    }
    
    .alert {
        padding: 10px 12px;
        font-size: 13px;
        border-radius: 8px;
        margin-bottom: 15px;
    }
    
    .alert i {
        font-size: 16px;
    }
    
    .info-box {
        padding: 10px 12px;
        font-size: 12px;
        margin-bottom: 15px;
        border-radius: 8px;
    }
    
    .info-box i {
        font-size: 16px;
    }
    
    .otp-input {
        font-size: 28px;
        letter-spacing: 8px;
        padding: 12px;
        margin: 15px 0;
        border-radius: 8px;
    }
    
    .timer {
        font-size: 12px;
        margin-top: 12px;
    }
    
    .resend-link button {
        font-size: 13px;
        padding: 4px 8px;
    }
    
    .auth-link {
        margin-top: 15px;
        padding-top: 15px;
        font-size: 13px;
    }
}

/* Small Mobile (max-width: 480px) */
@media (max-width: 480px) {
    .auth-container {
        padding: 15px 12px;
    }
    
    .auth-header {
        padding: 20px 15px;
    }
    
    .auth-header i {
        font-size: 40px;
    }
    
    .auth-header h2 {
        font-size: 22px;
    }
    
    .auth-header p {
        font-size: 12px;
    }
    
    .auth-body {
        padding: 18px 15px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    .form-group label {
        font-size: 12px;
        margin-bottom: 5px;
    }
    
    .form-group input:not([type="submit"]):not([type="button"]),
    .input-wrapper input {
        padding: 10px 12px;
        font-size: 13px;
        border-radius: 8px;
    }
    
    .input-wrapper input {
        padding: 10px 35px 10px 12px;
    }
    
    .toggle-password {
        right: 10px;
        width: 28px;
        height: 28px;
    }
    
    .btn-auth {
        padding: 10px;
        font-size: 14px;
        border-radius: 8px;
    }
    
    .password-requirements {
        padding: 8px 10px;
    }
    
    .requirement {
        font-size: 9px;
        margin-bottom: 3px;
    }
    
    .requirement i {
        font-size: 9px;
        width: 12px;
    }
    
    .alert {
        padding: 8px 10px;
        font-size: 12px;
        gap: 8px;
    }
    
    .alert i {
        font-size: 14px;
    }
    
    .info-box {
        padding: 8px 10px;
        font-size: 11px;
        gap: 8px;
    }
    
    .info-box i {
        font-size: 14px;
    }
    
    .otp-input {
        font-size: 24px;
        letter-spacing: 5px;
        padding: 10px;
        margin: 12px 0;
    }
    
    .timer {
        font-size: 11px;
    }
    
    .resend-link button {
        font-size: 12px;
    }
    
    .auth-link {
        margin-top: 12px;
        padding-top: 12px;
        font-size: 12px;
    }
}

/* Extra Small Mobile (max-width: 380px) */
@media (max-width: 380px) {
    .auth-container {
        padding: 10px 10px;
    }
    
    .auth-body {
        padding: 15px 12px;
    }
    
    .form-group input:not([type="submit"]):not([type="button"]),
    .input-wrapper input {
        padding: 8px 10px;
        font-size: 13px;
    }
    
    .input-wrapper input {
        padding: 8px 32px 8px 10px;
    }
    
    .btn-auth {
        padding: 9px;
        font-size: 13px;
    }
    
    .otp-input {
        font-size: 20px;
        letter-spacing: 3px;
        padding: 8px;
    }
}