:root {
  color-scheme: dark;
  font-family: "Segoe UI", Arial, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --background: #020b17;
  --panel: #03101f;
  --border: #07508a;
  --cyan: #00aaff;
  --green: #00e99a;
  --blue-muted: #8ebcff;
  --purple: #a63dff;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(ellipse at 63% -20%, #073263 0, transparent 38rem),
    var(--background);
  color: #eef5ff;
}

.dashboard {
  width: min(1600px, 100%);
  margin: 0 auto;
  padding: 22px 28px 18px;
}

.hero {
  min-height: 194px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px clamp(4px, 3vw, 36px);
  border-bottom: 1px solid #0871b6;
  background:
    radial-gradient(ellipse at 75% 50%, #063160 0, transparent 32%),
    linear-gradient(90deg, #020b17 4%, #04162b 60%, #020b17 100%);
}

.eyebrow {
  margin: 0 0 4px;
  color: #4aa8e8;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .22em;
}

h1 {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.5vw, 20px);
  margin: 0;
  font-size: clamp(2.5rem, 6vw, 5.2rem);
  line-height: 1;
  letter-spacing: -.055em;
}

.brand-logo {
  width: clamp(42px, 5vw, 64px);
  height: clamp(42px, 5vw, 64px);
  flex: 0 0 auto;
  overflow: visible;
  filter: drop-shadow(0 0 9px #009dff55);
}
.logo-orbit {
  fill: #05172a;
  stroke: #0877b8;
  stroke-width: 1.5;
  stroke-dasharray: 9 5;
  transform-origin: 32px 32px;
  animation: logo-spin 12s linear infinite;
}
.logo-server { fill: #0a2742; stroke: #079de8; stroke-width: 2; }
.logo-light { fill: var(--green); filter: drop-shadow(0 0 4px var(--green)); animation: logo-pulse 1.4s ease-in-out infinite alternate; }
.logo-light:last-child { animation-delay: .7s; }
@keyframes logo-spin { to { transform: rotate(360deg); } }
@keyframes logo-pulse { from { opacity: .4; } to { opacity: 1; } }

.hero-subtitle {
  margin: 8px 0 12px;
  color: #b7d5ff;
  font-size: clamp(.9rem, 2vw, 1.45rem);
  font-weight: 700;
  letter-spacing: .08em;
}

.hero-tags { margin: 0; color: var(--blue-muted); font-size: 1rem; }
.hero-tags span { margin: 0 15px; color: #75a9e3; }

.header-status-group { display: flex; align-items: stretch; gap: 12px; }
.status-pill {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 250px;
  padding: 15px 20px;
  border: 1px solid #0877b8;
  border-radius: 17px;
  background: #020c18d9;
}

.time-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
  padding: 15px 18px;
  border: 1px solid #0877b8;
  border-radius: 17px;
  background: #020c18d9;
}
.time-pill strong { display: block; color: #eef5ff; font-size: 1rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.time-pill small { display: block; margin-top: 4px; color: #9ebbe1; font-size: .82rem; white-space: nowrap; }
.time-pill .time-label { margin: 0 0 3px; color: #4aa8e8; font-size: .65rem; font-weight: 700; letter-spacing: .12em; }
.time-icon { color: #78a8ec; font-size: 1.8rem; line-height: 1; }
.status-pill strong { display: block; color: var(--green); font-size: 1rem; }
.status-pill small { display: block; margin-top: 4px; color: #9ebbe1; font-size: .82rem; }
.status-dot { width: 15px; height: 15px; flex: 0 0 auto; border-radius: 50%; background: var(--green); box-shadow: 0 0 18px #00e99a77; animation: status-blink 1.2s ease-in-out infinite; }
@keyframes status-blink {
  50% { opacity: .35; box-shadow: 0 0 3px #00e99a33; }
}

.sample-notice {
  margin: 15px 0 0;
  padding: 11px 15px;
  border: 1px solid #806127;
  border-radius: 9px;
  background: #38290e66;
  color: #ffd98c;
  font-size: .9rem;
}

.sample-notice code { color: #fff0c5; }

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 17px;
  margin-top: 24px;
}

.metric-card {
  min-width: 0;
  min-height: 320px;
  padding: 24px 20px 14px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: linear-gradient(145deg, #03101e, #020a15 75%);
  box-shadow: inset 0 0 30px #00162b44;
  cursor: pointer;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.metric-card:hover { transform: translateY(-3px); border-color: #168bd0; box-shadow: inset 0 0 30px #00162b44, 0 8px 26px #001a30aa; }
.metric-card:focus-visible { outline: 2px solid #65bfff; outline-offset: 3px; }

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 17px;
  margin-top: 17px;
}
.service-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 10px 14px;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: linear-gradient(145deg, #03101e, #020a15 75%);
  box-shadow: inset 0 0 30px #00162b44;
  cursor: pointer;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.service-card:hover { transform: translateY(-3px); border-color: #168bd0; box-shadow: inset 0 0 30px #00162b44, 0 8px 26px #001a30aa; }
.service-card:focus-visible { outline: 2px solid #65bfff; outline-offset: 3px; }
.service-icon { grid-row: span 2; display: grid; width: 46px; height: 46px; place-items: center; border: 1px solid #0877b8; border-radius: 12px; color: var(--cyan); background: #041a2d; font-size: 1.8rem; }
.service-ftp .service-icon { color: var(--green); border-color: #087c62; }
.service-websites .service-icon { color: #b884ff; border-color: #6634a1; }
.service-games .service-icon { color: #ffb84d; border-color: #8d5c1e; }
.service-info { min-width: 0; }
.service-info h2 { overflow: hidden; margin: 0; font-size: 1.08rem; text-overflow: ellipsis; white-space: nowrap; }
.service-info p { overflow: hidden; margin: 4px 0 0; color: var(--blue-muted); font-size: .82rem; text-overflow: ellipsis; white-space: nowrap; }
.service-status { display: flex; align-items: center; gap: 7px; color: #b4d7f5; font-size: .82rem; }
.service-status i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 9px #00e99a88; animation: status-blink 1.2s ease-in-out infinite; }
.service-open { grid-column: 1 / -1; display: flex; justify-content: space-between; padding-top: 9px; border-top: 1px solid #0b3152; color: #83b9ed; font-size: .8rem; }
.service-open b { color: var(--cyan); font-size: 1.1rem; line-height: .8; }

.card-heading { display: flex; align-items: center; gap: 16px; min-height: 54px; }
.metric-icon { width: 55px; flex: 0 0 55px; color: var(--green); font-size: 3.25rem; font-weight: 700; line-height: 1; text-align: center; }
.metric-cpu .metric-icon { color: var(--cyan); }
.metric-storage .metric-icon { color: var(--purple); }
.metric-network .metric-icon { color: var(--green); }
.storage-icon { width: 54px; height: 48px; flex-basis: 54px; border: 4px solid currentColor; border-radius: 9px; font-size: 1rem; line-height: 40px; }
.card-heading h2 { margin: 0; font-size: 1.28rem; }
.card-heading p { margin: 4px 0 0; color: var(--blue-muted); font-size: .96rem; }

.metric-value { display: flex; align-items: baseline; gap: 8px; margin: 21px 0 8px; white-space: nowrap; }
.metric-value > strong { overflow: hidden; font-size: clamp(1.65rem, 2.2vw, 2.5rem); line-height: 1.1; text-overflow: ellipsis; }
.metric-value > span { color: #a9c7ef; font-size: .95rem; }
.metric-value .accent-value { margin-left: auto; color: var(--green); font-size: 1.13rem; }
.metric-cpu .accent-value { color: var(--cyan); }
.metric-storage .accent-value { color: var(--purple); }
.progress-track { height: 13px; overflow: hidden; border-radius: 99px; background: #102b49; }
.progress-fill { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #00e99a, #00c883); transition: width .35s ease; }
.metric-cpu .progress-fill { background: linear-gradient(90deg, #009ce8, #00b8ff); }
.metric-storage .progress-fill { background: linear-gradient(90deg, #8627df, #b34aff); }

.chart { height: 145px; margin: 22px -3px 4px; }
.chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.chart-grid { stroke: #12314b; stroke-width: .8; }
.chart-grid-vertical { opacity: .55; }
.chart-label { fill: #b7d5ff; font: 10px "Segoe UI", Arial, sans-serif; }
.chart-time { font-size: 9px; }
.chart-line { stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

.process-dialog {
  width: min(620px, calc(100% - 28px));
  max-height: min(680px, calc(100% - 32px));
  padding: 24px;
  border: 1px solid #0871b6;
  border-radius: 16px;
  background: linear-gradient(145deg, #06172a, #020a15 78%);
  color: #eef5ff;
  box-shadow: 0 24px 90px #000b;
}
.process-dialog::backdrop { background: #000a; backdrop-filter: blur(5px); }
.dialog-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.dialog-header .eyebrow { margin-bottom: 8px; }
.dialog-header h2 { margin: 0; font-size: clamp(1.25rem, 4vw, 1.7rem); }
.dialog-close { width: 38px; height: 38px; border: 1px solid #176098; border-radius: 9px; background: #061629; color: #b7d5ff; font-size: 1.7rem; line-height: 1; cursor: pointer; }
.dialog-close:hover { border-color: var(--cyan); color: white; }
.dialog-notice { margin: 18px 0 12px; color: #ffd98c; font-size: .88rem; }
.process-list { display: grid; gap: 10px; max-height: 390px; overflow-y: auto; margin: 20px 0 0; padding: 0; list-style: none; }
.process-item { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 12px; border: 1px solid #0b3152; border-radius: 10px; background: #03101f; }
.process-description { display: grid; gap: 4px; min-width: 0; }
.process-description strong { overflow: hidden; text-overflow: ellipsis; }
.process-description small { color: var(--blue-muted); }
.process-activity { color: var(--green); font-size: .85rem; }
.process-value { min-width: 80px; color: #b7d5ff; font-variant-numeric: tabular-nums; text-align: right; }

.detail-box { display: grid; gap: 10px; margin-top: 19px; padding: 12px 13px; border: 1px solid #063660; border-radius: 11px; }
.detail-box p { display: flex; align-items: center; gap: 9px; margin: 0; color: var(--blue-muted); font-size: .88rem; }
.detail-box strong { margin-left: auto; color: #eaf3ff; font-size: .9rem; white-space: nowrap; }
.legend-dot { width: 11px; height: 11px; flex: 0 0 auto; border-radius: 50%; background: var(--green); }
.metric-cpu .legend-dot, .legend-dot.blue { background: var(--cyan); }
.metric-storage .legend-dot { background: var(--purple); }
.legend-dot.muted { background: #698fc9; }

.system-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 22px;
  padding: 19px 10px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: linear-gradient(100deg, #03101f, #020b17);
}

.system-item { display: flex; align-items: center; justify-content: center; gap: 16px; min-width: 0; padding: 0 12px; }
.system-item + .system-item { border-left: 1px solid #176098; }
.system-symbol { color: #78a8ec; font-size: 2.8rem; line-height: 1; }
.online-symbol { color: var(--green); text-shadow: 0 0 14px #00e99a77; }
.system-item div { display: grid; gap: 3px; min-width: 0; }
.system-item span:not(.system-symbol) { color: var(--blue-muted); font-size: .94rem; }
.system-item strong { overflow-wrap: anywhere; font-size: 1.2rem; }
.system-item small { color: var(--blue-muted); }

.footer { display: flex; align-items: center; gap: 20px; margin-top: 27px; color: #8fb8ee; font-size: .9rem; }
.footer > strong { color: #76b8ff; font-style: italic; white-space: nowrap; }
.footer-line { height: 1px; flex: 1; background: linear-gradient(90deg, #1478ba, transparent); }
.footer i { padding: 0 9px; color: #72a8e7; font-style: normal; }
@media (max-width: 1050px) {
  .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-value > strong { font-size: clamp(1.8rem, 4vw, 2.5rem); }
}

@media (max-width: 650px) {
  .dashboard { padding: 10px 12px 16px; }
  .hero { min-height: auto; flex-direction: column; align-items: flex-start; padding: 24px 8px; }
  .header-status-group { width: 100%; flex-direction: column; }
  .status-pill, .time-pill { width: 100%; min-width: 0; }
  .hero-tags span { margin: 0 6px; }
  h1 { font-size: clamp(2rem, 10vw, 3.4rem); }
  .brand-logo { width: 42px; height: 42px; }
  .metrics-grid { grid-template-columns: 1fr; gap: 12px; margin-top: 14px; }
  .metric-card { min-height: 0; padding: 20px 16px 14px; }
  .services-grid { grid-template-columns: 1fr; gap: 12px; margin-top: 12px; }
  .system-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 0; }
  .system-item { justify-content: flex-start; padding: 0 10px; }
  .system-item:nth-child(3) { border-left: 0; }
  .footer { gap: 10px; font-size: .78rem; }
  .process-dialog { padding: 18px; }
  .process-item { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; }
  .process-activity { grid-column: 2; grid-row: 1; }
  .process-value { grid-column: 1 / -1; min-width: 0; text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
