<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Login - Warkop Cak Imin</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.15.4/css/all.min.css">
    <link href="https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap" rel="stylesheet">
    <style>
        :root {
            --primary-gradient: linear-gradient(135deg, #ff8a00 0%, #ff5e00 100%);
            --soft-shadow: 0 10px 30px rgba(0,0,0,0.08);
        }
        body { 
            background-color: #f8f9fa; 
            font-family: 'Outfit', sans-serif;
            display: flex; 
            align-items: center; 
            justify-content: center; 
            height: 100vh; 
            margin: 0;
            background-image: radial-gradient(#ff8a0011 1px, transparent 1px);
            background-size: 20px 20px;
        }
        .login-box { width: 100%; max-width: 400px; padding: 0 20px; }
        .card { 
            border: none; 
            border-radius: 20px; 
            overflow: hidden; 
            box-shadow: var-soft-shadow;
            transition: transform 0.3s ease;
        }
        .card:hover {
            transform: translateY(-5px);
        }
        .card-header {
            background: var(--primary-gradient);
            padding: 40px 20px;
            text-align: center;
            border: none;
        }
        .card-header h2 {
            color: white;
            font-weight: 700;
            margin-bottom: 5px;
            letter-spacing: -0.5px;
        }
        .card-header p {
            color: rgba(255,255,255,0.8);
            margin-bottom: 0;
            font-weight: 300;
        }
        .login-card-body { padding: 40px 30px; }
        .form-control {
            border-radius: 12px;
            padding: 12px 15px;
            height: auto;
            border: 1px solid #eee;
            background-color: #fafafa;
        }
        .form-control:focus {
            border-color: #ff8a00;
            box-shadow: 0 0 0 3px rgba(255,138,0,0.1);
            background-color: white;
        }
        .input-group-text {
            background: transparent;
            border: none;
            color: #ccc;
        }
        .btn-primary {
            background: var(--primary-gradient);
            border: none;
            border-radius: 12px;
            padding: 12px;
            font-weight: 600;
            letter-spacing: 0.5px;
            box-shadow: 0 4px 15px rgba(255,94,0,0.3);
            transition: all 0.3s ease;
        }
        .btn-primary:hover {
            transform: scale(1.02);
            box-shadow: 0 6px 20px rgba(255,94,0,0.4);
            filter: brightness(1.1);
        }
        .icheck-primary label {
            font-weight: 400;
            color: #666;
            cursor: pointer;
        }
        .alert-danger {
            border-radius: 12px;
            border: none;
            font-size: 0.9rem;
        }
    </style>
</head>
<body>
    <div class="login-box">
        <div class="card shadow-lg">
            <div class="card-header">
                <h2>Cak Imin</h2>
                <p>Sistem Informasi Akuntansi</p>
            </div>
            <div class="card-body login-card-body">
                @if($errors->any())
                    <div class="alert alert-danger mb-4">
                        <i class="fas fa-exclamation-circle mr-2"></i>
                        @foreach($errors->all() as $error)
                            {{ $error }}
                        @endforeach
                    </div>
                @endif

                <form action="/authenticate" method="post">
                    @csrf
                    <div class="form-group mb-4">
                        <label class="small font-weight-bold text-uppercase text-muted">Email Address</label>
                        <div class="input-group">
                            <input type="email" name="email" class="form-control" placeholder="admin@example.com" required value="{{ old('email') }}">
                            <div class="input-group-append">
                                <div class="input-group-text">
                                    <span class="fas fa-envelope"></span>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="form-group mb-4">
                        <label class="small font-weight-bold text-uppercase text-muted">Password</label>
                        <div class="input-group">
                            <input type="password" name="password" class="form-control" placeholder="••••••••" required>
                            <div class="input-group-append">
                                <div class="input-group-text">
                                    <span class="fas fa-lock"></span>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="row align-items-center">
                        <div class="col-7">
                            <div class="custom-control custom-checkbox icheck-primary">
                                <input type="checkbox" class="custom-control-input" id="remember" name="remember">
                                <label class="custom-control-label" for="remember">Ingat Saya</label>
                            </div>
                        </div>
                        <div class="col-5">
                            <button type="submit" class="btn btn-primary btn-block">
                                MASUK <i class="fas fa-arrow-right ml-2 small"></i>
                            </button>
                        </div>
                    </div>
                    
                    <div class="text-center mt-4">
                        <a href="{{ route('password.request') }}" class="small text-muted" style="text-decoration: underline;">Lupa Password? (Khusus Admin)</a>
                    </div>
                </form>
            </div>
        </div>
        <p class="text-center mt-4 text-muted small">&copy; 2026 Warkop Cak Imin. All rights reserved.</p>
    </div>
</body>
</html>
