:root {
  color-scheme: light;
  --ink: #24313a;
  --muted: #73808a;
  --faint: #9aa6ae;
  --line: rgba(129, 154, 162, 0.22);
  --line-soft: rgba(129, 154, 162, 0.14);
  --soft: #f6f8f6;
  --panel: rgba(255, 255, 252, 0.82);
  --panel-solid: #fffefd;
  --blue: #dcebf0;
  --green: #dfeae3;
  --pink: #f1e4e8;
  --cream: #f8f4ea;
  --brand: #6f96a4;
  --brand-deep: #496d78;
  --ok: #6f9a83;
  --warn: #b49a68;
  --danger: #b07373;
  --shadow: 0 18px 48px rgba(89, 112, 119, 0.11);
  --shadow-soft: 0 10px 26px rgba(89, 112, 119, 0.08);
  --radius: 18px;
  --radius-small: 14px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #f5f8f7;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 14% 12%, rgba(220, 235, 240, 0.86), transparent 34%),
    radial-gradient(circle at 86% 16%, rgba(241, 228, 232, 0.72), transparent 31%),
    linear-gradient(145deg, #f9f6ee 0%, #f4f8f8 42%, #edf5f2 100%);
  color: var(--ink);
  font-family: "Inter", "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
  font-size: 15px;
  letter-spacing: 0;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.34) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.28) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.52), transparent 68%);
}

button,
input,
textarea,
select {
  font: inherit;
  letter-spacing: 0;
}

button {
  border: 0;
  cursor: pointer;
}

.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.ripple,
.bubble {
  position: absolute;
  display: block;
  border-radius: 999px;
}

.ripple {
  border: 1px solid rgba(111, 150, 164, 0.16);
  animation: ripple-breathe 8s ease-in-out infinite;
}

.ripple-a {
  width: 330px;
  height: 330px;
  left: -120px;
  top: 90px;
  background: rgba(220, 235, 240, 0.22);
}

.ripple-b {
  width: 420px;
  height: 420px;
  right: -180px;
  bottom: 4vh;
  background: rgba(223, 234, 227, 0.18);
  animation-delay: -2.6s;
}

.bubble {
  width: 12px;
  height: 12px;
  background: rgba(111, 150, 164, 0.22);
  box-shadow: 0 0 32px rgba(111, 150, 164, 0.12);
  animation: bubble-meditate 10s ease-in-out infinite;
}

.bubble-a {
  left: 12%;
  bottom: 22%;
}

.bubble-b {
  right: 16%;
  top: 28%;
  width: 18px;
  height: 18px;
  background: rgba(241, 228, 232, 0.48);
  animation-delay: -3.4s;
}

.bubble-c {
  left: 58%;
  top: 10%;
  width: 9px;
  height: 9px;
  background: rgba(223, 234, 227, 0.58);
  animation-delay: -6s;
}

#app {
  position: relative;
  z-index: 1;
}

.shell {
  width: min(1160px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 32px 20px 42px;
  animation: page-in 420ms ease both;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.brand h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 650;
  line-height: 1.22;
  color: #2c3f47;
}

.brand p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.panel,
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
}

.panel {
  padding: 24px;
}

.login {
  width: min(440px, calc(100% - 32px));
  margin: 11vh auto 18px;
  padding: 28px;
  animation: float-in 520ms ease both;
}

.login-wrap {
  min-height: 100vh;
  display: grid;
  align-content: start;
}

.version-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 14px;
  margin: 24px auto 0;
  padding: 12px 16px;
  color: var(--faint);
  font-size: 12px;
  line-height: 1.5;
}

.version-footer span + span::before {
  content: "";
}

.login h1,
.panel h2,
.card h3 {
  margin: 0 0 14px;
  color: #2d4148;
  font-weight: 650;
  line-height: 1.32;
}

.login h1 {
  font-size: 24px;
}

.panel h2 {
  font-size: 19px;
}

.card h3 {
  font-size: 15px;
}

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

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  padding: 12px 14px;
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease, transform 180ms ease;
}

textarea {
  min-height: 118px;
  resize: vertical;
  line-height: 1.72;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(111, 150, 164, 0.56);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 0 5px rgba(220, 235, 240, 0.62);
}

.primary,
.secondary,
.ghost {
  min-height: 44px;
  border-radius: 999px;
  padding: 0 18px;
  font-weight: 650;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease;
}

.primary {
  background: linear-gradient(135deg, #7faabb, #7eaa92);
  color: #fff;
  box-shadow: 0 12px 24px rgba(111, 150, 164, 0.22);
}

.secondary {
  border: 1px solid rgba(111, 150, 164, 0.32);
  background: rgba(220, 235, 240, 0.54);
  color: var(--brand-deep);
}

.ghost {
  background: rgba(255, 255, 255, 0.42);
  color: var(--muted);
  border: 1px solid var(--line-soft);
}

.primary:hover,
.secondary:hover,
.ghost:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(89, 112, 119, 0.12);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none !important;
  box-shadow: none !important;
}

.danger-action {
  color: #9f6666;
  border-color: rgba(176, 115, 115, 0.28);
  background: rgba(241, 228, 232, 0.5);
}

.tabs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 2px 14px;
  margin-bottom: 16px;
  scroll-behavior: smooth;
}

.tabs button {
  flex: 0 0 auto;
  min-height: 42px;
  border-radius: 999px;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--muted);
  border: 1px solid var(--line);
  font-weight: 650;
  transition: color 180ms ease, background 180ms ease, transform 180ms ease, border-color 180ms ease;
}

.tabs button.active {
  background: rgba(111, 150, 164, 0.18);
  color: #355b66;
  border-color: rgba(111, 150, 164, 0.34);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.52);
}

.tabs button:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.82);
}

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

.grid > .panel[style*="grid-column"] {
  grid-column: auto !important;
}

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

.card {
  padding: 18px;
  animation: card-rise 420ms ease both;
}

.card p {
  margin: 7px 0;
  color: var(--muted);
  line-height: 1.76;
  white-space: pre-wrap;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  color: var(--faint);
  font-size: 13px;
  line-height: 1.5;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  background: rgba(220, 235, 240, 0.66);
  color: #526b74;
  font-size: 13px;
  font-weight: 650;
}

.badge.ok {
  background: rgba(223, 234, 227, 0.78);
  color: #557865;
}

.badge.warn {
  background: rgba(248, 244, 234, 0.9);
  color: #8d7650;
}

.badge.danger {
  background: rgba(241, 228, 232, 0.9);
  color: #9f6666;
}

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

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(140px, 1fr));
  gap: 12px;
}

.metric-card {
  min-height: 112px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-small);
  background: rgba(255, 255, 255, 0.5);
}

.metric-card span {
  color: var(--muted);
  font-size: 13px;
}

.metric-card strong {
  color: #2d4148;
  font-size: 26px;
  line-height: 1.1;
}

.metric-card small {
  line-height: 1.45;
}

.card.compact {
  padding: 14px;
}

.runtime-card {
  display: grid;
  gap: 10px;
}

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

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

.check-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 650;
  border: 1px solid var(--line-soft);
}

.check-pill.ok {
  color: #557865;
  background: rgba(223, 234, 227, 0.72);
}

.check-pill.bad {
  color: #9f6666;
  background: rgba(241, 228, 232, 0.7);
}

.error,
.success {
  margin: 12px 0 16px;
  border-radius: var(--radius-small);
  padding: 12px 14px;
  font-weight: 650;
  border: 1px solid var(--line-soft);
}

.error {
  color: #9f6666;
  background: rgba(241, 228, 232, 0.64);
}

.success {
  color: #547764;
  background: rgba(223, 234, 227, 0.72);
}

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

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

th,
td {
  padding: 14px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

th {
  color: #526872;
  font-size: 13px;
  font-weight: 650;
  background: rgba(220, 235, 240, 0.32);
}

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

td.wrap {
  white-space: normal;
  min-width: 240px;
  line-height: 1.68;
}

small {
  color: var(--faint);
}

.mobile-cards {
  display: none;
}

@keyframes ripple-breathe {
  0%,
  100% {
    transform: scale(0.92);
    opacity: 0.42;
  }
  50% {
    transform: scale(1.08);
    opacity: 0.72;
  }
}

@keyframes bubble-meditate {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
    opacity: 0.36;
  }
  50% {
    transform: translate3d(12px, -26px, 0);
    opacity: 0.78;
  }
}

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

@keyframes float-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}

@media (max-width: 760px) {
  body {
    font-size: 14px;
  }

  .shell {
    padding: 20px 12px 32px;
  }

  .topbar {
    align-items: flex-start;
  }

  .brand h1 {
    font-size: 20px;
  }

  .grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .desktop-table {
    display: none;
  }

  .mobile-cards {
    display: grid;
    gap: 14px;
  }

  .panel {
    padding: 16px;
  }

  .section-head {
    display: grid;
  }

  .metrics-grid {
    grid-template-columns: 1fr 1fr;
  }

  .login {
    margin-top: 8vh;
    padding: 22px;
  }

  .ripple-a {
    width: 230px;
    height: 230px;
  }

  .ripple-b {
    width: 300px;
    height: 300px;
  }
}
