@extends('layouts.master')

@section('title', 'Add Account Type')

@section('content')
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;600;700&family=DM+Sans:wght@300;400;500;600&display=swap" rel="stylesheet">

<style>
:root{--sky:#0ea5e9;--sky-deep:#0369a1;--sky-ghost:rgba(14,165,233,.07);--sky-border:rgba(14,165,233,.2);--white:#fff;--off:#f7fbff;--border:#daeaf8;--fd:'Cormorant Garamond',Georgia,serif;--fb:'DM Sans',system-ui,sans-serif}
.main-content{background:var(--off);font-family:var(--fb)}
.page{max-width:900px;margin:0 auto;padding:40px 24px 64px}
.hero{background:linear-gradient(135deg,var(--sky-deep),var(--sky));border-radius:22px;padding:24px 30px;color:#fff;box-shadow:0 10px 28px rgba(14,165,233,.2);margin-bottom:22px}
.hero h1{margin:0;font-family:var(--fd);font-size:32px}
.hero p{margin:6px 0 0;font-size:13px;color:rgba(255,255,255,.85)}
.card{background:#fff;border:1px solid var(--border);border-radius:16px;padding:20px;box-shadow:0 6px 20px rgba(14,165,233,.08)}
label{font-size:12px;text-transform:uppercase;letter-spacing:.08em;color:#64748b}
input,textarea{width:100%;padding:10px 12px;border:1px solid var(--border);border-radius:10px}
.actions{display:flex;gap:10px;justify-content:flex-end;margin-top:16px}
.btn{display:inline-flex;align-items:center;gap:7px;padding:10px 16px;border-radius:10px;border:1px solid var(--sky-border);text-decoration:none;font-size:13px;font-weight:600;background:#fff;color:var(--sky-deep)}
.btn.primary{background:linear-gradient(135deg,var(--sky-deep),var(--sky));color:#fff;border-color:var(--sky-deep)}
</style>

<div class="page">
    <div class="hero">
        <h1>Add Account Type</h1>
        <p>Create a new account type category.</p>
    </div>

    <form method="POST" action="{{ route('account_types.store') }}" class="card">
        @csrf
        <div class="mb-3">
            <label>Code</label>
            <input type="text" name="code" value="{{ old('code') }}" required>
        </div>
        <div class="mb-3">
            <label>Name</label>
            <input type="text" name="name" value="{{ old('name') }}" required>
        </div>
        <div class="mb-3">
            <label>Description</label>
            <textarea name="description" rows="3">{{ old('description') }}</textarea>
        </div>
        <div class="actions">
            <a href="{{ route('account_types.index') }}" class="btn">Cancel</a>
            <button type="submit" class="btn primary">Save</button>
        </div>
    </form>
</div>
@endsection
