/* اجزای مشترک صفحه‌های عمومی و پنل مدیریت — بر پایهٔ توکن‌های طراحی اصلی (style.css) */
html { background: var(--background); color: var(--foreground); }
body { background: var(--background); color: var(--foreground); min-height: 100dvh; }
[hidden] { display: none !important; }
::selection { background: color-mix(in oklab, var(--primary) 35%, transparent); }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.rh-num { font-variant-numeric: tabular-nums; }
.rh-muted { color: var(--muted-foreground); }
.rh-ok { color: var(--primary); }
.rh-warn { color: var(--warning); }
.rh-down { color: var(--destructive); }
.rh-ltr { direction: ltr; unicode-bidi: plaintext; text-align: left; }

/* ───── فرم‌ها ───── */
.rh-input, .rh-select, .rh-textarea {
  width: 100%; min-height: 2.75rem; padding: .55rem 1rem; border-radius: .9rem;
  border: 1px solid var(--input); background: color-mix(in oklab, var(--surface) 70%, transparent);
  color: var(--foreground); font-size: .875rem; outline: none; transition: border-color .15s, box-shadow .15s;
}
.rh-textarea { min-height: 6rem; resize: vertical; line-height: 1.7; }
.rh-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%238b97ad' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-position: .95rem 50%; background-size: 12px 8px; background-repeat: no-repeat; padding-inline-start: 2.4rem; }
.rh-input:focus, .rh-select:focus, .rh-textarea:focus { border-color: color-mix(in oklab, var(--primary) 55%, transparent); box-shadow: 0 0 0 3px color-mix(in oklab, var(--primary) 18%, transparent); }
.rh-input::placeholder, .rh-textarea::placeholder { color: var(--muted-foreground); opacity: .7; }
.rh-input[type=color] { padding: .25rem; min-height: 2.75rem; cursor: pointer; }
.rh-input[type=checkbox] { width: 1.1rem; min-height: 1.1rem; height: 1.1rem; accent-color: var(--primary); }
.rh-label { display: block; font-size: .78rem; color: var(--muted-foreground); margin-bottom: .35rem; font-weight: 600; }
.rh-hint { font-size: .72rem; color: var(--muted-foreground); margin-top: .3rem; line-height: 1.6; }
.rh-row { display: flex; gap: .75rem; flex-wrap: wrap; align-items: stretch; }
.rh-row > .rh-input { flex: 1 1 18rem; }
.rh-error { color: var(--destructive); font-size: .8rem; }

/* ───── دکمه‌ها ───── */
.rh-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 2.75rem;
  padding: .5rem 1.4rem; border-radius: 999px; font-weight: 700; font-size: .875rem; cursor: pointer;
  border: 1px solid var(--border); background: color-mix(in oklab, var(--surface-raised) 80%, transparent);
  color: var(--foreground); transition: transform .1s, border-color .15s, background .15s, opacity .15s; white-space: nowrap;
}
.rh-btn:hover { border-color: color-mix(in oklab, var(--primary) 45%, transparent); }
.rh-btn:active { transform: translateY(1px); }
.rh-btn[disabled] { opacity: .55; cursor: not-allowed; }
.rh-btn-primary { background-image: var(--gradient-signal); color: var(--primary-foreground); border-color: transparent; box-shadow: 0 0 30px -10px var(--primary); }
.rh-btn-danger { color: var(--destructive); border-color: color-mix(in oklab, var(--destructive) 40%, transparent); background: color-mix(in oklab, var(--destructive) 10%, transparent); }
.rh-btn-sm { min-height: 2.1rem; padding: .25rem .9rem; font-size: .78rem; }
.rh-spin { width: 1rem; height: 1rem; border-radius: 50%; border: 2px solid currentColor; border-top-color: transparent; animation: rh-rot .7s linear infinite; }
@keyframes rh-rot { to { transform: rotate(360deg); } }

/* ───── چیپ‌ها و نشان‌ها ───── */
.rh-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.rh-chip {
  min-height: 2rem; padding: .2rem .8rem; border-radius: 999px; font-size: .78rem; font-weight: 600; cursor: pointer;
  border: 1px solid var(--border); background: color-mix(in oklab, var(--background) 50%, transparent); color: var(--muted-foreground);
  font-variant-numeric: tabular-nums; direction: ltr; transition: all .12s;
}
.rh-chip:hover { color: var(--foreground); }
.rh-chip[aria-pressed=true] { color: var(--primary); border-color: color-mix(in oklab, var(--primary) 40%, transparent); background: color-mix(in oklab, var(--primary) 12%, transparent); }
.rh-badge { display: inline-flex; align-items: center; gap: .35rem; padding: .15rem .65rem; border-radius: 999px; font-size: .72rem; font-weight: 700; border: 1px solid var(--border); white-space: nowrap; }
.rh-badge.ok { color: var(--primary); border-color: color-mix(in oklab, var(--primary) 30%, transparent); background: color-mix(in oklab, var(--primary) 10%, transparent); }
.rh-badge.warn { color: var(--warning); border-color: color-mix(in oklab, var(--warning) 30%, transparent); background: color-mix(in oklab, var(--warning) 10%, transparent); }
.rh-badge.down { color: var(--destructive); border-color: color-mix(in oklab, var(--destructive) 30%, transparent); background: color-mix(in oklab, var(--destructive) 10%, transparent); }
.rh-badge.muted { color: var(--muted-foreground); background: color-mix(in oklab, var(--muted) 60%, transparent); }
.rh-dot { width: .5rem; height: .5rem; border-radius: 50%; display: inline-block; flex: none; background: var(--muted-foreground); }
.rh-dot.ok { background: var(--primary); } .rh-dot.warn { background: var(--warning); } .rh-dot.down { background: var(--destructive); }

/* ───── جدول ───── */
.rh-table-wrap { overflow-x: auto; border-radius: 1rem; border: 1px solid var(--border); }
.rh-table { width: 100%; border-collapse: collapse; font-size: .84rem; }
.rh-table th { text-align: start; padding: .7rem .9rem; font-size: .72rem; color: var(--muted-foreground); font-weight: 700; background: color-mix(in oklab, var(--background) 45%, transparent); white-space: nowrap; }
.rh-table td { padding: .7rem .9rem; border-top: 1px solid var(--border); vertical-align: middle; }
.rh-table tbody tr:hover td { background: color-mix(in oklab, var(--primary) 4%, transparent); }
.rh-empty { padding: 2rem 1rem; text-align: center; color: var(--muted-foreground); font-size: .85rem; }

/* ───── راهنمای شناور / پاپ‌اور ───── */
.rh-tip {
  position: fixed; z-index: 80; pointer-events: none; max-width: 18rem; padding: .5rem .75rem; border-radius: .75rem; font-size: .75rem; line-height: 1.7;
  background: color-mix(in oklab, var(--surface-raised) 94%, black); border: 1px solid var(--border); box-shadow: 0 10px 30px -8px #000a;
}
.rh-pop {
  position: absolute; z-index: 60; top: calc(100% + .6rem); inset-inline-end: 0; width: min(22rem, 90vw); padding: .75rem; border-radius: 1.25rem;
  background: color-mix(in oklab, var(--surface-raised) 96%, black); border: 1px solid var(--border); box-shadow: 0 20px 50px -12px #000c;
}
.rh-pop li { display: flex; gap: .6rem; align-items: center; padding: .55rem .4rem; border-top: 1px solid var(--border); font-size: .8rem; }
.rh-pop li:first-child { border-top: 0; }

/* ───── داشبورد ───── */
.pin-hit::after { content: ""; position: absolute; inset: -9px; border-radius: 50%; border: 2px solid var(--foreground); animation: rh-pulse 1.1s ease-out infinite; }
@keyframes rh-pulse { from { transform: scale(.6); opacity: 1; } to { transform: scale(1.5); opacity: 0; } }
.rh-pin { cursor: default; }
.chart-empty { position: absolute; inset: 0 0 1.75rem; display: grid; place-items: center; font-size: .8rem; color: var(--muted-foreground); pointer-events: none; }
.rh-skel { position: relative; overflow: hidden; background: color-mix(in oklab, var(--muted) 70%, transparent); border-radius: .5rem; }
.rh-skel::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, color-mix(in oklab, white 8%, transparent), transparent); animation: rh-shimmer 1.4s infinite; }
@keyframes rh-shimmer { to { transform: translateX(100%); } }
.rh-stale { color: var(--warning) !important; }
.rh-offline { color: var(--destructive) !important; }
.heat-cell { cursor: pointer; }
.heat-cell:hover, .heat-cell:focus-visible { background-color: color-mix(in oklab, var(--foreground) 22%, transparent) !important; }

/* ───── سرور چک ───── */
.rh-verdict { display: flex; gap: 1rem; align-items: center; padding: 1.25rem 1.5rem; border-radius: 1.5rem; border: 1px solid var(--border); }
.rh-verdict.up { background: color-mix(in oklab, var(--primary) 10%, transparent); border-color: color-mix(in oklab, var(--primary) 30%, transparent); }
.rh-verdict.partial { background: color-mix(in oklab, var(--warning) 10%, transparent); border-color: color-mix(in oklab, var(--warning) 30%, transparent); }
.rh-verdict.down, .rh-verdict.dns_fail { background: color-mix(in oklab, var(--destructive) 10%, transparent); border-color: color-mix(in oklab, var(--destructive) 30%, transparent); }
.rh-verdict .ico { width: 3rem; height: 3rem; border-radius: 50%; display: grid; place-items: center; flex: none; }
.rh-verdict.up .ico { background: var(--primary); color: var(--primary-foreground); }
.rh-verdict.partial .ico { background: var(--warning); color: var(--primary-foreground); }
.rh-verdict.down .ico, .rh-verdict.dns_fail .ico { background: var(--destructive); color: var(--destructive-foreground); }
.rh-kv { display: grid; grid-template-columns: max-content 1fr; gap: .55rem 1.25rem; font-size: .85rem; }
.rh-kv dt { color: var(--muted-foreground); }
.rh-kv dd { min-width: 0; overflow-wrap: anywhere; }
.rh-bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 1.4rem; direction: ltr; }
.rh-bars i { width: 5px; border-radius: 2px; background: var(--primary); min-height: 3px; }
.rh-bars i.x { background: var(--destructive); height: 3px !important; }
.rh-grid2 { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }

/* ───── دانلود اپ ───── */
.rh-dl { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.25rem; border-radius: 1.25rem; border: 1px solid var(--border); background: color-mix(in oklab, var(--surface) 70%, transparent); transition: border-color .15s, transform .15s; }
.rh-dl:hover { border-color: color-mix(in oklab, var(--primary) 45%, transparent); transform: translateY(-2px); }

@media (prefers-reduced-motion: reduce) { *, ::before, ::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; } }

/* ───── ابزارک‌های کمبود در style.css (Tailwind فقط کلاس‌های صفحهٔ اول را ساخته بود) ───── */
.p-6 { padding: calc(var(--spacing) * 6); }
.mb-3 { margin-bottom: calc(var(--spacing) * 3); }
.mt-6 { margin-top: calc(var(--spacing) * 6); }
.min-h-11 { min-height: calc(var(--spacing) * 11); }
.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }
.font-normal { font-weight: 400; }
.space-y-6 > :not(:last-child) { margin-block-end: calc(var(--spacing) * 6); }
@media (min-width: 40rem) { .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 48rem) { .md\:p-8 { padding: calc(var(--spacing) * 8); } }
@media (min-width: 80rem) { .xl\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 96rem) { .\32xl\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ───── منوی کناری: هیچ‌وقت از باکس بیرون نزند ───── */
aside.sticky { overflow-y: auto; overflow-x: hidden; scrollbar-width: none; min-height: 0; justify-content: flex-start; }
aside.sticky::-webkit-scrollbar { display: none; }
aside.sticky > a { flex-shrink: 0; }
@media (max-height: 860px) {
  aside.sticky { padding-block: .5rem; gap: .25rem; }
  aside.sticky > a { padding-block: .55rem; gap: .25rem; }
}

/* ───── انتخاب روز و ساعت در «پایش اتصال سرور به سایت‌ها» ───── */
.heat-controls { margin-top: .9rem; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.heat-group { display: inline-flex; align-items: center; gap: .25rem; padding: .2rem; border: 1px solid var(--border); border-radius: 9999px; background: color-mix(in oklab, var(--background) 50%, transparent); }
.heat-btn { height: 1.9rem; min-width: 1.9rem; padding: 0 .75rem; border-radius: 9999px; border: 1px solid transparent; background: transparent; font-size: .75rem; font-weight: 600; color: var(--muted-foreground); cursor: pointer; transition: background .15s, color .15s, opacity .15s; }
.heat-controls > .heat-btn { border-color: var(--border); background: color-mix(in oklab, var(--background) 50%, transparent); height: 2.4rem; padding-inline: 1rem; }
.heat-btn:hover:not(:disabled) { background: color-mix(in oklab, var(--primary) 12%, transparent); color: var(--primary); }
.heat-btn:disabled { opacity: .3; cursor: not-allowed; }
#heat-prev, #heat-next { padding: 0; font-size: 1.1rem; line-height: 1; }
.dd { position: relative; }
.dd-btn { display: inline-flex; align-items: center; gap: .35rem; height: 1.9rem; padding: 0 .65rem; border-radius: 9999px; border: 0; background: transparent; font-size: .78rem; font-weight: 600; color: var(--foreground); cursor: pointer; white-space: nowrap; transition: background .15s; }
.dd-btn:hover, .dd-btn[aria-expanded="true"] { background: color-mix(in oklab, var(--foreground) 8%, transparent); }
.dd-chev { display: inline-flex; color: var(--muted-foreground); transition: transform .15s; }
.dd-btn[aria-expanded="true"] .dd-chev { transform: rotate(180deg); }
.dd-list { position: absolute; z-index: 40; top: calc(100% + .4rem); inset-inline-start: 0; min-width: max(100%, 6.5rem); max-height: 15rem; overflow-y: auto; margin: 0; padding: .3rem; list-style: none; border: 1px solid var(--border); border-radius: .8rem; background: var(--surface-raised); box-shadow: 0 18px 40px -12px oklch(0% 0 0 / .75); scrollbar-width: thin; scrollbar-color: var(--muted) transparent; }
.dd-up .dd-list { top: auto; bottom: calc(100% + .4rem); }
.dd-opt { padding: .38rem .7rem; border-radius: .55rem; font-size: .78rem; cursor: pointer; white-space: nowrap; font-variant-numeric: tabular-nums; }
.dd-opt:hover, .dd-opt.is-act { background: color-mix(in oklab, var(--foreground) 9%, transparent); }
.dd-opt.is-sel { color: var(--primary); font-weight: 700; background: color-mix(in oklab, var(--primary) 12%, transparent); }
.heat-detail { margin-top: 1rem; border: 1px solid var(--border); border-radius: .9rem; padding: 1rem 1.25rem; background: color-mix(in oklab, var(--background) 40%, transparent); }
.heat-detail-title { font-size: .85rem; font-weight: 700; margin-bottom: .6rem; }
.heat-row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; padding-block: .5rem; border-top: 1px solid var(--border); }
.heat-time { min-width: 8.5rem; font-size: .75rem; color: var(--muted-foreground); font-variant-numeric: tabular-nums; }
.heat-pills { display: flex; flex-wrap: wrap; gap: .4rem; }
.heat-pill { display: inline-flex; align-items: center; gap: .4rem; padding: .2rem .65rem; border-radius: 9999px; border: 1px solid var(--border); font-size: .72rem; }
.heat-pill i { width: .55rem; height: .55rem; border-radius: 3px; display: inline-block; }
.heat-pill b { font-weight: 600; color: var(--primary); }
.heat-pill-bad { border-color: color-mix(in oklab, var(--warning) 45%, transparent); background: color-mix(in oklab, var(--warning) 10%, transparent); }
.heat-pill-bad b { color: var(--warning); }

/* ───── چک هاست ───── */
.hc-tabs { display: flex; flex-wrap: wrap; gap: .4rem; padding: .25rem; width: fit-content; max-width: 100%; border: 1px solid var(--border); border-radius: 9999px; background: color-mix(in oklab, var(--background) 50%, transparent); }
.hc-tabs button { min-height: 2.2rem; padding: 0 1.1rem; border-radius: 9999px; border: 1px solid transparent; background: transparent; color: var(--muted-foreground); font-size: .85rem; font-weight: 600; cursor: pointer; transition: color .15s, background .15s; }
.hc-tabs button:hover { color: var(--foreground); }
.hc-tabs button.is-on { color: var(--primary); border-color: color-mix(in oklab, var(--primary) 35%, transparent); background: color-mix(in oklab, var(--primary) 12%, transparent); }
.hc-opts { display: flex; align-items: center; gap: .75rem; }
.hc-opts .rh-label { margin: 0; }
.hc-small { width: auto; min-width: 7rem; }
#hc-info-strip { font-size: .85rem; }
#hc-info-strip > span { display: inline-flex; align-items: center; gap: .35rem; }
.hc-pill { padding: .1rem .6rem; border-radius: .5rem; background: color-mix(in oklab, var(--foreground) 9%, transparent); font-weight: 600; }
.hc-org { padding: .3rem .8rem; border-radius: .6rem; background: color-mix(in oklab, var(--primary) 14%, transparent); color: var(--primary); font-weight: 600; font-size: .8rem; }
.hc-flag { font-size: 1.05rem; line-height: 1; }
.hc-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1rem; }
.hc-links { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; font-size: .8rem; }
.hc-perma { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.hc-summary { display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; margin-bottom: .9rem; font-size: .8rem; color: var(--muted-foreground); }
.hc-summary b { color: var(--foreground); }
.hc-wait { display: inline-flex; align-items: center; gap: .5rem; color: var(--muted-foreground); font-size: .8rem; }
.hc-loc { display: inline-flex; align-items: center; gap: .5rem; font-weight: 600; white-space: nowrap; }
.hc-table td, .hc-table th { white-space: nowrap; }
.hc-sortable { cursor: pointer; user-select: none; }
.hc-sortable:hover { color: var(--foreground); }
.hc-arrow { color: var(--primary); }
.hc-tag { margin-inline-start: .5rem; padding: .05rem .4rem; border-radius: .35rem; font-size: .62rem; font-weight: 700; color: var(--muted-foreground); background: color-mix(in oklab, var(--muted) 70%, transparent); }
.hc-rec { display: flex; flex-direction: column; gap: .15rem; white-space: normal; overflow-wrap: anywhere; }
.hc-loc-hint { margin-inline-start: .4rem; max-width: 12rem; overflow: hidden; text-overflow: ellipsis; display: inline-block; vertical-align: bottom; opacity: .8; direction: ltr; }
.rh-down { color: var(--destructive); font-weight: 600; }

.hc-nodename { font-weight: 400; font-size: .72rem; }

/* ───── چیدمان آزاد باکس‌ها (شبکهٔ ۱۲ ستونه؛ ستون‌ها از «ظاهر سایت» در پنل تعیین می‌شوند) ───── */
.blk-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1.25rem; align-items: stretch; }
.blk-grid > * { margin: 0 !important; grid-column: span 12; min-width: 0; }
@media (min-width: 48rem) { .blk-grid > .blk { grid-column: span var(--sm, 12); } }
@media (min-width: 80rem) { .blk-grid > .blk { grid-column: span var(--sx, 12); } }
@media (min-width: 96rem) { .blk-grid > .blk { grid-column: span var(--s, 12); } }
[data-block][hidden] { display: none !important; }

/* باکس‌های سفارشی */
.rh-blk-p { margin: 0; }
.rh-blk-p + .rh-blk-p { margin-top: .5rem; }
.rh-blk-gap { min-height: .5rem; }
.rh-blk-link { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.rh-blk-accent { border-color: color-mix(in oklab, var(--primary) 40%, transparent); background: linear-gradient(135deg, color-mix(in oklab, var(--primary) 12%, var(--surface)), var(--surface)); }
.rh-blk-warning { border-color: color-mix(in oklab, var(--warning) 45%, transparent); background: linear-gradient(135deg, color-mix(in oklab, var(--warning) 12%, var(--surface)), var(--surface)); }
.rh-blk-info { border-style: dashed; }

/* منوی بالا (پویا) */
.rh-topnav { display: flex; align-items: center; gap: .25rem; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.rh-topnav::-webkit-scrollbar { display: none; }
.rh-topnav-link { white-space: nowrap; flex-shrink: 0; }
@media (min-width: 64rem) { .rh-topnav { flex-shrink: 0; overflow: visible; } }
#top-nav ~ * { min-width: 0; }
@media (max-width: 39.99rem) { .rh-topnav-label { display: none; } .rh-topnav-link { padding-inline: .6rem; } }
.rh-sidenav-link span:not(.absolute) { max-width: 4.6rem; overflow-wrap: anywhere; }

/* ───────── وضعیت اینترنت همراه ───────── */
.mob-ico { display: inline-grid; place-items: center; width: 1.25rem; height: 1.25rem; color: var(--primary); }
.mob-ico svg { width: 1.25rem; height: 1.25rem; }
.mob-ops { display: grid; grid-template-columns: repeat(auto-fill, minmax(14.5rem, 1fr)); gap: .75rem; margin-top: 1rem; }
.mob-card { border: 1px solid var(--border); background: var(--surface); border-radius: 1rem; padding: .95rem 1rem; display: flex; flex-direction: column; gap: .6rem; }
.mob-card-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.mob-name { font-weight: 700; font-size: .95rem; }
.mob-pill { border-radius: 999px; border: 1px solid; padding: .15rem .65rem; font-size: .72rem; font-weight: 700; white-space: nowrap; }
.mob-main { display: flex; align-items: flex-end; justify-content: space-between; gap: .75rem; }
.mob-ratio { font-size: 1.7rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.mob-ratio small { font-size: .8rem; font-weight: 600; color: var(--muted-foreground); margin-inline-start: .15rem; }
.mob-spark { width: 5.5rem; height: 2rem; flex-shrink: 0; }
.mob-meta { display: flex; justify-content: space-between; gap: .5rem; font-size: .72rem; color: var(--muted-foreground); font-variant-numeric: tabular-nums; }
.mob-empty { grid-column: 1 / -1; border: 1px dashed var(--border); border-radius: 1rem; padding: 1.4rem 1rem; text-align: center; font-size: .82rem; line-height: 2; color: var(--muted-foreground); }
.mob-matrix { width: 100%; min-width: 30rem; border-collapse: separate; border-spacing: 0 .3rem; font-size: .78rem; }
.mob-matrix th { font-weight: 600; color: var(--muted-foreground); padding: .2rem .5rem; text-align: center; white-space: nowrap; }
.mob-matrix th:first-child, .mob-matrix td:first-child { text-align: start; }
.mob-matrix td { padding: .3rem .5rem; text-align: center; background: var(--surface); }
.mob-matrix td:first-child { border-radius: 0 .6rem .6rem 0; font-weight: 600; max-width: 12rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mob-matrix td:last-child { border-radius: .6rem 0 0 .6rem; }
.mob-cell { display: inline-flex; align-items: center; gap: .35rem; font-variant-numeric: tabular-nums; }
.mob-cell i { width: .5rem; height: .5rem; border-radius: 50%; display: inline-block; }
.mob-cell span { color: var(--muted-foreground); font-size: .7rem; }

/* ───────── پایش سایت‌ها: یک نمودار برای هر سرور ───────── */
.vt-list { display: flex; flex-direction: column; gap: .55rem; }
.vt-row { display: grid; grid-template-columns: minmax(0, 1fr) 9.5rem; gap: .75rem; align-items: stretch; }
.vt-grid { display: grid; gap: 2px; height: 3.9rem; }
.vt-label { display: flex; flex-direction: column; justify-content: center; gap: .1rem; min-width: 0; font-size: .7rem; line-height: 1.4; color: var(--muted-foreground); }
.vt-label b { color: var(--foreground); font-size: .82rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vt-label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vt-axis { margin-right: calc(9.5rem + .75rem); }

/* ───────── تست سرعت ───────── */
.st-ico { display: inline-grid; place-items: center; color: var(--primary); }
.st-ico svg { width: 1.4rem; height: 1.4rem; }
.st-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 1.5rem; margin-top: 1.4rem; align-items: start; }
@media (max-width: 820px) { .st-layout { grid-template-columns: 1fr; } }
.st-stage { display: flex; flex-direction: column; align-items: center; gap: .9rem; border: 1px solid var(--border); background: var(--surface); border-radius: 1.25rem; padding: 1.2rem 1rem 1.4rem; }
.st-gauge { width: min(100%, 22rem); }
.st-svg { width: 100%; height: auto; display: block; direction: ltr; }
.st-track, .st-prog { fill: none; stroke-width: 11; stroke-linecap: round; }
.st-track { stroke: color-mix(in oklab, var(--muted-foreground) 22%, transparent); }
.st-prog { stroke: var(--primary); transition: stroke-dasharray .2s linear; filter: drop-shadow(0 0 6px color-mix(in oklab, currentColor 40%, transparent)); }
.st-val { font-size: 38px; font-weight: 800; fill: var(--foreground); font-family: inherit; }
.st-unit { font-size: 11px; fill: var(--muted-foreground); font-family: inherit; }
.st-lab { font-size: 11px; fill: var(--muted-foreground); font-family: inherit; }
.st-go { min-width: 11rem; border-radius: 999px; border: 0; padding: .8rem 2rem; font: inherit; font-weight: 800; font-size: 1rem; cursor: pointer; color: var(--primary-foreground); background-image: var(--gradient-signal); box-shadow: 0 0 28px -8px var(--primary); transition: transform .15s, opacity .15s; }
.st-go:hover:not(:disabled) { transform: translateY(-1px); }
.st-go:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.st-go.stop { background: var(--destructive); background-image: none; color: #fff; box-shadow: none; }
.st-note { margin: 0; min-height: 1.2rem; font-size: .78rem; color: var(--warning); text-align: center; }
.st-h { margin: 0 0 .7rem; font-size: .95rem; font-weight: 700; }
.st-list { display: flex; flex-direction: column; gap: .5rem; max-height: 26rem; overflow-y: auto; padding-inline-end: .15rem; }
.st-srv { display: flex; align-items: center; justify-content: space-between; gap: .75rem; text-align: start; width: 100%; font: inherit; color: inherit; cursor: pointer; border: 1px solid var(--border); background: var(--surface); border-radius: .9rem; padding: .7rem .9rem; transition: border-color .15s, background .15s; }
.st-srv:hover:not(:disabled) { border-color: color-mix(in oklab, var(--primary) 45%, var(--border)); }
.st-srv.on { border-color: var(--primary); background: color-mix(in oklab, var(--primary) 9%, var(--surface)); }
.st-srv:disabled { opacity: .55; cursor: not-allowed; }
.st-srv-main { display: flex; flex-direction: column; min-width: 0; gap: .1rem; }
.st-srv-main b { font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-srv-main span { font-size: .72rem; color: var(--muted-foreground); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-srv-ping { font-size: .78rem; font-variant-numeric: tabular-nums; color: var(--primary); white-space: nowrap; direction: ltr; }
.st-srv-ping.bad { color: var(--destructive); direction: rtl; }
.st-empty { margin: 0; font-size: .82rem; color: var(--muted-foreground); line-height: 2; }
.st-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: .75rem; }
.st-card { border: 1px solid var(--border); background: var(--surface); border-radius: 1rem; padding: .8rem 1rem; display: flex; flex-direction: column; gap: .3rem; }
.st-card-l { font-size: .75rem; color: var(--muted-foreground); }
.st-card b { font-size: 1.6rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.st-card small { font-size: .75rem; font-weight: 600; color: var(--muted-foreground); }
.st-card-note { grid-column: 1 / -1; margin: 0; font-size: .75rem; color: var(--muted-foreground); }
.st-history { display: flex; flex-direction: column; }
.st-hrow { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr) repeat(3, 5.2rem); gap: .6rem; align-items: center; padding: .55rem 0; border-top: 1px solid var(--border); font-size: .8rem; font-variant-numeric: tabular-nums; }
.st-hrow:first-child { border-top: 0; }
.st-hsrv { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted-foreground); }
.st-hnum { direction: ltr; text-align: end; font-weight: 700; }
.st-hdate { color: var(--muted-foreground); }
.st-clear { align-self: flex-start; margin-top: .6rem; background: none; border: 0; color: var(--muted-foreground); text-decoration: underline; font: inherit; font-size: .75rem; cursor: pointer; padding: .2rem 0; }
@media (max-width: 640px) { .st-hrow { grid-template-columns: 1fr repeat(3, auto); } .st-hdate, .st-hsrv { grid-column: 1 / -1; } }

/* ───────── آنلاین‌ها ───────── */
.on-wrap { position: relative; }
.on-chip { display: inline-flex; align-items: center; gap: .4rem; height: 2.5rem; padding: 0 .85rem; border-radius: 999px; border: 1px solid var(--border); background: color-mix(in oklab, var(--surface) 70%, transparent); color: var(--foreground); font: inherit; font-size: .78rem; font-weight: 700; cursor: pointer; }
.on-chip:hover { border-color: color-mix(in oklab, var(--primary) 45%, transparent); }
.on-chip[hidden] { display: none; }
.on-dot { width: .5rem; height: .5rem; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 0 var(--primary); animation: on-ping 2s infinite; }
@keyframes on-ping { 70% { box-shadow: 0 0 0 .4rem transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.on-n { font-variant-numeric: tabular-nums; }
.on-l { color: var(--muted-foreground); font-weight: 500; }
@media (max-width: 40rem) { .on-l { display: none; } }
.on-pop { position: absolute; top: calc(100% + .5rem); inset-inline-end: 0; z-index: 50; width: 15rem; padding: .8rem; border-radius: 1rem; border: 1px solid var(--border); background: var(--surface-raised); box-shadow: 0 18px 40px -16px #000a; }
.on-pop[hidden] { display: none; }
.on-pop-h { font-size: .8rem; font-weight: 800; margin-bottom: .5rem; }
.on-pop-f { margin-top: .5rem; font-size: .68rem; color: var(--muted-foreground); }
.on-row { display: flex; justify-content: space-between; padding: .3rem .4rem; border-radius: .5rem; font-size: .8rem; color: var(--muted-foreground); }
.on-row b { color: var(--foreground); font-variant-numeric: tabular-nums; }
.on-row.me { background: color-mix(in oklab, var(--primary) 12%, transparent); color: var(--foreground); }

/* ───────── اسلایدر تبلیغات ───────── */
.ad-slider { position: relative; margin-bottom: 1.25rem; border-radius: 1.5rem; overflow: hidden; border: 1px solid var(--border); aspect-ratio: 16 / 4.2; min-height: 8.5rem; }
@media (max-width: 40rem) { .ad-slider { aspect-ratio: auto; min-height: 11rem; } }
.ad-track { position: absolute; inset: 0; }
.ad-slide { position: absolute; inset: 0; display: flex; align-items: center; padding: 1.2rem 3rem; color: #fff; text-decoration: none; opacity: 0; visibility: hidden; transition: opacity .5s; background: var(--ad-bg, linear-gradient(135deg, #0e7490, #0f766e)); }
.ad-slide.on { opacity: 1; visibility: visible; }
.ad-signal { --ad-bg: linear-gradient(135deg, #0e7490, #0f766e); }
.ad-violet { --ad-bg: linear-gradient(135deg, #6d28d9, #4338ca); }
.ad-amber { --ad-bg: linear-gradient(135deg, #b45309, #be123c); }
.ad-rose { --ad-bg: linear-gradient(135deg, #be185d, #9f1239); }
.ad-ocean { --ad-bg: linear-gradient(135deg, #1d4ed8, #0e7490); }
.ad-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ad-img + .ad-body::before { content: ''; position: absolute; inset: -2rem -3rem; z-index: -1; background: linear-gradient(to left, #000b, #0000 85%); }
.ad-body { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; gap: .4rem; max-width: 34rem; text-shadow: 0 1px 8px #0006; }
.ad-title { font-size: clamp(1.05rem, 2.4vw, 1.6rem); font-weight: 800; line-height: 1.4; }
.ad-text { font-size: .9rem; opacity: .92; }
.ad-btn { margin-top: .3rem; padding: .35rem 1rem; border-radius: 999px; background: #fff; color: #111; font-size: .8rem; font-weight: 800; text-shadow: none; }
.ad-tag { position: absolute; z-index: 2; top: .6rem; inset-inline-start: .8rem; padding: .05rem .5rem; border-radius: .4rem; background: #0007; font-size: .62rem; }
.ad-nav { position: absolute; z-index: 3; top: 50%; translate: 0 -50%; width: 2rem; height: 2rem; border: 0; border-radius: 50%; background: #0006; color: #fff; font-size: 1.3rem; line-height: 1; cursor: pointer; }
.ad-nav:hover { background: #000a; }
.ad-nav.prev { inset-inline-end: .6rem; } .ad-nav.next { inset-inline-start: .6rem; }
.ad-dots { position: absolute; z-index: 3; bottom: .55rem; inset-inline: 0; display: flex; justify-content: center; gap: .35rem; }
.ad-dot { width: .5rem; height: .5rem; padding: 0; border: 0; border-radius: 999px; background: #fff6; cursor: pointer; transition: width .2s, background .2s; }
.ad-dot.on { width: 1.4rem; background: #fff; }

/* ───────── آواتار و ورود در هدر ───────── */
.mb-link { display: inline-flex; align-items: center; justify-content: center; height: 2.5rem; text-decoration: none; font-weight: 800; }
.mb-av { width: 2.5rem; border-radius: 50%; color: #fff; font-size: .95rem; box-shadow: 0 0 0 2px color-mix(in oklab, var(--primary) 30%, transparent); }
.mb-login { padding: 0 1rem; border-radius: 999px; font-size: .78rem; color: var(--primary-foreground); background-image: var(--gradient-signal); white-space: nowrap; }
.av-a1 { background: #0e9f8e; } .av-a2 { background: #6d28d9; } .av-a3 { background: #b45309; } .av-a4 { background: #be185d; }
.av-a5 { background: #1d4ed8; } .av-a6 { background: #15803d; } .av-a7 { background: #c2410c; } .av-a8 { background: #475569; }

/* ───────── سوالات متداول ───────── */
.faq-bar { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1rem 0; }
.faq-bar .rh-input { flex: 1 1 14rem; }
.faq-cats { display: flex; flex-wrap: wrap; gap: .4rem; }
.faq-cat { padding: .3rem .85rem; border-radius: 999px; border: 1px solid var(--border); background: transparent; color: var(--muted-foreground); font: inherit; font-size: .78rem; cursor: pointer; }
.faq-cat.on { border-color: color-mix(in oklab, var(--primary) 40%, transparent); background: color-mix(in oklab, var(--primary) 12%, transparent); color: var(--primary); font-weight: 700; }
.faq-item { border: 1px solid var(--border); border-radius: 1rem; background: color-mix(in oklab, var(--surface) 60%, transparent); margin-bottom: .6rem; overflow: hidden; }
.faq-q { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 1.1rem; border: 0; background: none; color: var(--foreground); font: inherit; font-weight: 700; text-align: start; cursor: pointer; }
.faq-q::after { content: '+'; font-size: 1.3rem; color: var(--primary); transition: rotate .2s; }
.faq-item.open .faq-q::after { rotate: 45deg; }
.faq-a { display: none; padding: 0 1.1rem 1rem; color: var(--muted-foreground); line-height: 2; white-space: pre-wrap; }
.faq-item.open .faq-a { display: block; }
.faq-empty { padding: 2rem; text-align: center; color: var(--muted-foreground); }

/* ───────── تماس با ما ───────── */
.ct-layout { display: grid; gap: 1.2rem; margin-top: 1rem; }
@media (min-width: 56rem) { .ct-layout { grid-template-columns: 1fr 1.4fr; } }
.ct-info { display: grid; gap: .6rem; align-content: start; }
.ct-row { display: flex; gap: .8rem; align-items: center; padding: .8rem 1rem; border: 1px solid var(--border); border-radius: 1rem; background: color-mix(in oklab, var(--surface) 60%, transparent); color: var(--foreground); text-decoration: none; }
.ct-row small { display: block; color: var(--muted-foreground); font-size: .7rem; }
.ct-row b { font-size: .88rem; word-break: break-word; }
.ct-form { display: grid; gap: .8rem; }
.ct-form label, .pf-form label { display: grid; gap: .3rem; font-size: .8rem; font-weight: 600; }
.ct-hp { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ct-msg { padding: .7rem 1rem; border-radius: .8rem; font-size: .85rem; }
.ct-msg.ok { background: color-mix(in oklab, var(--primary) 14%, transparent); color: var(--primary); }
.ct-msg.err { background: color-mix(in oklab, var(--destructive) 14%, transparent); color: var(--destructive); }
.rh-textarea { min-height: 8rem; resize: vertical; }

/* ───────── پروفایل ───────── */
.pf-wrap { max-width: 34rem; margin-inline: auto; }
.pf-tabs { display: flex; gap: .4rem; margin-bottom: 1rem; }
.pf-form { display: grid; gap: .8rem; }
.pf-head { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.pf-ava { display: flex; width: 4rem; height: 4rem; align-items: center; justify-content: center; border-radius: 50%; color: #fff; font-size: 1.6rem; font-weight: 800; }
.pf-pal { display: flex; flex-wrap: wrap; gap: .5rem; }
.pf-pal button { width: 2.2rem; height: 2.2rem; padding: 0; border-radius: 50%; border: 2px solid transparent; color: #fff; font: inherit; font-weight: 800; cursor: pointer; }
.pf-pal button.on { border-color: var(--foreground); }
.pf-sec { margin-top: 1.4rem; padding-top: 1.2rem; border-top: 1px solid var(--border); }
.pf-tbl { width: 100%; border-collapse: collapse; font-size: .8rem; }
.pf-tbl th, .pf-tbl td { padding: .5rem .4rem; text-align: start; border-bottom: 1px solid var(--border); }
.pf-tbl th { color: var(--muted-foreground); font-weight: 600; }
.pf-btns { display: flex; flex-wrap: wrap; gap: .6rem; }
.pf-btn { padding: .55rem 1.3rem; border-radius: 999px; border: 1px solid var(--border); background: transparent; color: var(--foreground); font: inherit; font-weight: 700; cursor: pointer; }
.pf-btn.pri { border: 0; color: var(--primary-foreground); background-image: var(--gradient-signal); }
.pf-btn.danger { color: var(--destructive); border-color: color-mix(in oklab, var(--destructive) 40%, transparent); }
.pf-btn:disabled { opacity: .5; cursor: wait; }

/* جا برای چیپ آنلاین‌ها و آواتار در هدر: متن «آخرین به‌روزرسانی» فقط روی صفحه‌های عریض */
@media (max-width: 95rem) { header .ms-auto > span.hidden.md\:flex { display: none; } }
header label.relative { min-width: 0; flex: 1 1 8rem; }
header label.relative input { min-width: 0; }
header .ms-auto { flex-shrink: 0; }
.ct-layout.solo { grid-template-columns: minmax(0, 38rem); justify-content: center; }
.ct-form input, .ct-form textarea { width: 100%; }
#top > section.panel { width: 100%; box-sizing: border-box; }
.ct-layout.solo { grid-template-columns: minmax(0, 40rem); }
#ct-info-blk { align-self: start; }
