<!DOCTYPE html>
<html lang="ms">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Lupa Kata Laluan | Sistem Pengurusan Fail</title>
    <style>
        html {
            min-height: 100%;
            margin: 0;
            padding: 0;
            background: #f5f8f7;
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
            font-family: 'Segoe UI', 'Inter', Tahoma, Geneva, Verdana, sans-serif;
        }

        :root {
            --main-blue: #0077b6;
            --deep-blue: #023e5f;
            --soft-blue: #00b4d8;
            --text-dark: #17232b;
            --text-muted: #2d5367;
        }

        body {
            min-height: 100vh;
            color: var(--text-dark);
            background: #f5f8f7;
            overflow: hidden;
        }

        body::before,
        body::after {
            content: "";
            position: fixed;
            pointer-events: none;
            z-index: 0;
        }

        body::before {
            width: 54vw;
            height: 54vw;
            left: -18vw;
            bottom: -25vw;
            background:
                linear-gradient(155deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.01)),
                repeating-linear-gradient(0deg, transparent 0 32px, rgba(255, 255, 255, 0.08) 33px 34px);
            border: 1px solid rgba(255, 255, 255, 0.12);
            border-radius: 38px;
            transform: rotate(-10deg);
            box-shadow: 0 30px 120px rgba(0, 0, 0, 0.16);
        }

        body::after {
            width: 34vw;
            height: 34vw;
            left: 12vw;
            top: 10vw;
            background:
                radial-gradient(circle, rgba(0, 180, 216, 0.28), transparent 58%),
                radial-gradient(circle, rgba(0, 119, 182, 0.16), transparent 44%);
            filter: blur(8px);
            opacity: 0.95;
        }

        .forgot-shell {
            position: relative;
            z-index: 1;
            min-height: 100vh;
            height: 100vh;
            display: grid;
            grid-template-columns: minmax(340px, 1fr) minmax(340px, 1fr);
            align-items: stretch;
            width: 100%;
        }

        .brand-panel {
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: clamp(36px, 7vw, 92px);
            text-align: center;
            background:
                linear-gradient(135deg, rgba(2, 62, 95, 0.82), rgba(0, 119, 182, 0.58)),
                radial-gradient(circle at 22% 24%, rgba(0, 180, 216, 0.38), transparent 28%),
                radial-gradient(circle at 56% 74%, rgba(0, 180, 216, 0.24), transparent 24%);
            overflow: hidden;
        }

        .brand-mark {
            position: relative;
            display: flex;
            align-items: center;
            justify-content: center;
            width: min(340px, 54vw);
            aspect-ratio: 1;
            border-radius: 50%;
            background:
                radial-gradient(circle, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.03) 58%, transparent 62%),
                conic-gradient(from 0deg, rgba(255, 255, 255, 0.02), rgba(0, 180, 216, 0.3), rgba(255, 255, 255, 0.02), rgba(0, 119, 182, 0.28), rgba(255, 255, 255, 0.02));
            box-shadow: 0 34px 95px rgba(0, 0, 0, 0.32);
        }

        .brand-mark::before {
            content: "";
            position: absolute;
            inset: 11%;
            border: 1px solid rgba(255, 255, 255, 0.16);
            border-radius: 50%;
        }

        .brand-mark::after {
            content: "";
            position: absolute;
            width: 118%;
            height: 118%;
            border-radius: 50%;
            border: 1px dashed rgba(255, 255, 255, 0.2);
            animation: orbitSpin 12s linear infinite;
        }

        .brand-mark img {
            position: relative;
            z-index: 1;
            width: clamp(155px, 19vw, 245px);
            height: auto;
            filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.34));
            animation: logoRotate 9s linear infinite;
            transform-origin: center;
        }
        .brand-name {
            max-width: 360px;
            margin-top: 34px;
            color: #fff;
            font-size: clamp(1.05rem, 2vw, 1.45rem);
            line-height: 1.35;
            font-weight: 800;
            text-align: center;
            text-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
        }

        @keyframes logoRotate {
            from { transform: rotateY(0deg); }
            to { transform: rotateY(360deg); }
        }

        @keyframes orbitSpin {
            from { transform: rotate(0deg); }
            to { transform: rotate(360deg); }
        }

        .forgot-panel {
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: clamp(28px, 6vw, 74px);
            background:
                linear-gradient(135deg, rgba(255, 255, 255, 0.48), rgba(0, 180, 216, 0.12)),
                url('assets/auth-bg.png') center/cover no-repeat;
        }

        .forgot-card {
            width: 100%;
            max-width: 430px;
            border-radius: 22px;
            padding: 38px;
            background: rgba(255, 255, 255, 0.30);
            border: 1px solid rgba(255, 255, 255, 0.42);
            box-shadow: 0 30px 90px rgba(2, 38, 60, 0.26);
            backdrop-filter: blur(24px) saturate(1.25);
            -webkit-backdrop-filter: blur(24px) saturate(1.25);
        }

        .form-heading {
            text-align: center;
            margin-bottom: 28px;
        }

        .form-heading h1 {
            color: #005f99;
            font-size: clamp(1.78rem, 3vw, 2.25rem);
            line-height: 1.12;
            font-weight: 800;
            margin-bottom: 10px;
        }

        .form-heading p {
            color: #355f73;
            font-size: 0.94rem;
            font-weight: 500;
            line-height: 1.5;
        }

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

        label {
            display: block;
            margin-bottom: 8px;
            color: var(--text-dark);
            font-weight: 700;
            font-size: 0.9rem;
        }

        input {
            width: 100%;
            height: 48px;
            padding: 12px 15px;
            border: 1px solid #dce5e4;
            border-radius: 7px;
            font-size: 0.95rem;
            color: #12313e;
            transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
            background: #fff;
            box-shadow: 0 1px 0 rgba(16, 50, 47, 0.03);
        }

        input::placeholder {
            color: #526b79;
        }

        input:focus {
            border-color: rgba(0, 180, 216, 0.95);
            outline: none;
            box-shadow: 0 0 0 4px rgba(0, 180, 216, 0.15);
            background: #fff;
        }

        .btn-submit {
            width: 100%;
            height: 50px;
            margin-top: 6px;
            padding: 0 18px;
            background: linear-gradient(90deg, #0077b6, #00b4d8);
            color: #fff;
            border: 1px solid rgba(0, 119, 182, 0.28);
            border-radius: 999px;
            font-size: 0.95rem;
            font-weight: 850;
            letter-spacing: 0.04em;
            cursor: pointer;
            box-shadow: 0 14px 28px rgba(0, 119, 182, 0.26);
            transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
        }

        .btn-submit:hover {
            transform: translateY(-1px);
            filter: brightness(1.03);
            box-shadow: 0 18px 34px rgba(0, 119, 182, 0.34);
        }

        .helper-text {
            text-align: center;
            margin-top: 18px;
            color: var(--text-muted);
            font-size: 0.9rem;
            line-height: 1.5;
        }

        .back-link {
            text-align: center;
            margin-top: 20px;
            font-size: 0.9rem;
        }

        .back-link a {
            color: var(--main-blue);
            font-weight: 700;
            text-decoration: none;
        }

        .back-link a:hover,
        .back-link a:focus {
            text-decoration: none;
        }

        @media (max-width: 860px) {
            body {
                overflow-y: auto;
                overflow-x: hidden;
            }

            .forgot-shell {
                grid-template-columns: 1fr;
                min-height: 100vh;
                height: auto;
            }

            .brand-panel {
                min-height: 36vh;
                padding: 36px 24px;
            }

            .brand-mark {
                width: min(260px, 70vw);
            }
            .brand-name {
                margin-top: 24px;
                font-size: 1.05rem;
            }

            .forgot-panel {
                min-height: auto;
                padding: 34px 18px 44px;
            }
        }

        @media (max-width: 460px) {
            .forgot-card {
                padding: 26px 20px;
                border-radius: 22px;
            }
        }
    </style>
</head>
<body>
    <main class="forgot-shell">
        <section class="brand-panel" aria-label="Logo MAINPP">
            <div class="brand-mark">
                <img src="mainpp.png" alt="Logo MAINPP">
            </div>
            <p class="brand-name">Majlis Agama Islam Negeri Pulau Pinang</p>
        </section>

        <section class="forgot-panel" aria-label="Lupa kata laluan">
            <div class="forgot-card">
                <div class="form-heading">
                    <h1>Lupa Kata Laluan</h1>
                    <p>Sistem Pengurusan Fail dan Surat</p>
                </div>

                <form action="process_forgot.php" method="POST">
                    <div class="form-group">
                        <label for="email">Emel Berdaftar</label>
                        <input type="email" name="email" id="email" autocomplete="email" required>
                    </div>

                    <div class="form-group">
                        <label for="ic_number">No. Kad Pengenalan</label>
                        <input type="text" name="ic_number" id="ic_number" inputmode="numeric" required>
                    </div>

                    <button type="submit" class="btn-submit">DAPATKAN OTP</button>
                </form>

                <div class="helper-text">
                    Nombor OTP akan dihantar ke emel anda yang berdaftar selepas semakan berjaya.
                </div>

                <div class="back-link">
                    <a href="login.php">&larr; Kembali ke Log Masuk</a>
                </div>
            </div>
        </section>
    </main>
</body>
</html>
