@font-face { font-family: Vazirmatn; font-weight: 400; font-display: swap; src: url(../fonts/vazirmatn-arabic-400-normal.woff2) format("woff2"); unicode-range: U+0600-06FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: Vazirmatn; font-weight: 700; font-display: swap; src: url(../fonts/vazirmatn-arabic-700-normal.woff2) format("woff2"); unicode-range: U+0600-06FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: Vazirmatn; font-weight: 900; font-display: swap; src: url(../fonts/vazirmatn-arabic-900-normal.woff2) format("woff2"); unicode-range: U+0600-06FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: Vazirmatn; font-weight: 400; font-display: swap; src: url(../fonts/vazirmatn-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: Vazirmatn; font-weight: 700; font-display: swap; src: url(../fonts/vazirmatn-latin-700-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F; }

:root {
  --red: #d7263d;
  --red-dark: #a51d2f;
  --ink: #1d1d27;
  --muted: #6b6b7b;
  --line: #e5e5ec;
  --bg: #f6f6f9;
  --card: #ffffff;
  --ok: #1f9d55;
  --warn: #c77700;
  --c1: #d7263d;
  --c2: #1b75bb;
  --c3: #f4a300;
  --c4: #2a9d8f;
  --radius: 14px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: Vazirmatn, Tahoma, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  -webkit-text-size-adjust: 100%;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.ltr { direction: ltr; unicode-bidi: isolate; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  border: 1px solid var(--line); background: #fff; border-radius: 10px;
  padding: .55em 1.1em; font-weight: 700; transition: background .15s, opacity .15s;
}
.btn:hover { background: #f1f1f5; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); }
.btn-dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-dark:hover { background: #33333f; }
.btn-ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn-ok:hover { background: #18804a; }
.btn-ghost-danger { color: var(--red); }

.dot { display: inline-block; width: .65em; height: .65em; border-radius: 50%; background: var(--muted); }
.dot.on { background: var(--ok); box-shadow: 0 0 0 3px rgba(31,157,85,.18); }
.dot.off { background: var(--red); }

.banner {
  position: fixed; inset-inline: 0; top: 0; z-index: 50; text-align: center;
  background: var(--warn); color: #fff; padding: .45em 1em; font-weight: 700; font-size: .95rem;
}

/* ------------------------- نمودار و آمار ------------------------- */
.legend { list-style: none; padding: 0; margin: 0; display: grid; gap: .6em; }
.legend li { display: flex; align-items: center; gap: .6em; }
.legend .sw { width: 1.1em; height: 1.1em; border-radius: 4px; flex: none; }
.stats-table { width: 100%; border-collapse: collapse; }
.stats-table th, .stats-table td { padding: .5em .8em; border-bottom: 1px solid var(--line); text-align: right; }
.stats-table th { color: var(--muted); font-weight: 400; }
