@extends('layouts.app')

@push('style')
<link rel="stylesheet" href="/assets/vendor/libs/formvalidation/dist/css/formValidation.min.css" />
<link rel="stylesheet" href="/assets/vendor/css/pages/page-auth.css" />

<style>
    /* Full height layout */
    html, body {
        height: 100%;
        margin: 0;
        background-color: #f8f9fa; /* optional light background */
    }

    /* Center wrapper */
    .authentication-wrapper {
        display: flex;
        justify-content: center; /* horizontal center */
        align-items: center;     /* vertical center */
        min-height: 100vh;
        width: 100vw;
    }

    /* Inner card container */
    .authentication-inner {
        width: 100%;
        max-width: 420px; /* card width */
        padding: 1rem;
        margin: 0 auto;
    }

    /* Card styling */
    .card {
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }

    /* Center logo */
    .app-brand img {
        display: block;
        margin: 0 auto;
        width: 50%;
    }

    /* Center card body content, keep labels left-aligned */
    .card-body {
        text-align: center;
    }
    .card-body form .form-label {
        text-align: left;
    }
</style>
@endpush

@section('content')
<div class="authentication-wrapper">
    <div class="authentication-inner">
        <!-- Register Card -->
        <div class="card shadow">
            <div class="card-body">
                <!-- Logo -->
                <div class="app-brand mb-4 mt-2">
                    <a href="#" class="d-block w-100 text-center">
                     
                         <img src="{{ asset('assets/img/logo.png') }}" alt="MFMS Logo" />
                    </a>
                </div>

                <!-- Title -->
                <h4 class="mb-3 pt-0">Create Account Cattle Farm Management System</h4>

                <!-- Register Form -->
                <form action="{{ route('register') }}" method="POST">
                    @csrf

                    <!-- Full Name -->
                    <div class="mb-3 text-start">
                        <label class="form-label">Full Name</label>
                        <input type="text" class="form-control" name="name" required
                               placeholder="Enter your name" value="{{ old('name') }}">
                    </div>

                    <!-- Email -->
                    <div class="mb-3 text-start">
                        <label class="form-label">Email</label>
                        <input type="email" class="form-control" name="email" required
                               placeholder="example@mail.com" value="{{ old('email') }}">
                    </div>

                    <!-- Password -->
                    <div class="mb-3 form-password-toggle text-start">
                        <label class="form-label">Password</label>
                        <div class="input-group input-group-merge">
                            <input type="password" class="form-control" name="password" required
                                   placeholder="••••••••">
                            <span class="input-group-text cursor-pointer">
                                <i class="icon-base ti tabler-eye-off"></i>
                            </span>
                        </div>
                    </div>

                    <!-- Confirm Password -->
                    <div class="mb-3 form-password-toggle text-start">
                        <label class="form-label">Confirm Password</label>
                        <div class="input-group input-group-merge">
                            <input type="password" class="form-control" name="password_confirmation" required
                                   placeholder="••••••••">
                            <span class="input-group-text cursor-pointer">
                                <i class="icon-base ti tabler-eye-off"></i>
                            </span>
                        </div>
                    </div>

                    <!-- Submit Button -->
                    <div class="mb-3">
                        <button class="btn btn-primary d-grid w-100" type="submit">Register</button>
                    </div>
                </form>

                <!-- Login Link -->
                <p class="text-center">
                    <span>Already have an account?</span>
                    <a href="{{ route('login') }}"><span>Login</span></a>
                </p>
            </div>
        </div>
    </div>
</div>
@endsection

@push('script')
<script src="/assets/vendor/libs/formvalidation/dist/js/plugins/AutoFocus.min.js"></script>
<script src="/assets/js/pages-auth.js"></script>
@endpush
