:root {
  --bg: #0f1419;
  --card: #1a2332;
  --text: #e8eef7;
  --muted: #8b9cb3;
  --accent: #3d8bfd;
  --danger: #f14c4c;
  --border: #2a3548;
  --radius: 10px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  font-family: Inter, "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

.page-login {
  max-width: none;
}

.page-login body,
body:has(.page-login) {
  background: #0f1419;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }

.auth-form .btn {
  margin-top: 20px;
  width: 100%;
}
.login-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.login-brand .brand { margin: 0; }
.login-brand-logo { width: 34px; height: 34px; border-radius: 8px; }

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(520px, 1.15fr) minmax(420px, 0.85fr);
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #4d62ea 0%, #3f54dc 44%, #3447ca 100%);
}

.login-shell::before,
.login-shell::after {
  content: "";
  position: absolute;
  inset: auto;
  pointer-events: none;
  filter: blur(28px);
}

.login-shell::before {
  width: 440px;
  height: 440px;
  left: -120px;
  top: -140px;
  background: radial-gradient(circle, rgba(61, 139, 253, 0.35) 0%, rgba(61, 139, 253, 0) 72%);
  opacity: .58;
}

.login-shell::after {
  width: 520px;
  height: 520px;
  right: -140px;
  bottom: -180px;
  background: radial-gradient(circle, rgba(111, 201, 255, 0.26) 0%, rgba(111, 201, 255, 0) 70%);
  opacity: .34;
}

.login-showcase,
.login-panel-wrap {
  position: relative;
  z-index: 1;
  background: transparent;
}

.login-showcase {
  padding: clamp(40px, 7vw, 88px);
  display: flex;
  flex-direction: column;
}

.login-panel-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(28px, 4.5vw, 56px);
}

.auth-card.auth-card-login {
  max-width: 520px;
  width: min(100%, 520px);
  padding: 26px 26px 22px;
  border-radius: 24px;
  border: 1px solid rgba(184, 226, 255, .42);
  background: linear-gradient(180deg, rgba(77, 98, 234, .92), rgba(63, 84, 220, .9) 45%, rgba(52, 71, 202, .9) 100%);
  box-shadow: 0 26px 60px rgba(28, 63, 180, 0.28);
  backdrop-filter: blur(14px);
}

.auth-card-login-clean {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.login-panel-header-center {
  text-align: center;
  margin-bottom: 2px;
  overflow: hidden;
}

.login-panel-welcome-track {
  position: relative;
  height: 42px;
}

.login-panel-welcome {
  position: absolute;
  inset: 0;
  margin: 0;
  color: #ffffff;
  font-size: 1.86rem;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.03em;
  transition: transform .45s cubic-bezier(.22, 1, .36, 1), opacity .32s ease;
}

.login-panel-welcome-alt {
  transform: translateY(135%);
  opacity: 0;
}

.login-panel-header-center.is-register-view .login-panel-welcome:not(.login-panel-welcome-alt) {
  transform: translateY(-135%);
  opacity: 0;
}

.login-panel-header-center.is-register-view .login-panel-welcome-alt {
  transform: translateY(0%);
  opacity: 1;
}

.login-panel-subtitle {
  display: none;
  margin: 8px 0 0;
  color: rgba(255,255,255,.8);
  font-size: .92rem;
}

.auth-card-login .brand,
.login-brand,
.login-brand-lg,
.login-brand-clean {
  display: none;
}

.auth-card-login .alert {
  margin: 0;
}

.auth-shell { --auth-view-index: 0; }

.auth-top-switch {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  padding: 6px;
  margin: 4px 0 14px;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.16);
}

.auth-top-slider {
  position: absolute;
  top: 6px;
  left: 6px;
  width: calc((100% - 12px) / 3);
  height: calc(100% - 12px);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(61,139,253,.92), rgba(111,201,255,.82));
  box-shadow: 0 10px 24px rgba(61,139,253,.18);
  transition: transform .46s cubic-bezier(.22, 1, .36, 1);
  z-index: 0;
}

.auth-top-btn {
  position: relative;
  z-index: 1;
  border: none;
  background: transparent;
  color: rgba(255,255,255,.88);
  font-size: .96rem;
  font-weight: 600;
  padding: 12px 10px;
  border-radius: 12px;
  cursor: pointer;
  transition: color .25s ease;
}

.auth-top-btn.is-active { color: #fff; }

.login-tabs-pill {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  padding: 5px;
  margin: 0 0 16px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 16px;
  overflow: hidden;
}

.login-tabs-pill .login-tab-slider {
  display: block;
  position: absolute;
  top: 5px;
  left: 5px;
  width: calc((100% - 10px) / 2);
  height: calc(100% - 10px);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(61,139,253,.92), rgba(111,201,255,.82));
  box-shadow: 0 10px 24px rgba(61,139,253,.18);
  transition: transform .42s cubic-bezier(.22, 1, .36, 1);
}

.login-tabs-pill .login-tab-btn {
  position: relative;
  z-index: 1;
  flex: 1 1 50%;
  min-height: 46px;
  border-radius: 12px;
  border: none;
  background: transparent;
  color: rgba(255,255,255,.88);
  font-size: .96rem;
  font-weight: 700;
  box-shadow: none;
  cursor: pointer;
  transition: color .28s ease;
}

.login-tabs-pill .login-tab-btn.is-active {
  color: #ffffff;
}

.auth-slider-stage {
  overflow: hidden;
  position: relative;
  width: 100%;
  margin-top: 2px;
}

.auth-slider-track {
  display: flex;
  width: 300%;
  transition: transform .52s cubic-bezier(.22, 1, .36, 1);
  will-change: transform;
  align-items: flex-start;
}

.auth-view {
  width: calc(100% / 3);
  flex: 0 0 calc(100% / 3);
  min-width: 0;
  padding-top: 2px;
}

.auth-shell[data-auth-view="login"] .auth-slider-track { transform: translateX(0%); }
.auth-shell[data-auth-view="register"] .auth-slider-track { transform: translateX(-33.333333%); }
.auth-shell[data-auth-view="forgot"] .auth-slider-track { transform: translateX(-66.666666%); }
.auth-shell[data-auth-view="login"] .auth-top-slider { transform: translateX(0%); }
.auth-shell[data-auth-view="register"] .auth-top-slider { transform: translateX(100%); }
.auth-shell[data-auth-view="forgot"] .auth-top-slider { transform: translateX(200%); }
.auth-card-slider { overflow: hidden; }
.auth-card-slider .alert { margin-bottom: 12px; }
.auth-view .auth-form { width: 100%; }

.auth-card-login .auth-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.login-pane-stage {
  overflow: hidden;
  position: relative;
  width: 100%;
}

.login-pane-track {
  display: flex;
  width: 200%;
  transition: transform .42s cubic-bezier(.22, 1, .36, 1);
  will-change: transform;
}

.login-pane {
  width: 50%;
  flex: 0 0 50%;
  min-width: 0;
}

.auth-shell[data-login-mode="password"] .login-pane-track {
  transform: translateX(0%);
}

.auth-shell[data-login-mode="code"] .login-pane-track {
  transform: translateX(-50%);
}

.auth-card-login .auth-form label {
  margin-top: 0;
  color: #ffffff;
  letter-spacing: .03em;
}

.auth-card-login .auth-form input {
  width: 100%;
  height: 52px;
  border-radius: 14px;
  border: 1px solid rgba(129, 154, 198, 0.24);
  background: rgba(255,255,255,.9);
  padding: 12px 14px;
  color: #17253d;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75);
  transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}

.auth-card-login .auth-form input::placeholder {
  color: #8b9ab4;
}

.auth-card-login .auth-form input:focus {
  outline: none;
  border-color: rgba(61,139,253,.45);
  box-shadow: 0 0 0 3px rgba(61,139,253,.12);
  transform: translateY(-1px);
}

.auth-form .btn,
.btn-glow,
.btn-soft,
.auth-form .code-send-btn,
#login-submit-btn,
#login-code-form .btn-glow,
.auth-view-register .btn-glow,
.auth-view-forgot .btn-glow {
  min-height: 54px;
  padding: 0 18px;
  border-radius: 14px;
  border: 1px solid rgba(98, 176, 255, 0.52);
  background: linear-gradient(135deg, #3d8bfd, #62b0ff);
  color: #ffffff;
  font-family: Inter, "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .01em;
  line-height: 1;
  box-shadow: none;
}

.auth-card-login .auth-form .btn {
  margin-top: 8px;
}

.code-row-modern,
.code-row {
  display: flex;
  gap: 12px;
  align-items: center;
}

.auth-form .code-send-btn {
  margin-top: 0;
  width: 162px;
  flex: 0 0 162px;
  align-self: stretch;
}

.auth-form .code-row input {
  flex: 1 1 auto;
  min-width: 0;
}

.auth-form .code-send-btn:hover,
.btn-soft:hover,
.btn-glow:hover,
.auth-card-login .auth-form .btn:hover,
#login-submit-btn:hover,
#login-code-form .btn-glow:hover,
.auth-view-register .btn-glow:hover,
.auth-view-forgot .btn-glow:hover {
  filter: brightness(1.04);
}

.auth-form .code-send-btn:disabled,
.auth-card-login .auth-form .btn:disabled {
  opacity: .72;
  filter: saturate(.86);
  cursor: not-allowed;
}

#login-submit-btn:focus,
#login-code-form .btn-glow:focus,
.auth-view-register .btn-glow:focus,
.auth-view-forgot .btn-glow:focus,
.auth-card-login .auth-form .btn:focus,
.auth-card-login .auth-form .btn:focus-visible {
  box-shadow: 0 0 0 3px rgba(61,139,253,.18);
}

.login-showcase-b-clone {
  position: relative;
  overflow: hidden;
  justify-content: flex-start;
  align-items: flex-start;
  color: rgba(243, 247, 255, 0.98);
  background: transparent;
}
.bclone-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 20px 20px;
  opacity: .26;
}
.bclone-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
}
.bclone-glow.glow-a {
  width: 360px;
  height: 360px;
  top: -140px;
  right: -30px;
  background: rgba(255,255,255,.14);
}
.bclone-glow.glow-b {
  width: 460px;
  height: 460px;
  bottom: -220px;
  left: -140px;
  background: rgba(255,255,255,.06);
}
.bclone-header,
.bclone-stage {
  position: relative;
  z-index: 1;
}
.bclone-header {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.06rem;
  font-weight: 600;
}
.bclone-header-title {
  margin: 14px 0 6px 132px;
  transform: scale(1.14);
  transform-origin: left center;
  transition: transform .25s ease;
}
.bclone-header-title:hover {
  transform: scale(1.16);
}
.bclone-header-title span {
  font-size: clamp(1.72rem, 3.2vw, 2.34rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}
.bclone-logo-box {
  display: none;
}
.bclone-title-logo {
  width: 24px;
  height: 24px;
  display: block;
}
.bclone-title-logo-plain {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  filter: drop-shadow(0 2px 6px rgba(22, 26, 58, 0.18));
}
.bclone-stage {
  width: min(100%, 540px);
  height: 430px;
  margin: 6px auto 0;
  overflow: hidden;
}
.bclone-char {
  position: absolute;
  bottom: 0;
  transform-origin: bottom center;
  transition: transform .7s ease, height .7s ease, left .7s ease, top .7s ease, width .7s ease, background-color .28s ease, filter .28s ease;
  cursor: pointer;
  user-select: none;
}
.bclone-purple {
  left: 68px;
  width: 176px;
  height: 360px;
  background: #6C3FF5;
  border-radius: 12px 12px 0 0;
  z-index: 1;
}
.bclone-black {
  left: 228px;
  width: 112px;
  height: 282px;
  background: #2D2D2D;
  border-radius: 10px 10px 0 0;
  z-index: 2;
}
.bclone-orange {
  left: 8px;
  width: 220px;
  height: 176px;
  background: #FF9B6B;
  border-radius: 110px 110px 0 0;
  z-index: 3;
}
.bclone-yellow {
  left: 292px;
  width: 126px;
  height: 206px;
  background: #E8D754;
  border-radius: 64px 64px 0 0;
  z-index: 4;
}
.bclone-char:hover {
  filter: brightness(1.04);
}
.bclone-purple.is-color-flipped { background: #8458ff; }
.bclone-black.is-color-flipped { background: #48506b; }
.bclone-orange.is-color-flipped { background: #ffba8c; }
.bclone-yellow.is-color-flipped { background: #f4ec74; }
.bclone-char.is-color-flipped {
  box-shadow: 0 0 0 3px rgba(255,255,255,.12) inset;
  filter: saturate(1.08);
}
.bclone-char.is-color-flipped .yellow-mouth,
.bclone-char.is-color-flipped .eye .pupil,
.bclone-char.is-color-flipped .eye-pupil-only .pupil {
  background: #24304b;
}
.bclone-char.is-color-flipped .eye {
  background: #fffef9;
}
.char-eyes {
  position: absolute;
  display: flex;
  align-items: center;
  transition: left .7s ease, top .7s ease, opacity .18s ease;
}
.eye-white { gap: 8px; }
.eye {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: height .15s ease;
  overflow: hidden;
}
.eye .pupil,
.eye-pupil-only .pupil {
  display: block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #2D2D2D;
  transform: translate(0, 0);
  transition: transform .1s ease-out;
}
.bclone-purple .char-eyes {
  left: 44px;
  top: 38px;
}
.bclone-black .char-eyes {
  left: 26px;
  top: 32px;
}
.bclone-orange .char-eyes {
  left: 82px;
  top: 90px;
  gap: 32px;
}
.bclone-yellow .char-eyes {
  left: 52px;
  top: 40px;
  gap: 24px;
}
.bclone-orange .eye-pupil-only .pupil,
.bclone-yellow .eye-pupil-only .pupil {
  width: 14px;
  height: 14px;
}
.yellow-mouth {
  position: absolute;
  left: 40px;
  top: 88px;
  width: 20px;
  height: 4px;
  background: #2D2D2D;
  border-radius: 999px;
  transition: left .2s ease, top .2s ease;
}
.bclone-footer-links { display: none; }

.auth-shell.is-typing-email .bclone-purple {
  height: 440px;
  transform: skewX(-12deg) translateX(40px) !important;
}
.auth-shell.is-typing-email .bclone-purple .char-eyes {
  left: 55px;
  top: 65px;
}
.auth-shell.is-typing-email .bclone-black {
  transform: skewX(10deg) translateX(20px) !important;
}
.auth-shell.is-typing-email .bclone-black .char-eyes {
  left: 32px;
  top: 12px;
}
.auth-shell.is-password-visible .bclone-purple {
  height: 404px;
  width: 170px;
  left: 112px;
  transform: skewX(-14deg) translateX(26px) !important;
}
.auth-shell.is-password-visible .bclone-purple .char-eyes {
  left: 82px;
  top: 34px;
}
.auth-shell.is-password-visible .bclone-black {
  height: 302px;
  width: 104px;
  left: 252px;
  transform: skewX(-2deg) translateX(18px) !important;
}
.auth-shell.is-password-visible .bclone-black .char-eyes {
  left: 40px;
  top: 28px;
}
.auth-shell.is-password-visible .bclone-orange {
  transform: translateX(4px) !important;
}
.auth-shell.is-password-visible .bclone-orange .char-eyes {
  left: 84px;
  top: 90px;
}
.auth-shell.is-password-visible .bclone-yellow {
  transform: translateX(6px) !important;
}
.auth-shell.is-password-visible .bclone-yellow .char-eyes {
  left: 54px;
  top: 40px;
}
.auth-shell.is-password-visible .bclone-yellow .yellow-mouth {
  left: 42px;
  top: 88px;
}
.bclone-purple.is-blinking .eye,
.bclone-black.is-blinking .eye {
  height: 2px;
}
.bclone-purple.is-blinking .eye .pupil,
.bclone-black.is-blinking .eye .pupil {
  opacity: 0;
}

.page { max-width: 1200px; margin: 0 auto; padding: 24px 16px 64px; }
.page.page-login {
  max-width: none;
  margin: 0;
  padding: 0;
}
.page-wide {
  max-width: none;
  width: 100%;
  margin: 0 auto;
  padding: 24px clamp(12px, 2.5vw, 40px) 64px;
}

.brand { margin: 0 0 8px; font-size: 1.5rem; font-weight: 700; letter-spacing: 0.02em; }
.brand-inline { margin: 0; font-size: 1.25rem; }

.auth-wrap { display: flex; align-items: center; justify-content: center; min-height: 70vh; }
.auth-card {
  width: 100%; max-width: 420px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: 0 16px 48px rgba(0,0,0,.35);
}
.muted { color: var(--muted); font-size: 0.9rem; margin-bottom: 20px; }
.hint { font-size: 0.75rem; color: var(--muted); margin-top: 20px; line-height: 1.5; }
.hint code { background: #0d1117; padding: 2px 6px; border-radius: 4px; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--border);
}
.user-badge { margin: 6px 0 0; font-size: 0.85rem; color: var(--muted); }
.user-badge .pill { margin-left: 8px; vertical-align: middle; }
.user-hint { margin: 8px 0 0; font-size: 0.8rem; color: var(--muted); max-width: 520px; line-height: 1.4; }

.section-title { font-size: 1rem; margin: 0 0 12px; color: var(--text); }
.admin-add-card {
  background: linear-gradient(180deg, rgba(33, 45, 70, .98), rgba(28, 40, 64, .98));
  border: 1px solid rgba(88, 122, 182, .26);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 20px;
}
.add-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: flex-end;
}
.add-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.8rem;
  color: var(--muted);
}
.add-form input, .add-form select {
  min-width: 140px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #0d1117;
  color: var(--text);
}
.plugin-mgr-add-form select[name="panel_user_id"] { min-width: 220px; }
.plugin-mgr-add-form input[name="plugin_id"] { min-width: 260px; }
.admin-add-card .hint { margin: 12px 0 0; font-size: 0.75rem; color: var(--muted); }
.contact-admin-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.contact-admin-link {
  margin: 0;
  font-size: 0.8rem;
  word-break: break-all;
}
.contact-admin-link a {
  color: var(--accent);
}
.owner-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.owner-form select { max-width: 140px; padding: 4px 8px; font-size: 0.75rem; }

.owner-pick-block {
  flex: 1 1 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 400px;
}
.owner-pick-label {
  font-size: 0.8rem;
  color: var(--muted);
}
.owner-pick-block .owner-filter-input,
.owner-pick-block select {
  width: 100%;
  max-width: 360px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #0d1117;
  color: var(--text);
  font-size: 0.85rem;
}
.owner-assign-cell {
  min-width: 200px;
  vertical-align: top;
}
.owner-row-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: stretch;
}
.owner-row-form .owner-row-filter {
  width: 100%;
  max-width: 200px;
  padding: 6px 8px;
  font-size: 0.75rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #0d1117;
  color: var(--text);
}
.owner-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.owner-row-actions select {
  flex: 1;
  min-width: 100px;
  max-width: 220px;
  padding: 4px 8px;
  font-size: 0.75rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #0d1117;
  color: var(--text);
}
.op-cell { white-space: normal; vertical-align: middle; }
.op-cell .inline-form { display: inline-block; margin: 2px 4px 2px 0; vertical-align: middle; }
.muted-inline { font-size: 0.78rem; color: var(--muted); }
.bind-tag { display: block; font-size: 0.75rem; color: #6ee7a8; margin-bottom: 6px; }
.btn.ghost.sm { background: transparent; border: 1px solid var(--border); color: var(--text); }
.auth-card a { color: var(--accent); }
.topnav a { color: var(--accent); margin-left: 16px; text-decoration: none; }
.topnav a:hover { text-decoration: underline; }
.topnav {
  display: flex;
  align-items: center;
  gap: 12px;
}
.topnav a {
  margin-left: 0;
}
.user-menu {
  position: relative;
  margin-left: 6px;
}
.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, #3d8bfd, #7a4cff);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}
.user-menu-pop {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 180px;
  background: #fff;
  color: #1f2a3a;
  border: 1px solid #e2e8f3;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.25);
  display: none;
  z-index: 20;
  overflow: hidden;
}
.user-menu:hover .user-menu-pop,
.user-menu:focus-within .user-menu-pop {
  display: block;
}
.user-menu-email {
  padding: 12px 14px;
  font-weight: 700;
  border-bottom: 1px solid #eef2f7;
  word-break: break-all;
}
.user-menu-pop a {
  display: block;
  padding: 10px 14px;
  color: #2b3648;
  text-decoration: none;
}
.user-menu-pop a:hover {
  background: #f3f6fb;
}

.alert {
  padding: 10px 14px; border-radius: 8px; margin-bottom: 12px; font-size: 0.9rem;
}
.alert-error { background: rgba(241,76,76,.15); border: 1px solid rgba(241,76,76,.4); }
.alert-success { background: rgba(46,204,113,.12); border: 1px solid rgba(46,204,113,.35); }
.alert-warning { background: rgba(255,193,7,.12); border: 1px solid rgba(255,193,7,.35); }

.panel-toolbar { margin-bottom: 16px; }
.filter-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.filter-form label { font-size: 0.8rem; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
.filter-form input {
  min-width: 160px; padding: 8px 10px; border-radius: 8px;
  border: 1px solid var(--border); background: #0d1117; color: var(--text);
}
.filter-form .filter-q {
  flex: 1 1 320px;
  min-width: 0;
}
.filter-form .filter-q input {
  width: 100%;
  min-width: 200px;
}
.stat { margin: 12px 0 0; color: var(--muted); font-size: 0.9rem; }

.table-wrap { overflow-x: auto; border: 1px solid rgba(88, 122, 182, .22); border-radius: var(--radius); background: linear-gradient(180deg, rgba(26, 36, 57, .98), rgba(22, 31, 49, .98)); }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.data-table th, .data-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); }
.data-table th { color: var(--muted); font-weight: 600; background: rgba(0,0,0,.2); }
.data-table tr:hover td { background: rgba(61,139,253,.06); }
.data-table .empty { text-align: center; color: var(--muted); padding: 32px; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 0.8rem; }
.small { font-size: 0.78rem; max-width: 140px; overflow: hidden; text-overflow: ellipsis; }

.data-table-wide td.col-license,
.data-table-wide td.col-ip,
.data-table-wide td.col-plugin {
  max-width: none;
  white-space: normal;
  word-break: break-all;
}
.data-table-wide td.small {
  max-width: none;
  white-space: normal;
  word-break: break-word;
}
.status-cell { vertical-align: top; }
.status-cell .status-cn {
  display: block;
  margin-top: 6px;
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.3;
}
.status-unknown { background: rgba(139,156,179,.12); color: var(--muted); }

.pill {
  display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 0.75rem;
  background: #2a3548; color: var(--text);
}
.status-active { background: rgba(46,204,113,.2); color: #6ee7a8; }
.status-unbound { background: rgba(255,193,7,.15); color: #ffd666; }
.status-expired { background: rgba(241,76,76,.15); color: #ff8a8a; }
.status-inactive { background: rgba(241,76,76,.15); color: #ff8a8a; }

.user-admin-table .user-op-cell { min-width: 280px; vertical-align: top; }
.user-reset-form {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 8px;
}
.user-reset-form input[type="password"] {
  width: 100px;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #0d1117;
  color: var(--text);
  font-size: 0.75rem;
}

.btn {
  display: inline-block; padding: 8px 16px; border-radius: 8px; border: none; cursor: pointer;
  font-size: 0.9rem; text-decoration: none; text-align: center;
}
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--muted); border: 1px solid var(--border); }
.btn.danger { background: var(--danger); color: #fff; }
.btn.sm { padding: 4px 10px; font-size: 0.75rem; }
.inline-form { margin: 0; display: inline; }

.site-footer {
  text-align: center; padding: 24px; color: var(--muted); font-size: 0.75rem;
}
.site-footer code { color: #aab; }

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

.panel-dialog {
  border: 1px solid rgba(88, 122, 182, .24);
  border-radius: var(--radius);
  padding: 0;
  background: linear-gradient(180deg, rgba(33, 45, 70, .98), rgba(28, 40, 64, .98));
  color: var(--text);
  max-width: 420px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}
.panel-dialog::backdrop {
  background: rgba(0, 0, 0, 0.55);
}
.panel-dialog-form {
  padding: 20px 22px;
  margin: 0;
}
.panel-dialog-title {
  margin: 0 0 8px;
  font-weight: 600;
  font-size: 1rem;
}
.panel-dialog-hint {
  margin: 0 0 14px;
  font-size: 0.8rem;
  color: #a9b8cf;
  line-height: 1.45;
  display: block;
}
.col-select { width: 44px; }

.col-select input[type="checkbox"]{
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--accent);
}
.panel-dialog-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
  margin-bottom: 16px;
}
.panel-dialog-field input,
.panel-dialog-field textarea,
.panel-dialog-field select {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #0d1117;
  color: var(--text);
  font-family: inherit;
}
.panel-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}

.shop-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.shop-card{
  border: 1px solid rgba(88, 122, 182, .22);
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(180deg, rgba(33, 45, 70, .98), rgba(28, 40, 64, .98));
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}
.shop-cover{
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0d1117;
  overflow: hidden;
}
.shop-cover img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.shop-cover-placeholder{
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.85rem;
}
.shop-badge{
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(61,139,253,.20);
  border: 1px solid rgba(61,139,253,.35);
  color: #cfe1ff;
  font-size: 0.75rem;
}
.shop-hidden-badge{
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(241,76,76,.14);
  border: 1px solid rgba(241,76,76,.35);
  color: #ffb3b3;
  font-size: 0.75rem;
}
.shop-body{
  padding: 12px 12px 14px;
}
.shop-title{
  margin: 0 0 6px;
  font-size: 0.95rem;
  font-weight: 650;
}
.shop-desc{
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
  min-height: 2.6em;
}
.shop-actions{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.shop-empty{
  color: var(--muted);
  padding: 28px 10px;
}

.shop-card-link{
  display: block;
  color: inherit;
  text-decoration: none;
}
.shop-card-link:hover .shop-title{
  text-decoration: underline;
}
.shop-body-actions{
  padding-top: 0;
}

.shop-textarea{
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #0d1117;
  color: var(--text);
  font-family: inherit;
  resize: vertical;
}
.shop-inline-check{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.shop-inline-check input[type="checkbox"]{
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.shop-tags{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}
.shop-tag{
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,.18);
  color: #cfe1ff;
  font-size: 0.78rem;
}

.shop-edit-inline{
  margin-top: 16px;
  border: 1px solid rgba(88, 122, 182, .24);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(33, 45, 70, .98), rgba(28, 40, 64, .98));
  padding: 14px 16px;
}
.shop-edit-title{
  margin: 0 0 10px;
  font-size: 1rem;
}
.shop-edit-form{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
  margin-bottom: 14px;
}
.shop-edit-form label{
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--muted);
}
.shop-edit-form input[type="text"],
.shop-edit-form input[type="url"],
.shop-edit-form input[type="file"],
.shop-edit-form textarea{
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #0d1117;
  color: var(--text);
  font-family: inherit;
}
.shop-edit-form textarea{
  grid-column: 1 / -1;
}
.shop-edit-actions{
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.shop-link-helper {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
  align-items: end;
}
.shop-link-helper label {
  margin: 0;
}

.shop-gallery{
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.shop-gallery-item{
  border: 1px solid rgba(88, 122, 182, .22);
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(180deg, rgba(33, 45, 70, .98), rgba(28, 40, 64, .98));
  padding: 10px;
}
.shop-gallery-item img{
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  margin-bottom: 8px;
}

.shop-detail{
  display: grid;
  grid-template-columns: minmax(260px, 520px) 1fr;
  gap: 16px;
  align-items: start;
}
.shop-detail-cover{
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #0d1117;
  position: relative;
}
.shop-detail-cover img{
  width: 100%;
  height: auto;
  display: block;
}
.shop-detail-body{
  background: linear-gradient(180deg, rgba(33, 45, 70, .98), rgba(28, 40, 64, .98));
  border: 1px solid rgba(88, 122, 182, .24);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.shop-detail-title{
  margin: 0 0 8px;
  font-size: 1.2rem;
}
.shop-detail-desc{
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.45;
}
.shop-detail-content{
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.55;
  font-size: 0.92rem;
}
.shop-detail-meta{
  margin: 12px 0 0;
}

.jp-modal-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.55);
  z-index: 9999;
}
.jp-modal {
  width: min(520px, 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #f7f7f8;
  color: #1b2430;
  padding: 24px 24px 18px;
}
.jp-modal-msg {
  font-size: 1.05rem;
  line-height: 1.6;
  word-break: break-word;
}
.jp-modal-actions {
  margin-top: 18px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

@media (max-width: 980px) {
  .login-shell {
    grid-template-columns: 1fr;
    background: linear-gradient(180deg, #4d62ea 0%, #3f54dc 44%, #3447ca 100%);
  }
  .login-showcase { min-height: 48vh; }
  .login-panel-wrap { padding-top: 0; margin-top: -10px; }
}

@media (max-width: 920px){
  .shop-edit-form{ grid-template-columns: 1fr; }
  .shop-detail{ grid-template-columns: 1fr; }
  .shop-link-helper { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .auth-card-login { width: min(100%, 470px); padding: 22px 16px 20px; }
  .login-panel-welcome { font-size: 1.58rem; }
  .login-panel-welcome-track { height: 36px; }
  .bclone-header-title { margin-left: 12px; transform: scale(1.04); }
  .bclone-stage {
    width: min(100%, 420px);
    height: 340px;
  }
  .bclone-purple { left: 44px; width: 138px; height: 282px; }
  .bclone-black { left: 160px; width: 84px; height: 214px; }
  .bclone-orange { left: 8px; width: 170px; height: 138px; }
  .bclone-yellow { left: 206px; width: 98px; height: 158px; }
}

@media (max-width: 640px) {
  .login-panel-wrap {
    padding: 20px 14px 34px;
  }
  .auth-form .code-send-btn {
    width: 138px;
    flex: 0 0 138px;
  }
}

@media (max-width: 768px) {
  .page,
  .page-wide {
    padding: 14px 10px 30px;
  }
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .topnav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
  }
  .topnav a {
    margin-left: 0;
  }
  .add-form,
  .filter-form {
    flex-direction: column;
    align-items: stretch;
  }
  .add-form label,
  .filter-form label,
  .add-form input,
  .filter-form input {
    width: 100%;
    min-width: 0;
    max-width: none;
  }
}

.page-profile .admin-add-card {
  width: 100%;
  max-width: none;
}

.page-profile .auth-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.page-profile .auth-form label {
  margin: 0;
  color: var(--text);
  font-size: 0.82rem;
}

.page-profile .auth-form input {
  width: 100%;
  min-width: 0;
  height: 40px;
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #0d1117;
  color: var(--text);
}

.page-profile .auth-form .code-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.page-profile .auth-form .code-row input {
  flex: 1 1 auto;
}

.page-profile .auth-form .code-send-btn {
  width: 136px;
  min-width: 136px;
  flex: 0 0 136px;
  margin-top: 0;
  height: 40px;
  padding: 0 12px;
  white-space: nowrap;
}

.page-profile .auth-form .btn.primary {
  width: 100%;
  margin-top: 4px;
}

@media (max-width: 768px) {
  .page-profile .admin-add-card {
    max-width: none;
  }

  .page-profile .auth-form .code-row {
    flex-direction: column;
    align-items: stretch;
  }

  .page-profile .auth-form .code-send-btn {
    width: 100%;
    min-width: 0;
    flex: 0 0 auto;
  }
}
