.top-nav,
.shell-meta,
.shell-header {
  background: rgba(17, 24, 39, 0.8);
}

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

.shell-actions {
  display: flex;
  gap: 10px;
}

.shell-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.1);
  margin-bottom: 16px;
}

.shell-meta div span {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
}

.shell-meta div strong {
  font-size: 1rem;
}
:root {
  color-scheme: light;
  --bg: #f5f6fb;
  --bg-alt: #ffffff;
  --surface: #ffffff;
  --surface-alt: #f8f9ff;
  --border: #d7dce5;
  --text: #1f2933;
  --muted: #5f6c7b;
  --accent: #2563eb;
  --accent-hover: #1e50c2;
  --positive: #16a34a;
  --negative: #dc2626;
  --warning: #d97706;
  --shadow-soft: 0 16px 40px rgba(15, 23, 42, 0.08);
  --shadow-card: 0 10px 30px rgba(15, 23, 42, 0.06);
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 999px;
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
}

body.auth-body,
body.app-body {
  min-height: 100vh;
}

body.auth-body {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  background: linear-gradient(140deg, rgba(37, 99, 235, 0.12), rgba(168, 85, 247, 0.12)), var(--bg);
}

body.app-body {
  background: var(--bg);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.auth-container {
  width: min(420px, 100%);
}

.dashboard-container {
  display: grid;
  gap: 24px;
}

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

.version-panel {
  min-height: 320px;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 16px;
}

.version-panel .list-item {
  display: grid;
  gap: 8px;
}

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

.version-panel .actions button {
  min-width: 120px;
}

.shell-container {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(260px, 340px) 1fr;
}


header.app-header {
  background: transparent;
  position: sticky;
  top: 0;
  z-index: 10;
  margin-bottom: 32px;
}

.app-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

header.app-header h1 {
  margin: 0;
  padding: 24px 0 6px;
  font-size: 2rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.badge-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  font-size: 0.75rem;
  background: rgba(37, 99, 235, 0.15);
  color: #1e40af;
  letter-spacing: 0.08em;
}

.subtitle {
  margin: 0 0 12px;
  color: var(--muted);
}

main {
  display: grid;
  gap: 24px;
}

.top-nav {
  display: inline-flex;
  gap: 12px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: var(--radius-sm);
  padding: 6px;
  border: 1px solid rgba(209, 213, 219, 0.6);
  box-shadow: var(--shadow-soft);
}

.nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
}

.nav-button.active {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.14), rgba(59, 130, 246, 0.18));
  color: #1d4ed8;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.nav-button:disabled,
.nav-button[aria-disabled="true"],
.nav-button[data-disabled="true"] {
  opacity: 0.5;
  pointer-events: none;
}

.nav-button.ghost {
  border: 1px solid rgba(209, 213, 219, 0.8);
  background: rgba(255, 255, 255, 0.7);
}

.nav-button.ghost:hover {
  background: rgba(209, 213, 219, 0.25);
}

.panel {
  background: var(--surface);
  border: 1px solid rgba(209, 213, 219, 0.5);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.auth-panel {
  display: grid;
  gap: 24px;
  padding: 36px;
  text-align: left;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.auth-header h1 {
  margin: 0 0 8px;
  font-size: 1.8rem;
}

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

.primary-button {
  background: linear-gradient(135deg, #2563eb, #60a5fa);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.2);
  border: none;
}

.primary-button:hover {
  background: linear-gradient(135deg, #1d4ed8, #4f8bf5);
}

.auth-footer {
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.auth-footer a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 600;
}

.auth-footer a:hover {
  text-decoration: underline;
}

.password-field {
  position: relative;
  display: flex;
  align-items: center;
}

.password-field input {
  width: 100%;
  padding-right: 48px;
}

.toggle-password {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
  font-size: 0.75rem;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.toggle-password:hover {
  background: rgba(37, 99, 235, 0.25);
}

.user-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-end;
  color: var(--muted);
  font-size: 0.9rem;
}

.user-meta strong {
  color: var(--text);
  font-size: 1rem;
}

form,
.inline-form,
.stacked-form {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.inline-form {
  grid-template-columns: auto 1fr auto;
  align-items: center;
}

label {
  font-weight: 600;
  color: #27303c;
}

input,
select,
textarea {
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(209, 213, 219, 0.9);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  font-size: 0.95rem;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.6);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

button {
  padding: 10px 18px;
  border-radius: var(--radius-md);
  border: none;
  background: var(--accent);
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

button:hover {
  background: var(--accent-hover);
}

button:active {
  transform: translateY(1px);
}

button.ghost-button {
  background: transparent;
  border: 1px solid rgba(209, 213, 219, 0.8);
  color: var(--muted);
}

button.ghost-button:hover {
  background: rgba(209, 213, 219, 0.2);
}

.form-hint {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.grid .card {
  background: var(--surface-alt);
  border: 1px solid rgba(209, 213, 219, 0.7);
  border-radius: var(--radius-md);
  padding: 18px;
  display: grid;
  gap: 10px;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.grid .card:hover {
  transform: translateY(-4px);
  border-color: rgba(96, 165, 250, 0.5);
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.12);
}

.launch-button {
  margin-top: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  border: none;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

.launch-button:hover {
  background: var(--accent-hover);
}

.launch-button:active {
  transform: translateY(1px);
}

.grid .card h3 {
  margin: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(37, 99, 235, 0.14);
  color: #1d4ed8;
  border-radius: var(--radius-sm);
  padding: 4px 12px;
  font-size: 0.8rem;
}

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

.list {
  display: grid;
  gap: 14px;
}

.list.compact {
  gap: 10px;
}

.list-item {
  border: 1px solid rgba(209, 213, 219, 0.7);
  border-radius: var(--radius-md);
  padding: 18px;
  background: var(--surface);
  display: grid;
  gap: 10px;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.list-item.active {
  border-color: rgba(96, 165, 250, 0.55);
  box-shadow: 0 18px 36px rgba(37, 99, 235, 0.16);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: var(--radius-sm);
  padding: 4px 12px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.status.running {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}

.status.exited,
.status.stopped {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

.status.pending {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
}

.result {
  border-radius: var(--radius-md);
  background: rgba(248, 250, 252, 0.85);
  border: 1px solid rgba(209, 213, 219, 0.6);
  padding: 18px;
}

.result h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

pre {
  margin: 0;
  font-family: "JetBrains Mono", "Fira Code", Consolas, monospace;
  background: rgba(15, 23, 42, 0.06);
  padding: 18px;
  border-radius: var(--radius-md);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 320px;
  overflow-y: auto;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.empty-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.notification {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  border: 1px solid rgba(209, 213, 219, 0.6);
  color: var(--text);
  box-shadow: var(--shadow-card);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.notification[data-type="success"] {
  border-color: rgba(22, 163, 74, 0.4);
}

.notification[data-type="error"] {
  border-color: rgba(220, 38, 38, 0.4);
}

.notification.show {
  opacity: 1;
  transform: translateY(0);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-overlay[hidden] {
  display: none !important;
}

.modal-overlay.show {
  animation: fadeIn 0.2s ease forwards;
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--surface);
  border: 1px solid rgba(209, 213, 219, 0.7);
  border-radius: var(--radius-lg);
  max-width: 500px;
  width: 100%;
  padding: 24px;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.12);
  display: grid;
  gap: 20px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.modal-close {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
}

.modal-body {
  display: grid;
  gap: 12px;
}

.version-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid rgba(209, 213, 219, 0.7);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  background: rgba(248, 250, 252, 0.8);
}

.version-info {
  display: grid;
  gap: 4px;
}

.version-info span {
  color: var(--muted);
  font-size: 0.85rem;
}

.version-launch {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.version-launch:hover {
  background: var(--accent-hover);
}

.info-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(37, 99, 235, 0.25);
  background: rgba(37, 99, 235, 0.08);
}

.info-banner .info-text {
  display: grid;
  gap: 4px;
}

.info-banner strong {
  color: #1d4ed8;
}

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

.metric-card {
  background: var(--surface-alt);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  border: 1px solid rgba(209, 213, 219, 0.6);
}

.metric-card span {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 4px;
}

.metric-card strong {
  font-size: 1.1rem;
}

.auth-container {
  width: min(900px, 100%);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 32px;
}

.auth-illustration {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
}

.auth-illustration .visual {
  position: relative;
  width: 100%;
  padding-top: 66%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.18), rgba(168, 85, 247, 0.18));
  box-shadow: var(--shadow-card);
}

.auth-illustration .visual::before,
.auth-illustration .visual::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
}

.auth-illustration .visual::before {
  inset: 18% 22% 36% 18%;
}

.auth-illustration .visual::after {
  inset: 50% 30% 12% 36%;
  background: rgba(255, 255, 255, 0.25);
}

.auth-illustration .copy {
  display: grid;
  gap: 8px;
}

.auth-illustration .copy h2 {
  margin: 0;
  font-size: 1.6rem;
  color: #1d4ed8;
}

.auth-illustration .copy p {
  margin: 0;
  color: var(--muted);
}

.auth-panel {
  height: fit-content;
}

.auth-progress {
  display: grid;
  gap: 18px;
  margin-bottom: 16px;
}

.progress-steps {
  display: flex;
  gap: 12px;
  align-items: center;
}

.progress-step {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: rgba(37, 99, 235, 0.08);
  color: var(--muted);
  font-weight: 600;
}

.progress-step.active {
  background: rgba(37, 99, 235, 0.18);
  color: #1d4ed8;
}

.progress-step.completed {
  background: rgba(22, 163, 74, 0.15);
  color: var(--positive);
}

.verification-panel {
  display: grid;
  gap: 20px;
}

.code-input-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.code-input-group input {
  flex: 1;
  min-width: 180px;
}

.resend-link {
  color: #2563eb;
  font-weight: 600;
  cursor: pointer;
  border: none;
  background: transparent;
  padding: 0;
}

.resend-link[disabled] {
  color: rgba(37, 99, 235, 0.4);
  cursor: not-allowed;
}

@media (max-width: 768px) {
  .inline-form {
    grid-template-columns: 1fr;
  }

  .inline-form label {
    display: none;
  }

  button {
    width: 100%;
  }

  .shell-container {
    grid-template-columns: 1fr;
  }

  .app-header .container {
    flex-direction: column;
    align-items: flex-start;
  }

  .top-nav {
    align-self: stretch;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  .auth-panel {
    padding: 28px;
  }

  .auth-container {
    grid-template-columns: 1fr;
  }

  .auth-illustration {
    display: none;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
