:root { --brand: #0f766e; --ink: #1f2937; --muted: #6b7280; --line: #e5e7eb; --bg: #f6f7f9; --ok: #15803d; --bad: #b91c1c; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
       padding: 24px 16px; background: var(--bg); color: var(--ink);
       font: 16px/1.6 -apple-system, "SF Arabic", "Segoe UI", Tahoma, "Noto Sans Arabic", sans-serif; }
.card { width: 100%; max-width: 420px; background: #fff; border-radius: 18px; padding: 28px 24px;
        box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 28px rgba(0,0,0,.06); border-top: 5px solid var(--brand); }
body.wide .card { max-width: 980px; }
.head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.head img { width: 44px; height: 44px; object-fit: contain; border-radius: 10px; }
.head h1 { font-size: 1.15rem; margin: 0; }
h2 { font-size: 1.35rem; margin: 0 0 6px; }
h3 { font-size: 1rem; margin: 22px 0 8px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.hint { color: var(--muted); font-size: .85rem; margin: -4px 0 4px; }
.amount { font-size: 2.2rem; font-weight: 700; color: var(--brand); text-align: center; margin: 10px 0 14px; direction: ltr; }
.amount small { font-size: 1rem; color: var(--muted); font-weight: 500; }
form.pay { display: flex; flex-direction: column; gap: 10px; }
label { display: flex; flex-direction: column; gap: 4px; font-size: .9rem; color: var(--muted); }
input { font: inherit; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); }
input:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: transparent; }
button, .button { display: block; width: 100%; margin-top: 8px; padding: 13px; border: 0; border-radius: 12px; cursor: pointer;
                  background: var(--brand); color: #fff; font: inherit; font-weight: 700; text-align: center; text-decoration: none; }
.button.ghost { background: transparent; color: var(--brand); border: 1px solid var(--brand); }
.error { color: var(--bad); background: #fef2f2; padding: 8px 10px; border-radius: 8px; margin: 0; }
.status { text-align: center; }
.status .big { width: 64px; height: 64px; margin: 4px auto 10px; border-radius: 50%; display: grid; place-items: center;
               font-size: 2rem; color: #fff; background: var(--muted); }
.status.paid .big { background: var(--ok); }
.status.failed .big, .status.cancelled .big { background: var(--bad); }
dl.meta { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 14px 0; }
dl.meta dt { color: var(--muted); }
dl.meta dd { margin: 0; }
table.lines { width: 100%; border-collapse: collapse; margin: 10px 0; }
table.lines th, table.lines td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: start; }
table.lines th { color: var(--muted); font-weight: 500; font-size: .9rem; }
table.lines tr.total td { font-weight: 700; border-bottom: 0; }
.qr { display: flex; justify-content: center; margin: 14px 0; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.kpi { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.kpi h3 { margin: 0; color: var(--muted); font-weight: 500; }
.kpi b { display: block; font-size: 1.7rem; color: var(--brand); }
.kpi small { color: var(--muted); }
.st.paid { color: var(--ok); } .st.failed, .st.cancelled { color: var(--bad); }
.tabs { margin-bottom: 14px; color: var(--muted); }
a { color: var(--brand); }
.foot { margin-top: 16px; color: var(--muted); font-size: .85rem; }
@media print { body { background: #fff; padding: 0; } .card { box-shadow: none; border: 0; } .foot { display: none; } }
