@extends('partials.layout')
@section('title', 'Cambiar Contraseña')
@section('content')
<div style="max-width: 400px; margin: auto; padding: 20px;">
    <p style="color: #64748b; margin-bottom: 20px;">Para proteger tu cuenta, es necesario definir una nueva contraseña personal.</p>
    
    @if ($errors->any())
        <div style="background-color: #fee2e2; border: 1px solid #ef4444; color: #b91c1c; padding: 10px; border-radius: 8px; margin-bottom: 15px;">
            <ul style="margin: 0; padding-left: 20px; font-size: 14px;">
                @foreach ($errors->all() as $error)
                    <li>{{ $error }}</li>
                @endforeach
            </ul>
        </div>
    @endif

    <form method="POST" action="{{ route('password.update') }}">
        @csrf
        <div style="margin-bottom: 15px;">
            <label style="display:block; font-weight:700;">Nueva Contraseña</label>
            <input type="password" name="password" required style="width:100%; padding:10px; border:1px solid #e2e8f0; border-radius:8px; @error('password') border-color: #ef4444; @enderror">
        </div>
        <div style="margin-bottom: 20px;">
            <label style="display:block; font-weight:700;">Confirmar Contraseña</label>
            <input type="password" name="password_confirmation" required style="width:100%; padding:10px; border:1px solid #e2e8f0; border-radius:8px;">
        </div>
        <button type="submit" class="btn primary" style="width:100%;">Actualizar y Continuar</button>
    </form>
</div>
@endsection
