@extends('layouts.app')

@section('content')
<style>
    .fc-ls-lock{min-height:70vh;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#eef4fb,#f8fbff);padding:24px}.fc-ls-lock-card{width:min(100%,460px);background:#fff;border:1px solid #e5edf7;border-radius:18px;padding:24px;box-shadow:0 24px 60px rgba(15,23,42,.12)}.fc-ls-lock-icon{width:54px;height:54px;border-radius:16px;background:linear-gradient(135deg,#102a43,#155c9d);color:#fff;display:flex;align-items:center;justify-content:center;font-size:22px;margin-bottom:14px}.fc-ls-lock-card h3{font-weight:900;color:#172b4d;margin-bottom:6px}.fc-ls-lock-card p{color:#64748b;font-size:14px;line-height:1.6}.fc-ls-lock-card label{font-size:12px;font-weight:900;text-transform:uppercase;letter-spacing:.05em;color:#64748b}.fc-ls-lock-card .form-control{height:44px;border-radius:11px}.fc-ls-lock-card .btn{height:44px;border-radius:11px;font-weight:900}
</style>

<div class="fc-ls-lock">
    <div class="fc-ls-lock-card">
        <div class="fc-ls-lock-icon"><i class="fa fa-lock"></i></div>
        <h3>Live Support Access Control</h3>
        <p>This control page is protected by a separate password stored in phpMyAdmin.</p>

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

        @if(!$passwordConfigured)
            <div class="alert alert-warning">
                No control password is set yet. In phpMyAdmin, open <strong>fc_live_support_control</strong> and set <strong>setting_value</strong> for <strong>control_password</strong>.
            </div>
        @endif

        <form method="POST" action="{{ route('admin.support.payments.unlock') }}">
            @csrf
            <div class="form-group">
                <label>Control Password</label>
                <input type="password" class="form-control" name="control_password" required autocomplete="current-password">
            </div>
            <button type="submit" class="btn btn-primary btn-block">Unlock Control Page</button>
        </form>

        <div class="mt-3">
            <a href="{{ route('admin.support') }}" class="text-muted small">Back to Support Inbox</a>
        </div>
    </div>
</div>
@endsection
