:root { --ink: #1c1c1c; --gold: #a8895a; --gold-soft: #f5efe4; --bg: #faf8f4; --line: #e4ddd0; --ok: #2e7d32; --warn: #e6a100; --bad: #c62828; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: "Geeza Pro", "Segoe UI", Tahoma, "Noto Naskh Arabic", sans-serif; font-size: 17px; line-height: 1.6; }
.top { background: #fff; border-bottom: 3px solid var(--gold); padding: 12px 16px; text-align: center; }
.logo { max-width: 300px; width: 80%; height: auto; }
.wrap { max-width: 640px; margin: 0 auto; padding: 18px 16px 40px; }
.foot { text-align: center; color: #888; font-size: 14px; padding: 18px; }
h1 { font-size: 26px; margin: 6px 0 8px; }
h2 { font-size: 21px; margin: 0 0 10px; }
.muted { color: #666; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px; margin: 14px 0; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.card.link { display: flex; justify-content: space-between; text-decoration: none; color: inherit; }
.card.warn { border-color: var(--warn); background: #fff8e6; }
label { display: block; font-weight: 600; margin: 12px 0 0; }
input, select { display: block; width: 100%; margin-top: 6px; padding: 12px 14px; font: inherit; font-weight: 400; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; }
input:focus, select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
[dir="rtl"] input[dir="ltr"] { text-align: right; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: end; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.grid .full { grid-column: 1 / -1; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; margin-top: 16px; }
.check input { width: 22px; height: 22px; margin: 2px 0 0; flex: 0 0 22px; }
.ts { margin: 12px 0 0; }
.pub .ts { height: 0; margin: 0; overflow: hidden; }
.pub .ts.show { height: auto; margin: 14px 0 0; overflow: visible; }
button, .btn { display: inline-block; width: 100%; margin-top: 12px; padding: 14px; font: inherit; font-weight: 700; color: #fff; background: var(--ink); border: 0; border-radius: 10px; cursor: pointer; text-align: center; text-decoration: none; }
button:disabled { opacity: .6; cursor: wait; }
button.ghost, .btn.ghost { background: #fff; color: var(--ink); border: 1.5px solid var(--ink); }
.row { display: flex; gap: 10px; }
button.danger { background: #fff; color: var(--bad); border: 1.5px solid var(--bad); }
.err { color: var(--bad); background: #fdecec; border-radius: 10px; padding: 10px 12px; margin: 10px 0 0; }
.pass { text-align: center; border: 2px solid var(--ok); }
.big { font-size: 22px; font-weight: 700; margin: 4px 0; }
.qr { width: min(320px, 82vw); margin: 10px auto; background: #fff; }
.qr svg { width: 100%; height: auto; display: block; }
/* شعار سعى في نص الباركود */
.qr { position: relative; }
.qr-logo { position: absolute; left: 50%; top: 50%; width: 19%; aspect-ratio: 1 / 1; transform: translate(-50%, -50%); background: #fff; border-radius: 16%; padding: 2%; box-sizing: border-box; display: flex; align-items: center; justify-content: center; }
.qr-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.bar .btn { width: auto; margin: 0; padding: 10px 16px; }
.table { overflow-x: auto; margin-top: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
th { background: var(--gold-soft); }
.cam { margin-top: 12px; background: #000; border-radius: 12px; overflow: hidden; aspect-ratio: 1 / 1; }
.cam video { width: 100%; height: 100%; object-fit: cover; display: block; }
.result { margin-top: 14px; border-radius: 14px; padding: 18px; text-align: center; color: #fff; }
.result b { display: block; font-size: 24px; }
.result span { display: block; font-size: 17px; margin-top: 4px; }
.result.idle { background: #eee; color: #444; }
.result.ok { background: var(--ok); }
.result.warn { background: var(--warn); color: #1c1c1c; }
.result.bad { background: var(--bad); }
@media (max-width: 480px) { .two, .grid { grid-template-columns: 1fr; } h1 { font-size: 23px; } }

/* ===== الصفحات العامة ===== */
@font-face { font-family: "Plex"; src: url("/fonts/IBMPlexSansArabic-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex"; src: url("/fonts/IBMPlexSansArabic-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Plex"; src: url("/fonts/IBMPlexSansArabic-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
body.pub { font-family: "Plex", "Geeza Pro", "Segoe UI", Tahoma, sans-serif; background: #f3eee5; min-height: 100vh; display: flex; flex-direction: column; color: #1f1c18; }
.lang { position: fixed; top: 16px; inset-inline-end: 16px; z-index: 5; background: rgba(255,255,255,.95); color: #1f1c18; border: 1px solid #d8ccb5; padding: 7px 18px; border-radius: 999px; font-weight: 600; font-size: 15px; text-decoration: none; box-shadow: 0 4px 14px rgba(0,0,0,.08); }
.lang:hover { border-color: #a8895a; }
.reg { flex: 1; width: 100%; max-width: 1120px; margin: 0 auto; padding: 72px 20px 10px; display: grid; grid-template-columns: 0.95fr 1.05fr; gap: 26px; align-items: start; }
.intro { position: sticky; top: 28px; color: #1f1c18; background: #fff; border-radius: 26px; padding: 34px 34px 30px; overflow: hidden; border: 1px solid #ebe1cf; border-top: 5px solid #b2956e; box-shadow: 0 14px 44px rgba(31,28,24,.08); }
.intro-logo { width: 200px; height: auto; display: block; }
.eyebrow { color: #9a7b4f; font-weight: 600; font-size: 15px; margin: 22px 0 6px; }
.intro h1 { font-size: 40px; line-height: 1.25; margin: 0 0 12px; color: #1f1c18; font-weight: 700; }
.date { display: inline-block; background: #f7f1e6; border: 1px solid #e2d3b8; color: #6e5634; padding: 6px 15px; border-radius: 999px; font-size: 15px; margin: 0 0 12px; }
.date span { opacity: .75; }
.lead { font-size: 18px; line-height: 1.8; color: #5a5248; margin: 4px 0 0; }
.howto { margin: 26px 0 0; padding: 20px 20px 18px; background: #faf6ef; border: 1px solid #eee3d1; border-radius: 18px; }
.howto-title { margin: 0 0 12px; font-weight: 700; font-size: 16px; color: #2b2722; }
.pass .howto { text-align: start; margin-top: 22px; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 11px; }
.steps li { display: flex; align-items: center; gap: 12px; font-size: 16px; color: #3a342c; }
.steps b { flex: 0 0 32px; height: 32px; border-radius: 50%; background: #b2956e; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; }
.panel .two { align-items: start; }
.hint { display: block; font-weight: 400; font-size: 13px; color: #8a8174; margin-top: 6px; line-height: 1.5; }
.links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 14px 0 0; font-size: 15px; }
.links a { color: #8a6d3f; font-weight: 600; text-decoration: none; border-bottom: 1px dashed #c9a96e; padding-bottom: 1px; }
.links a:hover { color: #5e4a2b; }
.panel select { appearance: none; -webkit-appearance: none; padding-inline-end: 40px; cursor: pointer;
  background: #fdfbf7 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a6d3f' stroke-width='2.4'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat left 14px center; background-size: 16px; }
[dir="ltr"] .panel select { background-position: right 14px center; }
.panel select:invalid { color: #8a8174; }
.panel select:focus { border-color: #a8895a; box-shadow: 0 0 0 4px rgba(168,137,90,.16); background-color: #fff; outline: none; }
.doc { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 72px 20px 10px; }
.doc-logo { width: 120px; height: auto; display: block; margin: 0 0 14px; }
.doc h1 { font-size: 30px; margin: 0 0 4px; }
.terms { margin: 18px 0 0; padding-inline-start: 22px; display: grid; gap: 12px; font-size: 17px; line-height: 1.8; color: #3a342c; }
.terms li::marker { color: #b2956e; font-weight: 700; }
.panel { background: #fff; border-radius: 26px; padding: 34px 32px 28px; border: 1px solid #ebe1cf; box-shadow: 0 14px 44px rgba(31,28,24,.08); }
.panel h2 { font-size: 24px; margin: 0 0 4px; font-weight: 700; }
.panel label { font-weight: 600; font-size: 15px; margin-top: 16px; color: #2b2722; }
.panel input, .panel select { border-radius: 12px; border: 1.5px solid #e4d9c6; padding: 13px 14px; font-size: 16px; background: #fdfbf7; }
.panel input:focus { border-color: #a8895a; box-shadow: 0 0 0 4px rgba(168,137,90,.16); background: #fff; outline: none; }
.panel .check { font-weight: 400; font-size: 15px; color: #4a4339; }
.panel button[type="submit"], .panel #save { width: 100%; margin-top: 20px; padding: 16px; border: 0; border-radius: 14px; font-size: 18px; font-weight: 700; color: #f7e9cb; background: linear-gradient(180deg, #2c2822, #14120f); box-shadow: 0 8px 20px rgba(20,18,15,.22); cursor: pointer; }
.panel button[type="submit"]:hover { filter: brightness(1.12); }
.panel button.ghost { background: #fff; color: #2b2722; border: 1.5px solid #d8ccb5; box-shadow: none; font-weight: 600; }
.alt { text-align: center; margin: 18px 0 0; }
.alt a { color: #8a6d3f; font-weight: 600; text-decoration: none; border-bottom: 1px dashed #c9a96e; padding-bottom: 2px; }
.msg { font-size: 20px; text-align: center; padding: 46px 10px; color: #3a342c; }
.trip { display: flex; justify-content: space-between; align-items: center; padding: 18px; border: 1.5px solid #e4d9c6; border-radius: 16px; margin-bottom: 12px; text-decoration: none; color: inherit; font-size: 18px; }
.trip:hover { border-color: #a8895a; }
.panel .pass { border: 0; text-align: center; padding: 6px 0 0; margin: 0; box-shadow: none; }
.pfoot { text-align: center; padding: 26px 16px 34px; color: #7a6f60; font-size: 14px; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.pfoot a { color: #2e7d32; font-weight: 600; text-decoration: none; }
@media (max-width: 860px) {
  .reg { grid-template-columns: 1fr; padding: 64px 12px 6px; gap: 14px; }
  .intro { position: static; padding: 22px 20px 20px; border-radius: 22px; }
  .intro-logo { width: 160px; }
  .eyebrow { margin-top: 16px; }
  .intro h1 { font-size: 30px; }
  .lead { font-size: 16px; }
  .howto { padding: 16px 16px 14px; margin-top: 22px; }
  .steps { gap: 9px; }
  .steps li { font-size: 15px; }
  .steps b { flex-basis: 28px; height: 28px; font-size: 14px; }
  .doc { padding: 64px 12px 6px; }
  .doc h1 { font-size: 25px; }
  .terms { font-size: 16px; }
  .panel { padding: 24px 18px 22px; border-radius: 22px; }
  .lang { top: 12px; }
}

/* ===== دخول الموظفين ===== */
.auth { flex: 1; width: 100%; max-width: 440px; margin: 0 auto; padding: 48px 16px 10px; }
.auth .panel { text-align: center; }
.auth .panel form, .auth .panel .muted + form { text-align: start; }
.auth-logo { width: 150px; height: auto; display: block; margin: 0 auto 16px; }
.auth h1 { font-size: 26px; margin: 0 0 2px; }
.auth .muted { margin: 0 0 6px; }
.auth-note { font-size: 14px; color: #8a8174; margin: 18px 0 0; }
.auth input[readonly] { background: #f5f1ea; color: #6b6257; }
.bar .row { gap: 8px; align-items: center; }
.bar .logout { width: auto; margin: 0; padding: 10px 14px; }
button.mini { width: auto; margin: 0 4px 0 0; padding: 6px 10px; font-size: 13px; font-weight: 600; }
.linkbox { margin-top: 14px; padding: 14px; border: 1.5px dashed var(--gold); border-radius: 12px; background: var(--gold-soft); }
.linkbox p { margin: 0 0 8px; }
.linkbox .row { margin: 8px 0 0; }
.linkbox .row .btn, .linkbox .row button { margin-top: 0; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0 0; }
.stat { background: var(--gold-soft); border: 1px solid var(--line); border-radius: 12px; padding: 12px; text-align: center; }
.stat span { display: block; font-size: 14px; color: #6b6257; }
.stat b { display: block; font-size: 30px; line-height: 1.2; color: var(--ink); }
.stat small { display: block; font-size: 13px; color: #8a8174; min-height: 18px; }
button.copyreg { margin-top: 10px; }
/* داخل صفحة الرحلة في موقع الجمعية */
body.pub.embed { background: transparent; min-height: 0; }
.embed .reg { display: block; max-width: 680px; padding: 0 0 6px; }
.embed .doc { padding: 0 0 6px; max-width: 680px; }
.embed .panel { box-shadow: none; }
@media (max-width: 860px) { .embed .reg, .embed .doc { padding: 0; } .embed .panel { padding: 24px 18px 22px; border-radius: 18px; } }
/* داخل صفحة الجمعية: بدون شريط تمرير، والنموذج يبان جزء من الصفحة */
html.embed { scrollbar-width: none; }
html.embed::-webkit-scrollbar, html.embed body::-webkit-scrollbar { display: none; width: 0; height: 0; }
/* صفحة الاسترجاع والأحكام والباركود تنزل لتحت (مكان الضغطة) */
.embed.bottom .reg, .embed.bottom .doc { min-height: 100vh; box-sizing: border-box; display: flex; flex-direction: column; justify-content: flex-end; }
.embed.bottom .reg > *, .embed.bottom .doc > * { width: 100%; min-width: 0; box-sizing: border-box; }
/* الشكل الجديد داخل موقع الجمعية (look2): بطاقة البداية المعتمدة + النموذج */
.embed.look2 .reg { display: flex; flex-direction: column; align-items: stretch; gap: 16px; max-width: none; padding: 6px 8px 16px; }
.embed.look2 .intro { position: static; }
.embed.look2 .panel { box-shadow: 0 10px 30px rgba(31,28,24,.07); }
@media (min-width: 500px) {
  .embed.look2 .intro { display: grid; grid-template-columns: auto 1fr; column-gap: 30px; align-items: center; padding: 26px 30px 24px; }
  .embed.look2 .intro-logo { width: 150px; grid-row: 1 / span 4; }
  .embed.look2 .eyebrow { margin: 0 0 4px; }
  .embed.look2 .intro h1 { font-size: 34px; margin: 0 0 6px; }
  .embed.look2 .lead { font-size: 17px; margin: 0; }
  .embed.look2 .steps { grid-template-columns: repeat(3, 1fr); }
}
/* الأحكام والشروط تنفتح في نفس المكان داخل موقع الجمعية */
.linkwrap { position: relative; }
.links .linkbtn, .termsbox .linkbtn { display: inline; width: auto; margin: 0; padding: 0 0 1px; background: none; border: 0; border-bottom: 1px dashed #c9a96e; border-radius: 0; color: #8a6d3f; font: inherit; font-weight: 600; cursor: pointer; }
.termsbox { position: absolute; inset-inline: 0; top: calc(100% + 8px); z-index: 20; background: #fff; border: 1px solid #e4d9c6; border-top: 4px solid #b2956e; border-radius: 16px; box-shadow: 0 14px 40px rgba(31,28,24,.18); padding: 14px 16px 12px; max-height: 360px; overflow: auto; }
.termsbox[hidden] { display: none; }
.termsbox-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.termsbox .terms { margin: 10px 0 0; gap: 8px; font-size: 15px; line-height: 1.7; }
/* خانة المنطقة بالبحث: يكتب حرف وتطلع المناطق اللي تبدأ فيه */
.combo { position: relative; margin-top: 6px; }
.panel .combo .combo-in { margin-top: 0; padding-inline-end: 40px; background: #fdfbf7 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a6d3f' stroke-width='2.4'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat left 14px center; background-size: 16px; }
.panel .combo .combo-in:focus { background-color: #fff; }
[dir="ltr"] .panel .combo .combo-in { background-position: right 14px center; }
.combo-list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none; background: #fff; border: 1.5px solid #e4d9c6; border-radius: 12px; box-shadow: 0 14px 34px rgba(31,28,24,.14); max-height: 264px; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.combo-list[hidden] { display: none; }
.combo-list li { padding: 12px 14px; border-radius: 9px; font-weight: 400; font-size: 16px; line-height: 1.4; color: #2b2722; cursor: pointer; }
.combo-list li.act, .combo-list li:hover { background: #f6efe2; }
.combo-list li[aria-selected="true"] { font-weight: 700; color: #8a6d3f; }
.combo-list li.none { color: #8a8174; cursor: default; background: none; }
@media (pointer: coarse) { .combo-list { max-height: 220px; } }
.panel select[hidden], select[hidden] { display: none !important; }
/* الشكل الجديد: صفحة الباركود و«سجّلت من قبل» ملمومة بدون مسافات، والصفحة تنزل لحالها للباركود (المشرف 2026-11-14) */
.embed.look2.bottom .reg { justify-content: flex-start; min-height: 0; }
/* احتياط: متصفح ما سمح بالتنزيل، فالمحتوى ينزل لمكان الزائر زي قبل */
.embed.look2.bottom.pin-bottom .reg { justify-content: flex-end; min-height: 100vh; }
