@php($rtl = app()->getLocale() === 'ar')
<!DOCTYPE html>
<html dir="{{ $rtl ? 'rtl' : 'ltr' }}" lang="{{ app()->getLocale() }}">
<head>
<meta charset="utf-8">
<style>
    * { font-family: DejaVu Sans, sans-serif; }
    body { color: #2b241d; font-size: 12px; line-height: 1.55; margin: 0; }
    .sheet { padding: 34px 40px; }
    .head { border-bottom: 3px solid #c5a44f; padding-bottom: 14px; margin-bottom: 22px; }
    .brand { font-size: 21px; font-weight: bold; color: #1c1714; letter-spacing: .5px; }
    .tagline { color: #c5a44f; font-size: 11px; letter-spacing: 2px; text-transform: uppercase; }
    .doc-title { float: {{ $rtl ? 'left' : 'right' }}; text-align: {{ $rtl ? 'left' : 'right' }}; }
    .doc-title h1 { font-size: 18px; margin: 0; color: #1c1714; }
    .doc-title .meta { color: #7a6f60; font-size: 10px; }
    h2 { font-size: 13px; color: #1c1714; border-bottom: 1px solid #e7dec9; padding-bottom: 4px; margin: 20px 0 10px; }
    table { width: 100%; border-collapse: collapse; margin: 8px 0; }
    th { background: #f6f1e6; text-align: {{ $rtl ? 'right' : 'left' }}; padding: 7px 9px; font-size: 10px; text-transform: uppercase; color: #7a6f60; }
    td { padding: 7px 9px; border-bottom: 1px solid #eee5d4; }
    .kv td:first-child { color: #7a6f60; width: 38%; }
    .right { text-align: {{ $rtl ? 'left' : 'right' }}; }
    .total-row td { font-weight: bold; border-top: 2px solid #c5a44f; background: #faf6ec; }
    .muted { color: #7a6f60; }
    .terms { font-size: 10px; color: #4a4339; }
    .terms li { margin-bottom: 4px; }
    .sign { margin-top: 40px; }
    .sign td { border: none; padding-top: 30px; }
    .sign .line { border-top: 1px solid #2b241d; width: 200px; padding-top: 4px; font-size: 10px; color: #7a6f60; }
    .foot { margin-top: 26px; border-top: 1px solid #e7dec9; padding-top: 8px; font-size: 9px; color: #9a8f7d; text-align: center; }
    .pill { display: inline-block; background: #f6f1e6; border-radius: 10px; padding: 1px 8px; font-size: 10px; }
</style>
</head>
<body>
<div class="sheet">
    <div class="head">
        <div class="doc-title">
            <h1>@yield('title')</h1>
            <div class="meta">@yield('ref')<br>{{ $generated->format('d M Y') }}</div>
        </div>
        <div class="brand">{{ $brand['name'] }}</div>
        <div class="tagline">{{ $brand['tagline'] }}</div>
    </div>

    @yield('body')

    <div class="foot">{{ $brand['name'] }} · @yield('title') · {{ $generated->format('d M Y H:i') }}</div>
</div>
</body>
</html>
