:root {
  --bg: #07111c;
  --bg-deep: #040a12;
  --panel: rgba(11, 22, 38, 0.9);
  --panel-strong: rgba(16, 30, 52, 0.92);
  --panel-soft: rgba(18, 35, 59, 0.7);
  --line: rgba(148, 163, 184, 0.16);
  --line-strong: rgba(148, 163, 184, 0.3);
  --text: #edf3ff;
  --muted: #95a8c5;
  --accent: #5cf0b1;
  --accent-strong: #18d08b;
  --accent-soft: rgba(92, 240, 177, 0.14);
  --blue-soft: rgba(82, 170, 255, 0.14);
  --danger: #ff8a8a;
  --danger-soft: rgba(255, 112, 112, 0.14);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
  --shadow-soft: 0 18px 40px rgba(0, 0, 0, 0.2);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(24, 208, 139, 0.1), transparent 28%),
    radial-gradient(circle at 85% 12%, rgba(82, 170, 255, 0.16), transparent 24%),
    linear-gradient(180deg, #08111d 0%, #050a12 100%);
}

body::before {
  content: "";
  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: 30px 30px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent);
}

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

code {
  font-family: "Cascadia Code", "Consolas", monospace;
  font-size: 0.93rem;
}

.page-aura {
  position: fixed;
  z-index: -1;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
}

.page-aura-one {
  top: -120px;
  left: -80px;
  background: rgba(92, 240, 177, 0.18);
}

.page-aura-two {
  top: 180px;
  right: -120px;
  background: rgba(82, 170, 255, 0.18);
}

.container {
  width: min(1220px, calc(100vw - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
  background: rgba(7, 14, 24, 0.7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0;
}

.brand-wrap {
  display: grid;
  gap: 8px;
}

.brand-badge,
.eyebrow,
.sidecard-kicker {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #baf4dc;
  background: rgba(92, 240, 177, 0.12);
  border: 1px solid rgba(92, 240, 177, 0.22);
}

.brand {
  display: inline-block;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

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

.page-content {
  padding: 30px 0 56px;
}

.hero-card,
.form-shell,
.table-shell,
.server-card,
.login-sidecard,
.empty-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 26, 44, 0.95), rgba(8, 17, 29, 0.92));
  box-shadow: var(--shadow);
}

.hero-card::before,
.form-shell::before,
.login-sidecard::before,
.server-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), transparent 30%);
}

.hero-card {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
  border-radius: 28px;
  margin-bottom: 24px;
}

.hero-copy {
  display: grid;
  align-content: start;
  gap: 10px;
}

.hero-card h1,
.form-shell h1 {
  margin: 0;
  font-size: clamp(1.8rem, 2vw, 2.4rem);
}

.hero-card p,
.form-shell p,
.section-title p,
.login-sidecard p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.hero-meta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: flex-end;
}

.metric-card,
.mini-stat {
  min-width: 150px;
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow-soft);
}

.metric-card strong,
.mini-stat strong {
  display: block;
  margin-top: 10px;
  font-size: 1.2rem;
}

.metric-label,
.mini-stat span {
  color: var(--muted);
  font-size: 0.86rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.server-card,
.empty-card {
  border-radius: 24px;
  padding: 20px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.server-card:hover,
.empty-card:hover {
  transform: translateY(-4px);
  border-color: rgba(92, 240, 177, 0.28);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.36);
}

.server-card h2,
.empty-card h2,
.login-sidecard h2,
.section-title h2 {
  margin: 16px 0;
  font-size: 1.12rem;
}

.card-top,
.card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.card-foot {
  margin-top: 16px;
}

.region-pill,
.status-pill,
.soft-tag,
.mono-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.86rem;
}

.region-pill {
  color: #c9f8e5;
  background: rgba(92, 240, 177, 0.12);
  border: 1px solid rgba(92, 240, 177, 0.2);
}

.status-pill {
  color: #cde3ff;
  background: rgba(82, 170, 255, 0.12);
  border: 1px solid rgba(82, 170, 255, 0.2);
}

.soft-tag {
  color: #d9e4f5;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.mono-badge {
  font-family: "Cascadia Code", "Consolas", monospace;
  color: #d8fff0;
  background: rgba(92, 240, 177, 0.08);
  border: 1px solid rgba(92, 240, 177, 0.16);
}

.info-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.info-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.info-list li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.info-list strong {
  color: #bfd1ec;
}

.primary-button,
.ghost-button,
.danger-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 16px;
  padding: 11px 16px;
  border: 1px solid transparent;
  font: inherit;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.primary-button {
  color: #082113;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 14px 28px rgba(24, 208, 139, 0.24);
}

.ghost-button {
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--line);
}

.danger-button {
  color: #ffd2d2;
  background: var(--danger-soft);
  border-color: rgba(255, 112, 112, 0.24);
}

.primary-button:hover,
.ghost-button:hover,
.danger-button:hover {
  transform: translateY(-1px);
}

.small-button {
  min-width: 72px;
  padding: 8px 12px;
}

.wide-button {
  width: 100%;
}

.form-shell {
  border-radius: 28px;
  padding: 28px;
}

.narrow {
  max-width: 520px;
  margin: 0 auto;
}

.login-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  gap: 20px;
  align-items: stretch;
}

.login-panel,
.login-sidecard {
  min-height: 100%;
}

.login-sidecard {
  border-radius: 28px;
  padding: 28px;
  display: grid;
  gap: 18px;
  align-content: start;
  background:
    radial-gradient(circle at top right, rgba(82, 170, 255, 0.18), transparent 38%),
    linear-gradient(180deg, rgba(12, 24, 43, 0.96), rgba(10, 18, 31, 0.95));
}

.feature-list {
  margin: 0;
  padding-left: 18px;
  color: #d6e3f5;
  display: grid;
  gap: 10px;
}

.sidecard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.stack-form,
.server-form-grid {
  margin-top: 24px;
}

.stack-form {
  display: grid;
  gap: 16px;
}

.stack-form label,
.field-grid label,
.full-span {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #c8d7eb;
  font-size: 0.95rem;
}

.stack-form input,
.field-grid input,
.full-span textarea {
  width: 100%;
  padding: 13px 14px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(11, 21, 37, 0.78);
  color: var(--text);
  font: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.stack-form input:focus,
.field-grid input:focus,
.full-span textarea:focus {
  outline: none;
  border-color: rgba(92, 240, 177, 0.44);
  box-shadow: 0 0 0 4px rgba(92, 240, 177, 0.1);
  background: rgba(14, 27, 46, 0.88);
}

.server-form-grid {
  display: grid;
  gap: 18px;
}

.form-section {
  display: grid;
  gap: 16px;
  padding: 20px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.quick-import-panel {
  background:
    radial-gradient(circle at top right, rgba(92, 240, 177, 0.08), transparent 36%),
    rgba(255, 255, 255, 0.03);
}

.section-title {
  display: grid;
  gap: 6px;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.full-span {
  grid-column: 1 / -1;
}

.form-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
}

.smart-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.raw-import-box {
  min-height: 280px;
  resize: vertical;
  line-height: 1.6;
}

.table-shell {
  border-radius: 28px;
  overflow: hidden;
}

.server-table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(6, 13, 22, 0.72);
}

.server-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 16px;
  text-align: left;
  font-size: 0.9rem;
  font-weight: 600;
  color: #d4e4fb;
  background: rgba(21, 36, 59, 0.96);
  border-bottom: 1px solid var(--line-strong);
}

.server-table td {
  padding: 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  vertical-align: top;
}

.server-table tbody tr:nth-child(odd) {
  background: rgba(255, 255, 255, 0.015);
}

.server-table tbody tr:hover {
  background: rgba(92, 240, 177, 0.05);
}

.ssh-command {
  display: inline-block;
  max-width: 300px;
  overflow-wrap: anywhere;
  color: #dafdeb;
}

.actions-cell {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.muted {
  color: var(--muted);
}

.flash-stack {
  display: grid;
  gap: 12px;
  margin-bottom: 20px;
}

.flash {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid;
  backdrop-filter: blur(10px);
}

.flash-success {
  color: #cdf7e3;
  background: rgba(92, 240, 177, 0.1);
  border-color: rgba(92, 240, 177, 0.2);
}

.flash-error {
  color: #ffd8d8;
  background: rgba(255, 112, 112, 0.1);
  border-color: rgba(255, 112, 112, 0.2);
}

.empty-card p {
  margin: 0;
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(4, 10, 18, 0.72);
  backdrop-filter: blur(12px);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 0 22px;
  color: var(--muted);
  font-size: 0.88rem;
  flex-wrap: wrap;
}

@media (max-width: 1080px) {
  .login-layout,
  .hero-card,
  .form-head,
  .header-inner {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .hero-meta {
    justify-content: flex-start;
  }
}

@media (max-width: 860px) {
  .field-grid,
  .sidecard-grid {
    grid-template-columns: 1fr;
  }

  .container {
    width: min(100vw - 20px, 1220px);
  }

  .page-content {
    padding-top: 20px;
  }

  .hero-card,
  .form-shell,
  .login-sidecard,
  .server-card,
  .empty-card {
    border-radius: 22px;
    padding: 20px;
  }

  .server-table,
  .server-table thead,
  .server-table tbody,
  .server-table th,
  .server-table td,
  .server-table tr {
    display: block;
  }

  .server-table thead {
    display: none;
  }

  .server-table tbody {
    display: grid;
    gap: 14px;
    padding: 14px;
  }

  .server-table tr {
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.02);
    overflow: hidden;
  }

  .server-table td {
    display: grid;
    gap: 6px;
    padding: 12px 14px;
  }

  .server-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }

  .smart-actions,
  .form-actions {
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .brand {
    font-size: 1.24rem;
  }

  .hero-card h1,
  .form-shell h1 {
    font-size: 1.6rem;
  }

  .metric-card,
  .mini-stat {
    width: 100%;
  }

  .nav-actions {
    width: 100%;
  }

  .nav-actions a,
  .nav-actions form,
  .nav-actions button {
    width: 100%;
  }
}
