:root {
  --bg-top: #f7fbff;
  --bg-bottom: #edf2f8;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: rgba(255, 255, 255, 0.9);
  --surface-soft: rgba(246, 249, 252, 0.88);
  --text: #10213c;
  --muted: #65758d;
  --muted-strong: #45546c;
  --line: rgba(125, 148, 180, 0.18);
  --line-strong: rgba(102, 124, 155, 0.24);
  --primary: #0f76ff;
  --primary-deep: #0b53be;
  --primary-soft: rgba(15, 118, 255, 0.1);
  --cyan: #00a8b3;
  --cyan-soft: rgba(0, 168, 179, 0.1);
  --emerald: #17825c;
  --emerald-soft: rgba(23, 130, 92, 0.11);
  --amber: #d38a10;
  --amber-soft: rgba(211, 138, 16, 0.12);
  --danger: #d24e44;
  --danger-soft: rgba(210, 78, 68, 0.12);
  --shadow-lg: 0 26px 90px rgba(16, 33, 60, 0.09);
  --shadow-md: 0 18px 40px rgba(16, 33, 60, 0.08);
  --shadow-sm: 0 10px 28px rgba(16, 33, 60, 0.06);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --container: 1320px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Avenir Next", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(15, 118, 255, 0.14), transparent 28%),
    radial-gradient(circle at 88% 16%, rgba(0, 168, 179, 0.12), transparent 26%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
  position: relative;
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  pointer-events: none;
  z-index: -2;
  filter: blur(18px);
}

body::before {
  width: 460px;
  height: 460px;
  top: -160px;
  right: -120px;
  background: radial-gradient(circle, rgba(15, 118, 255, 0.16), transparent 70%);
}

body::after {
  width: 380px;
  height: 380px;
  bottom: -180px;
  left: -80px;
  background: radial-gradient(circle, rgba(0, 168, 179, 0.14), transparent 68%);
}

.ambient,
.ambient-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

.ambient-a {
  background: radial-gradient(circle at 22% 26%, rgba(255, 255, 255, 0.42), transparent 22%);
}

.ambient-b {
  background: radial-gradient(circle at 76% 12%, rgba(255, 255, 255, 0.28), transparent 18%);
}

.ambient-grid {
  background-image: linear-gradient(rgba(120, 143, 173, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 143, 173, 0.05) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.28), transparent 78%);
}

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

button,
input,
select,
textarea {
  font: inherit;
}

button,
.button-link,
.ghost,
.nav-link {
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, background 0.22s ease,
    color 0.22s ease;
}

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

.premium-surface,
.panel,
.stat-card,
.auth-showcase,
.hero-panel,
.page-hero,
.nav-strip,
.shell-header {
  background: var(--surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.app-shell {
  max-width: var(--container);
  margin: 0 auto;
  padding: 24px 24px 44px;
}

.shell-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 30px;
  border-radius: var(--radius-xl);
}

.brand-cluster {
  display: grid;
  gap: 14px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 16px;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #ffffff;
  background: linear-gradient(135deg, #0f76ff 0%, #00a8b3 100%);
  box-shadow: 0 18px 36px rgba(15, 118, 255, 0.26);
}

.brand-mark strong {
  display: block;
  margin-top: 6px;
  font-size: 28px;
  letter-spacing: -0.03em;
}

.shell-summary {
  max-width: 660px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.shell-status {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.signal-pill,
.user-pill,
.soft-badge,
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.signal-pill {
  color: var(--primary-deep);
  background: rgba(15, 118, 255, 0.12);
  border: 1px solid rgba(15, 118, 255, 0.16);
}

.user-pill {
  color: var(--text);
  background: rgba(255, 255, 255, 0.64);
  border: 1px solid var(--line);
}

.nav-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding: 14px;
  border-radius: 24px;
}

.nav-strip form {
  margin: 0 0 0 auto;
}

.nav-link {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted-strong);
  border-radius: 16px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.nav-link.active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary) 0%, #0a63d8 100%);
  box-shadow: 0 16px 28px rgba(15, 118, 255, 0.18);
}

.nav-link:not(.active):hover,
.nav-link-danger:hover,
.ghost:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.72);
}

.nav-link-danger {
  color: var(--danger);
}

.page-shell {
  padding-top: 24px;
}

.page-shell--auth {
  max-width: 1220px;
  margin: 0 auto;
  padding: 34px 24px 48px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-text,
.muted,
.sub,
.table-sub,
.hero-mini-card small,
.hero-data-card small {
  color: var(--muted);
  line-height: 1.7;
}

.hero-panel,
.page-hero,
.panel {
  border-radius: var(--radius-xl);
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.95fr);
  gap: 22px;
  padding: 30px 32px;
}

.hero-copy h2,
.page-hero h2,
.login-panel h2,
.panel h2,
.auth-showcase h1 {
  margin: 12px 0 0;
  letter-spacing: -0.04em;
}

.hero-copy h2,
.auth-showcase h1 {
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.06;
}

.page-hero h2,
.panel h2,
.login-panel h2 {
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.12;
}

.hero-actions,
.form-actions,
.actions,
.badge-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-actions {
  margin-top: 24px;
}

.button-link,
button {
  border: none;
  border-radius: 16px;
  padding: 13px 18px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-deep) 100%);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(15, 118, 255, 0.18);
}

.ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: none;
}

.ghost.small {
  padding: 9px 12px;
  font-size: 12px;
  border-radius: 12px;
}

.hero-grid,
.info-grid,
.auth-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.hero-data-card,
.info-card,
.hero-mini-card,
.auth-metrics article {
  padding: 18px;
  border-radius: 22px;
  background: var(--surface-soft);
  border: 1px solid rgba(132, 155, 188, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.hero-data-card span,
.info-card span,
.hero-mini-card span,
.auth-metrics article span,
.stat-meta {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-data-card strong,
.info-card strong,
.hero-mini-card strong,
.auth-metrics article strong {
  display: block;
  margin-top: 12px;
  font-size: 20px;
  line-height: 1.35;
  word-break: break-word;
}

.hero-data-card--wide,
.info-card--wide {
  grid-column: 1 / -1;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.stat-card {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border-radius: 26px;
}

.stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.6));
}

.stat-card strong {
  display: block;
  margin-top: 14px;
  font-size: 38px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.stat-card span {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
}

.accent-blue::after,
.accent-cyan::after,
.accent-amber::after,
.accent-emerald::after {
  content: "";
  position: absolute;
  inset: auto -34px -38px auto;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  opacity: 0.14;
}

.accent-blue::after {
  background: var(--primary);
}

.accent-cyan::after {
  background: var(--cyan);
}

.accent-amber::after {
  background: var(--amber);
}

.accent-emerald::after {
  background: var(--emerald);
}

.section-stack {
  display: grid;
  gap: 22px;
  margin-top: 22px;
}

.panel-stack {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(320px, 0.92fr);
  gap: 22px;
  margin-top: 22px;
}

.panel {
  padding: 26px;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.info-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.table-wrap {
  overflow: auto;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.66);
}

table {
  width: 100%;
  min-width: 880px;
  border-collapse: separate;
  border-spacing: 0;
}

thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(248, 251, 254, 0.95);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

th,
td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

tbody tr:hover {
  background: rgba(15, 118, 255, 0.035);
}

tbody tr:last-child td {
  border-bottom: none;
}

.table-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.table-sub {
  margin-top: 6px;
  font-size: 12px;
}

code {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 6px 10px;
  border-radius: 12px;
  background: var(--primary-soft);
  color: var(--primary-deep);
  font-size: 12px;
  font-weight: 700;
  word-break: break-all;
}

.soft-badge {
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted-strong);
  border: 1px solid var(--line);
  font-size: 12px;
}

.soft-badge.health-healthy {
  color: var(--emerald);
  background: rgba(23, 130, 92, 0.1);
  border-color: rgba(23, 130, 92, 0.18);
}

.soft-badge.health-down {
  color: var(--danger);
  background: rgba(210, 78, 68, 0.1);
  border-color: rgba(210, 78, 68, 0.18);
}

.soft-badge.health-unknown {
  color: var(--amber);
  background: rgba(211, 138, 16, 0.11);
  border-color: rgba(211, 138, 16, 0.18);
}

.status-pill.success {
  color: var(--emerald);
  background: var(--emerald-soft);
}

.status-pill.danger {
  color: var(--danger);
  background: var(--danger-soft);
}

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

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

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

.form-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.form-note {
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

label span,
.filter-field span {
  display: block;
  margin-bottom: 9px;
  color: var(--muted-strong);
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(120, 142, 174, 0.2);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--text);
  padding: 14px 16px;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

input::placeholder,
textarea::placeholder {
  color: rgba(101, 117, 141, 0.78);
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(15, 118, 255, 0.42);
  box-shadow: 0 0 0 4px rgba(15, 118, 255, 0.11);
}

textarea {
  resize: vertical;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(280px, 2fr) repeat(2, minmax(180px, 1fr)) auto auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 20px;
}

.filter-field {
  display: block;
}

.actions {
  gap: 8px;
}

.actions form {
  margin: 0;
}

.inline-form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.inline-form input {
  min-width: 128px;
  flex: 1 1 120px;
}

.quota-cell strong {
  display: block;
  margin-bottom: 10px;
  font-size: 18px;
}

.quota-bar {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(15, 118, 255, 0.08);
}

.quota-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--cyan));
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 16px;
  border-radius: 18px;
  border: 1px dashed rgba(124, 146, 177, 0.28);
  background: rgba(255, 255, 255, 0.6);
}

.checkbox input {
  width: 18px;
  height: 18px;
  margin: 0;
  flex: 0 0 auto;
}

.checkbox span {
  margin: 0;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.75fr);
  gap: 22px;
  margin-top: 22px;
}

.side-panel {
  align-self: start;
  display: grid;
  gap: 14px;
}

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

.pool-card {
  display: grid;
  gap: 16px;
  padding: 22px;
  border-radius: 24px;
  background: rgba(247, 250, 253, 0.86);
  border: 1px solid rgba(132, 155, 188, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.68);
}

.pool-card--create {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(240, 247, 255, 0.84) 100%);
}

.pool-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.pool-card h3 {
  margin: 10px 0 0;
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.pool-card .badge-row {
  margin-top: -2px;
}

.pool-card .form-actions {
  margin-top: 2px;
}

.feature-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.8;
}

.hint-card {
  padding: 18px;
  border-radius: 20px;
  background: rgba(248, 250, 253, 0.86);
  border: 1px solid rgba(132, 155, 188, 0.14);
}

.hint-card strong {
  display: block;
  margin-bottom: 10px;
  font-size: 15px;
}

.hint-card--compact {
  padding: 16px 18px;
  gap: 10px;
}

.hint-card--compact strong {
  margin-bottom: 8px;
}

.hint-card--compact .muted,
.hint-card--compact .form-note {
  font-size: 13px;
  line-height: 1.7;
}

.page-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  padding: 28px 30px;
}

.page-hero-side,
.page-hero-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-mini-card {
  min-width: 210px;
}

.auth-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.86fr);
  gap: 24px;
  align-items: stretch;
}

.auth-showcase,
.login-panel {
  padding: 30px 32px;
  border-radius: var(--radius-xl);
}

.auth-showcase {
  display: grid;
  align-content: start;
  gap: 18px;
}

.auth-metrics {
  margin-top: 10px;
}

.login-panel {
  align-self: center;
}

.flash-stack {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.flash {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid transparent;
  box-shadow: var(--shadow-sm);
}

.flash.success {
  color: var(--emerald);
  background: var(--emerald-soft);
  border-color: rgba(23, 130, 92, 0.12);
}

.flash.error {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: rgba(210, 78, 68, 0.12);
}

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

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-panel,
.page-hero,
.panel,
.stat-card,
.auth-showcase,
.login-panel {
  animation: rise-in 0.45s ease both;
}

@media (max-width: 1200px) {
  .hero-panel,
  .panel-stack,
  .split-layout,
  .auth-grid,
  .shell-header,
  .page-hero,
  .panel-head {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .stats-grid,
  .info-grid,
  .pool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .app-shell,
  .page-shell--auth {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-grid,
  .auth-metrics,
  .stats-grid,
  .info-grid,
  .dense-grid,
  .pool-grid,
  .form-grid.two,
  .filter-bar {
    grid-template-columns: 1fr;
  }

  .nav-strip form {
    margin-left: 0;
  }

  .page-hero-side,
  .page-hero-meta {
    width: 100%;
  }
}

@media (max-width: 720px) {
  .shell-header,
  .hero-panel,
  .page-hero,
  .panel,
  .auth-showcase,
  .login-panel {
    padding: 22px;
    border-radius: 22px;
  }

  .brand-mark strong {
    font-size: 22px;
  }

  .hero-copy h2,
  .auth-showcase h1 {
    font-size: 30px;
  }

  .page-hero h2,
  .panel h2,
  .login-panel h2 {
    font-size: 24px;
  }

  .nav-strip {
    padding: 10px;
  }

  .nav-link,
  .button-link,
  .ghost,
  button {
    width: 100%;
    justify-content: center;
  }

  table {
    min-width: 760px;
  }
}
