@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --red: #9A1322;
  --red-d: #741421;
  --red-l: #B8283A;
  --cream: #F5EEDE;
  --cream-2: #ECE2CB;
  --cream-3: #FBF8F0;
  --ink: #010100;
  --muted: #62594c;
  --line: rgba(1, 1, 0, .13);
  --ok: #2f6b3f;
  --warn: #a15a0b;
  --radius: 16px;
  --shadow: 0 1px 0 rgba(1,1,0,.04), 0 12px 32px -14px rgba(116, 20, 33, .28);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Vazirmatn', system-ui, 'Segoe UI', Tahoma, sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.85;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--red); color: var(--cream); }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* لوگو */
.logo { display: inline-flex; align-items: center; gap: 12px; }
.logo-mark {
  flex: none; display: block; width: 28px; height: 46px;
  background: url('../img/mark.svg') center / contain no-repeat;
}
/* روی زمینهٔ قرمز یا مشکی: نسخهٔ تک‌رنگ کرم */
.side .logo-mark, .login-side .logo-mark, .site-footer .logo-mark, .logo-mark.light {
  background: var(--cream);
  -webkit-mask: url('../img/mark.svg') center / contain no-repeat;
  mask: url('../img/mark.svg') center / contain no-repeat;
}
.logo-text { display: flex; flex-direction: column; line-height: 1.2; }
.logo-text strong { font-weight: 900; font-size: 22px; letter-spacing: -.01em; }
.logo-text small { font-size: 12px; font-weight: 600; color: var(--muted); }

/* دکمه‌ها */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1.5px solid transparent; border-radius: 999px;
  padding: 10px 22px; font-weight: 700; font-size: 15px; cursor: pointer;
  transition: transform .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-red { background: var(--red); color: var(--cream); }
.btn-red:hover { background: var(--red-d); }
.btn-ink { background: var(--ink); color: var(--cream); }
.btn-ink:hover { background: #26231d; }
.btn-line { border-color: var(--ink); background: transparent; }
.btn-line:hover { background: var(--ink); color: var(--cream); }
.btn-cream { background: var(--cream); color: var(--red-d); }
.btn-cream:hover { background: #fff; }
.btn-lg { padding: 14px 30px; font-size: 16px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* فرم‌ها */
.field { display: grid; gap: 6px; }
.field label { font-weight: 700; font-size: 14px; }
.input, .select, .textarea {
  width: 100%; background: var(--cream-3); border: 1.5px solid var(--line);
  border-radius: 12px; padding: 11px 14px; transition: border-color .15s, box-shadow .15s;
}
.textarea { resize: vertical; min-height: 110px; line-height: 1.8; }
.input:hover, .select:hover, .textarea:hover { border-color: rgba(1,1,0,.3); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 4px rgba(154, 19, 34, .14); }
.input[dir="ltr"], .ltr { direction: ltr; text-align: right; }
.hint { font-size: 13px; color: var(--muted); }
.form-msg { min-height: 24px; font-size: 14px; font-weight: 600; }
.form-msg.err { color: var(--red); }
.form-msg.ok { color: var(--ok); }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
