:root {
  --bg: #050b1f;
  --panel: rgba(10, 22, 52, 0.88);
  --panel-strong: rgba(7, 17, 42, 0.96);
  --panel-soft: rgba(18, 32, 72, 0.72);
  --line: rgba(120, 150, 255, 0.16);
  --line-strong: rgba(120, 150, 255, 0.28);
  --text: #e8eefc;
  --muted: #8fa0c5;
  --primary: #5b8cff;
  --primary-soft: rgba(91, 140, 255, 0.18);
  --success: #32d296;
  --danger: #ff6b6b;
  --warning: #f9a826;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(91, 140, 255, 0.16), transparent 32%),
    radial-gradient(circle at top right, rgba(50, 210, 150, 0.12), transparent 28%),
    var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

body {
  min-height: 100vh;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 28px 20px;
  border-right: 1px solid var(--line);
  background: rgba(2, 8, 24, 0.9);
  backdrop-filter: blur(18px);
  overflow-y: auto;
  gap: 16px;
}

.brand {
  margin-bottom: 8px;
  flex-shrink: 0;
}

.brand-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-desc {
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.7;
  font-size: 14px;
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  cursor: pointer;
  transition: all 0.22s ease;
}

.nav-item:hover,
.nav-item.active {
  border-color: var(--line-strong);
  background: linear-gradient(135deg, rgba(23, 43, 95, 0.96), rgba(34, 67, 146, 0.86));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.nav-badge {
  margin-left: auto;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: #b7c8ff;
  font-size: 12px;
}

.sidebar-footer {
  margin-top: auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  flex-shrink: 0;
}

.sidebar-footer .label {
  color: var(--muted);
  font-size: 12px;
}

.sidebar-footer .value {
  margin-top: 8px;
  font-size: 16px;
  font-weight: 600;
}

.sidebar-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  margin-top: 14px;
  padding: 12px 16px;
  border: 1px solid rgba(120, 150, 255, 0.22);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.sidebar-logout:hover {
  transform: translateY(-1px);
  background: rgba(91, 140, 255, 0.14);
  border-color: rgba(120, 150, 255, 0.34);
}

.content {
  padding: 28px;
}

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

.topbar-title {
  font-size: 32px;
  font-weight: 700;
}

.topbar-desc {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.7;
}

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

.ghost-chip,
.button,
.button-light,
.button-danger {
  border: none;
  border-radius: 14px;
  cursor: pointer;
  transition: transform 0.18s ease, opacity 0.18s ease, background 0.18s ease;
}

.button,
.button-light,
.button-danger {
  padding: 12px 18px;
  font-size: 14px;
}

.button {
  background: linear-gradient(135deg, var(--primary), #7c9fff);
  color: #fff;
}

.button-light {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid var(--line);
}

.button-danger {
  background: rgba(255, 107, 107, 0.12);
  color: #ffd9d9;
  border: 1px solid rgba(255, 107, 107, 0.22);
}

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

.button:disabled,
.button-light:disabled,
.button-danger:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.ghost-chip {
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  border: 1px solid var(--line);
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.section {
  display: none;
}

.section.active {
  display: block;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  padding: 22px;
}

.stat-label {
  color: var(--muted);
  font-size: 13px;
}

.stat-value {
  margin-top: 14px;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.stat-desc {
  margin-top: 10px;
  color: #b5c2df;
  font-size: 13px;
}

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

.panel-title {
  font-size: 22px;
  font-weight: 700;
}

.panel-desc {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.6;
  font-size: 14px;
}

.panel-body {
  padding: 24px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.toolbar input,
.toolbar select,
.upload-box input[type="file"],
.checkbox-row input[type="checkbox"] {
  accent-color: var(--primary);
}

.field,
.select-field {
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  outline: none;
}

.field::placeholder {
  color: #7d8db4;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
}

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

.data-table th {
  color: #9fb2dc;
  font-weight: 600;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.02);
}

.data-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.mono {
  font-family: Consolas, monospace;
  font-size: 12px;
}

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

.tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(91, 140, 255, 0.12);
  color: #bcd0ff;
  font-size: 12px;
  margin-right: 6px;
  margin-bottom: 6px;
}

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

.text-button {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
}

.text-button.danger {
  border-color: rgba(255, 107, 107, 0.25);
  color: #ffcccc;
  background: rgba(255, 107, 107, 0.08);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.pagination-info {
  color: var(--muted);
  font-size: 13px;
}

.pagination-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  flex: 1;
}

.page-number {
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  cursor: pointer;
}

.page-number.active {
  background: linear-gradient(135deg, var(--primary), #7c9fff);
  color: #ffffff;
  border-color: transparent;
}

.jump-box {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  margin-left: auto;
  padding-left: 8px;
}

.jump-input {
  width: 88px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  outline: none;
}

.recent-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 20px;
}

.mini-table th,
.mini-table td {
  padding: 14px 10px;
  font-size: 13px;
}

.upload-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 20px;
}

.stack-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 20px;
}

.upload-box {
  padding: 24px;
  border: 1px dashed rgba(123, 157, 255, 0.28);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.02);
}

.upload-box h3 {
  margin: 0 0 12px;
}

.upload-box .tip {
  color: var(--muted);
  line-height: 1.7;
  font-size: 14px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  color: var(--muted);
}

.result-panel,
.system-panel {
  min-height: 280px;
  padding: 18px;
  border-radius: 18px;
  background: rgba(2, 8, 24, 0.72);
  border: 1px solid var(--line);
  color: #dbeafe;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: Consolas, monospace;
  line-height: 1.7;
}

.drawer-mask {
  position: fixed;
  inset: 0;
  display: none;
  background: rgba(1, 5, 14, 0.54);
}

.drawer-mask.active {
  display: block;
}

.drawer {
  position: absolute;
  top: 0;
  right: 0;
  width: min(520px, 100vw);
  height: 100%;
  padding: 24px;
  background: rgba(5, 12, 30, 0.98);
  border-left: 1px solid var(--line);
  overflow-y: auto;
}

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

.drawer-title {
  font-size: 22px;
  font-weight: 700;
}

.drawer-desc {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.6;
}

.drawer-close {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.detail-grid {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.detail-item {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
}

.detail-label {
  color: var(--muted);
  font-size: 13px;
}

.detail-value {
  margin-top: 10px;
  line-height: 1.7;
  word-break: break-all;
}

.detail-section + .detail-section {
  margin-top: 24px;
}

.detail-section-title {
  margin-bottom: 14px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.detail-section-kicker {
  margin-bottom: 10px;
  color: #bcd0ff;
  font-size: 14px;
  font-weight: 700;
}

.detail-section-block + .detail-section-block {
  margin-top: 16px;
}

.detail-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.detail-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(91, 140, 255, 0.12);
  border: 1px solid rgba(91, 140, 255, 0.2);
  color: #c8d7ff;
  font-size: 13px;
  font-weight: 600;
}

.detail-table-wrap {
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
}

.detail-table td:last-child,
.detail-table th:last-child {
  max-width: 240px;
  word-break: break-word;
}

.status-ok {
  color: var(--success);
}

.status-warn {
  color: var(--warning);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid var(--line);
}

.status-pill.pending {
  background: rgba(249, 168, 38, 0.12);
  color: #ffd184;
  border-color: rgba(249, 168, 38, 0.24);
}

.status-pill.running {
  background: rgba(91, 140, 255, 0.14);
  color: #bcd0ff;
  border-color: rgba(91, 140, 255, 0.24);
}

.status-pill.success {
  background: rgba(50, 210, 150, 0.14);
  color: #b8ffe2;
  border-color: rgba(50, 210, 150, 0.24);
}

.status-pill.failed {
  background: rgba(255, 107, 107, 0.12);
  color: #ffd3d3;
  border-color: rgba(255, 107, 107, 0.24);
}

@media (max-width: 1200px) {
  .stats-grid,
  .recent-grid,
  .upload-grid,
  .stack-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 960px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
  }

  .stats-grid,
  .recent-grid,
  .upload-grid,
  .stack-grid {
    grid-template-columns: 1fr;
  }
}

.auth-page {
  margin: 0;
  min-height: 100vh;
  background: #f6f7fb;
}

.auth-page-original {
  margin: 0;
  min-height: 100vh;
  font-family: 'Inter', 'PingFang SC', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #1a1a2e;
  overflow: hidden;
}

#login-page {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

.left-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(135deg, #d4d0dc 0%, #c8c4d0 50%, #bbb7c5 100%);
  padding: 40px 48px;
  overflow: hidden;
}

.left-panel .logo {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
}

.left-panel .logo svg {
  width: 28px;
  height: 28px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  padding: 4px;
  border-radius: 6px;
}

.characters-wrapper {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 420px;
}

.left-panel .footer-links {
  position: relative;
  z-index: 10;
  display: flex;
  gap: 28px;
  font-size: 13px;
  color: rgba(80,70,90,0.7);
}

.left-panel .footer-links a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

.left-panel .footer-links a:hover {
  color: #333;
}

.left-panel::after {
  content: '';
  position: absolute;
  top: 20%;
  right: 15%;
  width: 260px;
  height: 260px;
  background: rgba(180,170,200,0.25);
  border-radius: 50%;
  filter: blur(80px);
}

.left-panel::before {
  content: '';
  position: absolute;
  bottom: 15%;
  left: 10%;
  width: 350px;
  height: 350px;
  background: rgba(200,195,210,0.2);
  border-radius: 50%;
  filter: blur(100px);
}

.right-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  padding: 40px;
}

.form-container {
  width: 100%;
  max-width: 400px;
}

.sparkle-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.sparkle-icon svg {
  width: 32px;
  height: 32px;
}

.form-header {
  text-align: center;
  margin-bottom: 36px;
}

.form-header h1 {
  font-size: 28px;
  font-weight: 700;
  color: #1a1a2e;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.form-header p {
  font-size: 14px;
  color: #888;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #333;
  margin-bottom: 8px;
}

.form-group .input-wrapper {
  position: relative;
}

.form-group input {
  width: 100%;
  height: 48px;
  border: none;
  border-bottom: 1.5px solid #e0e0e0;
  padding: 0 40px 0 0;
  font-size: 15px;
  font-family: inherit;
  color: #1a1a2e;
  background: transparent;
  outline: none;
  transition: border-color 0.3s;
}

.form-group input:focus {
  border-bottom-color: #5B21B6;
}

.form-group input::placeholder {
  color: #ccc;
}

.form-group input[type="password"]:not(:placeholder-shown) {
  letter-spacing: 2px;
}

.toggle-password {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #666;
  padding: 6px;
  transition: color 0.2s;
}

.toggle-password:hover {
  color: #333;
}

.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.remember-me {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #555;
  cursor: default;
}

.remember-me input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #5B21B6;
}

.forgot-link {
  font-size: 13px;
  color: #5B21B6;
  text-decoration: none;
  font-weight: 500;
}

.forgot-link.static-tip {
  cursor: default;
}

.btn-login {
  position: relative;
  width: 100%;
  height: 50px;
  border-radius: 25px;
  border: 1.5px solid #1a1a2e;
  background: #1a1a2e;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  overflow: hidden;
  margin-bottom: 14px;
  transition: all 0.3s;
}

.btn-login .btn-text {
  display: inline-block;
  transition: all 0.3s;
}

.btn-login .btn-hover-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #5B21B6;
  color: #fff;
  opacity: 0;
  transition: all 0.3s;
  border-radius: 25px;
}

.btn-login:hover .btn-text {
  transform: translateX(40px);
  opacity: 0;
}

.btn-login:hover .btn-hover-content {
  opacity: 1;
}

.btn-login:disabled {
  opacity: 0.88;
  cursor: not-allowed;
}

.characters-scene {
  position: relative;
  width: 480px;
  height: 360px;
}

.character {
  position: absolute;
  bottom: 0;
  transition: all 0.7s ease-in-out;
  transform-origin: bottom center;
}

.char-purple {
  left: 60px;
  width: 170px;
  height: 370px;
  background: #6C3FF5;
  border-radius: 10px 10px 0 0;
  z-index: 1;
}

.char-black {
  left: 220px;
  width: 115px;
  height: 290px;
  background: #2D2D2D;
  border-radius: 8px 8px 0 0;
  z-index: 2;
}

.char-orange {
  left: 0;
  width: 230px;
  height: 190px;
  background: #FF9B6B;
  border-radius: 115px 115px 0 0;
  z-index: 3;
}

.char-yellow {
  left: 290px;
  width: 135px;
  height: 215px;
  background: #E8D754;
  border-radius: 68px 68px 0 0;
  z-index: 4;
}

.eyes {
  position: absolute;
  display: flex;
  transition: all 0.7s ease-in-out;
}

.eyeball {
  border-radius: 50%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: height 0.15s ease;
  overflow: hidden;
}

.pupil {
  border-radius: 50%;
  background: #2D2D2D;
  transition: transform 0.1s ease-out;
}

.bare-pupil {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #2D2D2D;
  transition: transform 0.7s ease-in-out;
}

.yellow-mouth {
  position: absolute;
  width: 50px;
  height: 4px;
  background: #2D2D2D;
  border-radius: 2px;
  transition: all 0.7s ease-in-out;
}

@keyframes shakeHead {
  0%, 100% { translate: 0 0; }
  10%  { translate: -9px 0; }
  20%  { translate: 7px 0; }
  30%  { translate: -6px 0; }
  40%  { translate: 5px 0; }
  50%  { translate: -4px 0; }
  60%  { translate: 3px 0; }
  70%  { translate: -2px 0; }
  80%  { translate: 1px 0; }
  90%  { translate: -0.5px 0; }
}

.eyes.shake-head,
.yellow-mouth.shake-head,
.orange-mouth.shake-head {
  animation: shakeHead 0.8s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

.orange-mouth {
  position: absolute;
  width: 28px;
  height: 14px;
  border: 3px solid #2D2D2D;
  border-top: none;
  border-radius: 0 0 14px 14px;
  opacity: 0;
  transition: all 0.7s ease-in-out;
}

.orange-mouth.visible {
  opacity: 1;
}

.error-msg {
  display: none;
  padding: 10px 14px;
  font-size: 13px;
  color: #dc2626;
  background: rgba(220,38,38,0.08);
  border: 1px solid rgba(220,38,38,0.2);
  border-radius: 10px;
  margin-bottom: 16px;
}

.form-group input.error {
  border-bottom-color: #dc2626;
}

.form-group label.error-label {
  color: #dc2626;
}

@media (max-width: 900px) {
  #login-page {
    grid-template-columns: 1fr;
  }

  .left-panel {
    display: none;
  }

  .right-panel {
    padding: 24px;
  }
}

.auth-shell-v2 {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(420px, 520px);
  min-height: 100vh;
}

.auth-side-v2 {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 40px 48px;
  overflow: hidden;
  background: linear-gradient(135deg, #d4d0dc 0%, #c8c4d0 50%, #bbb7c5 100%);
}

.auth-side-header,
.auth-side-copy,
.auth-side-links,
.auth-stage-v2 {
  position: relative;
  z-index: 1;
}

.auth-side-header {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #ffffff;
}

.auth-side-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  font-size: 13px;
  font-weight: 700;
}

.auth-side-title {
  font-size: 16px;
  font-weight: 600;
}

.auth-stage-v2 {
  position: relative;
  width: min(520px, 100%);
  height: 420px;
  margin: 0 auto;
}

.auth-stage-glow {
  position: absolute;
  border-radius: 999px;
  filter: blur(90px);
}

.auth-stage-glow-a {
  left: 5%;
  bottom: 12%;
  width: 280px;
  height: 280px;
  background: rgba(210, 202, 222, 0.38);
}

.auth-stage-glow-b {
  right: 8%;
  top: 16%;
  width: 220px;
  height: 220px;
  background: rgba(180, 170, 197, 0.3);
}

.auth-block {
  position: absolute;
  border-radius: 28px;
  box-shadow: 0 28px 60px rgba(62, 53, 86, 0.16);
}

.auth-block-lg {
  left: 12%;
  bottom: 34px;
  width: 210px;
  height: 280px;
  background: linear-gradient(180deg, #6e46f4, #5a35d2);
}

.auth-block-md {
  right: 18%;
  bottom: 34px;
  width: 130px;
  height: 220px;
  background: linear-gradient(180deg, #2b2b34, #17171e);
}

.auth-block-pill {
  left: 0;
  bottom: 0;
  width: 260px;
  height: 170px;
  border-radius: 120px 120px 24px 24px;
  background: linear-gradient(180deg, #ffb08b, #ff8f5c);
}

.auth-block-card {
  right: 2%;
  bottom: 0;
  width: 170px;
  height: 190px;
  border-radius: 80px 80px 22px 22px;
  background: linear-gradient(180deg, #f0dd72, #dfc94d);
}

.auth-float-slow {
  animation: authFloatSlow 6.4s ease-in-out infinite;
}

.auth-float-mid {
  animation: authFloatMid 5.2s ease-in-out infinite;
}

.auth-float-fast {
  animation: authFloatFast 4.6s ease-in-out infinite;
}

.auth-side-copy {
  max-width: 420px;
}

.auth-side-kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(69, 58, 83, 0.62);
}

.auth-side-copy h1 {
  margin: 14px 0 12px;
  font-size: 42px;
  line-height: 1.1;
  color: #212133;
}

.auth-side-copy p {
  margin: 0;
  font-size: 15px;
  line-height: 1.8;
  color: rgba(49, 43, 58, 0.72);
}

.auth-side-links {
  display: flex;
  gap: 28px;
  font-size: 13px;
  color: rgba(78, 67, 92, 0.7);
}

.auth-main-v2 {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: #ffffff;
}

.auth-form-card-v2 {
  width: min(420px, 100%);
  padding: 40px 40px 34px;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 28px 70px rgba(35, 36, 66, 0.08);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.auth-form-card-v2:hover {
  transform: translateY(-2px);
  box-shadow: 0 32px 78px rgba(35, 36, 66, 0.11);
}

.auth-card-error {
  animation: authCardShake 0.45s ease;
}

.auth-mark-v2 {
  width: 30px;
  height: 30px;
  margin: 0 auto 24px;
  border-radius: 12px;
  background:
    linear-gradient(180deg, transparent 0 35%, #171a2b 35% 65%, transparent 65% 100%),
    linear-gradient(90deg, transparent 0 35%, #171a2b 35% 65%, transparent 65% 100%);
}

.auth-brand-v2 {
  font-size: 29px;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-align: center;
  color: #171a2b;
}

.auth-desc-v2 {
  margin-top: 10px;
  text-align: center;
  color: #8b8fa1;
  font-size: 14px;
  line-height: 1.7;
}

.auth-form-v2 {
  margin-top: 34px;
}

.auth-field-v2 {
  margin-bottom: 20px;
}

.auth-label-v2 {
  display: block;
  margin-bottom: 8px;
  color: #35384a;
  font-size: 13px;
  font-weight: 600;
  transition: color 0.2s ease;
}

.auth-label-error-v2 {
  color: #dc2626;
}

.auth-input-wrap-v2 {
  position: relative;
}

.auth-input-v2 {
  width: 100%;
  height: 48px;
  border: none;
  border-bottom: 1.5px solid #e2e6ef;
  background: transparent;
  color: #171a2b;
  font-size: 15px;
  outline: none;
  transition: border-color 0.25s ease;
  padding: 0 56px 0 0;
}

.auth-input-v2:focus {
  border-bottom-color: #5b21b6;
}

.auth-input-v2::placeholder {
  color: #c2c7d2;
}

.auth-input-error-v2 {
  border-bottom-color: #dc2626;
}

.auth-toggle-v2 {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: #6f7385;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.auth-meta-v2 {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  font-size: 12px;
  color: #8d93a6;
}

.auth-error-v2 {
  min-height: 24px;
  margin-bottom: 14px;
  color: #dc2626;
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.14);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.5;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.auth-error-v2:not(:empty) {
  opacity: 1;
}

.auth-submit-v2 {
  position: relative;
  display: block;
  width: 100%;
  height: 52px;
  border: 1.5px solid #171a2b;
  border-radius: 999px;
  background: #171a2b;
  color: #ffffff;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.24s ease, box-shadow 0.24s ease, background 0.24s ease;
}

.auth-submit-v2:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 32px rgba(91, 33, 182, 0.18);
  background: #5b21b6;
  border-color: #5b21b6;
}

.auth-submit-primary,
.auth-submit-secondary {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 600;
  transition: transform 0.28s ease, opacity 0.28s ease;
}

.auth-submit-secondary {
  opacity: 0;
  transform: translateY(18px);
}

.auth-submit-v2:hover .auth-submit-primary {
  opacity: 0;
  transform: translateY(-18px);
}

.auth-submit-v2:hover .auth-submit-secondary {
  opacity: 1;
  transform: translateY(0);
}

.auth-submit-v2.is-loading .auth-submit-primary,
.auth-submit-v2.is-loading .auth-submit-secondary {
  opacity: 0;
}

.auth-submit-v2.is-loading::after {
  content: '登录中...';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 600;
}

body.auth-focus-user .auth-form-card-v2,
body.auth-focus-password .auth-form-card-v2 {
  box-shadow: 0 32px 78px rgba(63, 65, 112, 0.13);
}

@keyframes authFloatSlow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes authFloatMid {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

@keyframes authFloatFast {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes authCardShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(2px); }
}

@media (max-width: 980px) {
  .auth-shell-v2 {
    grid-template-columns: 1fr;
  }

  .auth-side-v2 {
    display: none;
  }

  .auth-main-v2 {
    min-height: 100vh;
    padding: 24px;
  }

  .auth-form-card-v2 {
    padding: 30px 24px 26px;
  }
}
