<!DOCTYPE html>
<html lang="it">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Регистрация гостя — Hotel Pineta</title>
    <style>
        :root { --bg:#f6f7fb; --panel:#fff; --line:#d9dfec; --text:#1f2740; --muted:#6c7795; --accent:#3559b7; --error-bg:#fff1f1; --error-text:#9d2020; }
        *{box-sizing:border-box} body{margin:0;min-height:100vh;display:grid;place-items:center;background:radial-gradient(circle at top,#fbfcff 0,#f1f4fb 52%,#e9eef9 100%);font-family:Arial,Helvetica,sans-serif;color:var(--text)}
        .panel{width:min(620px,calc(100vw - 32px));background:var(--panel);border:1px solid var(--line);border-radius:24px;padding:28px;box-shadow:0 22px 55px rgba(32,57,123,.10)}
        .brand{display:flex;gap:14px;align-items:center;margin-bottom:22px}.brand img{width:56px;height:56px;border-radius:16px;background:#fff;padding:4px}
        h1{margin:0 0 6px;font-size:28px} p{margin:0;color:var(--muted);line-height:1.5}.grid{display:grid;gap:16px;grid-template-columns:1fr 1fr}.field{display:grid;gap:6px}.field.full{grid-column:1/-1} label{font-size:14px;color:var(--muted)} input,select{width:100%;border:1px solid var(--line);border-radius:14px;padding:14px 16px;font-size:15px}
        .error{margin-top:16px;border-radius:14px;background:var(--error-bg);color:var(--error-text);padding:12px 14px;font-size:14px} button{border:0;border-radius:14px;background:var(--accent);color:#fff;padding:14px 18px;font-size:15px;cursor:pointer}.links{margin-top:18px;display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;font-size:13px}
        @media(max-width:760px){.grid{grid-template-columns:1fr}.field.full{grid-column:auto}}
    </style>
</head>
<body data-i18n-page="guest_register">
<script>(function(){var s=["it","en","ru","uk","fr","de"],l=String(localStorage.getItem("hotel-pineta-lang")||"it").toLowerCase().split("-")[0];document.documentElement.lang=s.includes(l)?l:"it";})();</script>

<div class="panel">
    <div class="brand">
        <img src="<?php echo e(asset('images/hotel/emblem.jpg')); ?>" alt="Hotel Pineta">
        <div>
            <h1>Hotel Pineta</h1>
            <p data-i18n="brandSub">Регистрация гостя</p>
        </div>
    </div>

    <p data-i18n="intro">После регистрации вы попадёте в личный кабинет и сможете оформлять брони в новой системе.</p>

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

    <form method="post" action="<?php echo e(route('guest.register.store')); ?>" class="grid">
        <?php echo csrf_field(); ?>
        <div class="field">
            <label for="full_name" data-i18n="fullName">Имя и фамилия</label>
            <input id="full_name" type="text" name="full_name" data-pineta-name="1" value="<?php echo e(old('full_name')); ?>" required>
        </div>
        <div class="field">
            <label for="phone" data-i18n="phone">Телефон</label>
            <input id="phone" class="pineta-phone-input" data-pineta-phone="1" type="tel" name="phone" value="<?php echo e(old('phone')); ?>" placeholder="39 000 000 0000" required>
        </div>
        <div class="field">
            <label for="email" data-i18n="email">E-mail</label>
            <input id="email" type="email" name="email" value="<?php echo e(old('email')); ?>">
        </div>
        <input type="hidden" id="registrationLanguage" name="language" value="<?php echo e(old('language', 'it')); ?>">
        <div class="field">
            <label for="password" data-i18n="password">Пароль</label>
            <input id="password" type="password" name="password" minlength="6" required>
        </div>
        <div class="field">
            <label for="password_confirmation" data-i18n="passwordRepeat">Повторите пароль</label>
            <input id="password_confirmation" type="password" name="password_confirmation" minlength="6" required>
        </div>
        <div class="field full">
            <label style="display:flex;align-items:center;gap:8px;color:var(--text);">
                <input type="checkbox" id="show-passwords" style="width:auto;padding:0;"><span data-i18n="showPassword">Показать пароль</span>
            </label>
        </div>
        <div class="field full">
            <label style="display:flex;align-items:center;gap:10px;color:var(--text);">
                <input type="checkbox" name="privacy_consent" value="1" style="width:auto;padding:0;" <?php if(old('privacy_consent')): echo 'checked'; endif; ?>>
                <span data-i18n="privacy">Согласен на обработку данных для оформления бронирования</span>
            </label>
        </div>
        <div class="field full" style="display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;">
            <div class="links" style="margin:0;display:flex;gap:12px;">
                <a href="<?php echo e(route('guest.login')); ?>" data-i18n="haveAccount">У меня уже есть аккаунт</a>
            </div>
            <button type="submit" data-i18n="submit">Зарегистрироваться</button>
        </div>
    </form>

<script>
    (function () {
        const supported = ['it','en','ru','uk','fr','de'];
        const saved = String(localStorage.getItem('hotel-pineta-lang') || 'it').toLowerCase().split('-')[0];
        const lang = supported.includes(saved) ? saved : 'it';
        const languageInput = document.getElementById('registrationLanguage');
        if (languageInput) languageInput.value = lang;
    })();

    document.getElementById('show-passwords')?.addEventListener('change', function () {
        ['password', 'password_confirmation'].forEach(function (id) {
            const field = document.getElementById(id);
            if (field) field.type = document.getElementById('show-passwords').checked ? 'text' : 'password';
        });
    });
</script>
</div>
<script src="<?php echo e(asset('assets/js/phone-fields.js')); ?>"></script>
<script src="<?php echo e(asset('assets/js/name-fields.js')); ?>"></script>
<script src="<?php echo e(asset('js/site-translations.js')); ?>"></script>
<script src="<?php echo e(asset('js/site-i18n.js')); ?>"></script>
</body>
</html>
<?php /**PATH C:\OSPanel6\home\hotel-pineta-laravel.local\resources\views/guest/auth/register.blade.php ENDPATH**/ ?>