:root {
  --bg: #07101d;
  --panel: #0d1929cc;
  --panel2: #101f31;
  --line: #20324a;
  --text: #edf5ff;
  --muted: #90a3bc;
  --cyan: #21d4c2;
  --green: #45e19b;
  --amber: #ffbd57;
  --red: #ff647c;
  --blue: #6ba4ff;
  --shadow: 0 24px 80px #0007;
}
* {
  box-sizing: border-box;
}
html {
  color-scheme: dark;
}
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 5%, #12355a55, transparent 28%),
    radial-gradient(circle at 90% 80%, #0b796044, transparent 28%), var(--bg);
  color: var(--text);
  font-family: Vazirmatn, Tahoma, sans-serif;
  font-size: 14px;
}
.ambient {
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.18;
}
.ambient-one {
  width: 320px;
  height: 320px;
  background: #2079ff;
  top: -150px;
  left: -100px;
}
.ambient-two {
  width: 330px;
  height: 330px;
  background: #00c890;
  bottom: -180px;
  right: -120px;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select {
  font: inherit;
}
code {
  direction: ltr;
  display: inline-block;
  color: #a7bad0;
}
.shell {
  max-width: 1400px;
  margin: auto;
  padding: 38px 28px 70px;
}
.topbar {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #ffffff0e;
  padding: 0 max(28px, calc((100vw - 1400px) / 2 + 28px));
  background: #07101dcc;
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar nav {
  display: flex;
  align-items: center;
  gap: 22px;
}
.topbar nav > a {
  color: #aab9cc;
}
.topbar nav > a:hover {
  color: #fff;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand > span:last-child {
  display: flex;
  flex-direction: column;
}
.brand strong {
  font-size: 18px;
}
.brand small {
  font-size: 10px;
  color: var(--muted);
}
.brand-mark {
  width: 35px;
  height: 35px;
  border: 1px solid #2edbc655;
  border-radius: 50%;
  display: grid;
  place-content: center;
  position: relative;
  box-shadow: inset 0 0 20px #21d4c233;
}
.brand-mark:after {
  content: "";
  position: absolute;
  width: 48%;
  height: 1px;
  background: var(--cyan);
  top: 50%;
  left: 50%;
  transform-origin: left;
  transform: rotate(-35deg);
  box-shadow: 0 0 7px var(--cyan);
}
.brand-mark i {
  display: block;
  width: 18px;
  height: 1px;
  background: #21d4c244;
  margin: 2px;
}
.user-chip {
  border: 1px solid var(--line);
  background: #ffffff08;
  border-radius: 99px;
  padding: 7px 12px;
  color: #c8d5e5;
}
.link-button {
  border: 0;
  background: none;
  color: #ff8b9d;
  cursor: pointer;
}
.hero-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin: 16px 0 30px;
}
.hero-row h1,
.detail-hero h1 {
  font-size: 34px;
  margin: 5px 0;
}
.eyebrow {
  direction: ltr;
  letter-spacing: 2.5px;
  font-weight: 700;
  color: var(--cyan);
  font-size: 10px;
  margin: 0;
}
.muted {
  color: var(--muted);
  margin: 5px 0;
}
.button {
  border: 0;
  border-radius: 12px;
  padding: 11px 18px;
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  transition: 0.2s;
  display: inline-flex;
  justify-content: center;
  align-items: center;
}
.button:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}
.button.primary {
  background: linear-gradient(135deg, #20c7b6, #138eab);
  box-shadow: 0 10px 30px #12b6aa33;
}
.button.secondary {
  background: #182a40;
  border: 1px solid #2b405c;
}
.button.danger-button {
  background: #3b1c29;
  color: #ff8ca0;
  border: 1px solid #733045;
}
.button.full {
  width: 100%;
  padding: 13px;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin-bottom: 20px;
}
.stat-card {
  border: 1px solid var(--line);
  background: linear-gradient(145deg, #101d2fcc, #0b1725cc);
  border-radius: 16px;
  padding: 17px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 12px 35px #0002;
}
.stat-card b {
  font-size: 25px;
  display: block;
}
.stat-card small {
  color: var(--muted);
}
.stat-icon {
  width: 43px;
  height: 43px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  font-weight: 800;
}
.stat-icon.healthy {
  background: #45e19b18;
  color: var(--green);
}
.stat-icon.danger {
  background: #ff647c18;
  color: var(--red);
}
.stat-icon.warning {
  background: #ffbd5718;
  color: var(--amber);
}
.stat-icon.neutral {
  background: #6ba4ff18;
  color: var(--blue);
}
.panel {
  background: linear-gradient(145deg, #0e1a2acc, #0a1522dd);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.panel-head {
  padding: 21px 23px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.panel-head h2 {
  margin: 0;
  font-size: 18px;
}
.panel-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.live-pill {
  color: var(--green);
  border: 1px solid #45e19b33;
  background: #45e19b0c;
  border-radius: 99px;
  padding: 6px 10px;
  font-size: 11px;
}
.live-pill i {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  50% {
    opacity: 0.35;
  }
}
.monitor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 18px;
}
.monitor-card {
  border: 1px solid #20334b;
  background: #0d1927;
  border-radius: 16px;
  padding: 17px;
  transition: 0.2s;
}
.monitor-card:hover {
  border-color: #315373;
  transform: translateY(-2px);
}
.monitor-top {
  display: flex;
  align-items: center;
  gap: 12px;
}
.target-icon {
  width: 43px;
  height: 43px;
  border-radius: 13px;
  background: linear-gradient(145deg, #163a50, #102738);
  color: var(--cyan);
  font-size: 10px;
  font-weight: 800;
  display: grid;
  place-items: center;
}
.target-title {
  min-width: 0;
  flex: 1;
}
.target-title a {
  display: block;
  font-size: 16px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
}
.target-title code {
  display: block;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.status-badge {
  border-radius: 99px;
  padding: 5px 9px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  border: 1px solid;
}
.tone-healthy {
  color: var(--green);
  background: #45e19b0d;
  border-color: #45e19b36;
}
.tone-danger {
  color: var(--red);
  background: #ff647c0d;
  border-color: #ff647c36;
}
.tone-warning {
  color: var(--amber);
  background: #ffbd570d;
  border-color: #ffbd5736;
}
.tone-checking {
  color: var(--cyan);
  background: #21d4c20d;
  border-color: #21d4c236;
}
.tone-neutral {
  color: #a6bad1;
  background: #a6bad10d;
  border-color: #a6bad12c;
}
.status-message {
  color: var(--muted);
  font-size: 12px;
  height: 20px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: #07121e;
  border: 1px solid #192b40;
  border-radius: 12px;
  margin-top: 13px;
}
.metrics div {
  padding: 11px;
  border-left: 1px solid #192b40;
}
.metrics div:last-child {
  border: 0;
}
.metrics small {
  display: block;
  color: #7489a3;
  font-size: 9px;
}
.metrics b {
  font-size: 15px;
}
.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 13px;
  color: #70849d;
  font-size: 10px;
}
.actions {
  display: flex;
  gap: 7px;
}
.actions form {
  display: inline;
}
.icon-button {
  border: 1px solid #29405a;
  background: #132238;
  color: #b8c8da;
  border-radius: 8px;
  padding: 5px 8px;
  cursor: pointer;
  font-size: 10px;
}
.empty {
  text-align: center;
  padding: 75px 20px;
}
.empty > span {
  font-size: 44px;
  color: var(--cyan);
}
.empty h3 {
  margin: 6px;
}
.empty p {
  color: var(--muted);
}
.modal {
  border: 1px solid #29405c;
  border-radius: 20px;
  background: #0c1828;
  color: var(--text);
  width: min(92vw, 480px);
  padding: 0;
  box-shadow: var(--shadow);
}
.modal::backdrop {
  background: #020812cc;
  backdrop-filter: blur(5px);
}
.modal form {
  padding: 25px;
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}
.modal-head h2 {
  margin: 4px 0;
}
.close {
  border: 0;
  background: #1b2b40;
  color: #aabbd0;
  border-radius: 9px;
  width: 34px;
  height: 34px;
  font-size: 22px;
  cursor: pointer;
}
.modal label,
.login-form label {
  display: block;
  color: #c9d5e4;
  font-size: 12px;
  margin: 15px 0;
}
.modal input,
.modal select,
.login-form input {
  display: block;
  width: 100%;
  margin-top: 7px;
  background: #07121f;
  border: 1px solid #243a55;
  color: #fff;
  border-radius: 11px;
  padding: 12px;
  outline: none;
}
.modal input:focus,
.modal select:focus,
.login-form input:focus {
  border-color: #21d4c2;
  box-shadow: 0 0 0 3px #21d4c214;
}
.hint {
  color: var(--muted);
  font-size: 10px;
}
.flash-stack {
  position: fixed;
  top: 86px;
  left: 22px;
  z-index: 50;
  display: grid;
  gap: 8px;
}
.flash {
  padding: 11px 15px;
  border-radius: 11px;
  background: #14263a;
  border: 1px solid #2d4865;
  box-shadow: 0 10px 30px #0005;
}
.flash-success {
  border-color: #45e19b55;
}
.flash-danger {
  border-color: #ff647c66;
}
.flash-warning {
  border-color: #ffbd5766;
}
.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 30px;
}
.login-card {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  width: min(950px, 100%);
  min-height: 570px;
  overflow: hidden;
  border-radius: 26px;
}
.glass {
  background: #0c1929c7;
  border: 1px solid #2b415d;
  box-shadow: 0 40px 100px #0009;
  backdrop-filter: blur(18px);
}
.login-visual {
  padding: 55px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background:
    radial-gradient(circle at 50% 36%, #1dd5bf1c, transparent 38%),
    linear-gradient(145deg, #0c2d42, #0a192a);
  position: relative;
}
.login-visual h1 {
  font-size: 36px;
  line-height: 1.4;
  margin: 10px 0;
}
.login-visual > p:last-child {
  color: #9eb1c7;
  max-width: 430px;
}
.login-form {
  padding: 60px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.login-form h2 {
  font-size: 27px;
  margin: 25px 0 3px;
}
.security-note {
  text-align: center;
  color: #677d97;
  font-size: 10px;
  margin-top: 17px;
}
.brand.compact {
  display: inline-flex;
}
.radar {
  position: absolute;
  width: 270px;
  height: 270px;
  top: 45px;
  right: calc(50% - 135px);
  border-radius: 50%;
  border: 1px solid #22d7c337;
  background:
    repeating-radial-gradient(circle, #21d4c200 0 42px, #21d4c228 43px 44px),
    linear-gradient(90deg, transparent 49.7%, #21d4c22f 50%, transparent 50.3%),
    linear-gradient(0deg, transparent 49.7%, #21d4c22f 50%, transparent 50.3%);
  overflow: hidden;
}
.radar-sweep {
  position: absolute;
  width: 50%;
  height: 50%;
  top: 0;
  right: 50%;
  transform-origin: bottom right;
  background: linear-gradient(25deg, #21d4c200 45%, #21d4c252);
  animation: sweep 4s linear infinite;
}
@keyframes sweep {
  to {
    transform: rotate(360deg);
  }
}
.dot {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 13px var(--green);
}
.d1 {
  top: 35%;
  left: 25%;
}
.d2 {
  top: 66%;
  left: 58%;
}
.d3 {
  top: 20%;
  left: 64%;
}
.back {
  display: inline-block;
  color: #98abc1;
  margin-bottom: 15px;
}
.detail-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 25px;
  margin-bottom: 18px;
}
.detail-actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}
.detail-stats {
  grid-template-columns: repeat(3, 1fr);
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}
th,
td {
  text-align: right;
  padding: 15px 18px;
  border-bottom: 1px solid #1c3046;
}
th {
  color: #8297b0;
  font-size: 10px;
  font-weight: 600;
  background: #0a1624;
}
td {
  color: #cbd7e5;
  font-size: 12px;
}
tr:last-child td {
  border-bottom: 0;
}
.row-error {
  display: block;
  color: #ff8ea0;
  margin-top: 5px;
}
.nodes-row td {
  background: #08131f;
}
.node-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.node-pill {
  display: flex;
  gap: 8px;
  border: 1px solid;
  border-radius: 9px;
  padding: 7px 9px;
}
.node-pill small {
  color: #91a5bd;
}
.node-pill.ok {
  border-color: #45e19b44;
}
.node-pill.fail {
  border-color: #ff647c44;
}
.empty-cell {
  text-align: center;
  color: var(--muted);
  padding: 35px;
}
.settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  gap: 18px;
}
.settings-card { overflow: visible; }
.form-body { padding: 22px; }
.form-body > label {
  display: block;
  color: #c9d5e4;
  font-size: 12px;
  margin: 0 0 17px;
}
.form-body input:not([type="checkbox"]),
.form-body select {
  display: block;
  width: 100%;
  margin-top: 7px;
  background: #07121f;
  border: 1px solid #243a55;
  color: #fff;
  border-radius: 11px;
  padding: 12px;
  outline: none;
}
.form-body input:focus,
.form-body select:focus {
  border-color: #21d4c2;
  box-shadow: 0 0 0 3px #21d4c214;
}
.check-row {
  display: flex !important;
  align-items: center;
  gap: 12px;
  background: #091522;
  border: 1px solid #1d3046;
  border-radius: 12px;
  padding: 12px;
}
.check-row input { width: 18px; height: 18px; accent-color: var(--cyan); }
.check-row span { display: flex; flex-direction: column; }
.check-row small { color: var(--muted); }
.info-card { padding: 25px; }
.info-card h2 { margin: 8px 0 20px; }
.info-card code {
  color: var(--cyan);
  background: #07121f;
  border: 1px solid #1f344b;
  border-radius: 7px;
  padding: 5px 8px;
}
.info-card p { color: var(--muted); font-size: 12px; }
.danger-zone form { margin-top: 12px; }
.status-list { display: grid; grid-template-columns: auto 1fr; gap: 12px; margin: 0; }
.status-list dt { color: var(--muted); }
.status-list dd { margin: 0; overflow-wrap: anywhere; }
.inline-test { margin-top: 16px; }
.hero-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.hero-actions form { margin: 0; }
.group-stack { display: grid; gap: 18px; }
.group-panel { overflow: hidden; }
.group-head h2 { display: flex; align-items: center; gap: 9px; }
.group-dot { width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 12px currentColor; }
.compact-empty { padding: 25px; }
.group-manage-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.group-manage-card { padding: 20px; }
.group-manage-card > form:first-child > label { display: block; color: #c9d5e4; font-size: 12px; margin: 15px 0; }
.group-manage-card input:not([type="checkbox"]):not([type="color"]) { display: block; width: 100%; margin-top: 7px; background: #07121f; border: 1px solid #243a55; color: #fff; border-radius: 11px; padding: 11px; }
.group-title { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.group-title input[type="color"] { width: 44px; height: 44px; border: 0; padding: 0; background: none; }
.group-title div { display: flex; flex-direction: column; }
.group-title strong { font-size: 17px; }
.group-title small { color: var(--muted); }
.danger-link { display: block; margin: 14px auto 0; }
.sub-settings { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 20px 0; padding: 18px 0 2px; }
.sub-settings h3 { font-size: 14px; margin: 0 0 14px; }
.hour-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hour-grid label { color: #c9d5e4; font-size: 12px; }
.standalone-select { background: #101f31; color: var(--text); border: 1px solid var(--line); border-radius: 11px; padding: 11px 13px; }
.target-settings { margin-bottom: 18px; }
.inline-settings { display: grid; grid-template-columns: minmax(180px, 0.6fr) minmax(280px, 1fr) auto; gap: 14px; align-items: end; }
@media (max-width: 900px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .monitor-grid {
    grid-template-columns: 1fr;
  }
  .login-card {
    grid-template-columns: 1fr;
  }
  .login-visual {
    display: none;
  }
  .topbar nav > a {
    display: none;
  }
  .user-chip {
    display: none;
  }
  .detail-hero {
    align-items: flex-start;
    flex-direction: column;
    gap: 20px;
  }
  .settings-grid { grid-template-columns: 1fr; }
  .group-manage-grid { grid-template-columns: 1fr; }
  .inline-settings { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .shell {
    padding: 25px 14px 55px;
  }
  .topbar {
    padding: 0 14px;
  }
  .topbar nav {
    gap: 10px;
  }
  .hero-row {
    align-items: flex-start;
    flex-direction: column;
  }
  .hero-row h1 {
    font-size: 28px;
  }
  .stats-grid {
    gap: 9px;
  }
  .stat-card {
    padding: 12px;
  }
  .monitor-grid {
    padding: 10px;
  }
  .metrics {
    grid-template-columns: 1fr;
  }
  .metrics div {
    border-left: 0;
    border-bottom: 1px solid #192b40;
  }
  .login-shell {
    padding: 12px;
  }
  .login-form {
    padding: 38px 24px;
  }
  .flash-stack {
    left: 12px;
    right: 12px;
  }
  .detail-stats {
    grid-template-columns: 1fr;
  }
  .detail-actions {
    width: 100%;
  }
  .hero-actions { width: 100%; }
  .hero-actions .button, .hero-actions form { flex: 1; }
  .hero-actions form .button { width: 100%; }
  .hour-grid { grid-template-columns: 1fr; }
}
