:root {
  --bg: #11151b;
  --panel: rgba(27, 33, 43, 0.92);
  --line: rgba(255, 255, 255, 0.08);
  --text: #e8edf3;
  --muted: #9eaab8;
  --accent: #ef8f1a;
  --accent-soft: rgba(239, 143, 26, 0.16);
  --green: #79c36a;
  --shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  font-family: Inter, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(239, 143, 26, 0.18), transparent 25%),
    linear-gradient(180deg, #0d1117 0%, #11151b 100%);
}

a { color: inherit; text-decoration: none; }

.page-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.25;
}

.shell {
  position: relative;
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px 20px 50px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(17, 21, 27, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.logo-wrap { display: flex; align-items: center; gap: 14px; }
.logo-box {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffb04d, #d66d00);
  color: #1a1a1a;
  font-weight: 900;
  letter-spacing: 0.08em;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.5);
}
.brand { font-size: 1.15rem; font-weight: 800; }
.subtitle { color: var(--muted); font-size: 0.92rem; }

.nav-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.nav-link {
  padding: 10px 12px;
  color: var(--muted);
  border-radius: 12px;
}
.nav-link:hover { background: rgba(255,255,255,0.05); color: var(--text); }
.nav-user {
  padding: 9px 12px;
  border-radius: 12px;
  background: var(--accent-soft);
  border: 1px solid rgba(239,143,26,0.28);
}
.inline-form { margin: 0; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 12px;
  color: #1a1a1a;
  background: linear-gradient(180deg, #ffb04d, #d97706);
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(239, 143, 26, 0.25);
}
.btn:hover { filter: brightness(1.03); }
.btn-wide { width: 100%; }
.btn-small { min-height: 38px; }
.btn-secondary {
  color: var(--text);
  background: linear-gradient(180deg, #2c3747, #232b37);
  box-shadow: none;
}
.btn-ghost {
  color: var(--text);
  background: linear-gradient(180deg, #2a313c, #1e242d);
  box-shadow: none;
}

.flash {
  margin: 16px 0 0;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(121, 195, 106, 0.35);
  background: rgba(121, 195, 106, 0.13);
  color: #dff5d6;
}

.grid { display: grid; gap: 22px; margin-top: 22px; }
.login-grid { grid-template-columns: 1.25fr 0.9fr; }
.single-grid { grid-template-columns: 1fr; }
.stack-layout { display: grid; gap: 24px; margin-top: 22px; }
.card-grid { display: grid; gap: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.info-grid { display: grid; gap: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mini-grid { display: grid; gap: 14px; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 18px; }
.mini-grid--status { margin-top: 12px; }

.hero-panel,
.form-panel,
.server-card,
.info-panel,
.metric-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(30,37,48,0.96), rgba(19,23,30,0.96));
  box-shadow: var(--shadow);
}

.hero-panel {
  padding: 28px;
  position: relative;
  overflow: hidden;
}
.hero-panel::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -40px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(239,143,26,0.36), transparent 70%);
}
.hero-panel h1,
.form-panel h1 { margin: 10px 0 14px; font-size: clamp(2rem, 4vw, 3.4rem); line-height: 1.02; }
.hero-panel p,
.form-panel p,
.info-panel p { color: var(--muted); line-height: 1.7; }
.hero-pills { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 22px; }
.hero-pills span,
.panel-tag,
.server-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid rgba(239,143,26,0.25);
  color: #ffd39e;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.console-box {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(9, 12, 16, 0.72);
  border: 1px solid rgba(255,255,255,0.08);
  color: #87d37c;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  display: grid;
  gap: 8px;
}

.form-panel { padding: 28px; }
.form-panel--wide { max-width: 840px; }
.form-panel h2 { margin-top: 0; font-size: 1.8rem; }
.muted { color: var(--muted); }
.tiny-note { margin-top: 14px; font-size: 0.92rem; color: var(--muted); }

.stack-form { display: grid; gap: 14px; margin-top: 18px; }
label { display: grid; gap: 8px; color: var(--muted); font-weight: 600; }
input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(12, 16, 22, 0.9);
  color: var(--text);
  outline: none;
}
input:focus { border-color: rgba(239,143,26,0.65); box-shadow: 0 0 0 3px rgba(239,143,26,0.12); }

.hero-panel--dashboard {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 18px;
}
.hero-side { display: grid; gap: 12px; }
.metric-card {
  padding: 16px;
}
.metric-card span,
.metric span { display: block; color: var(--muted); font-size: 0.86rem; margin-bottom: 8px; }
.metric-card strong,
.metric strong { font-size: 1.18rem; }

.section-head { margin-bottom: 14px; }
.section-head h2 { margin: 0 0 6px; font-size: 1.6rem; }
.section-head p { margin: 0; color: var(--muted); }

.server-card { padding: 22px; }
.server-card__head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}
.server-card h3 { margin: 10px 0 8px; font-size: 1.35rem; }
.server-badge {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(121, 195, 106, 0.16);
  border: 1px solid rgba(121, 195, 106, 0.26);
  color: #d9f1d2;
  white-space: nowrap;
  font-weight: 700;
}
.server-motd { margin: 0; color: var(--muted); }
.metric-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 18px;
}
.metric {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
}
.meter {
  margin-top: 18px;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255,255,255,0.08);
}
.meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ef8f1a, #f5b04c);
}
.server-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.server-bottom {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.92rem;
}

.info-panel {
  padding: 22px;
  min-height: 168px;
}
.info-panel h3 { margin-top: 0; font-size: 1.35rem; }

.footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
  padding: 18px 8px 0;
  color: var(--muted);
  font-size: 0.92rem;
}

@media (max-width: 980px) {
  .login-grid,
  .hero-panel--dashboard,
  .card-grid,
  .info-grid,
  .mini-grid,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .topbar,
  .server-card__head,
  .footer,
  .server-bottom {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-actions { justify-content: flex-start; }
}
