:root {
  --bg: #eef3f8;
  --bg-accent: #d7e4f4;
  --surface: rgba(255, 255, 255, 0.95);
  --surface-strong: #ffffff;
  --surface-dark: #1f2937;
  --surface-dark-2: #111827;
  --text: #1f2937;
  --text-muted: #5b6778;
  --line: rgba(15, 23, 42, 0.08);
  --line-strong: rgba(15, 23, 42, 0.14);
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: rgba(37, 99, 235, 0.12);
  --success-soft: rgba(34, 197, 94, 0.16);
  --success: #15803d;
  --warning-soft: rgba(245, 158, 11, 0.18);
  --warning: #b45309;
  --danger-soft: rgba(239, 68, 68, 0.16);
  --danger: #b91c1c;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  --radius: 18px;
  --radius-sm: 12px;
  --container: 1120px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 30%),
    linear-gradient(180deg, var(--bg-accent) 0%, var(--bg) 180px, #f7f9fc 100%);
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.page-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(17, 24, 39, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 6px 24px rgba(15, 23, 42, 0.18);
}

.topbar-inner,
.page-container {
  width: min(calc(100% - 32px), var(--container));
  margin: 0 auto;
}

.topbar-inner {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #f8fafc;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #60a5fa, #2563eb);
  color: white;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
  font-size: 15px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-title {
  font-size: 16px;
}

.brand-subtitle {
  color: rgba(226, 232, 240, 0.72);
  font-size: 12px;
  font-weight: 500;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.topnav a {
  color: rgba(226, 232, 240, 0.9);
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  text-decoration: none;
}

.topnav a:hover,
.topnav a.is-active {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.page-container {
  padding: 24px 0 40px;
}

.hero-card,
.surface-card,
.info-card,
.server-card,
.table-shell {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 26px 28px;
  margin-bottom: 18px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.9fr);
  gap: 24px;
  align-items: start;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 14px;
}

.hero-title {
  margin: 0 0 10px;
  font-size: clamp(2rem, 3vw, 2.8rem);
  line-height: 1.08;
}

.hero-text,
.section-text,
.muted,
.helper-text,
.meta-text {
  color: var(--text-muted);
}

.hero-actions,
.action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.input-row {
  display: grid;
  gap: 14px;
  margin: 20px 0;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
}

input[type="text"],
input[type="password"],
input[type="search"],
select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  padding: 14px 16px;
  font: inherit;
  color: var(--text);
  background: rgba(255, 255, 255, 0.96);
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
select:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.5);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.button,
button,
.button-link {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 13px 16px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease, border-color 120ms ease;
  text-align: center;
}

.button:hover,
button:hover,
.button-link:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

.button-primary,
button,
.button-link.button-primary {
  color: white;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.2);
}

.button-secondary,
.button-link.button-secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.9);
  border-color: var(--line-strong);
}

.button-warning {
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

.button-neutral {
  color: var(--text);
  background: rgba(148, 163, 184, 0.14);
  border-color: rgba(148, 163, 184, 0.24);
}

.server-preview-card {
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.92));
}

.server-preview-list {
  display: grid;
  gap: 12px;
}

.server-preview-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(37, 99, 235, 0.04);
  border: 1px solid rgba(37, 99, 235, 0.08);
}

.server-preview-meta {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 13px;
}

.surface-card,
.info-card,
.server-card,
.table-shell {
  padding: 22px 24px;
  margin-bottom: 18px;
}

.section-title {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.notice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(37, 99, 235, 0.07);
  border: 1px solid rgba(37, 99, 235, 0.12);
}

.notice-icon,
.inline-icon {
  flex: 0 0 auto;
}

.message {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.22);
  color: #92400e;
  font-weight: 600;
}

.message-error {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
  margin-bottom: 18px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-weight: 600;
}

.table-shell {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 16px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  vertical-align: top;
}

th {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.badge-online {
  background: var(--success-soft);
  color: var(--success);
}

.badge-offline {
  background: var(--danger-soft);
  color: var(--danger);
}

.badge-status {
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary-dark);
}

.badge-reserved,
.badge-maintenance {
  background: var(--warning-soft);
  color: var(--warning);
}

.user-list {
  display: grid;
  gap: 10px;
}

.user-row,
.server-row-title {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.username {
  font-weight: 700;
}

.empty {
  text-align: center;
  color: var(--text-muted);
  padding: 24px 12px;
}

.quick-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.quick-link {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(148, 163, 184, 0.12);
  color: var(--text);
  font-weight: 600;
}

.center-card {
  width: min(calc(100% - 32px), 760px);
  margin: 40px auto;
}

.launch-card {
  padding: 28px;
}

code {
  padding: 3px 8px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.06);
  color: var(--text);
}

.auto-open-note {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

@media (max-width: 900px) {
  .hero-grid,
  .page-header {
    grid-template-columns: 1fr;
    display: grid;
  }

  .topbar-inner {
    padding: 12px 0;
    align-items: start;
    flex-direction: column;
  }

  .hero-actions,
  .action-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .topbar-inner,
  .page-container {
    width: min(calc(100% - 24px), var(--container));
  }

  .hero-card,
  .surface-card,
  .info-card,
  .server-card,
  .table-shell,
  .launch-card {
    padding: 20px;
  }

  th,
  td {
    padding: 14px 10px;
  }
}
