/* هوية MalafHub — من دليل الهوية الإصدار 1.0 */
@font-face { font-family: "Readex Pro"; font-weight: 400; src: url(/brand/fonts/ReadexPro-400.ttf) format("truetype"); font-display: swap; }
@font-face { font-family: "Readex Pro"; font-weight: 600; src: url(/brand/fonts/ReadexPro-600.ttf) format("truetype"); font-display: swap; }
@font-face { font-family: "Readex Pro"; font-weight: 700; src: url(/brand/fonts/ReadexPro-700.ttf) format("truetype"); font-display: swap; }

:root {
  --green: #006A3E;
  --deep: #00452A;
  --teal: #5DB7B7;
  --purple: #7A4B9D;
  --gold: #C19838;
  --gray: #5A5351;
  --gray-2: #8a8280;
  --line: #e6e2df;
  --bg: #ffffff;
  --bg-2: #f6f4f2;
  --ok: #006A3E;
  --warn: #C19838;
  --bad: #b3261e;
  --radius: 12px;
}

* { box-sizing: border-box; }
html { font-size: 16px; }
body {
  margin: 0; font-family: "Readex Pro", "Tajawal", "Segoe UI", sans-serif;
  color: var(--gray); background: var(--bg-2); line-height: 1.7;
  text-align: right; direction: rtl;
}
h1, h2, h3 { color: var(--green); margin: 0 0 .5rem; line-height: 1.3; }
h1 { font-size: 1.75rem; font-weight: 700; }
h2 { font-size: 1.125rem; font-weight: 600; }
h3 { font-size: .95rem; font-weight: 600; }
p { margin: 0 0 .75rem; }
a { color: var(--green); }
small, .muted { color: var(--gray-2); font-size: .85rem; }
code, pre, .mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; direction: ltr; text-align: left; }

.topbar { background: var(--bg); border-bottom: 1px solid var(--line); }
.topbar .in { max-width: 1100px; margin: 0 auto; padding: .75rem 1rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.topbar img { height: 36px; display: block; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
.narrow { max-width: 720px; }

.card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1rem; }
.grid { display: grid; gap: 1rem; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.btn { display: inline-flex; align-items: center; gap: .4rem; border: 1px solid var(--green); background: var(--green); color: #fff; font: inherit; font-weight: 600; padding: .55rem 1rem; border-radius: 10px; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--deep); border-color: var(--deep); }
.btn.ghost { background: transparent; color: var(--green); }
.btn.ghost:hover { background: #eef6f1; }
.btn.danger { background: transparent; color: var(--bad); border-color: var(--bad); }
.btn.sm { padding: .3rem .7rem; font-size: .85rem; font-weight: 400; }
.btn[disabled] { opacity: .5; cursor: default; }

label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .25rem; }
input, select { font: inherit; width: 100%; padding: .55rem .75rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--gray); }
input:focus, select:focus { outline: 2px solid var(--teal); border-color: var(--teal); }
.field { margin-bottom: .9rem; }
.row { display: flex; gap: .75rem; flex-wrap: wrap; align-items: end; }
.row > * { flex: 1 1 160px; }

table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { padding: .6rem .5rem; border-bottom: 1px solid var(--line); text-align: right; vertical-align: middle; }
th { color: var(--green); font-weight: 600; font-size: .85rem; }
tr:hover td { background: var(--bg-2); }

.pill { display: inline-block; padding: .1rem .6rem; border-radius: 999px; font-size: .8rem; font-weight: 600; }
.pill.ok { background: #e5f2ec; color: var(--ok); }
.pill.warn { background: #f8f0dc; color: #8a6a1e; }
.pill.bad { background: #f9e5e3; color: var(--bad); }
.pill.muted { background: var(--bg-2); color: var(--gray-2); }

.keybox { background: var(--deep); color: #fff; border-radius: 10px; padding: 1rem 4.5rem 1rem 1rem; direction: ltr; text-align: left; font-family: ui-monospace, Consolas, monospace; font-size: .95rem; word-break: break-all; position: relative; }
.keybox .copy { position: absolute; top: .5rem; right: .5rem; background: var(--teal); color: var(--deep); border: 0; border-radius: 8px; padding: .25rem .6rem; font: inherit; font-family: "Readex Pro", sans-serif; cursor: pointer; }
.gold { color: var(--gold); }
.notice { border-right: 4px solid var(--teal); background: #eef7f7; padding: .75rem 1rem; border-radius: 8px; margin-bottom: 1rem; }
.notice.bad { border-color: var(--bad); background: #fbeeed; }
.notice.ok { border-color: var(--green); background: #e5f2ec; }
.hidden { display: none !important; }
.stat { font-size: 1.6rem; font-weight: 700; color: var(--green); }
footer { text-align: center; padding: 2rem 1rem; color: var(--gray-2); font-size: .85rem; }
@media (max-width: 640px) { .topbar img { height: 30px; } th:nth-child(n+5), td:nth-child(n+5) { display: none; } }
