<!DOCTYPE html>
<html lang="id">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Daftar - SIPDAM</title>

    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap" rel="stylesheet">


    <style>
        * { box-sizing: border-box; margin: 0; padding: 0; }

        body {
            font-family: 'Plus Jakarta Sans', Arial, sans-serif;
            min-height: 100vh;
            display: flex;
            background: linear-gradient(160deg, #e8f5eb 0%, #f2faf4 40%, #e4f3f8 100%);
        }

        /* ── KIRI ── */
        .left-panel {
            width: 55%;
            background: #1a5c2a;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 60px 40px;
            position: relative;
            overflow: hidden;
        }
        .left-panel::before {
            content: '';
            position: absolute;
            top: -100px; right: -100px;
            width: 400px; height: 400px;
            background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
            border-radius: 50%;
        }
        .left-panel::after {
            content: '';
            position: absolute;
            bottom: -80px; left: -80px;
            width: 350px; height: 350px;
            background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
            border-radius: 50%;
        }
        .left-logo {
            position: relative; z-index: 2;
            margin-bottom: 40px;
        }
        .left-logo img {
            height: 120px;
            width: auto;
            object-fit: contain;
            mix-blend-mode: screen;
            filter: brightness(1.2);
        }
        .left-title {
            position: relative; z-index: 2;
            color: #fff;
            font-size: 28px;
            font-weight: 800;
            text-align: center;
            line-height: 1.3;
            margin-bottom: 14px;
        }
        .left-desc {
            position: relative; z-index: 2;
            color: rgba(255,255,255,0.75);
            font-size: 14px;
            text-align: center;
            line-height: 1.7;
            max-width: 340px;
            margin-bottom: 40px;
        }
        .left-badges {
            position: relative; z-index: 2;
            display: flex;
            flex-direction: column;
            gap: 14px;
            width: 100%;
            max-width: 320px;
        }
        .left-badge {
            background: rgba(255,255,255,0.12);
            border: 1px solid rgba(255,255,255,0.2);
            border-radius: 14px;
            padding: 14px 18px;
            display: flex;
            align-items: center;
            gap: 14px;
            color: #fff;
        }
        .left-badge .badge-icon {
            width: 38px; height: 38px;
            background: rgba(255,255,255,0.2);
            border-radius: 10px;
            display: flex; align-items: center; justify-content: center;
            flex-shrink: 0;
        }
        .left-badge .badge-text { font-size: 13px; font-weight: 600; }
        .left-badge .badge-sub { font-size: 11px; opacity: 0.7; margin-top: 2px; }

        /* ── KANAN ── */
        .right-panel {
            width: 45%;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 60px 50px;
        }
        .register-box {
            width: 100%;
            max-width: 400px;
        }
        .register-header {
            margin-bottom: 32px;
        }
        .register-header .tirta-logo {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 28px;
        }
        .register-header .tirta-logo img {
            width: 48px; height: 48px;
            object-fit: contain;
        }
        .register-header .tirta-logo-text .name {
            font-size: 15px;
            font-weight: 700;
            color: #1a5c2a;
            line-height: 1.2;
        }
        .register-header .tirta-logo-text .sub {
            font-size: 11px;
            color: #1e6fa8;
            font-weight: 600;
            letter-spacing: 1px;
            text-transform: uppercase;
        }
        .register-header h2 {
            font-size: 26px;
            font-weight: 800;
            color: #1a2e1c;
            margin-bottom: 8px;
        }
        .register-header p {
            font-size: 14px;
            color: #6b8c72;
        }

        /* Form */
        .form-group { margin-bottom: 18px; }
        .form-group label {
            display: block;
            font-size: 13px;
            font-weight: 600;
            color: #1a2e1c;
            margin-bottom: 8px;
        }
        .form-group input {
            width: 100%;
            padding: 13px 16px;
            border: 1.5px solid #d1e8d4;
            border-radius: 12px;
            font-size: 14px;
            font-family: inherit;
            color: #1a2e1c;
            background: #fff;
            outline: none;
            transition: border-color 0.2s, box-shadow 0.2s;
        }
        .form-group input:focus {
            border-color: #3a9e52;
            box-shadow: 0 0 0 3px rgba(58,158,82,0.12);
        }
        .form-group input::placeholder { color: #a0b8a4; }

        .btn-register {
            width: 100%;
            padding: 14px;
            background: linear-gradient(135deg, #2d7a3e, #1a5c2a);
            color: #fff;
            border: none;
            border-radius: 12px;
            font-size: 15px;
            font-weight: 700;
            font-family: inherit;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            box-shadow: 0 6px 20px rgba(42,120,60,0.35);
            transition: all 0.25s;
            margin-top: 24px;
        }
        .btn-register:hover {
            transform: translateY(-2px);
            box-shadow: 0 10px 28px rgba(42,120,60,0.4);
        }

        .register-footer {
            text-align: center;
            margin-top: 20px;
            font-size: 12px;
            color: #6b8c72;
        }
        .register-footer a {
            color: #1a5c2a;
            font-weight: 600;
            text-decoration: none;
        }
        .register-footer a:hover { text-decoration: underline; }

        .error-msg {
            color: #dc2626;
            font-size: 12px;
            margin-top: 6px;
        }

        @media (max-width: 768px) {
            body { flex-direction: column; }
            .left-panel { width: 100%; padding: 40px 24px; min-height: auto; }
            .left-badges { display: none; }
            .right-panel { width: 100%; padding: 40px 24px; }
        }
    </style>
</head>
<body>

    <!-- Kiri: Branding -->
    <div class="left-panel">
        <div class="left-logo">
            <img src="{{ asset('images/SIPDAM.png') }}" alt="SIPDAM">
        </div>
        <h2 class="left-title">Bergabung dengan SIPDAM</h2>
        <p class="left-desc">Buat akun untuk mengakses sistem penggajian tenaga kerja lepas PERUMDA Tirta Sanjiwani</p>
        <div class="left-badges">
            <div class="left-badge">
                <div class="badge-icon">
                    <svg width="20" height="20" fill="none" stroke="white" stroke-width="2" viewBox="0 0 24 24">
                        <path d="M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0z"/>
                    </svg>
                </div>
                <div>
                    <div class="badge-text">Manajemen Tenaga Kerja</div>
                    <div class="badge-sub">Data terpusat & terstruktur</div>
                </div>
            </div>
            <div class="left-badge">
                <div class="badge-icon">
                    <svg width="20" height="20" fill="none" stroke="white" stroke-width="2" viewBox="0 0 24 24">
                        <path d="M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z"/>
                    </svg>
                </div>
                <div>
                    <div class="badge-text">Penggajian Otomatis</div>
                    <div class="badge-sub">Akurat & tepat waktu</div>
                </div>
            </div>
            <div class="left-badge">
                <div class="badge-icon">
                    <svg width="20" height="20" fill="none" stroke="white" stroke-width="2" viewBox="0 0 24 24">
                        <path d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"/>
                    </svg>
                </div>
                <div>
                    <div class="badge-text">Absensi & Kontrak</div>
                    <div class="badge-sub">Monitoring real-time</div>
                </div>
            </div>
        </div>
    </div>

    <!-- Kanan: Form Register -->
    <div class="right-panel">
        <div class="register-box">

            <div class="register-header">
                <div class="tirta-logo">
                    <img src="{{ asset('images/logo tirta sanjiwani.png') }}" alt="Tirta Sanjiwani">
                    <div class="tirta-logo-text">
                        <div class="name">PERUMDA Air Minum</div>
                        <div class="sub">Tirta Sanjiwani</div>
                    </div>
                </div>
                <h2>Buat Akun Baru</h2>
                <p>Isi data di bawah untuk mendaftar ke SIPDAM</p>
            </div>

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

                <div class="form-group">
                    <label for="name">Nama Lengkap</label>
                    <input id="name" type="text" name="name"
                           value="{{ old('name') }}"
                           placeholder="Masukkan nama lengkap"
                           required autofocus>
                    @error('name')
                        <div class="error-msg">{{ $message }}</div>
                    @enderror
                </div>

                <div class="form-group">
                    <label for="email">Username/Email</label>
                    <input id="email" type="email" name="email"
                           value="{{ old('email') }}"
                           placeholder="contoh@email.com"
                           required>
                    @error('email')
                        <div class="error-msg">{{ $message }}</div>
                    @enderror
                </div>

                <div class="form-group">
                    <label for="password">Password</label>
                    <input id="password" type="password" name="password"
                           placeholder="Buat password"
                           required>
                    @error('password')
                        <div class="error-msg">{{ $message }}</div>
                    @enderror
                </div>

                <div class="form-group">
                    <label for="password_confirmation">Konfirmasi Password</label>
                    <input id="password_confirmation" type="password"
                           name="password_confirmation"
                           placeholder="Ulangi password"
                           required>
                    @error('password_confirmation')
                        <div class="error-msg">{{ $message }}</div>
                    @enderror
                </div>

                <button type="submit" class="btn-register">
                    <svg width="18" height="18" fill="none" stroke="currentColor" stroke-width="2.5" viewBox="0 0 24 24">
                        <path d="M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"/>
                    </svg>
                    Daftar Sekarang
                </button>
            </form>

            <div class="register-footer">
                Sudah punya akun? <a href="{{ route('login') }}">Masuk di sini</a>
            </div>

        </div>
    </div>

</body>
</html>