<!DOCTYPE html>
<html lang="id">
<head>
    <title>Pengaturan Lokasi Absen Sekolah</title>
    <style>
        body { font-family: sans-serif; max-width: 600px; margin: 50px auto; padding: 20px; box-shadow: 0 0 10px rgba(0,0,0,0.1); }
        .form-group { margin-bottom: 15px; }
        label { display: block; margin-bottom: 5px; font-weight: bold; }
        input { width: 100%; padding: 8px; box-sizing: border-box; }
        button { padding: 10px 20px; background: #28a745; color: white; border: none; cursor: pointer; }
        .alert { padding: 10px; background: #d4edda; color: #155724; margin-bottom: 15px; }
    </style>
</head>
<body>
    <h2>⚙️ Pengaturan Titik Absen Sekolah</h2>
    
    @if(session('success'))
        <div class="alert">{{ session('success') }}</div>
    @endif

    <form action="{{ route('admin.pengaturan.update') }}" method="POST">
        @csrf
        <div class="form-group">
            <label>Latitude Sekolah</label>
            <input type="text" name="latitude_sekolah" value="{{ $pengaturan->latitude_sekolah }}" required>
            <small style="color: gray;">Contoh: -1.606558</small>
        </div>
        
        <div class="form-group">
            <label>Longitude Sekolah</label>
            <input type="text" name="longitude_sekolah" value="{{ $pengaturan->longitude_sekolah }}" required>
            <small style="color: gray;">Contoh: 103.609591</small>
        </div>

        <div class="form-group">
            <label>Radius Maksimal Absen (Meter)</label>
            <input type="number" name="radius_meter" value="{{ $pengaturan->radius_meter }}" required>
            <small style="color: gray;">Jarak toleransi guru dari titik sekolah (Disarankan 50-100 meter)</small>
        </div>

        <button type="submit">Simpan Pengaturan</button>
    </form>
</body>
</html>