<!DOCTYPE html>
<html lang="id">
<head>
    <meta charset="UTF-8">
    <title>Reset Password - Sistem Hama Padi</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap" rel="stylesheet">
    <style>

        *, *::before, *::after {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        body {
            font-family: 'Poppins', sans-serif;
            min-height: 100vh;
            background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 40%, #66bb6a 100%);
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 20px;
        }

        .auth-card {
            background: white;
            border-radius: 20px;
            padding: 40px;
            width: 100%;
            max-width: 400px;
            box-shadow: 0 20px 60px rgba(0,0,0,0.2);
        }

        .auth-header {
            text-align: center;
            margin-bottom: 28px;
        }

        .auth-header .icon {
            font-size: 44px;
            display: block;
            margin-bottom: 10px;
        }

        .auth-header h2 {
            font-size: 21px;
            font-weight: 700;
            color: #1b5e20;
            margin-bottom: 6px;
        }

        .auth-header p {
            font-size: 13px;
            color: #6b7280;
            line-height: 1.5;
        }

        .alert {
            padding: 12px 14px;
            border-radius: 10px;
            font-size: 13px;
            margin-bottom: 20px;
        }

        .alert-danger {
            background: #fff0f0;
            color: #c62828;
            border: 1px solid #ffcdd2;
        }

        .alert-success {
            background: #f0fdf4;
            color: #2e7d32;
            border: 1px solid #bbf7d0;
        }

        .form-group {
            margin-bottom: 16px;
        }

        .form-group label {
            display: block;
            font-size: 13px;
            font-weight: 500;
            color: #374151;
            margin-bottom: 6px;
        }

        .form-group input {
            width: 100%;
            padding: 11px 14px;
            border: 1.5px solid #e5e7eb;
            border-radius: 10px;
            font-size: 14px;
            font-family: 'Poppins', sans-serif;
            color: #111;
            transition: border-color 0.25s, box-shadow 0.25s;
            background: #fafafa;
        }

        .form-group input:focus {
            outline: none;
            border-color: #2e7d32;
            box-shadow: 0 0 0 3px rgba(46,125,50,0.12);
            background: white;
        }

        .btn-submit {
            width: 100%;
            padding: 13px;
            background: linear-gradient(135deg, #2e7d32, #66bb6a);
            color: white;
            border: none;
            border-radius: 10px;
            font-size: 15px;
            font-weight: 600;
            font-family: 'Poppins', sans-serif;
            cursor: pointer;
            transition: transform 0.2s, box-shadow 0.2s;
            box-shadow: 0 4px 15px rgba(46,125,50,0.35);
            margin-top: 6px;
        }

        .btn-submit:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 20px rgba(46,125,50,0.4);
        }

        .btn-submit:active {
            transform: translateY(0);
        }

        .auth-links {
            text-align: center;
            margin-top: 18px;
        }

        .auth-links a {
            font-size: 13px;
            color: #2e7d32;
            text-decoration: none;
            transition: color 0.2s;
        }

        .auth-links a:hover {
            color: #1b5e20;
            text-decoration: underline;
        }

        @media (max-width: 480px) {
            body {
                padding: 16px;
                align-items: flex-start;
                padding-top: 40px;
            }

            .auth-card {
                padding: 26px 20px;
                border-radius: 16px;
            }

            .auth-header .icon {
                font-size: 38px;
            }

            .auth-header h2 {
                font-size: 19px;
            }
        }

    </style>
</head>

<body>

<div class="auth-card">

    <div class="auth-header">
        <span class="icon">🔑</span>
        <h2>Reset Password</h2>
        <p>Masukkan email dan password baru Anda</p>
    </div>

    @if(session('error'))
        <div class="alert alert-danger">
            {{ session('error') }}
        </div>
    @endif

    @if(session('success'))
        <div class="alert alert-success">
            {{ session('success') }}
        </div>
    @endif

    <form method="POST" action="/reset-password">
        @csrf

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

        <div class="form-group">
            <label for="password">Password Baru</label>
            <input
                type="password"
                id="password"
                name="password"
                placeholder="Minimal 8 karakter"
                required
                autocomplete="new-password"
            >
        </div>

        <div class="form-group">
            <label for="password_confirmation">Ulangi Password</label>
            <input
                type="password"
                id="password_confirmation"
                name="password_confirmation"
                placeholder="Ulangi password baru"
                required
                autocomplete="new-password"
            >
        </div>

        <button type="submit" class="btn-submit">Reset Password</button>

    </form>

    <div class="auth-links">
        <a href="/login">← Kembali ke Login</a>
    </div>

</div>

</body>
</html>