@font-face { font-family: "Vazirmatn"; font-weight: 400; font-display: swap;
  src: url("/static/fonts/Vazirmatn-Regular.woff2") format("woff2"); }
@font-face { font-family: "Vazirmatn"; font-weight: 700; font-display: swap;
  src: url("/static/fonts/Vazirmatn-Bold.woff2") format("woff2"); }

:root {
  --bg: #f4f6fa; --surface: #fff; --ink: #14213d; --muted: #5d6b82; --line: #e1e6ef;
  --brand: #14325c; --brand-ink: #fff; --accent: #e8a317; --danger: #c0392b; --ok: #1e8a52;
  --radius: 14px; --shadow: 0 1px 2px rgba(20, 33, 61, .06), 0 6px 18px rgba(20, 33, 61, .06);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); line-height: 1.7;
  font-family: "Vazirmatn", Tahoma, "Segoe UI", system-ui, sans-serif; font-size: 15px;
}
.wrap { width: min(1280px, 100% - 32px); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
[hidden] { display: none !important; }

.site-header { background: linear-gradient(135deg, #0e2442, var(--brand)); color: var(--brand-ink); }
.header-inner { display: flex; align-items: center; gap: 14px; padding: 16px 0; }
.logo { height: 52px; width: auto; border-radius: 8px; }
.logo-mark { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px;
  background: var(--accent); color: #1b1300; font-weight: 700; font-size: 24px; }
.brand h1 { margin: 0; font-size: clamp(17px, 2.6vw, 22px); line-height: 1.3; }
.brand p { margin: 2px 0 0; font-size: 13px; opacity: .8; }
.header-extra { margin-inline-start: auto; }

.site-footer { margin-top: 48px; background: #0e2442; color: #cfd8e8; padding: 28px 0; font-size: 14px; }
.site-footer strong { color: #fff; font-size: 16px; }
.contact { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 8px 28px; }
.contact span { color: #8fa0bd; margin-inline-end: 4px; }
.site-footer .note { margin: 14px 0 0; color: #8fa0bd; font-size: 13px; }

.btn { font: inherit; cursor: pointer; border: 1px solid transparent; border-radius: 10px; padding: 8px 16px;
  background: var(--brand); color: var(--brand-ink); transition: filter .15s, background .15s; }
.btn:hover { filter: brightness(1.12); }
.btn:disabled { opacity: .5; cursor: not-allowed; filter: none; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { background: #eef1f7; filter: none; }
.btn.accent { background: var(--accent); color: #1b1300; font-weight: 700; }
.btn.danger { background: var(--danger); }
.btn.small { padding: 4px 10px; font-size: 13px; }

input, select, textarea { font: inherit; color: inherit; background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; padding: 9px 12px; max-width: 100%; }
input:focus, select:focus, textarea:focus, .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.only-mobile { display: none; }
@media (max-width: 899px) { .only-mobile { display: inline-block; } }

/* shared by public and admin pages */
.btn.light { color: #fff; border-color: rgba(255,255,255,.35); text-decoration: none; display: inline-block; }
.btn.light:hover { background: rgba(255,255,255,.14); }
.btn.block { display: block; width: 100%; }
.header-extra { margin-inline-start: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; color: #fff; }
.header-extra bdi { font-variant-numeric: tabular-nums; opacity: .9; }
.header-extra > span { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.muted { color: var(--muted); }
.error { color: var(--danger); margin: 0; }
.badge { font-size: 12px; border-radius: 999px; padding: 1px 9px; background: #eef1f7; color: var(--muted); }
.badge.answered, .badge.ok { background: #e3f5ea; color: var(--ok); }
.badge.new, .badge.warn { background: #fff3d6; color: #8a5a00; }
.modal { border: 0; border-radius: 16px; padding: 0; width: min(460px, calc(100% - 24px)); box-shadow: 0 20px 60px rgba(0,0,0,.3); color: var(--ink); }
.modal.wide { width: min(640px, calc(100% - 24px)); }
.modal::backdrop { background: rgba(10, 20, 40, .55); }
.modal form, .modal .modal-body { padding: 22px; display: grid; gap: 12px; }
.modal h3 { margin: 0; }
.modal label { display: grid; gap: 4px; font-size: 14px; color: var(--muted); }
.modal input, .modal select, .modal textarea { width: 100%; color: var(--ink); }
.modal .actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
@media (max-width: 600px) { .header-inner { flex-wrap: wrap; } .header-extra { margin-inline-start: 0; width: 100%; justify-content: flex-start; } }

/* Excel export dialog (public site and admin panel) */
.export-list { display: grid; gap: 4px; max-height: 50vh; overflow: auto; padding: 4px 0; }
.export-list label.check, .modal-body label.check { display: flex; align-items: center; gap: 10px; }
.export-list input[type="checkbox"] { width: 18px; height: 18px; flex: none; }
