/* ═══════════════════════════════════════════════════════════════
   پایش شبکه — دیتاسنتر ابر باران
   موبایل‌اول؛ از ویژگی‌های منطقی (inline-start/end) استفاده شده
   تا یک فایل برای فارسی (RTL) و انگلیسی (LTR) کافی باشد.
   ═══════════════════════════════════════════════════════════════ */

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

:root {
  --font: "VazirLocal", "Vazirmatn", "Vazir", "IRANSansX", "IRANSans", "Segoe UI", Tahoma, "Noto Sans Arabic",
          system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, Menlo, monospace;

  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --line: #e2e7ee;
  --line-soft: #edf0f5;

  --text: #0e1a2b;
  --text-2: #4d5b73;
  --text-3: #7c8aa0;

  --ok: #087f58;      --ok-soft: #e4f5ed;      --ok-seg: #2dbd8c;
  --warn: #9a5b00;    --warn-soft: #fdf1dc;    --warn-seg: #f0a92b;
  --down: #c81e33;    --down-soft: #fdeaed;    --down-seg: #e5484d;
  --none: #7c8aa0;    --none-soft: #eef1f5;    --none-seg: #d5dce6;
  --brand: #087f58;

  --bar: rgba(244, 246, 249, .85);
  --bar-solid: rgba(255, 255, 255, .92);
  --shadow: 0 1px 2px rgba(14, 26, 43, .04), 0 8px 24px rgba(14, 26, 43, .05);

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
  --r: 16px;
  --r-sm: 12px;
  --nav-h: 62px;
  --max: 960px;
}

[data-theme="dark"] {
  --bg: #080d15;
  --surface: #0f1623;
  --surface-2: #131c2b;
  --line: #1f2a3b;
  --line-soft: #182232;

  --text: #e8eef7;
  --text-2: #9aa8bf;
  --text-3: #6d7c94;

  --ok: #3ddc9d;      --ok-soft: rgba(61, 220, 157, .12);   --ok-seg: #2bb98a;
  --warn: #fbbf24;    --warn-soft: rgba(251, 191, 36, .12); --warn-seg: #e0a526;
  --down: #ff7b86;    --down-soft: rgba(255, 123, 134, .13); --down-seg: #e5555f;
  --none: #6d7c94;    --none-soft: #172131;                 --none-seg: #243044;
  --brand: #3ddc9d;

  --bar: rgba(8, 13, 21, .82);
  --bar-solid: rgba(15, 22, 35, .92);
  --shadow: 0 1px 0 rgba(255, 255, 255, .02), 0 8px 24px rgba(0, 0, 0, .35);
}

/* ── پایه ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.75;
  background: var(--bg);
  color: var(--text);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
h1, h2, h3, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico {
  width: 20px; height: 20px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
.muted { color: var(--text-2); }
.small { font-size: 13px; }

/* ── نوار بالا ──────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 40;
  padding-top: env(safe-area-inset-top);
  border-bottom: 1px solid var(--line);
}
.topbar::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--bar);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
}
.topbar-in {
  max-width: var(--max); margin: 0 auto;
  padding: 10px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; }
.logo {
  width: 40px; height: 40px; flex: none;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  display: grid; place-items: center; overflow: hidden;
}
.logo img { width: 28px; height: 28px; object-fit: contain; }
.brand-t { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.brand-t strong { font-size: 15px; font-weight: 700; white-space: nowrap; }
.brand-t small { font-size: 12px; color: var(--text-3); }

.actions { display: flex; align-items: center; gap: 8px; }
.btn-icon, .btn-lang {
  height: 40px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line);
  color: var(--text-2); cursor: pointer;
  display: inline-grid; place-items: center;
  transition: background .15s, color .15s, border-color .15s;
}
.btn-icon { width: 40px; padding: 0; }
.btn-lang { padding: 0 14px; font-size: 13px; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; }
.btn-icon:hover, .btn-lang:hover { background: var(--surface-2); color: var(--text); }
.btn-icon.spin .ico { animation: spin .9s linear infinite; }
.ico-sun { display: none; }
[data-theme="dark"] .ico-moon { display: none; }
[data-theme="dark"] .ico-sun { display: block; }

/* ── ناوبری: پایین صفحه روی موبایل، داخل هدر روی دسکتاپ ──────── */
.tabs {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 50;
  display: grid; grid-template-columns: repeat(3, 1fr);
  background: var(--bar-solid);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tab {
  height: var(--nav-h);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  text-decoration: none; color: var(--text-3);
  font-size: 11.5px; font-weight: 600; position: relative;
  transition: color .15s;
}
.tab .ico { width: 22px; height: 22px; }
.tab[aria-current="page"] { color: var(--brand); }
.tab[aria-current="page"]::before {
  content: ""; position: absolute; top: 0; width: 28px; height: 3px;
  background: var(--brand); border-radius: 0 0 4px 4px;
}

/* ── صفحه ───────────────────────────────────────────────────── */
.page {
  max-width: var(--max); margin: 0 auto;
  padding: 16px 16px calc(var(--nav-h) + env(safe-area-inset-bottom) + 28px);
}
.view { animation: rise .35s ease both; }

.notice {
  background: var(--warn-soft); color: var(--warn);
  border-radius: var(--r-sm); padding: 10px 14px; margin-bottom: 12px;
  font-size: 13.5px; font-weight: 500;
}

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden;
}
.pad { padding: 20px; }
.h2 { font-size: 18px; font-weight: 700; margin-bottom: 4px; }

/* ── هیرو ───────────────────────────────────────────────────── */
.hero {
  --accent: var(--ok-seg); --tint: var(--ok-soft); --tone: var(--ok);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); margin-bottom: var(--s5);
  box-shadow: inset 0 3px 0 var(--accent), var(--shadow);
  overflow: hidden;
}
.hero.is-partial { --accent: var(--warn-seg); --tint: var(--warn-soft); --tone: var(--warn); }
.hero.is-major   { --accent: var(--down-seg); --tint: var(--down-soft); --tone: var(--down); }
.hero.is-stale, .hero.is-loading { --accent: var(--none-seg); --tint: var(--none-soft); --tone: var(--none); }

.hero-main { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s3) var(--s4); align-items: center; padding: var(--s5) var(--s4) var(--s4); }
.hero-icon {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--tint); color: var(--tone); display: grid; place-items: center;
}
.hero-icon .ico { width: 26px; height: 26px; stroke-width: 1.8; }
.hero h1 { font-size: 20px; line-height: 1.4; font-weight: 800; }
.hero-text p { font-size: 14px; color: var(--text-2); line-height: 1.7; margin-top: var(--s1); }
.kpi {
  grid-column: 1 / -1; display: flex; flex-direction: column;
  padding-top: var(--s4); border-top: 1px solid var(--line-soft);
}
.kpi .metric-value { font-size: 40px; line-height: 1.25; color: var(--tone); }
.hero.is-loading .kpi .metric-value, .hero.is-stale .kpi .metric-value { color: var(--text); }

.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line-soft); background: var(--surface-2); }
.fact { padding: var(--s3) var(--s4); display: flex; flex-direction: column; min-width: 0; }
.fact + .fact { border-inline-start: 1px solid var(--line-soft); }
.fact .metric-value { font-size: 18px; line-height: 1.5; }

.metric-label { font-size: 12px; color: var(--text-2); font-weight: 600; }
.metric-value { font-weight: 800; letter-spacing: -.01em; }
.metric-note { font-size: 12px; color: var(--text-3); }
.metric-value.tick { animation: tick .5s ease; }
@keyframes tick { 0% { opacity: .35; transform: translateY(3px); } 100% { opacity: 1; transform: none; } }

.live {
  display: inline-flex; align-items: center; gap: var(--s2);
  font-size: 12px; font-weight: 600; color: var(--text-2);
  background: var(--surface); border: 1px solid var(--line);
  padding: 2px 12px; border-radius: 99px; white-space: nowrap;
}
.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok-seg); animation: pulse 2s ease-in-out infinite; }
.statusbar { display: flex; align-items: center; justify-content: space-between; gap: var(--s2) var(--s3); flex-wrap: wrap; margin: 0 var(--s1) var(--s3); }
.statusbar .ago { font-size: 12px; color: var(--text-3); }
.statusbar.is-busy .live i { background: var(--warn-seg); animation: pulse .6s ease-in-out infinite; }
.statusbar.is-off .live i { background: var(--none-seg); animation: none; }

/* ── راهنمای نمودار ─────────────────────────────────────────── */
.guide {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--shadow); padding: var(--s4); margin-bottom: var(--s5);
}
.guide-head h2 { font-size: 15px; font-weight: 700; line-height: 1.5; }
.guide-head p { font-size: 13px; color: var(--text-2); line-height: 1.8; margin-top: var(--s1); }
.legend { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); margin-top: var(--s4); padding-top: var(--s4); border-top: 1px solid var(--line-soft); }
.legend li { display: flex; align-items: center; gap: var(--s3); min-width: 0; }
.legend .seg { flex: none; width: 10px; height: 32px; border-radius: 3px; }
.legend b { display: block; font-size: 13px; font-weight: 700; line-height: 1.5; }
.legend span { display: block; font-size: 12px; color: var(--text-2); line-height: 1.5; }

/* ── کارت گروه‌ها: یک ستون، هم‌عرض ───────────────────────────── */
.cols { display: flex; flex-direction: column; gap: var(--s5); }
.col { display: contents; }
.cols .card { overflow: hidden; }

.g-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s4); }
.g-head h2 { font-size: 16px; font-weight: 700; line-height: 1.5; }
.g-sub { font-size: 12px; color: var(--text-3); line-height: 1.5; }
.g-up { text-align: end; flex: none; line-height: 1.4; }
.g-up span { display: block; font-size: 12px; color: var(--text-3); }
.g-up b { font-size: 16px; font-weight: 800; color: var(--text); }

.row {
  display: grid; align-items: center;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "id up" "strip strip" "cap cap";
  gap: var(--s3) var(--s3);
  row-gap: var(--s2);
  padding: var(--s3) var(--s4) var(--s3);
  border-top: 1px solid var(--line-soft);
}
.r-id { grid-area: id; display: flex; align-items: center; gap: var(--s3); min-width: 0; }
.dot {
  width: 10px; height: 10px; flex: none; border-radius: 50%;
  background: var(--ok-seg); box-shadow: 0 0 0 3px var(--ok-soft);
}
.s-checking .dot { background: var(--warn-seg); box-shadow: 0 0 0 3px var(--warn-soft); }
.s-down .dot     { background: var(--down-seg); box-shadow: 0 0 0 3px var(--down-soft); }
.s-unknown .dot  { background: var(--none-seg); box-shadow: 0 0 0 3px var(--none-soft); }
.r-name { display: block; font-size: 14px; font-weight: 600; line-height: 1.5; }
.r-host {
  display: block; font-family: var(--mono); font-size: 11px; color: var(--text-3);
  direction: ltr; unicode-bidi: isolate; text-align: start; line-height: 1.4;
}
[dir="rtl"] .r-host { text-align: right; }
.chip {
  display: inline-block; font-size: 11px; font-weight: 700; line-height: 1.6;
  padding: 0 8px; border-radius: 99px; margin-inline-start: var(--s2); vertical-align: 1px;
}
.s-checking .chip { background: var(--warn-soft); color: var(--warn); }
.s-down .chip     { background: var(--down-soft); color: var(--down); }
.s-unknown .chip  { background: var(--none-soft); color: var(--none); }

.r-up { grid-area: up; text-align: end; font-size: 14px; font-weight: 800; white-space: nowrap; }
.r-lat { display: block; font-size: 11px; font-weight: 500; color: var(--text-3); }

.strip { grid-area: strip; display: flex; gap: 2px; height: 32px; min-width: 0; cursor: default; }
.seg { flex: 1 1 0; min-width: 2px; border-radius: 3px; background: var(--none-seg); transition: filter .12s, transform .12s; }
.seg.ok   { background: var(--ok-seg); }
.seg.warn { background: var(--warn-seg); }
.seg.down { background: var(--down-seg); }
.seg.none { background: var(--none-seg); }
.strip .seg:hover, .strip .seg.on { filter: brightness(.88); transform: scaleY(1.12); }

.axis { display: grid; grid-template-columns: minmax(0, 1fr); padding: var(--s3) var(--s4); border-top: 1px solid var(--line-soft); background: var(--surface-2); }
.axis-in { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-3); }

.skel .seg { animation: pulse 1.4s ease-in-out infinite; }
.skel .r-up, .skel .g-up b { color: var(--text-3); }

/* ── رویدادها ───────────────────────────────────────────────── */
.ev-item {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 14px 0; border-top: 1px solid var(--line-soft);
}
.ev-item:first-child { border-top: 0; }
.ev-name { font-weight: 700; font-size: 14.5px; }
.ev-time { font-size: 12.5px; color: var(--text-3); }
.ev-meta { text-align: end; }
.ev-dur { font-weight: 800; font-size: 14px; }
.pill { display: inline-block; font-size: 11px; font-weight: 700; padding: 0 9px; border-radius: 99px; line-height: 1.7; }
.pill.on  { background: var(--down-soft); color: var(--down); }
.pill.off { background: var(--ok-soft); color: var(--ok); }
#ev-list { margin: 14px 0 6px; }
#ev-blips { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.empty { text-align: center; padding: 34px 12px 28px; }
.empty .ico { width: 44px; height: 44px; color: var(--ok); stroke-width: 1.5; margin-bottom: 8px; }
.empty b { display: block; font-size: 16px; }
.empty span { display: block; margin-top: 4px; color: var(--text-2); font-size: 13.5px; }

/* ── درباره ─────────────────────────────────────────────────── */
.prose h3 { font-size: 15px; font-weight: 700; margin: 22px 0 6px; }
.prose h2 + h3 { margin-top: 12px; }
.prose p { color: var(--text-2); line-height: 1.95; }
.link { display: inline-flex; align-items: center; gap: 7px; margin-top: 22px; color: var(--brand); font-weight: 700; text-decoration: none; }
.link .ico { width: 16px; height: 16px; }
.link:hover { text-decoration: underline; }

.footer { text-align: center; color: var(--text-3); font-size: 12.5px; padding: 28px 8px 0; }

/* ── راهنمای حباب (tooltip) ─────────────────────────────────── */
.tip {
  position: fixed; z-index: 80; max-width: 260px; pointer-events: none;
  background: var(--text); color: var(--bg);
  padding: 8px 12px; border-radius: 10px; font-size: 12.5px; line-height: 1.6;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .28);
  display: flex; flex-direction: column;
}
.tip b { font-weight: 700; }

/* ── انیمیشن‌ها ─────────────────────────────────────────────── */
@keyframes spin  { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
@keyframes rise  { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ── تبلت و بالاتر ──────────────────────────────────────────── */
@media (min-width: 720px) {
  .row {
    grid-template-columns: 200px minmax(0, 1fr) 88px;
    grid-template-areas: "id strip up" "id cap up";
    gap: var(--s5);
    padding: var(--s3) var(--s5);
    min-height: 64px;
  }
  .g-head { padding: var(--s4) var(--s5); }
  .axis { grid-template-columns: 200px minmax(0, 1fr) 88px; column-gap: var(--s5); padding: var(--s3) var(--s5); }
  .axis-in { grid-column: 2; }
  .strip { height: 36px; gap: 3px; }
  .legend { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .guide { padding: var(--s5); }
  .hero-main { grid-template-columns: auto minmax(0, 1fr) auto; padding: var(--s5); gap: var(--s5); }
  .kpi { grid-column: auto; padding: 0; border-top: 0; text-align: end; align-items: flex-end; }
  .fact { padding: var(--s4) var(--s5); }
  .fact .metric-value { font-size: 20px; }
}

/* ── دسکتاپ: ناوبری می‌رود داخل هدر ─────────────────────────── */
@media (min-width: 860px) {
  .topbar-in { padding: 12px 24px; }
  .page { padding: var(--s6) var(--s5) var(--s7); }
  .tabs {
    position: static; inset: auto; display: inline-flex; gap: 4px; padding: 4px;
    background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px;
    -webkit-backdrop-filter: none; backdrop-filter: none;
  }
  .tab {
    height: 38px; flex-direction: row; gap: 8px; padding: 0 16px; border-radius: 10px;
    font-size: 13.5px;
  }
  .tab .ico { width: 18px; height: 18px; }
  .tab[aria-current="page"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(14, 26, 43, .12); }
  .tab[aria-current="page"]::before { display: none; }
  .hero h1 { font-size: 24px; }
  .hero-text p { font-size: 15px; }
  .hero-icon { width: 56px; height: 56px; }
}

@media (max-width: 379px) {
  .brand-t small { display: none; }
  .btn-lang { padding: 0 10px; }
  .fact .metric-note { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ── نمودار و خط زمان هر کارت ───────────────────────────────── */
.gchart { display: grid; grid-template-columns: minmax(0, 1fr); padding: var(--s1) var(--s4) 0; }
.gc-cap { display: none; font-size: 12px; color: var(--text-3); align-self: center; }
.gplot { position: relative; height: 112px; touch-action: pan-y; cursor: crosshair; }
.gc-svg { display: block; width: 100%; height: 100%; overflow: visible; }
.gc-grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }
.gc-vgrid { stroke: var(--line-soft); stroke-width: 1; vector-effect: non-scaling-stroke; }
.gc-band { fill: var(--down-soft); }
.gc-area { fill: var(--ok-soft); }
.gc-line { fill: none; stroke: var(--ok-seg); stroke-width: 2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.gc-cursor { position: absolute; top: 0; bottom: 0; width: 0; border-inline-start: 1px solid var(--text-3); opacity: 0; pointer-events: none; }
.gc-cursor.on { opacity: 1; }
.ylab span { position: absolute; font-size: 11px; line-height: 1; color: var(--text-3); transform: translateY(-50%); inset-inline-start: 4px; background: var(--surface); padding: 1px 3px; border-radius: 3px; opacity: .92; pointer-events: none; }
.ylab { display: none; }
.ylab .yl0 { top: 8%; } .ylab .yl1 { top: 50%; } .ylab .yl2 { top: 92%; }

.gruler { padding: 0 var(--s4) var(--s3); display: grid; grid-template-columns: minmax(0, 1fr); }
.tl-ruler { position: relative; height: 38px; border-top: 2px solid var(--line); margin-top: 2px; }
.tk { position: absolute; top: 4px; bottom: 0; display: flex; flex-direction: column; align-items: center; transform: translateX(-50%); font-size: 11px; line-height: 1.4; color: var(--text-3); white-space: nowrap; }
.tk b { font-weight: 600; color: var(--text-2); }
.tk small { font-size: 10.5px; }
.tk::before { content: ""; position: absolute; top: -10px; width: 2px; height: 8px; background: var(--line); border-radius: 1px; }
.tk.first, .tk.last { transform: none; }
.tk.first { align-items: flex-start; inset-inline-start: 0; }
.tk.last  { align-items: flex-end; inset-inline-end: 0; }
.tk.first::before { inset-inline-start: 0; } .tk.last::before { inset-inline-end: 0; }
.tk.last b { color: var(--brand); font-weight: 800; }
.tk.last::before { background: var(--brand); }

@media (min-width: 720px) {
  .gchart, .gruler { grid-template-columns: 200px minmax(0, 1fr) 88px; column-gap: var(--s5); padding-inline: var(--s5); }
  .gc-cap { display: block; }
  .gplot, .tl-ruler { grid-column: 2; }
  .gplot { height: 128px; }
  .ylab { display: block; }
  .ylab span { inset-inline-start: auto; background: none; padding: 0; opacity: 1; }
  [dir="rtl"] .ylab span { left: calc(100% + 10px); }
  [dir="ltr"] .ylab span { right: calc(100% + 10px); }
}

/* ── توضیح زیر هر نوار: شروع و پایان بازه، با فلش جهت زمان ──── */
.strip-cap { grid-area: cap; display: flex; align-items: center; gap: var(--s2); font-size: 11px; line-height: 1.4; color: var(--text-3); }
.strip-cap .now { color: var(--brand); font-weight: 700; }
.strip-cap i { position: relative; flex: 1; border-top: 1px dashed var(--line); height: 0; }
.strip-cap i::after { content: ""; position: absolute; top: -4px; inset-inline-end: 0; width: 6px; height: 6px; border-top: 1.5px solid var(--text-3); }
.strip-cap i::after { border-right: 1.5px solid var(--text-3); transform: rotate(45deg); }
@media (min-width: 720px) { .row { min-height: 0; row-gap: 4px; padding-block: var(--s3); } .strip-cap { font-size: 11px; } }

/* متن‌های فارسی داخل بخش‌های زمان (که چپ‌به‌راست‌اند) جهت خودشان را حفظ کنند */
[dir="rtl"] .strip-cap span, [dir="rtl"] .tk b, [dir="rtl"] .tk small { direction: rtl; unicode-bidi: isolate; }

/* ── موبایل: هدر نباید روی نام برند بیفتد ───────────────────── */
.brand-t strong { overflow: hidden; text-overflow: ellipsis; }
.actions { flex: none; }
@media (max-width: 480px) {
  .topbar-in { gap: var(--s2); padding-inline: var(--s3); }
  .brand { gap: var(--s2); flex: 1 1 auto; }
  .logo { width: 36px; height: 36px; border-radius: 10px; }
  .logo img { width: 24px; height: 24px; }
  .actions { gap: 6px; }
  .btn-icon, .btn-lang { height: 36px; border-radius: 10px; }
  .btn-icon { width: 36px; }
  .btn-lang { padding: 0 10px; font-size: 12px; }
  .brand-t strong { font-size: 14px; }
  .btn-install:not([hidden]) + .btn-icon { display: none; }
}
@media (max-width: 359px) { .brand-t small { display: none; } .btn-lang { display: none; } }
