@font-face { font-family: "Noto Kufi Arabic"; src: url("fonts/NotoKufiArabic-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Noto Kufi Arabic"; src: url("fonts/NotoKufiArabic-Bold.ttf") format("truetype"); font-weight: 600 800; font-display: swap; }
:root { --bg: #F4F6F9; --card: #fff; --brand: #1F3A5F; --gold: #F4B63F; --soft: #EAF0F7; --line: #d9e0ea; --text: #1d2433; --muted: #5b6678; --bad: #b3261e; --ok: #1b7a43; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.7 "Noto Kufi Arabic", "Segoe UI", Tahoma, sans-serif; }
h1 { font-size: 1.35em; margin: 4px 0 14px; } h2 { font-size: 1.08em; margin: 0 0 10px; } p { margin: 0 0 10px; }
header { position: sticky; top: 0; z-index: 5; background: var(--brand); color: #fff; }
.brand { display: flex; align-items: center; gap: 10px; padding: 10px 16px; max-width: 1080px; margin: auto; } .brand b { flex: 1; } .brand img { border-radius: 9px; }
nav { display: flex; gap: 4px; overflow-x: auto; padding: 0 12px 8px; max-width: 1080px; margin: auto; }
nav button { background: none; border: 0; color: #dbe6f3; font: inherit; padding: 8px 14px; min-height: 44px; border-radius: 12px; white-space: nowrap; cursor: pointer; }
nav button.on { background: var(--gold); color: var(--brand); font-weight: 700; }
main { max-width: 1080px; margin: auto; padding: 18px 16px 70px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px; margin: 0 0 14px; min-width: 0; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 14px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; text-align: start; font: inherit; color: inherit; cursor: pointer; } .tile b { display: block; font-size: 1.9em; line-height: 1.3; color: var(--brand); } .tile.hot { border: 2px solid var(--gold); }
.b { font: inherit; font-weight: 600; border: 0; background: var(--brand); color: #fff; border-radius: 12px; padding: 9px 18px; min-height: 44px; cursor: pointer; } .b:disabled { opacity: .5; cursor: default; }
.b.light { background: var(--soft); color: var(--brand); } .b.red { background: #fbe9e7; color: var(--bad); } .b.gold { background: var(--gold); color: var(--brand); } .b.small { padding: 5px 14px; font-size: .9em; } .b.full { width: 100%; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
form { display: grid; gap: 10px; } form.two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); align-items: end; }
label { display: grid; gap: 4px; font-weight: 600; min-width: 0; }
input, select, textarea { font: inherit; width: 100%; min-width: 0; padding: 9px 12px; min-height: 44px; border: 1px solid #b8c3d2; border-radius: 12px; background: #fff; color: var(--text); } textarea { min-height: 90px; resize: vertical; }
.item { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid var(--line); } .item:last-child { border: 0; } .item > span { min-width: 0; overflow-wrap: anywhere; flex: 1 1 220px; }
button.item { width: 100%; background: none; border: 0; border-bottom: 1px solid var(--line); font: inherit; color: inherit; text-align: start; cursor: pointer; } button.item:hover { background: var(--soft); }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 18px; overflow-wrap: anywhere; } .kv span { color: var(--muted); }
.muted { color: var(--muted); font-size: .92em; } .err { color: var(--bad); min-height: 1.5em; margin: 0; } .tag { display: inline-block; border-radius: 999px; padding: 1px 12px; font-size: .85em; background: var(--soft); color: var(--brand); } .tag.ok { background: #e3f3e9; color: var(--ok); } .tag.bad { background: #fbe9e7; color: var(--bad); } .tag.gold { background: #fdf0d3; color: #6b4a00; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.code { direction: ltr; text-align: center; font: 700 1.35em/1.6 Consolas, "Courier New", monospace; background: var(--soft); border-radius: 12px; padding: 12px; user-select: all; overflow-wrap: anywhere; } pre { white-space: pre-wrap; font: inherit; background: var(--soft); border-radius: 12px; padding: 12px; margin: 0 0 10px; }
.sign { max-width: 420px; margin: 6vh auto 0; text-align: center; } .sign img { border-radius: 18px; } .sign form { text-align: start; } .sign input { text-align: center; }
dialog { border: 0; border-radius: 18px; padding: 20px; width: min(480px, calc(100vw - 28px)); color: var(--text); } dialog::backdrop { background: rgb(18 33 58 / .55); }
#toast { position: fixed; bottom: 18px; inset-inline: 16px; margin: auto; max-width: 420px; text-align: center; background: var(--brand); color: #fff; border-radius: 12px; padding: 10px 16px; opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 20; } #toast.on { opacity: 1; }
@media (max-width: 560px) { .kv { grid-template-columns: minmax(0, 1fr); gap: 0; } .kv b { margin-bottom: 8px; } }
@media (prefers-reduced-motion: reduce) { #toast { transition: none; } }
