<!DOCTYPE html>
<html lang="id">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Daftar - ELEVATE</title>
    <link rel="preconnect" href="https://fonts.bunny.net">
    <link href="https://fonts.bunny.net/css?family=inter:300,400,500,600,700" rel="stylesheet" />
    <style>
        :root {
            --white: #ffffff;
            --gray-50: #f9fafb;
            --gray-100: #f3f4f6;
            --gray-200: #e5e7eb;
            --gray-300: #d1d5db;
            --gray-400: #9ca3af;
            --gray-500: #6b7280;
            --gray-600: #4b5563;
            --gray-700: #374151;
            --gray-800: #1f2937;
            --gray-900: #111827;
            --black: #000000;
            --error: #ef4444;
            --error-bg: #fef2f2;
            --error-border: #fee2e2;
            --success: #10b981;
            --success-bg: #ecfdf5;
            --success-border: #d1fae5;
        }
        * { margin: 0; padding: 0; box-sizing: border-box; }
        body {
            font-family: 'Inter', sans-serif;
            background: var(--gray-50);
            display: flex;
            align-items: center;
            justify-content: center;
            min-height: 100vh;
            padding: 2rem;
        }
        .card {
            background: var(--white);
            border-radius: 1rem;
            border: 1px solid var(--gray-200);
            box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
            padding: 2.5rem;
            width: 100%;
            max-width: 480px;
        }
        .logo-section {
            text-align: center;
            margin-bottom: 2rem;
        }
        .logo-name {
            font-size: 1.5rem;
            font-weight: 700;
            letter-spacing: -0.025em;
            color: var(--gray-900);
        }
        .form-header {
            text-align: center;
            margin-bottom: 1.75rem;
        }
        .form-header h2 {
            font-size: 1.5rem;
            font-weight: 600;
            color: var(--gray-900);
            margin-bottom: 0.5rem;
        }
        .form-header p {
            color: var(--gray-500);
            font-size: 0.875rem;
        }
        .alert-error {
            background: var(--error-bg);
            border: 1px solid var(--error-border);
            border-radius: 0.5rem;
            padding: 0.75rem 1rem;
            margin-bottom: 1.25rem;
            font-size: 0.813rem;
            color: var(--error);
        }
        .alert-success {
            background: var(--success-bg);
            border: 1px solid var(--success-border);
            border-radius: 0.5rem;
            padding: 0.75rem 1rem;
            margin-bottom: 1.25rem;
            font-size: 0.813rem;
            color: var(--success);
        }
        .form-group {
            margin-bottom: 1.25rem;
        }
        .form-label {
            display: block;
            font-weight: 500;
            font-size: 0.813rem;
            color: var(--gray-700);
            margin-bottom: 0.5rem;
        }
        .form-input {
            width: 100%;
            padding: 0.625rem 0.875rem;
            border: 1px solid var(--gray-300);
            border-radius: 0.5rem;
            font-size: 0.875rem;
            font-family: 'Inter', sans-serif;
            background: var(--white);
            color: var(--gray-900);
            transition: border-color 0.15s, box-shadow 0.15s;
        }
        .form-input:focus {
            outline: none;
            border-color: var(--gray-900);
            box-shadow: 0 0 0 3px rgba(17,24,39,0.1);
        }
        .form-input.error {
            border-color: var(--error);
        }
        .field-error {
            font-size: 0.75rem;
            color: var(--error);
            margin-top: 0.25rem;
            display: flex;
            align-items: center;
            gap: 0.25rem;
        }
        .field-error::before {
            content: "⚠";
            font-size: 0.7rem;
        }
        .password-wrapper {
            position: relative;
        }
        .password-wrapper .form-input {
            padding-right: 2.5rem;
        }
        .toggle-password {
            position: absolute;
            right: 0.75rem;
            top: 50%;
            transform: translateY(-50%);
            background: none;
            border: none;
            cursor: pointer;
            color: var(--gray-400);
            display: flex;
            align-items: center;
            padding: 0;
        }
        .toggle-password:hover {
            color: var(--gray-600);
        }
        .toggle-password svg {
            width: 18px;
            height: 18px;
        }
        .password-strength {
            margin-top: 0.5rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-size: 0.7rem;
        }
        .strength-meter {
            flex: 1;
            height: 4px;
            background: var(--gray-200);
            border-radius: 2px;
            overflow: hidden;
        }
        .strength-bar {
            height: 100%;
            width: 0%;
            transition: width 0.2s, background 0.2s;
        }
        .strength-text {
            color: var(--gray-500);
            font-size: 0.7rem;
            min-width: 70px;
        }
        .strength-bar.weak { background: var(--error); }
        .strength-bar.medium { background: #f59e0b; }
        .strength-bar.strong { background: var(--success); }
        .password-hint {
            font-size: 0.7rem;
            color: var(--gray-500);
            margin-top: 0.35rem;
            display: flex;
            align-items: center;
            gap: 0.25rem;
        }
        .btn-primary {
            width: 100%;
            padding: 0.75rem;
            background: var(--gray-900);
            color: white;
            border: none;
            border-radius: 0.5rem;
            font-size: 0.875rem;
            font-weight: 600;
            font-family: 'Inter', sans-serif;
            cursor: pointer;
            transition: background 0.15s;
            margin-top: 0.5rem;
        }
        .btn-primary:hover {
            background: var(--black);
        }
        .login-link {
            text-align: center;
            margin-top: 1.5rem;
            font-size: 0.813rem;
            color: var(--gray-500);
        }
        .login-link a {
            color: var(--gray-900);
            font-weight: 600;
            text-decoration: none;
        }
        .login-link a:hover {
            text-decoration: underline;
        }
        .terms-note {
            text-align: center;
            font-size: 0.7rem;
            color: var(--gray-500);
            margin-top: 1.25rem;
            padding-top: 1rem;
            border-top: 1px solid var(--gray-200);
        }
        .terms-note a {
            color: var(--gray-700);
            text-decoration: none;
        }
        .terms-note a:hover {
            text-decoration: underline;
        }
        @media (max-width: 480px) {
            .card { padding: 1.5rem; }
            .form-header h2 { font-size: 1.35rem; }
        }
    </style>
</head>
<body>
    <div class="card">
        <div class="logo-section">
            <span class="logo-name">ELEVATE</span>
        </div>

        <div class="form-header">
            <h2>Buat Akun Baru</h2>
            <p>Bergabung dan nikmati pengalaman belanja terbaik</p>
        </div>

        <?php if(session('status')): ?>
            <div class="alert-success"><?php echo e(session('status')); ?></div>
        <?php endif; ?>

        <?php if($errors->any()): ?>
            <div class="alert-error">
                <?php echo e($errors->first()); ?>

            </div>
        <?php endif; ?>

        <form method="POST" action="<?php echo e(route('register')); ?>">
            <?php echo csrf_field(); ?>
            
            <div class="form-group">
                <label for="name" class="form-label">Nama Lengkap</label>
                <input id="name" class="form-input <?php $__errorArgs = ['name'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> error <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" type="text" name="name" value="<?php echo e(old('name')); ?>" required autofocus placeholder="Nama lengkap Anda" />
                <?php $__errorArgs = ['name'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?><div class="field-error"><?php echo e($message); ?></div><?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
            </div>

            <div class="form-group">
                <label for="email" class="form-label">Alamat Email</label>
                <input id="email" class="form-input <?php $__errorArgs = ['email'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> error <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" type="email" name="email" value="<?php echo e(old('email')); ?>" required placeholder="email@contoh.com" />
                <?php $__errorArgs = ['email'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?><div class="field-error"><?php echo e($message); ?></div><?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
            </div>

            <div class="form-group">
                <label for="phone" class="form-label">Nomor Telepon</label>
                <input id="phone" class="form-input <?php $__errorArgs = ['phone'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> error <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" type="tel" name="phone" value="<?php echo e(old('phone')); ?>" placeholder="08xx-xxxx-xxxx" />
                <?php $__errorArgs = ['phone'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?><div class="field-error"><?php echo e($message); ?></div><?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
            </div>

            <div class="form-group">
                <label for="password" class="form-label">Kata Sandi</label>
                <div class="password-wrapper">
                    <input id="password" class="form-input <?php $__errorArgs = ['password'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> error <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" type="password" name="password" required placeholder="Minimal 8 karakter" />
                    <button type="button" class="toggle-password" onclick="togglePassword('password')">
                        <svg id="eye-on-pwd" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                            <path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/>
                            <circle cx="12" cy="12" r="3"/>
                        </svg>
                        <svg id="eye-off-pwd" style="display:none" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                            <path d="M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"/>
                            <line x1="1" y1="1" x2="23" y2="23"/>
                        </svg>
                    </button>
                </div>
                
                <div class="password-strength">
                    <div class="strength-meter">
                        <div class="strength-bar" id="strength-bar"></div>
                    </div>
                    <span class="strength-text" id="strength-text">Kekuatan</span>
                </div>
                <div class="password-hint">
                    <span>💡</span> Gunakan 8+ karakter, kombinasi huruf dan angka
                </div>
                <?php $__errorArgs = ['password'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?><div class="field-error"><?php echo e($message); ?></div><?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
            </div>

            <div class="form-group">
                <label for="password_confirmation" class="form-label">Konfirmasi Kata Sandi</label>
                <div class="password-wrapper">
                    <input id="password_confirmation" class="form-input <?php $__errorArgs = ['password_confirmation'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> error <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" type="password" name="password_confirmation" required placeholder="Ketik ulang kata sandi" />
                    <button type="button" class="toggle-password" onclick="togglePassword('confirm')">
                        <svg id="eye-on-confirm" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                            <path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/>
                            <circle cx="12" cy="12" r="3"/>
                        </svg>
                        <svg id="eye-off-confirm" style="display:none" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                            <path d="M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"/>
                            <line x1="1" y1="1" x2="23" y2="23"/>
                        </svg>
                    </button>
                </div>
                <div id="confirm-match-error" style="font-size:0.75rem; color:var(--error); margin-top:0.25rem; display:none;"></div>
                <?php $__errorArgs = ['password_confirmation'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?><div class="field-error"><?php echo e($message); ?></div><?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
            </div>

            <button type="submit" class="btn-primary">Daftar Sekarang</button>

            <div class="login-link">
                Sudah punya akun? <a href="<?php echo e(route('login')); ?>">Masuk di sini</a>
            </div>

            <div class="terms-note">
                Dengan mendaftar, Anda menyetujui <a href="#">Syarat & Ketentuan</a> dan <a href="#">Kebijakan Privasi</a> kami.
            </div>
        </form>
    </div>

    <script>
        function togglePassword(type) {
            let input, eyeOn, eyeOff;
            
            if (type === 'password') {
                input = document.getElementById('password');
                eyeOn = document.getElementById('eye-on-pwd');
                eyeOff = document.getElementById('eye-off-pwd');
            } else {
                input = document.getElementById('password_confirmation');
                eyeOn = document.getElementById('eye-on-confirm');
                eyeOff = document.getElementById('eye-off-confirm');
            }
            
            if (input.type === 'password') {
                input.type = 'text';
                if (eyeOn) eyeOn.style.display = 'none';
                if (eyeOff) eyeOff.style.display = 'block';
            } else {
                input.type = 'password';
                if (eyeOn) eyeOn.style.display = 'block';
                if (eyeOff) eyeOff.style.display = 'none';
            }
        }

        function checkPasswordStrength(password) {
            let strength = 0;
            if (password.length >= 8) strength++;
            if (password.match(/[a-z]/) && password.match(/[A-Z]/)) strength++;
            if (password.match(/[0-9]/)) strength++;
            if (password.match(/[^a-zA-Z0-9]/)) strength++;
            
            if (password.length === 0) return { score: 0, text: 'Kekuatan', class: '' };
            if (strength <= 1) return { score: 25, text: 'Lemah', class: 'weak' };
            if (strength === 2) return { score: 50, text: 'Sedang', class: 'medium' };
            if (strength === 3) return { score: 75, text: 'Kuat', class: 'strong' };
            return { score: 100, text: 'Sangat Kuat', class: 'strong' };
        }

        const passwordField = document.getElementById('password');
        const confirmField = document.getElementById('password_confirmation');
        const strengthBar = document.getElementById('strength-bar');
        const strengthText = document.getElementById('strength-text');
        const confirmErrorDiv = document.getElementById('confirm-match-error');

        function updateStrength() {
            const password = passwordField.value;
            const strength = checkPasswordStrength(password);
            strengthBar.style.width = strength.score + '%';
            strengthBar.className = 'strength-bar ' + strength.class;
            strengthText.textContent = strength.text;
        }

        function checkConfirmMatch() {
            if (confirmField.value.length > 0) {
                if (passwordField.value !== confirmField.value) {
                    confirmErrorDiv.textContent = '⚠ Kata sandi tidak cocok';
                    confirmErrorDiv.style.display = 'block';
                    confirmField.classList.add('error');
                } else {
                    confirmErrorDiv.style.display = 'none';
                    confirmField.classList.remove('error');
                }
            } else {
                confirmErrorDiv.style.display = 'none';
                confirmField.classList.remove('error');
            }
        }

        if (passwordField) {
            passwordField.addEventListener('input', function() {
                updateStrength();
                if (confirmField.value.length > 0) checkConfirmMatch();
            });
        }

        if (confirmField) {
            confirmField.addEventListener('input', checkConfirmMatch);
        }

        if (passwordField && passwordField.value) {
            updateStrength();
        }
    </script>
</body>
</html><?php /**PATH C:\laragon\www\ecommerce_app\resources\views/auth/register.blade.php ENDPATH**/ ?>