:root {
  --bg: #080d13;
  --bg-soft: #0f1822;
  --panel: rgba(15, 22, 31, 0.92);
  --panel-2: rgba(19, 29, 40, 0.96);
  --panel-3: rgba(255, 255, 255, 0.04);
  --text: #edf3fb;
  --muted: #98a7b9;
  --line: rgba(158, 184, 214, 0.14);
  --line-strong: rgba(176, 206, 239, 0.24);
  --accent: #d6b46d;
  --accent-2: #f0d289;
  --danger: #b65959;
  --success: #4e8b64;
  --warning: #9b7c36;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0;
  font-family: Inter, Segoe UI, Arial, sans-serif;
  background:
    radial-gradient(circle at top, rgba(41, 67, 96, 0.34) 0%, rgba(15, 24, 34, 0.08) 32%, transparent 58%),
    linear-gradient(180deg, #081018 0%, #070c12 100%);
  color: var(--text);
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
a:hover { color: #fff; }
code {
  background: rgba(8, 13, 19, 0.86);
  border: 1px solid var(--line);
  padding: .15rem .4rem;
  border-radius: .5rem;
}
hr { border: 0; border-top: 1px solid var(--line); margin: 1.2rem 0; }
textarea, select, input {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(7, 13, 18, 0.88);
  color: var(--text);
  padding: .9rem 1rem;
  border-radius: 1rem;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
textarea:focus, select:focus, input:focus {
  border-color: rgba(214, 180, 109, 0.55);
  box-shadow: 0 0 0 4px rgba(214, 180, 109, 0.12);
}
textarea { resize: vertical; min-height: 120px; }

.shell { width: min(1360px, calc(100% - 2rem)); margin: 0 auto; padding: 1rem 0 3rem; }
main { display: grid; gap: 1.2rem; }

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0 1.6rem;
}
.site-header nav { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.site-header nav a,
.site-header nav button {
  padding: .7rem .95rem;
  border-radius: 999px;
  border: 1px solid transparent;
  color: #f7fbff;
  background: transparent;
}
.site-header nav a:hover,
.site-header nav button:hover {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.04);
}
.brand {
  font-size: 1.75rem;
  font-weight: 900;
  letter-spacing: .01em;
  display: inline-block;
}
.header-subtitle { margin: .25rem 0 0; color: var(--muted); font-size: .97rem; }

.notice {
  padding: 1rem 1.05rem;
  border-radius: 1.15rem;
  margin-bottom: 1rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
}
.notice.success { background: rgba(78, 139, 100, .13); border-color: rgba(78, 139, 100, .36); }
.notice.error { background: rgba(182, 89, 89, .13); border-color: rgba(182, 89, 89, .34); }
.notice.warning { background: rgba(155, 124, 54, .16); border-color: rgba(155, 124, 54, .34); }
.notice.info { background: rgba(255, 255, 255, .04); border-color: rgba(255, 255, 255, .12); }

.hero, .grid.two, .grid.three, .grid.four { display: grid; gap: 1.2rem; }
.hero { grid-template-columns: minmax(0, 1.8fr) minmax(320px, 1fr); align-items: stretch; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .018));
  border: 1px solid var(--line);
  border-radius: 1.55rem;
  padding: 1.25rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(214, 180, 109, .07), transparent 28%, transparent 70%, rgba(107, 143, 199, .07));
  pointer-events: none;
}
.narrow { width: min(760px, 100%); }
.form-card { margin: 0 auto; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: .16em;
  color: var(--accent);
  font-size: .76rem;
  font-weight: 800;
}
.hero-panel { padding: .2rem 0; }
.hero-copy { padding: .3rem 0; }
.hero h1 {
  font-size: clamp(2.4rem, 5vw, 4.5rem);
  line-height: .98;
  margin: .5rem 0 .9rem;
  letter-spacing: -.03em;
  max-width: 14ch;
}
.lede, .muted { color: var(--muted); }
.lede { max-width: 62ch; font-size: 1.08rem; }
.small { font-size: .9rem; }
.cta-row { display: flex; gap: .8rem; margin-top: 1.2rem; flex-wrap: wrap; }
.button, button {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  padding: .9rem 1.08rem;
  border-radius: 1rem;
  cursor: pointer;
  font-weight: 700;
  white-space: nowrap;
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.button:hover, button:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.06);
}
.button.primary, button.primary {
  background: linear-gradient(180deg, var(--accent-2), #c79f54);
  color: #111;
  border-color: transparent;
  box-shadow: 0 12px 30px rgba(214, 180, 109, 0.24);
}
.button.danger, button.danger {
  background: linear-gradient(180deg, #c56c6c, #9d4c4c);
  color: #fff;
  border-color: transparent;
}
label { display: grid; gap: .45rem; color: var(--muted); }
.stack { display: grid; gap: 1rem; }
.status-stack { display: grid; gap: 1rem; }
.status-panel { min-height: 100%; align-content: start; }
.status-item h2,
.metrics-grid h2 { font-size: clamp(1.8rem, 2.5vw, 2.45rem); margin: .28rem 0 0; }
.inline-form { display: inline; }
ul { margin: 0; padding-left: 1.1rem; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .82rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: #d7e4f4; font-weight: 700; }
.section-head { display: flex; justify-content: space-between; gap: 1rem; align-items: center; margin-bottom: .9rem; }
.list-item + .list-item { border-top: 1px solid var(--line); padding-top: 1rem; margin-top: 1rem; }
.server-row, .server-main { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.server-row { padding: .2rem 0; }
.server-card {
  border: 1px solid var(--line);
  border-radius: 1.15rem;
  padding: 1.05rem;
  background: rgba(255, 255, 255, .022);
}
.align-right { text-align: right; }
.player-pill {
  margin-top: .55rem;
  padding: .48rem .78rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  display: inline-block;
  background: rgba(255, 255, 255, .03);
}
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  padding: .42rem .72rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  text-transform: capitalize;
  white-space: nowrap;
  min-width: 5.75rem;
  background: rgba(255, 255, 255, .03);
}
.badge.success { background: rgba(78, 139, 100, .13); border-color: rgba(78, 139, 100, .35); }
.badge.warning { background: rgba(155, 124, 54, .16); border-color: rgba(155, 124, 54, .34); }
.badge.danger { background: rgba(182, 89, 89, .13); border-color: rgba(182, 89, 89, .34); }
.badge.muted { background: rgba(255, 255, 255, .03); }
.check-row { display: flex; align-items: center; gap: .75rem; }
.check-row input { width: auto; }
.check-grid { display: grid; gap: .8rem; }
.two-col-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.two-col-form .check-grid, .two-col-form button { grid-column: 1 / -1; }
.compact-form { min-width: 240px; }
.admin-grid { align-items: start; }
button[disabled] { opacity: .55; cursor: not-allowed; }

.server-meta-grid {
  display: grid;
  gap: .85rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-top: .95rem;
}
.server-meta {
  padding: .9rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, .02);
  border: 1px solid var(--line);
}
.server-meta strong { display: block; font-size: 1rem; margin: .25rem 0; }
.span-2 { grid-column: 1 / -1; }
.compact-actions { margin-top: 1rem; align-items: start; }
.pill-row { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1rem; }
.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .48rem .78rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .03);
  color: #dce8f6;
  font-size: .92rem;
}
.empty-state {
  display: grid;
  gap: .45rem;
  justify-items: start;
  padding: 1.05rem;
  border: 1px dashed rgba(214, 180, 109, 0.28);
  border-radius: 1.15rem;
  background: rgba(214, 180, 109, 0.05);
}
.empty-state h2,
.empty-state h3 { margin: 0; }
.empty-state p { margin: 0; color: var(--muted); max-width: 60ch; }

@media (max-width: 1100px) {
  .grid.four, .grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .hero, .grid.two, .grid.three, .grid.four, .two-col-form { grid-template-columns: 1fr; }
  .site-header { flex-direction: column; align-items: flex-start; }
  .align-right { text-align: left; }
  .server-row, .server-main { flex-direction: column; }
}

.admin-hub-card h1 {
  margin: .35rem 0 .4rem;
  font-size: clamp(1.9rem, 3vw, 2.9rem);
}
.admin-hub-head {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(260px, .8fr);
  gap: 1rem;
  align-items: start;
}
.admin-hub-copy { max-width: 68ch; }
.admin-focus-card {
  padding: 1rem 1.05rem;
  border-radius: 1.15rem;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.03);
}
.admin-focus-card strong {
  display: block;
  font-size: 1.15rem;
  margin: .25rem 0 .3rem;
}
.admin-tab-nav {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: .8rem;
  margin-top: 1.2rem;
}
.admin-tab-link {
  display: grid;
  gap: .28rem;
  padding: .95rem 1rem;
  border-radius: 1.15rem;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.025);
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.admin-tab-link span {
  font-weight: 800;
  color: #f5fbff;
}
.admin-tab-link small {
  color: var(--muted);
  line-height: 1.45;
}
.admin-tab-link:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  background: rgba(255,255,255,.05);
}
.admin-tab-link.active {
  border-color: rgba(214,180,109,.42);
  background: rgba(214,180,109,.09);
  box-shadow: 0 14px 34px rgba(214,180,109,.11);
}
.slim-stack { gap: .8rem; }
.compact-list-item p { margin: .35rem 0 0; }
.profile-card {
  display: grid;
  gap: .8rem;
  padding: 1rem;
  border-radius: 1.15rem;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.024);
}
.profile-card.selected {
  border-color: rgba(214,180,109,.42);
  background: rgba(214,180,109,.07);
}
.profile-card-head,
.profile-card-actions,
.button-row {
  display: flex;
  gap: .75rem;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.button-row { justify-content: flex-end; }
@media (max-width: 1100px) {
  .admin-tab-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .admin-hub-head,
  .admin-tab-nav { grid-template-columns: 1fr; }
}



.host-command-table {
  min-width: 1100px;
}
.host-command-table th,
.host-command-table td {
  white-space: normal;
  word-break: break-word;
}
.host-command-table th:nth-child(1),
.host-command-table td:nth-child(1) {
  min-width: 8.5rem;
}
.host-command-table th:nth-child(2),
.host-command-table td:nth-child(2) {
  min-width: 5.5rem;
}
.host-command-table th:nth-child(3),
.host-command-table td:nth-child(3),
.host-command-table th:nth-child(4),
.host-command-table td:nth-child(4) {
  min-width: 8rem;
}
.host-command-table th:nth-child(5),
.host-command-table td:nth-child(5) {
  min-width: 7rem;
}
.host-command-table th:nth-child(6),
.host-command-table td:nth-child(6) {
  min-width: 8rem;
}
.host-command-table th:nth-child(7),
.host-command-table td:nth-child(7) {
  min-width: 18rem;
}

.table-empty-state {
  width: 100%;
  margin: .35rem 0;
}
.actions-col {
  width: 1%;
  white-space: nowrap;
}
.deployment-actions {
  min-width: 220px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .55rem;
}
.deployment-actions .button {
  white-space: nowrap;
}
.action-link {
  display: inline-block;
  line-height: 1.45;
}
