<!DOCTYPE html>
<html lang="id">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Masuk - 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; /* Latar abu sedikit agar card menonjol */
        }

        .main-container {
            width: 100%;
            height: 100vh; /* Full layar sesuai desain */
            background: white;
            display: flex;
            overflow: hidden;
            position: relative; /* Penting untuk posisi gradien tengah */
            box-shadow: 0 0 30px rgba(0,0,0,0.1);
        }

        /* --- SISI KIRI (FORM PUTIH) --- */
        .form-section {
            flex: 1; /* Ambil 50% lebar */
            background-color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 60px;
            position: relative;
            z-index: 2; /* Di atas gradien tengah */
        }

        .login-box {
            width: 100%;
            max-width: 400px; /* Batasi lebar form agar rapi */
            text-align: center;
        }

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

        .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; /* Radius input sesuai desain */
            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);
        }

        .lupa-sandi {
            text-align: right;
            margin-top: -10px;
            margin-bottom: 35px;
        }

        .lupa-sandi a {
            color: #555;
            text-decoration: none;
            font-size: 0.85rem;
            transition: color 0.3s;
        }

        .lupa-sandi a:hover {
            color: #448b39;
        }

        .btn-masuk-custom {
            background-color: #448b39; /* KODE WARNA HIJAU */
            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;
        }

        .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;
        }

        /* --- GRADIENT/BLUR TENGAH (CODINGAN) --- */
        .middle-gradient {
            position: absolute;
            top: 0;
            bottom: 0;
            left: 58%; /* Posisi tepat di tengah pembatas */
            transform: translateX(-50%);
            width: 180px; /* Lebar area gradien/blur */
            /* Gradien dari putih pekat ke transparan lalu ke hijau pekat */
            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; /* Di antara kiri dan kanan */
            pointer-events: none; /* Biar tidak menghalangi input form */
        }

        /* --- SISI KANAN (HIJAU + GAMBAR ES TEH) --- */
        .image-section {
            flex: 1; /* Ambil 50% lebar */
            background-color: #448b39; /* KODE WARNA HIJAU PEKAT SESUAI DESAIN */
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
            z-index: 0;
        }

        .esteh-image {
            max-width: 85%; /* Ukuran gambar es teh menyesuaikan */
            max-height: 85%;
            object-fit: contain; /* Menjaga proporsi gambar */
            position: relative;
            z-index: 2; /* Di atas latar hijau */
        }

        /* --- RESPONSIF UNTUK HP --- */
        @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; /* Gambar di atas saat di HP */ }
            .form-section { order: 2; }
            .middle-gradient { display: none; /* Gradien tengah dihilangkan di HP */ }
            .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">MASUK</h1>
            
                <form action="/login" method="POST">
                    @csrf 
                    <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>

                    <div class="lupa-sandi">
                        <a href="#">Lupa Kata Sandi?</a>
                    </div>

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

            <p class="daftar-link">Belum Punya Akun? <a href="daftar">Daftar</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>