<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Login Admin - {{ config('app.name') }}</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=Inter:wght@400;600;700&display=swap" rel="stylesheet">
    <style>
        body {
            background-color: #f8f9fa; /* Background abu sangat muda */
            font-family: 'Inter', sans-serif;
            height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0;
        }

        .login-card {
            background: #ffffff;
            border: none;
            border-radius: 8px; /* Rounded tipis */
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05); /* Soft Shadow */
            width: 100%;
            max-width: 400px;
            padding: 40px;
        }

        .brand-section {
            text-align: center;
            margin-bottom: 30px;
        }

        .brand-logo {
            width: 60px;
            height: 60px;
            object-fit: contain;
            margin-bottom: 15px;
            border-radius: 4px;
        }

        .brand-title {
            font-weight: 700;
            font-size: 1.25rem;
            color: #1a1a1a;
            letter-spacing: -0.5px;
            text-transform: uppercase;
        }

        .form-label {
            font-weight: 600;
            font-size: 0.85rem;
            color: #4b5563;
        }

        .form-control {
            border: 1px solid #e5e7eb;
            border-radius: 6px;
            padding: 12px;
            font-size: 0.95rem;
            transition: all 0.2s;
        }

        .form-control:focus {
            border-color: #3b82f6;
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
            outline: none;
        }

        .btn-primary {
            background-color: #3b82f6;
            border: none;
            border-radius: 6px;
            padding: 12px;
            font-weight: 600;
            width: 100%;
            margin-top: 10px;
            transition: background 0.2s;
        }

        .btn-primary:hover {
            background-color: #2563eb;
        }

        .alert {
            font-size: 0.85rem;
            border-radius: 6px;
            border: none;
        }
    </style>
</head>
<body>

<div class="login-card">
    <div class="brand-section">
        @if(File::exists(public_path('favicon.ico')))
            <img src="{{ asset('favicon.ico') }}" alt="Logo" class="brand-logo">
        @elseif(config('app.favicon'))
             <img src="{{ config('app.favicon') }}" alt="Logo" class="brand-logo">
        @else
            <div class="brand-logo bg-primary d-inline-flex align-items-center justify-content-center text-white">
                <span class="fw-bold">DS</span>
            </div>
        @endif
        
        <div class="brand-title">{{strtoupper(env('APP_NAME'))}} PANEL</div>
        <p class="text-muted small">Authorized Access Only</p>
    </div>

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

    <form action="{{ route('admin.login.process') }}" method="POST">
        @csrf
        <div class="mb-4">
            <label for="password" class="form-label">Admin Password</label>
            <input type="password" 
                   name="password" 
                   id="password" 
                   class="form-control" 
                   placeholder="Masukkan password..." 
                   required 
                   autofocus>
        </div>

        <button type="submit" class="btn btn-primary">
            LOGIN
        </button>
    </form>
    
    <div class="mt-4 text-center">
        <a href="{{ url('/') }}" class="text-decoration-none text-muted small">← Back to Site</a>
    </div>
</div>

</body>
</html>