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

:root {
  font-family: Vazirmatn, Tahoma, sans-serif;
  color: #152842;
  background: #f3f6fa;
  font-synthesis: none;
  --navy: #10233e;
  --blue: #155ac2;
  --muted: #52647a;
  --line: #dce4ed;
  --green: #087157;
  --red: #a1243c;
  --amber: #89540a;
  --white: #fff;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100dvh; }
h1, h2, h3, p { margin: 0; }
svg { display: inline-block; vertical-align: middle; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, .button { cursor: pointer; }
button:disabled { opacity: .55; cursor: default; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #6eabfc; outline-offset: 3px; }
.skip { position: absolute; z-index: 4; background: white; padding: .5rem; transform: translateY(-150%); }
.skip:focus { transform: none; }
.topbar { background: var(--navy); color: var(--white); }
.topbar-inner, .tabbar, main { width: min(100% - 3.5rem, 1300px); margin-inline: auto; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.7rem; }
.brand { display: inline-flex; align-items: center; gap: .75rem; font-size: 1.18rem; font-weight: 800; line-height: 1.2; }
.brand small { display: block; margin-top: .22rem; color: #bbcae0; font-weight: 500; font-size: .78rem; }
.brand-symbol { display: grid; width: 2.55rem; aspect-ratio: 1; place-items: center; border-radius: .72rem; background: #2252a0; color: #f3f7ff; }
.brand-symbol svg { width: 1.45rem; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.account-nav { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: .8rem; }
.account-nav a, .account-nav button { color: #e4eeff; padding: .3rem .45rem; border: 0; background: transparent; border-radius: .35rem; font-size: .88rem; }
.account-nav a:hover, .account-nav button:hover { background: #243d60; }
.navigation { border-bottom: 1px solid var(--line); background: #fff; }
.tabbar { display: flex; gap: 1.15rem; overflow-x: auto; align-items: stretch; }
.tabbar a { display: flex; align-items: center; gap: .43rem; padding: .85rem .3rem .72rem; border-bottom: 3px solid transparent; color: var(--muted); white-space: nowrap; font-weight: 600; }
.tabbar a:hover { color: var(--blue); }
.tabbar a[aria-current="page"] { border-color: var(--blue); color: var(--blue); }
.tabbar svg, .button svg { width: 1.05rem; height: 1.05rem; }
main { padding-block: 2.5rem 4rem; outline: none; }
.page-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1.55rem; }
.page-head h1 { font-size: clamp(1.75rem, 3vw, 2.55rem); line-height: 1.32; font-weight: 830; letter-spacing: -.035em; }
.page-head p { color: var(--muted); margin-top: .45rem; }
.page-head .head-actions { display: flex; align-items: center; gap: .75rem; }
.time { color: var(--muted); font-size: .83rem; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: .43rem; min-height: 2.55rem; padding: .4rem .85rem; border-radius: .55rem; border: 1px solid #cbd8e8; background: #fff; color: #24416b; font-weight: 670; white-space: nowrap; }
.button:hover { border-color: #6d9de1; }
.button.primary { border-color: #1659bc; background: #1659bc; color: #fff; }
.button.primary:hover { background: #104a9f; }
.button.danger { border-color: #b83047; background: #b83047; color: #fff; }
.button.compact { min-height: 2.1rem; padding: .2rem .6rem; font-size: .83rem; }
.summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .85rem; margin-bottom: 2rem; }
.summary-card { display: flex; align-items: center; gap: .75rem; padding: .87rem 1.05rem; border: 1px solid var(--line); border-radius: .75rem; background: #fff; }
.summary-card strong { font-size: 1.45rem; line-height: 1; font-weight: 770; }
.summary-card span { color: var(--muted); font-size: .91rem; }
.summary-card svg { width: 1.2rem; height: 1.2rem; margin-inline-end: auto; color: var(--blue); }
.section-title { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: .6rem; margin: 0 0 .7rem; }
.section-title h2 { font-size: 1.22rem; font-weight: 800; }
.server-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .85rem; margin-bottom: 2rem; }
.server-card { display: flex; min-width: 0; flex-direction: column; gap: .85rem; min-height: 14.8rem; padding: 1rem; background: #fff; border: 1px solid var(--line); border-radius: .8rem; box-shadow: 0 2px 4px #233c5c05; }
.server-card:hover { border-color: #83a8da; box-shadow: 0 3px 14px #233c5c12; }
.server-card h3 { font-size: 1.18rem; }
.card-head, .card-footer { display: flex; justify-content: space-between; align-items: center; gap: .45rem; flex-wrap: wrap; }
.card-footer { border-top: 1px solid #e8eef5; padding-top: .65rem; margin-top: auto; color: var(--muted); font-size: .79rem; }
.card-footer strong { color: var(--blue); }
.pill { display: inline-flex; align-items: center; gap: .36rem; width: max-content; max-width: 100%; border-radius: 2rem; padding: .2rem .55rem; background: #edf1f6; color: #435773; font-size: .79rem; font-weight: 700; }
.pill::before, .dot { width: .49rem; height: .49rem; flex: 0 0 .49rem; border-radius: 50%; background: currentColor; }
.pill::before { content: ""; }
.pill.online, .pill.accepted, .pill.ok, .dot.online { color: var(--green); background-color: #e9f8f3; }
.pill.offline, .pill.high, .pill.critical, .pill.unconfirmed { color: var(--red); background: #fdeef1; }
.pill.stale, .pill.medium, .pill.maintenance, .pill.pending { color: var(--amber); background: #fff4dd; }
.dot.online { background-color: #0d916a; }
.dot.offline { background-color: #be3451; }
.dot.stale, .dot.maintenance { background-color: #b97b28; }
.dot { color: #98a8bb; }
.metric-list { display: grid; gap: .62rem; }
.metric { display: grid; grid-template-columns: minmax(3.5rem, 1fr) minmax(2rem, auto); align-items: center; gap: .12rem .35rem; }
.metric span { color: var(--muted); font-size: .82rem; }
.metric b { font-size: .88rem; font-variant-numeric: tabular-nums; }
.metric progress { grid-column: 1 / -1; width: 100%; height: .36rem; overflow: hidden; border-radius: 1rem; border: 0; background: #e7edf6; accent-color: #3d7ad0; }
.metric progress::-webkit-progress-bar { background: #e7edf6; }
.metric progress::-webkit-progress-value { background: #3d7ad0; border-radius: 1rem; }
.metric progress.warn::-webkit-progress-value { background: #c28026; }
.metric progress.hot::-webkit-progress-value { background: #c03d57; }
.metric-track { grid-column: 1 / -1; min-height: .36rem; border-radius: 1rem; background: #e7edf6; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: .8rem; }
.panel + .panel { margin-top: 1rem; }
.panel-pad { padding: 1rem 1.15rem; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: .7rem; padding: .85rem 1.15rem; border-bottom: 1px solid #e7edf3; }
.panel-head h2, .panel-pad > h2 { font-size: 1.12rem; font-weight: 770; }
.table-scroll { overflow: auto; }
table { width: 100%; border-collapse: collapse; text-align: start; }
th, td { padding: .72rem 1.05rem; border-bottom: 1px solid #e9eef4; vertical-align: middle; text-align: start; }
th { color: var(--muted); background: #f9fbfe; font-size: .8rem; font-weight: 720; }
td { font-size: .88rem; }
tr:last-child td { border-bottom: 0; }
.empty { display: flex; align-items: center; gap: .5rem; color: var(--muted); padding: 1.3rem 1.15rem; }
.empty svg { width: 1.1rem; color: var(--green); }
.notice { color: var(--muted); padding: .8rem 1rem; background: #fff; border: 1px solid var(--line); border-radius: .6rem; }
.notice.error, .error { color: var(--red); }
.notice.error { background: #fff5f6; border-color: #f3c7d0; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(16rem, 1fr); gap: 1rem; margin-bottom: 1rem; }
.detail-grid .panel { margin: 0; min-width: 0; }
.metrics-detail { display: grid; gap: .82rem; margin-top: .9rem; }
.detail-actions { margin-top: 1rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.chart-wrap { padding: .65rem 1rem 0; }
.chart-row { display: grid; grid-template-columns: 2.2rem minmax(0, 1fr); gap: .45rem; direction: ltr; }
.y-axis { display: flex; flex-direction: column; justify-content: space-between; height: 10rem; color: var(--muted); font-size: .73rem; text-align: center; }
.chart { width: 100%; height: 10rem; background: repeating-linear-gradient(to bottom, #e8eef5, #e8eef5 1px, transparent 1px, transparent 25%); }
.chart polyline { fill: none; stroke-width: 2.4; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.chart-labels { display: flex; justify-content: space-between; padding: .32rem 0 0 2.65rem; direction: ltr; font-size: .8rem; color: var(--muted); }
.legend { display: flex; flex-wrap: wrap; gap: 1rem; padding: .65rem 1rem 1rem; font-size: .83rem; }
.legend span::before { content: ""; display: inline-block; vertical-align: .25em; width: 1.05rem; height: 3px; margin-inline-end: .33rem; background: var(--series); }
.cpu { --series: #2465c6; }
.ram { --series: #058165; }
.disk { --series: #aa6313; }
.chart polyline { stroke: var(--series); }
.login { width: min(100%, 28rem); margin: 1.8rem auto; padding: 1.65rem; }
.login h1 { font-size: 1.65rem; }
.login > p { color: var(--muted); margin-bottom: 1rem; }
.fields { display: grid; gap: .76rem; }
.form-columns { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.field { display: grid; gap: .32rem; font-size: .86rem; font-weight: 680; }
.field input:not([type="checkbox"]), .field textarea, select { min-width: 0; width: 100%; min-height: 2.45rem; padding: .38rem .62rem; border: 1px solid #c9d6e6; border-radius: .5rem; background: #fff; color: #152842; }
.field input[dir="ltr"], .field textarea[dir="ltr"] { text-align: left; }
.field textarea { resize: vertical; min-height: 4rem; }
.field-check { display: flex; align-items: center; gap: .4rem; }
.form-actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-top: .8rem; }
.form-error { color: var(--red); margin-top: .6rem; font-size: .86rem; }
.narrow { width: min(100%, 40rem); }
#action-dialog { width: min(92vw, 30rem); border: 1px solid var(--line); border-radius: .85rem; padding: 1.15rem; color: var(--navy); box-shadow: 0 18px 42px #091a3750; }
#action-dialog::backdrop { background: #10233e80; }
#action-dialog h2 { font-size: 1.16rem; margin-bottom: .6rem; }
#action-dialog > form > p { margin-bottom: .7rem; color: var(--muted); }
.toast { position: fixed; inset-inline-end: 1.15rem; bottom: 1.15rem; color: #fff; background: var(--navy); padding: .65rem .9rem; border-radius: .5rem; box-shadow: 0 8px 26px #11264e36; z-index: 3; }
.muted { color: var(--muted); }
.stack { display: grid; gap: .8rem; }
.number { font-variant-numeric: tabular-nums; }
.check-box { width: 1.1rem; height: 1.1rem; accent-color: #175bbf; }

@media (max-width: 990px) {
  .server-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 710px) {
  .topbar-inner, .tabbar, main { width: calc(100% - 1.5rem); }
  .topbar-inner { min-height: 3.9rem; }
  .tabbar { gap: .8rem; }
  .tabbar a { padding-block: .65rem .52rem; font-size: .86rem; }
  main { padding-block: 1.4rem 2.5rem; }
  .page-head { align-items: start; flex-direction: column; gap: .65rem; margin-bottom: 1rem; }
  .detail-grid { grid-template-columns: 1fr; }
  .summary-card { flex-wrap: wrap; gap: .28rem .5rem; padding: .65rem; }
  .summary-card span { font-size: .79rem; }
  .summary-card svg { display: none; }
  .account-nav { gap: .15rem; }
  .account-nav a, .account-nav button { font-size: .76rem; }
}
@media (max-width: 380px) {
  .server-grid, .form-columns { grid-template-columns: 1fr; }
  .server-card { min-height: 0; }
}
