<!DOCTYPE html>
<html lang="id">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Daftar - Teh Tarik 99</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap" rel="stylesheet">
    
    <style>
        body {
            font-family: 'Poppins', sans-serif;
            margin: 0;
            padding: 0;
            height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            background-color: #f0f0f0;
        }

        .main-container {
            width: 100%;
            height: 100vh;
            background: white;
            display: flex;
            overflow: hidden;
            position: relative;
            box-shadow: 0 0 30px rgba(0,0,0,0.1);
        }

        .form-section {
            flex: 1;
            background-color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 60px;
            position: relative;
            z-index: 2;
        }

        .login-box {
            width: 100%;
            max-width: 400px;
            text-align: center;
        }

        .title-masuk {
            font-weight: 700;
            font-size: 2.8rem;
            margin-bottom: 40px;
            letter-spacing: 1px;
            color: black;
            text-transform: uppercase;
        }

        .form-group-custom {
            text-align: left;
            margin-bottom: 20px;
        }

        .form-label-custom {
            font-size: 0.95rem;
            color: #333;
            margin-bottom: 8px;
            display: block;
        }

        .form-control-custom {
            border: 1px solid #ccc;
            border-radius: 12px;
            padding: 14px 18px;
            font-size: 1rem;
            width: 100%;
            background-color: white;
            transition: all 0.3s;
        }

        .form-control-custom:focus {
            outline: none;
            border-color: #448b39;
            box-shadow: 0 0 0 0.25rem rgba(68, 139, 57, 0.15);
        }

        .btn-masuk-custom {
            background-color: #448b39;
            color: white;
            border: none;
            border-radius: 12px;
            padding: 14px;
            font-weight: 600;
            font-size: 1.1rem;
            width: 100%;
            cursor: pointer;
            transition: background-color 0.3s, transform 0.1s;
            margin-top: 10px;
        }

        .btn-masuk-custom:hover {
            background-color: #356e2d;
        }

        .btn-masuk-custom:active {
            transform: scale(0.98);
        }

        .daftar-link {
            margin-top: 30px;
            font-size: 0.95rem;
            color: #333;
        }

        .daftar-link a {
            color: #333;
            text-decoration: none;
            font-weight: 600;
            transition: color 0.3s;
        }
        
        .daftar-link a:hover {
            color: #448b39;
        }

        .middle-gradient {
            position: absolute;
            top: 0;
            bottom: 0;
            left: 58%;
            transform: translateX(-50%);
            width: 180px;
            background: linear-gradient(to right, 
                #ffffff 0%, 
                rgba(255,255,255,0.9) 30%, 
                transparent 50%, 
                rgba(68, 139, 57, 0.4) 70%, 
                #448b39 100%);
            z-index: 1;
            pointer-events: none;
        }

        .image-section {
            flex: 1;
            background-color: #448b39;
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
            z-index: 0;
        }

        .esteh-image {
            max-width: 85%; /* Sudah saya perbaiki dari % ke 85% */
            max-height: 85%;
            object-fit: contain;
            position: relative;
            z-index: 2;
        }

        @media (max-width: 768px) {
            .main-container { flex-direction: column; height: auto; }
            .form-section, .image-section { flex: none; width: 100%; height: auto; padding: 50px 20px; }
            .image-section { height: 350px; order: 1; }
            .form-section { order: 2; }
            .middle-gradient { display: none; }
            .title-masuk { font-size: 2.2rem; margin-bottom: 30px; }
            .main-container { height: 100vh; overflow-y: auto; }
        }
    </style>
</head>
<body>

<div class="main-container">
    <div class="middle-gradient"></div>

    <div class="form-section">
        <div class="login-box">
            <h1 class="title-masuk">DAFTAR</h1>
            
            <form action="/daftar" method="POST">
                @csrf 
                <div class="form-group-custom">
                    <label class="form-label-custom">Nama Lengkap</label>
                    <input type="text" class="form-control-custom" id="name" name="name" placeholder="Nama Lengkap" required>
                </div>

                <div class="form-group-custom">
                    <label class="form-label-custom">Email</label>
                    <input type="email" class="form-control-custom" id="email" name="email" placeholder="Email" required>
                </div>

                <div class="form-group-custom">
                    <label class="form-label-custom">Kata Sandi</label>
                    <input type="password" class="form-control-custom" id="password" name="password" placeholder="Kata Sandi" required>
                </div>

                <button type="submit" class="btn-masuk-custom">DAFTAR</button>
            </form>

            <p class="daftar-link">Sudah Punya Akun? <a href="/">Masuk</a></p>
        </div>
    </div>

    <div class="image-section">
        <img src="{{ asset('img/esteh-transparan.png') }}" class="esteh-image" alt="Es Teh Segar">
    </div>
</div>

</body>
</html>