@font-face{font-family:"MacVazir";src:url(/static/mac/vazirmatn-var.woff2) format("woff2");font-weight:100 900;font-display:swap}
/*
 * سیستم طراحی مشترک مک سیگنال (همه‌ی صفحه‌ها). رنگ‌ها و اندازه‌ها فقط از این توکن‌ها.
 * صفحه‌ی اصلی استایل‌های خاص خودش را جدا دارد (components/home/home.css).
 */
:root {
  --bg: #050d1a;
  --bg-2: #07142a;
  --card: #0a1b33;
  --card-2: #0c2342;
  --line: #16335a;
  --line-2: #22487a;
  --cyan: #22d3ee;
  --cy2: #2a8bff;
  --gold: #f5b942;
  --text: #e8f1ff;
  --mute: #8aa4c8;
  --ok: #34d399;
  --bad: #f87171;
  --warn: #f5b942;
  --radius: 14px;
  --radius-lg: 18px;
  --tap: 44px;
  --shadow: 0 10px 30px #0006;
  --font: "MacVazir", Tahoma, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body {
  margin: 0; min-height: 100vh; background: var(--bg) radial-gradient(900px 500px at 85% -5%, #0b3a66, transparent 60%) no-repeat;
  color: var(--text); font-family: var(--font); line-height: 1.9; overflow-x: hidden;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { max-width: 100%; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
::selection { background: #22d3ee44; }

/* ---------- کمکی ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; right: 12px; top: -60px; background: var(--cyan); color: #03202c; padding: 8px 14px; border-radius: 10px; z-index: 100; font-weight: 700; }
.skip:focus { top: 12px; }
.container { max-width: 1160px; margin: 0 auto; padding-inline: max(20px, env(safe-area-inset-left, 0px)) max(20px, env(safe-area-inset-right, 0px)); }
.mute { color: var(--mute); }
.sm { font-size: 13px; }
.ltr { direction: ltr; unicode-bidi: plaintext; text-align: left; }
.num { font-variant-numeric: tabular-nums; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.between { justify-content: space-between; }
.stack { display: grid; gap: 14px; }

/* ---------- دکمه ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--tap); padding: 8px 22px;
  border-radius: var(--radius); font-weight: 700; border: 1px solid var(--line); background: #0a1b3399; cursor: pointer;
  transition: border-color .2s, box-shadow .2s, background-color .2s, color .2s; white-space: nowrap; text-decoration: none;
}
.btn:hover { border-color: var(--cyan); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.btn-primary { background: linear-gradient(90deg, var(--cy2), var(--cyan)); color: #03202c; border: 0; }
.btn-primary:hover { box-shadow: 0 0 24px #22d3ee55; }
.btn-ghost { background: transparent; }
.btn-danger { border-color: #f8717188; color: var(--bad); }
.btn-danger:hover { border-color: var(--bad); background: #f8717114; }
.btn-ok { border-color: #34d39988; color: var(--ok); }
.btn-sm { min-height: 36px; padding: 2px 14px; font-size: 13.5px; border-radius: 10px; }
.btn-icon { min-width: var(--tap); padding: 0; }
.link { background: none; border: 0; color: var(--cyan); cursor: pointer; padding: 0; min-height: var(--tap); text-decoration: underline; text-underline-offset: 4px; }

/* ---------- کارت و ظرف ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.card h2 { font-size: 20px; line-height: 1.6; margin: 0 0 8px; }
.card h3 { font-size: 17px; margin: 0 0 6px; }
.pill { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: #0a1b33cc; border-radius: 999px; padding: 0 14px; font-size: 12.5px; color: var(--mute); }
.chip { display: inline-flex; align-items: center; border-radius: 999px; padding: 0 12px; font-size: 12.5px; line-height: 1.9; border: 1px solid var(--line); color: var(--mute); white-space: nowrap; }
.chip-ok { color: var(--ok); border-color: #34d39966; background: #34d39911; }
.chip-warn { color: var(--gold); border-color: #f5b94266; background: #f5b94211; }
.chip-bad { color: var(--bad); border-color: #f8717166; background: #f8717111; }
.chip-info { color: var(--cyan); border-color: #22d3ee66; background: #22d3ee11; }
.notice { border: 1px solid #f5b94266; background: #f5b94211; border-radius: var(--radius); padding: 14px 16px; }
.notice-info { border-color: #22d3ee55; background: #22d3ee0d; }

/* ---------- فرم ---------- */
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field > label { font-size: 14px; }
.field .hint { font-size: 12.5px; color: var(--mute); }
.input, .select, .textarea {
  width: 100%; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; min-height: var(--tap);
  transition: border-color .2s, box-shadow .2s;
}
.textarea { min-height: 120px; resize: vertical; line-height: 1.8; }
.select { background-color: var(--bg-2); color: var(--text); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px #22d3ee22; }
.input[dir="ltr"] { text-align: left; }
.field.invalid .input, .field.invalid .select, .field.invalid .textarea { border-color: var(--bad); }
.error { color: var(--bad); font-size: 12.5px; min-height: 1px; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; padding: 6px 0; min-height: var(--tap); }
.check input { width: 22px; height: 22px; margin-top: 4px; accent-color: var(--cyan); flex: none; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.msg { min-height: 1.6em; font-size: 14px; margin: 10px 0 0; }
.msg-err { color: var(--bad); }
.msg-ok { color: var(--ok); }

/* ---------- جدول ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.table { width: 100%; min-width: 640px; border-collapse: collapse; text-align: right; }
.table th, .table td { padding: 11px 12px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: middle; }
.table th { color: var(--mute); font-weight: 700; white-space: nowrap; background: #07142a; position: sticky; top: 0; }
.table tbody tr:hover { background: #0c234266; }
.table tbody tr:last-child td { border-bottom: 0; }

/* ---------- دیالوگ ---------- */
dialog.modal { background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; width: min(640px, 92vw); max-height: 88vh; overflow: auto; overscroll-behavior: contain; }
dialog.modal::backdrop { background: #030a15cc; backdrop-filter: blur(4px); }

/* ---------- لوگو ---------- */
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; direction: ltr; color: var(--text); min-height: var(--tap); }

@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
  .card { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
