@model watcher_monitoring.Models.User

@{
    ViewData["Title"] = "Neuer Benutzer";
}

<div class="container-fluid px-4">
    <div class="row">
        <div class="col-md-8 offset-md-2">
            <h1 class="section-title mb-4">Neuen Benutzer erstellen</h1>

            <div class="card">
                <form asp-action="Create" method="post">
                    <div asp-validation-summary="ModelOnly" class="alert" style="background-color: rgba(248, 81, 73, 0.15); border: 1px solid var(--danger); color: var(--danger); border-radius: 6px; padding: 1rem; margin-bottom: 1rem;"></div>

                    <div class="mb-3">
                        <label asp-for="Username" class="form-label" style="color: var(--text-primary); font-weight: 500; margin-bottom: 0.5rem;">Benutzername</label>
                        <input asp-for="Username" class="form-control" style="background-color: var(--bg-tertiary); border: 1px solid var(--border-color); color: var(--text-primary); padding: 0.75rem; border-radius: 6px;" required />
                        <span asp-validation-for="Username" style="color: var(--danger); font-size: 0.875rem;"></span>
                    </div>

                    <div class="mb-3">
                        <label asp-for="Email" class="form-label" style="color: var(--text-primary); font-weight: 500; margin-bottom: 0.5rem;">E-Mail-Adresse</label>
                        <input asp-for="Email" type="email" class="form-control" style="background-color: var(--bg-tertiary); border: 1px solid var(--border-color); color: var(--text-primary); padding: 0.75rem; border-radius: 6px;" required />
                        <span asp-validation-for="Email" style="color: var(--danger); font-size: 0.875rem;"></span>
                    </div>

                    <div class="mb-3">
                        <label asp-for="Password" class="form-label" style="color: var(--text-primary); font-weight: 500; margin-bottom: 0.5rem;">Passwort</label>
                        <input asp-for="Password" type="password" class="form-control" style="background-color: var(--bg-tertiary); border: 1px solid var(--border-color); color: var(--text-primary); padding: 0.75rem; border-radius: 6px;" required />
                        <span asp-validation-for="Password" style="color: var(--danger); font-size: 0.875rem;"></span>
                        <div style="color: var(--text-muted); font-size: 0.875rem; margin-top: 0.25rem;">Mindestens 8 Zeichen empfohlen</div>
                    </div>

                    <div class="d-flex gap-2">
                        <button type="submit" class="btn btn-primary">Erstellen</button>
                        <a asp-action="Index" class="btn" style="background-color: var(--bg-tertiary); border: 1px solid var(--border-color); color: var(--text-primary); padding: 0.5rem 1rem; border-radius: 6px; text-decoration: none;">Abbrechen</a>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>

@section Scripts {
    @{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
}
