MÓDULO_TEÓRICO
User Registration and State Validation

Building the Registration Form
Now we will build the Sign Up (Registration) view, adding custom accent checkboxes, error validation feedback, and conditional disabled button states using Tailwind modifiers.
1. Custom Checkboxes with accent-cyan-400
Styling native checkboxes historically took 40 lines of CSS pseudo-element hacks. In Tailwind, you only need one utility:
html<div class="flex items-start gap-3"> <input type="checkbox" id="terms" class="w-4 h-4 mt-1 rounded bg-slate-950 border-slate-700 accent-cyan-400 cursor-pointer" > <label for="terms" class="text-xs text-slate-400 leading-normal cursor-pointer"> I accept the <a href="#" class="text-cyan-400 underline hover:text-cyan-300">Quantum Terms of Service</a> and cryptographic data policies. </label> </div>
2. Error States and Visual Validation
How do we present invalid input states in Tailwind? Modify the border and ring colors:
html<!-- Input in Error State --> <div> <label class="block text-xs font-semibold text-rose-400 uppercase tracking-wider mb-2"> Master Password </label> <input type="password" class="w-full bg-slate-950/80 border border-rose-500 rounded-xl px-4 py-3 text-white text-sm focus:outline-none focus:ring-2 focus:ring-rose-500/20" value="123" > <!-- Error feedback message --> <p class="text-xs text-rose-400 mt-1.5 flex items-center gap-1"> ⚠️ Password must contain at least 8 characters. </p> </div>
3. Disabled Button States with disabled:
Tailwind provides the disabled: prefix to deliver instant visual feedback when forms are incomplete:
html<button type="submit" disabled class="w-full bg-cyan-400 text-slate-950 font-bold py-3.5 rounded-xl disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:bg-cyan-400 disabled:shadow-none" > Register New Agent </button>
