@font-face { font-family: "Cairo"; src: url("../fonts/Cairo-Regular.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Cairo"; src: url("../fonts/Cairo-Medium.woff") format("woff"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Cairo"; src: url("../fonts/Cairo-SemiBold.woff") format("woff"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Cairo"; src: url("../fonts/Cairo-Bold.woff") format("woff"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Cairo"; src: url("../fonts/Cairo-ExtraBold.woff") format("woff"); font-weight: 800; font-style: normal; font-display: swap; }

/* ==========================================================================
   بوابة ترشيح اختبار القرآن الكريم السنوي — الأنماط
   ========================================================================== */
:root {
  --bg: #F6F4EC;
  --bg-2: #ECE8DA;
  --ink: #1F2116;
  --ink-2: #3F4232;
  --muted: #747561;
  --line: #E3DFD0;
  --line-2: #CFCAB6;
  --olive: #393C27;      /* لون الغلاف الأساسي */
  --olive-2: #2C2E1E;
  --green: #3D4327;      /* الأزرار والعناصر النشطة */
  --green-2: #4C5432;
  --gold: #B39B5B;       /* خطوط الزخرفة */
  --gold-2: #D8C48A;
  --leaf: #C7D98E;       /* أخضر شعار الوزارة */
  --ok: #2E7D32;
  --red: #B91C1C;
  --amber: #92400E;
  --radius: 12px;
  --sans: "Cairo", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  --serif: "Cairo", system-ui, sans-serif;
  --mono: "Cairo", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body.no-scroll { overflow: hidden; }
::selection { background: rgba(61, 67, 39, .15); color: var(--green); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
code { font-family: var(--mono); background: var(--bg-2); padding: 1px 6px; border-radius: 4px; }

.serif { font-family: var(--serif); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.muted { color: var(--muted); font-weight: 400; }
.small { font-size: .8rem; }
.b { font-weight: 700; }
.green { color: var(--green); }
.center { text-align: center; }
.center > svg, .center > img { margin-inline: auto; }
.hidden { display: none !important; }
.inline { display: inline; margin: 0; }
.mt { margin-top: 16px; }
.mt-sm { margin-top: 10px; }
.mt-lg { margin-top: 32px; }
.req { color: #DC2626; font-style: normal; }

.container { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: 20px; }
.main { flex: 1; }
.page { padding-block: 32px; display: flex; flex-direction: column; gap: 22px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.stack-lg { display: flex; flex-direction: column; gap: 26px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-2.tight { gap: 12px; }
.align-start { align-items: start; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 18px; border-radius: 9px; border: 1px solid transparent;
  font-size: .875rem; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn-sm { padding: 7px 13px; font-size: .78rem; }
.btn-lg { padding: 14px 24px; font-size: 1rem; border-radius: 12px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--green); color: #fff; border-bottom: 2px solid var(--gold); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.btn-primary:hover:not(:disabled) { background: var(--green-2); }
.btn-light { background: #fff; border-color: var(--line-2); color: var(--ink); }
.btn-light:hover:not(:disabled) { background: #FAFAF9; border-color: #A8A29E; }
.btn-muted { background: var(--bg); border-color: var(--line-2); color: var(--ink-2); font-weight: 500; }
.btn-muted:hover { background: #F5F5F4; }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: rgba(0,0,0,.04); }
.btn-danger-ghost { background: transparent; color: var(--muted); }
.btn-danger-ghost:hover { background: #FEF2F2; color: var(--red); }
.icon-btn {
  width: 36px; height: 36px; border-radius: 8px; border: 1px solid transparent; background: transparent;
  cursor: pointer; color: var(--muted); font-size: 1rem;
}
.icon-btn:hover { background: #F5F5F4; color: var(--ink); }
.icon-btn.sm { width: 30px; height: 30px; border-color: var(--line); }
.link { background: none; border: 0; padding: 0; cursor: pointer; font-size: .78rem; font-weight: 500; color: var(--ink-2); }
.link:hover { text-decoration: underline; }
.link.danger { color: var(--red); }

/* ---------- Alerts ---------- */
.alert { padding: 13px 16px; border-radius: 10px; border: 1px solid; font-size: .875rem; }
.alert-success { background: rgba(61,67,39,.05); border-color: rgba(61,67,39,.25); color: var(--green); }
.alert-error { background: #FEF2F2; border-color: #FECACA; color: #991B1B; }
.alert-info { background: #FFFBEB; border-color: #FDE68A; color: #78350F; }
.alert-warning { background: #FFFBEB; border-color: #FCD34D; color: #78350F; }
.flash-wrap { padding-top: 20px; display: flex; flex-direction: column; gap: 10px; }

/* ---------- Header ---------- */
.pattern { background-color: var(--olive); background-image: linear-gradient(rgba(57,60,39,.55), rgba(57,60,39,.55)), url("../img/pattern.jpg"); background-size: auto, 900px auto; background-position: center; }
.topbar { position: sticky; top: 0; z-index: 30; color: #fff; border-bottom: 3px solid var(--gold); box-shadow: 0 2px 10px rgba(0,0,0,.15); }
.topbar-inner { height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand-logo { height: 56px; width: auto; }
.brand-title { height: 44px; width: auto; }
.brand-ministry { height: 52px; width: auto; }
.nav-links { display: flex; gap: 22px; font-size: .9rem; font-weight: 600; color: #E4E2D2; flex: 1; justify-content: center; }
.nav-links a { padding-block: 4px; white-space: nowrap; }
.nav-links a:hover { color: #fff; }
.nav-links a.active { color: var(--gold-2); font-weight: 700; text-decoration: underline; text-underline-offset: 9px; text-decoration-thickness: 2px; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.topbar .btn-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.45); }
.topbar .btn-light:hover { background: rgba(255,255,255,.1); border-color: #fff; }
.user-chip { display: flex; align-items: center; gap: 8px; font-size: .8rem; color: #E4E2D2; }
.user-name { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--gold); color: var(--olive-2); display: inline-flex; align-items: center; justify-content: center; font-size: .78rem; font-weight: 800; }
.mobile-nav { display: none; border-top: 1px solid rgba(255,255,255,.12); padding: 8px 20px; gap: 18px; overflow-x: auto; font-size: .8rem; font-weight: 600; }
.mobile-nav a { white-space: nowrap; color: #E4E2D2; }
.mobile-nav a.active { color: var(--gold-2); font-weight: 700; }

/* ---------- Footer ---------- */
.footer { margin-top: 56px; color: #E4E2D2; border-top: 3px solid var(--gold); }
.footer-inner { padding-block: 28px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; font-size: .8rem; font-weight: 400; }
.footer-logos { display: flex; align-items: center; gap: 14px; }
.footer-logos img { height: 54px; width: auto; }
.footer-text p + p { margin-top: 2px; color: var(--gold-2); }

/* ---------- Landing ---------- */
.hero-band { color: #fff; }
.hero { padding-block: 64px 72px; }
.hero-grid { display: grid; grid-template-columns: 7fr 5fr; gap: 48px; align-items: center; }
.hero-copy { display: flex; flex-direction: column; gap: 26px; }
.hero-calligraphy { width: min(520px, 100%); height: auto; }
.hero-band .meta-line { color: var(--gold-2); font-weight: 600; }
.hero-title { font-size: clamp(1.9rem, 4vw, 3rem); line-height: 1.35; font-weight: 800; max-width: 680px; text-wrap: balance; }
.hero-lead { font-size: 1.08rem; color: #E4E2D2; max-width: 680px; line-height: 1.95; font-weight: 400; }
.hero-lead strong { color: #fff; font-weight: 700; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-band .btn-primary { background: var(--gold); color: var(--olive-2); }
.hero-band .btn-primary:hover { background: var(--gold-2); }
.hero-band .btn-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.hero-band .btn-light:hover { background: rgba(255,255,255,.1); }
.hero-band .btn-ghost { color: var(--gold-2); }
.hero-band .muted { color: #C9C7B4; }
.hero-logos { display: flex; align-items: flex-end; justify-content: center; gap: clamp(16px, 4vw, 44px); }
.hero-logos img { height: auto; filter: drop-shadow(0 8px 18px rgba(0,0,0,.35)); }
.hero-logos .lg-society { width: min(300px, 54%); }
.hero-logos .lg-ministry { width: min(230px, 40%); }
.steps-wrap { padding-block: 8px 48px; }
.steps { margin-top: 48px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.steps h3 { font-size: 1rem; margin-block: 6px; }
.steps p { font-size: .875rem; color: #57534E; }
.step-no { display: inline-flex; width: 34px; height: 34px; border-radius: 50%; align-items: center; justify-content: center; background: var(--olive); color: var(--gold-2); font-size: .85rem; font-weight: 800; }
.band { background: #fff; border-top: 1px solid var(--line); padding-block: 56px; }
.band .section-title { color: var(--olive); }
.section-title { font-size: 1.8rem; font-weight: 800; }
.branch-card { padding: 24px; border: 1px solid var(--line); border-top: 4px solid var(--gold); border-radius: var(--radius); background: var(--bg); display: flex; flex-direction: column; gap: 12px; }
.branch-card h3 { font-size: 1.1rem; }
.rubric-lines { border-top: 1px solid var(--line); padding-top: 10px; font-size: .8rem; color: #57534E; }
.req-grid { margin-top: 36px; padding-top: 32px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 5fr 7fr; gap: 32px; }
.req-item p { font-size: .8rem; color: #57534E; margin-top: 4px; }

/* ---------- Cards & forms ---------- */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card h3 { font-size: 1.02rem; font-weight: 700; color: var(--olive); }
.card-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 14px; }
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; border-bottom: 1px solid var(--line); padding-bottom: 20px; }
.page-title { font-size: 1.6rem; font-weight: 800; color: var(--olive); }

.label, .field > span { display: block; font-size: .78rem; font-weight: 600; color: var(--ink-2); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field input, .field select, .field textarea, .filter-form input, .filter-form select, .reqno-input input {
  width: 100%; padding: 10px 14px; border: 1px solid var(--line-2); border-radius: 9px; background: #fff; font-size: .9rem;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus, .filter-form input:focus, .reqno-input input:focus {
  outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(61,67,39,.12);
}
.has-error input { border-color: #F87171; }
.field-error { font-size: .75rem; color: #B91C1C; }
.form-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 20px; }
.span-3 { grid-column: span 3; } .span-4 { grid-column: span 4; } .span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; } .span-7 { grid-column: span 7; }
.year-field { width: 150px; }
.year-field input { background: var(--bg); font-weight: 600; padding: 6px 12px; }

.reqno-row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px; }
.reqno-input { position: relative; flex: 1; min-width: 240px; }
.reqno-input .hash { position: absolute; right: 14px; top: 9px; color: #A8A29E; font-family: var(--mono); }
.reqno-input input { padding-right: 34px; text-align: left; }
.reqno-input input[readonly] { background: var(--bg); color: var(--ink-2); cursor: not-allowed; }

.branch-option { cursor: pointer; }
.branch-option input { position: absolute; opacity: 0; pointer-events: none; }
.branch-box { display: flex; flex-direction: column; gap: 8px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); transition: all .15s; position: relative; }
.branch-box::after {
  content: ""; position: absolute; left: 18px; top: 20px; width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--line-2);
}
.branch-option:hover .branch-box { border-color: #A8A29E; }
.branch-option input:checked + .branch-box { border-color: var(--green); background: rgba(61,67,39,.04); box-shadow: 0 0 0 1px var(--green); }
.branch-option input:checked + .branch-box::after { background: var(--green); border-color: var(--green); box-shadow: inset 0 0 0 4px #fff; }
.branch-option input:focus-visible + .branch-box { outline: 2px solid var(--green); outline-offset: 2px; }
.branch-title { font-weight: 700; font-size: 1rem; }

.attach-box { display: flex; align-items: flex-start; gap: 16px; border: 1px solid var(--line); border-radius: 10px; padding: 16px; background: var(--bg); }
.photo-frame { border: 2px solid #292524; border-radius: 12px; overflow: hidden; background: #fff; flex-shrink: 0; }
.photo-frame img { width: 100%; height: 100%; object-fit: cover; }
.id-thumb { width: 128px; height: 80px; border-radius: 6px; overflow: hidden; border: 1px solid var(--line-2); background: #fff; padding: 0; cursor: zoom-in; flex-shrink: 0; }
.id-thumb img { width: 100%; height: 100%; object-fit: cover; }
.link-row { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; color: var(--line-2); }
.dropzone, .crop-drop {
  width: 100%; border: 2px dashed var(--line-2); border-radius: 10px; padding: 26px; text-align: center;
  background: var(--bg); cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 6px; transition: all .15s;
}
.dropzone:hover, .dropzone.drag, .crop-drop.drag { border-color: var(--green); background: var(--bg-2); }
.dropzone.has-error { border-color: #FCA5A5; }
.dz-icon { font-size: 1.6rem; color: #A8A29E; }
.submit-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; }

/* ---------- Status ---------- */
.status { font-size: .78rem; font-weight: 600; white-space: nowrap; }
.st-draft { color: #57534E; }
.st-submitted { color: var(--ink-2); }
.st-review { color: var(--amber); }
.st-approved { color: var(--ok); }
.st-revision { color: #991B1B; }
.note-chip { display: inline-block; margin-top: 4px; font-size: .75rem; color: #78350F; background: #FFFBEB; border: 1px solid #FDE68A; border-radius: 6px; padding: 3px 10px; }
.status-line { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ---------- Lists ---------- */
.filter-bar { padding: 14px 16px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px; }
.seg { display: flex; gap: 4px; padding: 4px; background: var(--bg-2); border-radius: 9px; }
.seg a { padding: 6px 12px; font-size: .78rem; font-weight: 500; border-radius: 7px; color: #57534E; }
.seg a.active { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.filter-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filter-form select, .filter-form input { width: auto; padding: 7px 12px; font-size: .8rem; }
.filter-form input[type="search"] { min-width: 240px; background: var(--bg); }
.list { padding: 0; overflow: hidden; }
.list-row { padding: 20px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }
.list-row:hover { background: rgba(249,247,243,.7); }
.list-main { display: flex; gap: 16px; min-width: 0; flex: 1; }
.thumb { width: 48px; height: 64px; border-radius: 6px; border: 1px solid var(--line-2); overflow: hidden; background: #F5F5F4; flex-shrink: 0; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.list-text { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.list-title { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.list-title h3 { font-size: 1rem; }
.list-text .meta-line { color: #57534E; }
.empty { text-align: center; padding: 48px; }
.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; font-size: .78rem; font-weight: 600; }
.stat.active { border-color: var(--green); box-shadow: 0 0 0 1px var(--green); }
.stat-num { font-size: 1.5rem; font-weight: 700; color: var(--ink); }
.admin-list { margin: 0; padding-inline-start: 20px; font-size: .875rem; }
details summary { cursor: pointer; }

/* ---------- Auth ---------- */
.auth-wrap { padding-block: 48px; display: flex; justify-content: center; }
.auth-card { width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 18px; }
.emblem-sm { width: 120px; height: auto; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--bg-2); border-radius: 10px; padding: 4px; }
.tabs a { text-align: center; padding: 8px; border-radius: 8px; font-size: .875rem; font-weight: 600; color: #57534E; }
.tabs a.active { background: #fff; color: var(--green); box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .78rem; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------- Modals ---------- */
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(28,25,23,.6); display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-box { background: #fff; border-radius: var(--radius); width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; box-shadow: 0 20px 40px rgba(0,0,0,.2); }
.modal-xl { max-width: 960px; }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 16px 24px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 1.05rem; }
.modal-body { padding: 24px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 12px; padding: 16px 24px; border-top: 1px solid var(--line); background: var(--bg); }
.modal-foot.flat { padding: 8px 0 0; border: 0; background: none; }
.id-big { max-height: 70vh; width: auto; border-radius: 8px; border: 1px solid var(--line); }

.cropper-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.crop-stage { position: relative; width: 100%; height: 340px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line-2); background: #1C1917; touch-action: none; }
.crop-stage canvas { display: block; cursor: grab; }
.crop-stage canvas:active { cursor: grabbing; }
.crop-drop { height: 340px; justify-content: center; cursor: default; }
.crop-hints { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: .75rem; color: #57534E; }
.crop-hints > span:last-child { display: flex; gap: 12px; align-items: center; }
.criteria { padding: 12px 14px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; font-size: .75rem; }
.criteria-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; color: #57534E; margin-top: 4px; }
.preset-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.preset { padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: .78rem; font-weight: 500; text-align: right; cursor: pointer; }
.preset:hover { border-color: #A8A29E; }
.preset.active { background: var(--olive); border-color: var(--gold); color: #fff; }
.soft-box { padding: 14px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; }
.zoom-row { display: flex; gap: 8px; align-items: center; }
.zoom-row input { flex: 1; }
input[type="range"] { width: 100%; accent-color: var(--green); cursor: pointer; }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 500; cursor: pointer; user-select: none; }
.check input { accent-color: var(--green); width: 16px; height: 16px; }

/* ---------- Print toolbar ---------- */
.toolbar { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.toolbar-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; }
.toolbar-info { display: flex; align-items: center; gap: 12px; }
.toolbar-info h3 { font-size: .9rem; }
.toolbar-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.success-strip { background: rgba(61,67,39,.05); border: 1px solid rgba(61,67,39,.25); border-radius: var(--radius); padding: 16px; color: var(--ink); }
.success-strip .b { color: var(--green); }

/* ==========================================================================
   استمارة الاختبار (A4)
   ========================================================================== */
.sheets { display: flex; flex-direction: column; align-items: center; gap: 24px; }
.sheet {
  width: 100%; max-width: 210mm; background: #fff; color: #000; border: 1px solid var(--line-2);
  box-shadow: 0 1px 3px rgba(0,0,0,.06); padding: 22px 30px; font-family: var(--sans);
}
.ef-head { display: grid; grid-template-columns: 5fr 4fr 3fr; gap: 8px; align-items: start; padding-bottom: 8px; }
.ef-org { text-align: center; padding-top: 4px; }
.ef-org h1 { margin: 0; }
.ef-calligraphy { width: 100%; max-width: 300px; height: auto; margin-inline: auto; }
.ef-city { display: none; }
.ef-small { font-size: 11px; font-weight: 600; margin-top: 2px; }
.ef-small.b { font-weight: 700; }
.ef-emblem { display: flex; justify-content: center; margin-top: -4px; }
.ef-emblem-svg { width: 132px; height: auto; }
.ef-photo-wrap { display: flex; justify-content: flex-end; }
.ef-photo { border: 2px solid #000; border-radius: 16px; overflow: hidden; background: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ef-photo img { width: 100%; height: 100%; object-fit: cover; }
.ef-photo-empty { text-align: center; font-size: 10px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
.ef-title { text-align: center; border-bottom: 2px solid #000; padding-bottom: 6px; margin-bottom: 10px; }
.ef-title h2 { font-size: 18px; font-weight: 700; }
.ef-subtitle { text-align: center; margin-bottom: 6px; }
.ef-subtitle h3 { font-size: 15px; font-weight: 700; }
.ef-box { border: 2px solid #000; border-radius: 12px; overflow: hidden; margin-bottom: 12px; }
.ef-personal { display: flex; }
.ef-vstrip { width: 36px; background: #D9D9D9; border-left: 1.5px solid #000; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ef-vstrip span { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 13px; font-weight: 700; white-space: nowrap; }
.ef-grid { flex: 1; font-size: 12px; }
.ef-grid .r { display: grid; grid-template-columns: repeat(12, 1fr); border-bottom: 1px solid #000; min-height: 27px; text-align: center; }
.ef-grid .r.last { border-bottom: 0; }
.ef-grid .r > div { display: flex; align-items: center; justify-content: center; padding: 4px 6px; font-weight: 500; }
.ef-grid .r-head { background: #D9D9D9; }
.ef-grid .r-head > div { font-weight: 700; }
.ef-grid .r-val { min-height: 30px; }
.ef-grid .big { font-size: 13px; font-weight: 700 !important; }
.ef-grid .lab { background: #D9D9D9; font-weight: 700 !important; }
.ef-grid .bl { border-left: 1px solid #000; }
.ef-grid .b { font-weight: 600 !important; }
.ef-grid .tiny { font-size: 10px; color: #44403C; }
.c1 { grid-column: span 1; } .c2 { grid-column: span 2; } .c3 { grid-column: span 3; }
.c5 { grid-column: span 5; } .c7 { grid-column: span 7; }
.ef-table { width: 100%; border-collapse: collapse; font-size: 11.5px; text-align: center; }
.ef-table th { background: #D9D9D9; font-weight: 700; padding: 6px; border-bottom: 1px solid #000; border-left: 1px solid #000; }
.ef-table td { border-bottom: 1px solid #000; border-left: 1px solid #000; padding: 4px 6px; }
.ef-table .nobl { border-left: 0; }
.ef-table tr.last td { border-bottom: 0; }
.ef-table .qcell { background: #EFEFEF; font-weight: 700; }
.ef-table .lab { background: #D9D9D9; font-weight: 700; padding: 8px; white-space: nowrap; }
.ef-table .rubric { background: #E5E5E5; font-size: 10.5px; font-weight: 600; line-height: 1.7; }
.ef-table .h9 { height: 36px; }
.q-tall { height: 36px; }
.q-short { height: 28px; }
.grades { display: flex; justify-content: space-around; align-items: center; font-weight: 700; font-size: 12px; padding-block: 4px; }
.grades span { display: inline-flex; align-items: center; gap: 5px; }
.oct { width: 16px; height: 16px; }
.ef-committee-head { background: #D9D9D9; border-bottom: 1px solid #000; padding: 6px; text-align: center; font-weight: 700; font-size: 14px; }
.ef-committee { font-size: 12px; }
.ef-committee tr { height: 32px; }
.ef-foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 10px; color: #57534E; padding-inline: 4px; margin-top: -2px; }
.att-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-bottom: 2px solid #000; padding-bottom: 12px; margin-bottom: 20px; }
.att-head h3 { font-size: 18px; }
.att-head p { font-size: 12px; color: #57534E; }
.att-ref { text-align: left; font-size: 12px; }
.att-info { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; padding: 12px; border: 1px solid #000; border-radius: 8px; background: #F5F5F5; font-size: 12px; }
.att-info span { display: block; color: #57534E; }
.att-info b { font-size: 14px; }
.att-img { border: 2px solid #000; border-radius: 12px; padding: 16px; min-height: 380px; display: flex; align-items: center; justify-content: center; }
.att-img img { max-height: 170mm; object-fit: contain; border-radius: 4px; }
.att-note { margin-top: 16px; font-size: 12px; color: #57534E; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero-grid, .req-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 860px) {
  .nav-links { display: none; }
  .brand-ministry { display: none; }
  .brand-title { height: 34px; }
  .brand-logo { height: 44px; }
  .mobile-nav { display: flex; }
  .user-name { display: none; }
  .cropper-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .grid-2, .steps, .criteria-grid { grid-template-columns: 1fr; }
  .form-grid > .field { grid-column: span 12; }
  .stats { grid-template-columns: 1fr 1fr; }
  .card { padding: 18px; }
  .brand-title { height: 28px; }
  .topbar-inner { height: 64px; gap: 10px; }
  .hero-logos .lg-society { width: 46%; }
  .sheets { overflow-x: auto; align-items: stretch; }
  .sheet { min-width: 720px; }
  .filter-form input[type="search"] { min-width: 0; flex: 1; }
}

/* ---------- Print ---------- */
@page { size: A4 portrait; margin: 8mm; }
@media print {
  html, body { background: #fff !important; color: #000 !important; -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; display: block; }
  .no-print, .topbar, .footer { display: none !important; }
  .main, .container, .page { padding: 0 !important; margin: 0 !important; max-width: none !important; display: block; }
  .sheets { display: block; overflow: visible; }
  .sheet { width: 100% !important; max-width: none !important; min-width: 0 !important; margin: 0 !important; padding: 2mm 4mm !important; border: 0 !important; box-shadow: none !important; page-break-inside: avoid; }
  .page-break { break-before: page; page-break-before: always; }
  .exclude-print { display: none !important; }
}
