@php $noNavbar = true; @endphp
@extends('layouts.app')

@section('content')

<style>
    body{
        margin:0;
        min-height:100vh;
        background:linear-gradient(135deg,#2563eb,#0ea5e9);
        display:flex;
        align-items:center;
        justify-content:center;
        font-family:'Segoe UI',sans-serif;
        padding:20px;
    }

    .register-wrapper{
        width:1000px;
        max-width:100%;
        background:#fff;
        border-radius:24px;
        overflow:hidden;
        box-shadow:0 25px 50px rgba(0,0,0,0.12);
        display:flex;
    }

    /* LEFT */
    .register-left{
        width:50%;
        background:linear-gradient(135deg,#2563eb,#0ea5e9);
        color:white;
        padding:60px;
        display:flex;
        flex-direction:column;
        justify-content:center;
        position:relative;
        overflow:hidden;
    }

    .register-left::before{
        content:'';
        position:absolute;
        width:300px;
        height:300px;
        background:rgba(255,255,255,0.08);
        border-radius:50%;
        top:-80px;
        right:-80px;
    }

    .register-left::after{
        content:'';
        position:absolute;
        width:220px;
        height:220px;
        background:rgba(255,255,255,0.05);
        border-radius:50%;
        bottom:-70px;
        left:-70px;
    }

    .register-content{
        position:relative;
        z-index:2;
    }

    .register-left h1{
        font-size:42px;
        font-weight:700;
        margin-bottom:20px;
        line-height:1.2;
    }

    .register-left p{
        font-size:16px;
        line-height:1.8;
        opacity:0.95;
        margin-bottom:30px;
    }

    .register-feature{
        display:flex;
        align-items:center;
        margin-bottom:18px;
        font-size:15px;
    }

    .register-feature i{
        width:40px;
        height:40px;
        border-radius:10px;
        background:rgba(255,255,255,0.15);
        display:flex;
        align-items:center;
        justify-content:center;
        margin-right:15px;
    }

    /* RIGHT */
    .register-right{
        width:50%;
        padding:60px 50px;
        display:flex;
        flex-direction:column;
        justify-content:center;
    }

    .register-right h2{
        text-align:center;
        font-weight:700;
        color:#1e293b;
        margin-bottom:10px;
    }

    .register-right .subtitle{
        text-align:center;
        color:#64748b;
        margin-bottom:30px;
        font-size:14px;
    }

    .form-label{
        font-weight:600;
        color:#334155;
        margin-bottom:8px;
    }

    .form-control{
        border-radius:12px;
        border:1px solid #dbeafe;
        padding:12px 14px;
        transition:0.3s;
    }

    .form-control:focus{
        border-color:#2563eb;
        box-shadow:0 0 0 4px rgba(37,99,235,0.1);
    }

    .btn-register{
        background:linear-gradient(135deg,#2563eb,#0ea5e9);
        border:none;
        border-radius:12px;
        padding:12px;
        font-weight:600;
        transition:0.3s;
    }

    .btn-register:hover{
        transform:translateY(-2px);
        opacity:0.95;
    }

    .auth-links{
        text-align:center;
        margin-top:25px;
        font-size:14px;
    }

    .auth-links a{
        color:#2563eb;
        text-decoration:none;
        font-weight:600;
    }

    .auth-links a:hover{
        text-decoration:underline;
    }

    .invalid-feedback{
        display:block;
    }

    /* =========================
       RESPONSIVE MOBILE
    ========================= */
    @media(max-width:768px){

        body{
            height:auto;
            padding:15px;
            display:block;
        }

        .register-wrapper{
            flex-direction:column;
            width:100%;
            border-radius:18px;
            margin:20px auto;
        }

        /* LEFT */
        .register-left{
            width:100%;
            padding:35px 25px;
            text-align:center;
        }

        .register-left h1{
            font-size:28px;
            margin-bottom:15px;
        }

        .register-left p{
            font-size:14px;
            line-height:1.7;
        }

        .register-feature{
            justify-content:center;
            text-align:left;
            font-size:14px;
        }

        .register-feature i{
            width:35px;
            height:35px;
            font-size:14px;
            margin-right:10px;
        }

        /* RIGHT */
        .register-right{
            width:100%;
            padding:35px 20px;
        }

        .register-right h2{
            font-size:28px;
        }

        .subtitle{
            font-size:13px;
            margin-bottom:25px;
        }

        .form-control{
            padding:11px 12px;
            font-size:14px;
        }

        .btn-register{
            padding:11px;
            font-size:15px;
        }

        .auth-links{
            font-size:13px;
        }
    }

    /* EXTRA SMALL DEVICE */
    @media(max-width:480px){

        .register-left{
            padding:30px 20px;
        }

        .register-right{
            padding:30px 18px;
        }

        .register-left h1{
            font-size:24px;
        }

        .register-right h2{
            font-size:24px;
        }

        .register-feature{
            align-items:flex-start;
        }
    }

</style>

<div class="register-wrapper">

    <!-- LEFT -->
    <div class="register-left">

        <div class="register-content">

            <h1>Buat Akun Baru</h1>

            <p>
                Daftarkan akun anda untuk menggunakan Sistem Pakar 
                Diagnosa Penyakit Hipertensi berbasis metode 
                Certainty Factor.
            </p>

        </div>

    </div>

    <!-- RIGHT -->
    <div class="register-right">

        <h2>REGISTER</h2>

        <div class="subtitle">
            Silakan lengkapi data untuk membuat akun
        </div>

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

            <!-- Nama -->
            <div class="mb-3">

                <label class="form-label">
                    Nama Lengkap
                </label>

                <input type="text"
                       name="name"
                       class="form-control @error('name') is-invalid @enderror"
                       placeholder="Masukkan nama lengkap"
                       value="{{ old('name') }}"
                       required>

                @error('name')
                    <div class="invalid-feedback text-danger">
                        {{ $message }}
                    </div>
                @enderror

            </div>

            <!-- Email -->
            <div class="mb-3">

                <label class="form-label">
                    Email
                </label>

                <input type="email"
                       name="email"
                       class="form-control @error('email') is-invalid @enderror"
                       placeholder="Masukkan email"
                       value="{{ old('email') }}"
                       required>

                @error('email')
                    <div class="invalid-feedback text-danger">
                        {{ $message }}
                    </div>
                @enderror

            </div>

            <!-- Password -->
            <div class="mb-3">

                <label class="form-label">
                    Password
                </label>

                <input type="password"
                       name="password"
                       class="form-control @error('password') is-invalid @enderror"
                       placeholder="Masukkan password"
                       required>

                @error('password')
                    <div class="invalid-feedback text-danger">
                        {{ $message }}
                    </div>
                @enderror

            </div>

            <!-- Konfirmasi Password -->
            <div class="mb-3">

                <label class="form-label">
                    Konfirmasi Password
                </label>

                <input type="password"
                       name="password_confirmation"
                       class="form-control"
                       placeholder="Ulangi password"
                       required>

            </div>

            <!-- BUTTON -->
            <div class="d-grid">

                <button type="submit"
                        class="btn btn-register text-white">

                    Daftar

                </button>

            </div>

        </form>

        <div class="auth-links">

            Sudah punya akun?

            <a href="{{ route('login') }}">
                Login
            </a>

        </div>

    </div>

</div>

@endsection