@extends('install.layout')
@section('title', 'Manual .env setup required — AI Vision Attendance')
@section('tagline', 'Almost there — one manual step')
@section('footnote', 'Nothing else was changed — no migration or seed has run yet, so it is safe to retry.')

@section('content')
<h2 class="step-heading">Almost there — manual step required</h2>

<div class="alert alert-error">
    The installer could not write <code>{{ $envPath }}</code> — the application root directory is not writable by
    the web server. Nothing else was changed (no migration/seed has run yet), so it's safe to retry.
</div>

<div class="card">
    <h3>What to do</h3>
    <ol class="checklist">
        <li>Using FTP or your host's File Manager, create/edit the file <code>{{ $envPath }}</code> and paste the
            exact content below into it.</li>
        <li>Alternatively, chmod the application root directory (e.g. 755 or 775) so PHP can write to it, then just
            reload the install form and submit again.</li>
        <li>Once the file is saved, go back to <a href="{{ route('install.index') }}">/install</a> and submit the
            form again — the wizard will pick up from there.</li>
    </ol>
</div>

<div class="card">
    <h3>.env content to save</h3>
    <textarea readonly rows="24" class="env-textarea">{{ $envContents }}</textarea>
</div>

<a class="btn btn-primary btn-block btn-lg" href="{{ route('install.index') }}">Back to install</a>
@endsection
