:root {
  --bg: #eef3f8;
  --surface: #ffffff;
  --surface-soft: #f9fafb;
  --text: #1b2430;
  --muted: #667085;
  --line: #e3e8ef;
  --line-strong: #cbd5e1;
  --brand: #e5484d;
  --brand-dark: #b4232b;
  --blue: #2563eb;
  --green: #08875d;
  --amber: #b7791f;
  --danger: #dc2626;
  --shadow: 0 18px 45px rgba(20, 28, 38, .10);
  --radius: 8px;
  --sky-ink: #11203a;
  --sky-indigo: #5967d9;
  --sky-coral: #f56f73;
  --sky-mint: #55d6c2;
  --sky-cream: #fff8ef;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

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

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font: 14px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  background:
    linear-gradient(128deg, rgba(255, 248, 239, .92) 0%, rgba(238, 245, 255, .88) 36%, rgba(228, 253, 248, .78) 100%),
    linear-gradient(158deg, rgba(245, 111, 115, .28) 0%, transparent 31%),
    linear-gradient(32deg, rgba(85, 214, 194, .32) 0%, transparent 42%),
    linear-gradient(218deg, rgba(89, 103, 217, .40) 0%, transparent 51%),
    linear-gradient(180deg, #fbfcff 0%, #e7f3f7 56%, #f2fbf2 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(112deg, transparent 0 12%, rgba(255, 255, 255, .64) 18%, rgba(255, 255, 255, .12) 29%, transparent 42%),
    linear-gradient(149deg, transparent 0 21%, rgba(245, 111, 115, .22) 34%, rgba(255, 255, 255, .18) 43%, transparent 58%),
    linear-gradient(38deg, transparent 0 28%, rgba(85, 214, 194, .24) 43%, rgba(255, 255, 255, .18) 54%, transparent 72%),
    linear-gradient(79deg, transparent 0 58%, rgba(89, 103, 217, .13) 70%, transparent 86%),
    repeating-linear-gradient(90deg, rgba(15, 23, 42, .034) 0, rgba(15, 23, 42, .034) 1px, transparent 1px, transparent 92px),
    repeating-linear-gradient(0deg, rgba(15, 23, 42, .024) 0, rgba(15, 23, 42, .024) 1px, transparent 1px, transparent 92px);
  opacity: .86;
  mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, .82) 70%, rgba(0, 0, 0, .45) 100%);
}

body::after {
  content: "";
  position: fixed;
  inset: -1px;
  pointer-events: none;
  background:
    linear-gradient(132deg, transparent 0 18%, rgba(245, 111, 115, .13) 31%, transparent 46%),
    linear-gradient(42deg, transparent 0 38%, rgba(85, 214, 194, .18) 54%, transparent 76%),
    conic-gradient(from 208deg at 18% 28%, transparent 0deg, rgba(245, 111, 115, .17) 42deg, transparent 92deg),
    conic-gradient(from 32deg at 86% 20%, transparent 0deg, rgba(89, 103, 217, .19) 54deg, transparent 118deg),
    linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, .38) 44%, transparent 58%);
  filter: blur(12px);
  mix-blend-mode: normal;
  opacity: .62;
  transform: translateX(-26%);
  animation: ambient-sheen 14s cubic-bezier(.22, 1, .36, 1) infinite;
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  color: #1d4ed8;
}

button,
.btn {
  --button-glow: rgba(229, 72, 77, .34);
  --button-shadow: rgba(229, 72, 77, .22);
  appearance: none;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 0;
  border-radius: 7px;
  padding: 9px 14px;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 18px var(--button-shadow), 0 0 0 rgba(229, 72, 77, 0);
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
  overflow: visible;
  isolation: isolate;
}

button::after,
.btn::after {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  background: linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, .34) 45%, transparent 72%);
  opacity: 0;
  transform: translateX(-55%);
  transition: opacity .18s ease, transform .34s ease;
}

button:hover,
.btn:hover {
  color: #fff;
  background: var(--brand-dark);
  box-shadow: 0 14px 30px var(--button-shadow), 0 0 22px var(--button-glow);
  transform: translateY(-1px);
}

button:hover::after,
.btn:hover::after {
  opacity: .88;
  transform: translateX(44%);
}

button:active,
.btn:active {
  transform: translateY(0) scale(.98);
  box-shadow: 0 6px 16px var(--button-shadow), 0 0 0 6px var(--button-glow), 0 0 34px var(--button-glow);
}

button.is-glowing,
.btn.is-glowing {
  animation: button-glow .56s ease-out;
}

button:disabled {
  cursor: wait;
  opacity: .7;
  transform: none;
}

.danger {
  --button-glow: rgba(220, 38, 38, .36);
  --button-shadow: rgba(220, 38, 38, .20);
  background: var(--danger);
}

.danger:hover {
  background: #b91c1c;
}

.warning {
  --button-glow: rgba(245, 158, 11, .34);
  --button-shadow: rgba(245, 158, 11, .22);
  background: #f59e0b;
  color: #fff;
}

.warning:hover {
  background: #d97706;
}

.secondary {
  --button-glow: rgba(71, 85, 105, .30);
  --button-shadow: rgba(71, 85, 105, .18);
  background: #475569;
}

.secondary:hover {
  background: #334155;
}

.compact {
  min-height: 30px;
  padding: 5px 9px;
  box-shadow: none;
  font-size: 12px;
}

.app-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 2000;
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 28px;
  color: #fff;
  overflow: visible;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .24), rgba(255, 255, 255, .04)),
    linear-gradient(112deg, rgba(168, 46, 70, .92) 0%, rgba(218, 82, 111, .84) 29%, rgba(93, 91, 203, .84) 67%, rgba(37, 99, 235, .86) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, .26);
  box-shadow: 0 18px 42px rgba(15, 23, 42, .18), inset 0 -1px 0 rgba(255, 255, 255, .18);
  backdrop-filter: blur(18px) saturate(1.2);
}

.topbar::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(92deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .18) 45%, rgba(255, 255, 255, 0) 78%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .10) 0, rgba(255, 255, 255, .10) 1px, transparent 1px, transparent 64px);
  opacity: .42;
  animation: nav-light-pass 9s ease-in-out infinite;
}

.topbar > * {
  position: relative;
  z-index: 1;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  white-space: nowrap;
  text-shadow: 0 1px 8px rgba(15, 23, 42, .18);
}

.brand:hover {
  color: #fff;
}

.brand-mark {
  width: 40px;
  height: 34px;
  display: block;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 12px 28px rgba(126, 25, 47, .22);
  flex: 0 0 auto;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 7px;
  border: 1px solid transparent;
  color: rgba(255, 255, 255, .84);
  font-weight: 700;
  transition: background .16s ease, border-color .16s ease, box-shadow .16s ease, color .16s ease, transform .16s ease;
}

.nav a:hover,
.nav a.active {
  color: #fff;
  border-color: rgba(255, 255, 255, .24);
  background: rgba(255, 255, 255, .18);
  box-shadow: 0 8px 22px rgba(15, 23, 42, .14), inset 0 1px 0 rgba(255, 255, 255, .18);
}

.nav a:hover {
  transform: translateY(-1px);
}

.user-area {
  display: flex;
  align-items: center;
  gap: 10px;
}

.notification-center {
  position: relative;
  flex: 0 0 auto;
}

.notification-trigger {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, .15);
  box-shadow: 0 8px 20px rgba(15, 23, 42, .14), inset 0 1px 0 rgba(255, 255, 255, .14);
}

.notification-trigger:hover,
.notification-center.is-open .notification-trigger {
  background: rgba(255, 255, 255, .24);
}

.notification-trigger svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notification-trigger-dot {
  position: absolute;
  left: 4px;
  top: 5px;
  width: 9px;
  height: 9px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #ef4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, .24);
}

.notification-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: -8px;
  z-index: 2100;
  width: min(360px, calc(100vw - 24px));
  max-height: min(430px, calc(100vh - 90px));
  overflow: hidden;
  padding: 12px;
  border: 1px solid rgba(203, 213, 225, .86);
  border-radius: 10px;
  color: #111827;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 22px 54px rgba(15, 23, 42, .22);
}

.notification-panel::before {
  content: "";
  position: absolute;
  top: -7px;
  right: 20px;
  width: 12px;
  height: 12px;
  border-left: 1px solid rgba(203, 213, 225, .86);
  border-top: 1px solid rgba(203, 213, 225, .86);
  background: rgba(255, 255, 255, .98);
  transform: rotate(45deg);
}

.notification-panel-head {
  position: sticky;
  top: -12px;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  margin: -12px -12px 10px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .98);
}

.notification-panel-head strong {
  font-size: 15px;
}

.notification-close {
  display: inline-grid;
  place-items: center;
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: #475569;
  background: #fff;
  box-shadow: none;
}

.notification-list {
  display: grid;
  gap: 8px;
  max-height: min(348px, calc(100vh - 168px));
  overflow-y: auto;
  padding-right: 2px;
}

.notification-item {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.notification-item-warning {
  background: #fffbeb;
}

.notification-item-success {
  background: #f0fdf4;
}

.notification-unread-dot {
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: 999px;
  background: transparent;
}

.notification-item.is-unread .notification-unread-dot {
  background: #ef4444;
}

.notification-item-toggle {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px;
  gap: 8px;
  align-items: center;
  width: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #111827;
  background: transparent;
  box-shadow: none;
  text-align: left;
}

.notification-item-toggle::after {
  display: none;
}

.notification-item-toggle:hover,
.notification-item-toggle:active {
  color: #111827;
  background: transparent;
  box-shadow: none;
  transform: none;
}

.notification-item-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
}

.notification-item-chevron {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  color: #64748b;
  background: #f1f5f9;
  font-size: 13px;
  line-height: 1;
  transition: transform .16s ease;
}

.notification-item.is-expanded .notification-item-chevron {
  transform: rotate(180deg);
}

.notification-item p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 4px 0 0;
  color: #475569;
  font-size: 13px;
  line-height: 1.55;
}

.notification-item.is-expanded p {
  display: block;
  overflow: visible;
}

.notification-item a {
  display: none;
  margin-top: 8px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
}

.notification-item.is-expanded a {
  display: inline-flex;
}

.notification-empty {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.user-chip {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 999px;
  color: rgba(255, 255, 255, .90);
  background: rgba(255, 255, 255, .13);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14);
}

.user-chip:hover {
  color: rgba(255, 255, 255, .96);
}

.topbar .btn {
  --button-glow: rgba(255, 255, 255, .28);
  --button-shadow: rgba(15, 23, 42, .16);
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, .28);
  background: rgba(255, 255, 255, .16);
  box-shadow: 0 8px 20px var(--button-shadow), inset 0 1px 0 rgba(255, 255, 255, .14);
}

.topbar .btn:hover {
  background: rgba(255, 255, 255, .24);
  box-shadow: 0 12px 26px var(--button-shadow), 0 0 22px rgba(255, 255, 255, .18);
}

.wrap {
  width: min(1120px, calc(100% - 36px));
  margin: 28px auto 44px;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 18px;
  padding: 4px 0 2px;
}

.page-title {
  margin: 0;
  font-size: 26px;
  line-height: 1.2;
  font-weight: 800;
  color: #111827;
  text-wrap: balance;
}

.page-subtitle {
  margin-top: 5px;
  color: var(--muted);
  text-wrap: pretty;
}

.card {
  position: relative;
  overflow-x: auto;
  margin-bottom: 18px;
  padding: 20px;
  border: 1px solid rgba(226, 232, 240, .92);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .95), rgba(255, 255, 255, .88)),
    linear-gradient(135deg, rgba(255, 248, 250, .70), rgba(238, 246, 255, .66) 48%, rgba(236, 255, 251, .52));
  box-shadow: 0 1px 0 rgba(255, 255, 255, .85), 0 18px 48px rgba(20, 28, 38, .10);
  transition: border-color .22s ease, box-shadow .22s ease, transform .22s ease, background .22s ease;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, .58), transparent 34%, rgba(37, 99, 235, .07) 100%),
    linear-gradient(28deg, transparent 0 62%, rgba(85, 214, 194, .08) 76%, transparent 100%);
  opacity: .78;
}

.card > * {
  position: relative;
}

.card:hover {
  border-color: rgba(148, 163, 184, .74);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .9), 0 24px 56px rgba(20, 28, 38, .13);
  transform: translateY(-2px);
}

.card h2 {
  margin: 0 0 14px;
  font-size: 17px;
  line-height: 1.25;
  font-weight: 800;
  color: #111827;
}

.card p {
  margin: 0 0 14px;
}

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

label {
  display: block;
  margin: 0 0 6px;
  color: #334155;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 40px;
  box-sizing: border-box;
  margin: 0 0 14px;
  padding: 10px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  outline: none;
  background: #fff;
  color: var(--text);
  font: inherit;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease, transform .16s ease;
}

textarea {
  min-height: 130px;
  resize: vertical;
  font-family: "Cascadia Mono", Consolas, "Courier New", monospace;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(229, 72, 77, .12), 0 12px 28px rgba(15, 23, 42, .07);
  transform: translateY(-1px);
}

.skript-editor {
  --editor-bg: #293134;
  --editor-panel: #20282b;
  --editor-gutter: #1d2528;
  --editor-line: rgba(255, 255, 255, .10);
  --editor-text: #f7fafc;
  --editor-muted: #9aa7ad;
  --editor-accent: #5eaeff;
  margin: 0 0 14px;
  overflow: hidden;
  border: 1px solid #1d2528;
  border-radius: 8px;
  background: var(--editor-bg);
  box-shadow: 0 18px 42px rgba(15, 23, 42, .22);
}

.skript-editor.is-compact {
  border-color: var(--line);
  background: #fff;
  box-shadow: none;
}

body.skript-editor-dialog-open {
  overflow: hidden;
}

.skript-editor-dialog {
  width: calc(100vw - 24px);
  height: calc(100vh - 24px);
  max-width: none;
  max-height: none;
  padding: 0;
  border: 1px solid #11191c;
  border-radius: 8px;
  background: #293134;
  color: #f7fafc;
  box-shadow: 0 34px 100px rgba(2, 6, 23, .54);
}

.skript-editor-dialog::backdrop {
  background: rgba(15, 23, 42, .62);
}

.skript-editor-dialog[open] {
  display: block;
}

.skript-editor-dialog-body {
  width: 100%;
  height: 100%;
}

.skript-editor-source {
  display: none !important;
}

.xyue-syntax-preview {
  display: block;
  width: 100%;
  min-height: 220px;
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #f8fafc;
  color: #243041;
  font-family: "Cascadia Mono", Consolas, "Courier New", monospace;
  font-size: 14px;
  line-height: 1.55;
  resize: vertical;
  white-space: pre;
}

.xyue-syntax-preview:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(229, 72, 77, .12);
  outline: none;
}

.syntax-preview-fold {
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.syntax-preview-fold summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
}

.syntax-preview-fold summary span {
  font-weight: 700;
  color: var(--text);
}

.syntax-preview-fold summary small {
  color: var(--muted);
  line-height: 1.45;
  text-align: right;
}

.syntax-preview-fold .xyue-syntax-preview {
  min-height: 260px;
  border-right: 0;
  border-left: 0;
  border-radius: 0;
}

.syntax-preview-fold p,
.syntax-preview-fold button {
  margin: 0 14px 12px;
}

.skript-editor-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 10px;
  border-bottom: 1px solid var(--editor-line);
  background: linear-gradient(180deg, #354044, #252d30);
  color: var(--editor-text);
}

.skript-editor.is-compact .skript-editor-toolbar {
  border-bottom: 0;
  background: #f8fafc;
  color: var(--text);
}

.skript-editor-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-weight: 800;
}

.skript-editor-title::before {
  content: "SK";
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 24px;
  border: 1px solid rgba(94, 174, 255, .35);
  border-radius: 6px;
  background: rgba(94, 174, 255, .12);
  color: #9fd0ff;
  font-size: 11px;
  font-weight: 900;
}

.skript-editor.is-compact .skript-editor-title::before {
  border-color: rgba(229, 72, 77, .24);
  background: rgba(229, 72, 77, .08);
  color: var(--brand-dark);
}

.skript-editor-meta {
  min-width: 0;
  overflow: hidden;
  color: var(--editor-muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.skript-editor.is-compact .skript-editor-meta {
  color: var(--muted);
}

.skript-editor-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
}

.skript-editor-actions button {
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .06);
  box-shadow: none;
  color: #e5edf1;
  font-size: 12px;
}

.skript-editor.is-compact .skript-editor-actions button {
  border-color: var(--line-strong);
  background: #fff;
  color: #334155;
}

.skript-editor.is-compact .skript-editor-actions button:hover {
  background: #fff1f2;
  color: var(--brand-dark);
}

.skript-editor.is-compact .skript-editor-actions .dialog-only {
  display: none;
}

.skript-editor.has-unsaved .skript-editor-toolbar {
  border-bottom-color: rgba(245, 158, 11, .36);
  box-shadow: inset 0 -1px 0 rgba(245, 158, 11, .20);
}

.skript-editor.has-unsaved .skript-editor-title::after {
  content: "未保存";
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 7px;
  border: 1px solid rgba(245, 158, 11, .42);
  border-radius: 999px;
  color: #fbbf24;
  background: rgba(245, 158, 11, .12);
  font-size: 12px;
  font-weight: 800;
}

.skript-editor-actions button.save-draft {
  border-color: rgba(94, 174, 255, .32);
  background: rgba(94, 174, 255, .18);
  color: #dbeafe;
}

.skript-editor-actions button.save-draft:disabled {
  cursor: default;
  opacity: .45;
  transform: none;
}

.skript-editor-actions button.save-draft:disabled:hover {
  background: rgba(94, 174, 255, .18);
  color: #dbeafe;
}

.skript-editor-actions button:hover {
  background: rgba(94, 174, 255, .22);
  box-shadow: none;
  transform: none;
}

.skript-editor.is-compact .codemirror-skript-host {
  display: none;
}

.codemirror-skript-host {
  min-width: 0;
  min-height: 0;
}

.skript-editor.is-dialog {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  margin: 0;
  border: 0;
  border-radius: 8px;
  box-shadow: none;
}

.skript-editor.is-dialog .codemirror-skript-host {
  display: block;
  flex: 1 1 0;
  width: 100%;
  min-height: 0;
  overflow: hidden;
  background: #293134;
}

.codemirror-skript-editor .cm-editor {
  width: 100%;
  height: 100%;
}

.codemirror-skript-editor .cm-scroller {
  overflow: auto;
}

.codemirror-skript-editor .cm-content {
  tab-size: 4;
}

.codemirror-skript-editor .cm-line,
.codemirror-skript-editor .cm-gutterElement {
  line-height: 24px;
}

.codemirror-skript-editor .cm-selectionBackground {
  background-color: rgba(255, 204, 0, .48) !important;
}

.codemirror-skript-editor .cm-focused .cm-selectionBackground,
.codemirror-skript-editor .cm-content ::selection {
  background-color: rgba(255, 204, 0, .58) !important;
}

.codemirror-skript-editor .cm-content .xyue-mc-color-0,
.codemirror-skript-editor .cm-content .xyue-mc-color-0 * { color: #000000 !important; }
.codemirror-skript-editor .cm-content .xyue-mc-color-1,
.codemirror-skript-editor .cm-content .xyue-mc-color-1 * { color: #0000AA !important; }
.codemirror-skript-editor .cm-content .xyue-mc-color-2,
.codemirror-skript-editor .cm-content .xyue-mc-color-2 * { color: #00AA00 !important; }
.codemirror-skript-editor .cm-content .xyue-mc-color-3,
.codemirror-skript-editor .cm-content .xyue-mc-color-3 * { color: #00AAAA !important; }
.codemirror-skript-editor .cm-content .xyue-mc-color-4,
.codemirror-skript-editor .cm-content .xyue-mc-color-4 * { color: #AA0000 !important; }
.codemirror-skript-editor .cm-content .xyue-mc-color-5,
.codemirror-skript-editor .cm-content .xyue-mc-color-5 * { color: #AA00AA !important; }
.codemirror-skript-editor .cm-content .xyue-mc-color-6,
.codemirror-skript-editor .cm-content .xyue-mc-color-6 * { color: #FFAA00 !important; }
.codemirror-skript-editor .cm-content .xyue-mc-color-7,
.codemirror-skript-editor .cm-content .xyue-mc-color-7 * { color: #AAAAAA !important; }
.codemirror-skript-editor .cm-content .xyue-mc-color-8,
.codemirror-skript-editor .cm-content .xyue-mc-color-8 * { color: #555555 !important; }
.codemirror-skript-editor .cm-content .xyue-mc-color-9,
.codemirror-skript-editor .cm-content .xyue-mc-color-9 * { color: #5555FF !important; }
.codemirror-skript-editor .cm-content .xyue-mc-color-a,
.codemirror-skript-editor .cm-content .xyue-mc-color-a * { color: #55FF55 !important; }
.codemirror-skript-editor .cm-content .xyue-mc-color-b,
.codemirror-skript-editor .cm-content .xyue-mc-color-b * { color: #55FFFF !important; }
.codemirror-skript-editor .cm-content .xyue-mc-color-c,
.codemirror-skript-editor .cm-content .xyue-mc-color-c * { color: #FF5555 !important; }
.codemirror-skript-editor .cm-content .xyue-mc-color-d,
.codemirror-skript-editor .cm-content .xyue-mc-color-d * { color: #FF55FF !important; }
.codemirror-skript-editor .cm-content .xyue-mc-color-e,
.codemirror-skript-editor .cm-content .xyue-mc-color-e * { color: #FFFF55 !important; }
.codemirror-skript-editor .cm-content .xyue-mc-color-f,
.codemirror-skript-editor .cm-content .xyue-mc-color-f * { color: #FFFFFF !important; }
.codemirror-skript-editor .cm-content .xyue-mc-color-r,
.codemirror-skript-editor .cm-content .xyue-mc-color-r * { color: #FFFFFF !important; }
.codemirror-skript-editor .cm-content .xyue-mc-color-l,
.codemirror-skript-editor .cm-content .xyue-mc-color-l * { font-weight: 900 !important; }
.codemirror-skript-editor .cm-content .xyue-mc-color-o,
.codemirror-skript-editor .cm-content .xyue-mc-color-o * { font-style: italic !important; }
.codemirror-skript-editor .cm-content .xyue-mc-color-n,
.codemirror-skript-editor .cm-content .xyue-mc-color-n * { text-decoration: underline !important; }
.codemirror-skript-editor .cm-content .xyue-mc-color-m,
.codemirror-skript-editor .cm-content .xyue-mc-color-m * { text-decoration: line-through !important; }
.codemirror-skript-editor .cm-content .xyue-mc-color-k,
.codemirror-skript-editor .cm-content .xyue-mc-color-k * { text-shadow: 0 0 6px rgba(255, 255, 255, .75) !important; }

.skript-editor-fallback-notice {
  grid-column: 1 / -1;
  margin: 0 0 8px;
  padding: 9px 11px;
  border: 1px solid rgba(245, 158, 11, .34);
  border-radius: 7px;
  background: rgba(245, 158, 11, .10);
  color: #92400e;
  font-size: 13px;
  font-weight: 700;
}

.skript-editor-fallback {
  display: block !important;
  min-height: 420px;
  font: 15px/1.6 "Cascadia Mono", Consolas, "Courier New", monospace;
  tab-size: 4;
  white-space: pre;
}

input[type="checkbox"] {
  width: auto;
  min-height: auto;
  margin: 0 6px 0 0;
  accent-color: var(--brand);
}

input[type="file"] {
  padding: 8px;
  background: var(--surface-soft);
}

.filter-form {
  margin: 0;
}

.filter-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 10px;
  align-items: start;
}

.filter-row select {
  margin-bottom: 0;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, .45);
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-panel {
  width: min(100%, 520px);
  max-height: min(760px, calc(100vh - 48px));
  overflow: auto;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 28px 70px rgba(15, 23, 42, .26);
}

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

.modal-head h2 {
  margin: 0;
  color: #111827;
  font-size: 18px;
}

.modal-danger-zone {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.modal-danger-zone h3 {
  margin: 0 0 10px;
  color: #991b1b;
  font-size: 15px;
}

.dialog-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.dialog-summary-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.dialog-summary-card h3 {
  margin: 0 0 4px;
  color: #111827;
  font-size: 15px;
}

.dialog-summary-card p {
  margin: 0;
}

.content-dialog {
  width: min(1120px, calc(100vw - 32px));
  max-height: min(820px, calc(100vh - 32px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 34px 90px rgba(15, 23, 42, .34);
}

.content-dialog::backdrop {
  background: rgba(15, 23, 42, .48);
}

.content-dialog-body {
  max-height: min(760px, calc(100vh - 92px));
  overflow: auto;
  padding: 18px;
}

.content-dialog-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: -18px -18px 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(10px);
}

.content-dialog-head h2 {
  margin: 0 0 4px;
  color: #111827;
  font-size: 18px;
}

.content-dialog-head p {
  margin: 0;
}

.content-dialog-close {
  flex: 0 0 auto;
}

.script-edit-dialog {
  width: min(1180px, calc(100vw - 32px));
}

.script-edit-dialog .content-dialog-body {
  max-height: min(820px, calc(100vh - 32px));
}

.script-edit-dialog form {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 10px 14px;
}

.script-edit-dialog form label,
.script-edit-dialog form input,
.script-edit-dialog form select {
  margin-bottom: 0;
}

.script-edit-dialog form .form-span-all,
.script-edit-dialog form .skript-editor,
.script-edit-dialog form textarea[name="source_text"] {
  grid-column: 1 / -1;
}

.script-edit-dialog form button,
.script-edit-dialog form .btn {
  justify-self: start;
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  overflow: hidden;
}

.card table {
  margin: -3px 0 0;
}

th,
td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: #475569;
  background: var(--surface-soft);
  font-size: 12px;
  font-weight: 800;
}

tr:last-child td {
  border-bottom: 0;
}

td small {
  color: var(--muted);
  word-break: break-all;
}

.binding-item {
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
}

.binding-item:first-child {
  padding-top: 0;
}

.binding-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.row-action-details summary,
.danger-action-details summary,
.config-section-summary {
  cursor: pointer;
  list-style: none;
}

.row-action-details summary::-webkit-details-marker,
.danger-action-details summary::-webkit-details-marker,
.config-section-summary::-webkit-details-marker {
  display: none;
}

.row-action-details summary {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: #334155;
  background: #fff;
  font-weight: 800;
}

.row-action-details[open] summary {
  margin-bottom: 10px;
}

.license-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.license-detail-grid div {
  display: grid;
  gap: 3px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.license-detail-grid strong {
  color: #111827;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.danger-action-details {
  display: grid;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px dashed rgba(220, 38, 38, .24);
}

.danger-action-details summary {
  color: #991b1b;
  font-size: 12px;
  font-weight: 800;
}

.dependency-group {
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.dependency-group:first-of-type {
  padding-top: 0;
  border-top: 0;
}

.dependency-group:last-child {
  padding-bottom: 0;
}

.dependency-group-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.dependency-group-head h3 {
  margin: 0 0 2px;
  color: #111827;
  font-size: 16px;
}

.dependency-group-head p {
  margin: 0;
}

.dependency-table {
  margin-bottom: 12px;
}

.version-fold {
  margin: 12px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
}

.version-fold summary {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
  background: var(--surface-soft);
}

.version-fold summary::-webkit-details-marker {
  display: none;
}

.version-fold summary::before {
  content: ">";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-right: 2px;
  color: var(--muted);
  font-weight: 800;
  transition: transform .16s ease;
}

.version-fold[open] summary::before {
  transform: rotate(90deg);
}

.version-fold summary > span:first-child {
  display: inline-flex;
  align-items: baseline;
  flex: 1 1 220px;
  gap: 8px;
  min-width: 0;
}

.version-fold summary strong {
  color: #111827;
  font-size: 15px;
}

.version-fold summary .status-badge {
  margin: 0;
}

.version-fold table {
  margin: 0;
  border-top: 1px solid var(--line);
}

.relation-version-fold {
  margin-bottom: 10px;
}

.relation-form,
.add-relation-form {
  display: grid;
  gap: 8px;
  align-items: start;
}

.relation-form {
  grid-template-columns: minmax(100px, 130px) auto;
}

.add-relation-form {
  grid-template-columns: minmax(220px, 1fr) minmax(110px, 150px) auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.api-asset-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 10px 14px;
  align-items: end;
}

.api-asset-form label {
  margin: 0;
}

.api-asset-form input,
.api-asset-form select {
  margin-bottom: 0;
}

.config-pack-preview {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  word-break: break-all;
}

.config-pack-preview code {
  display: inline-block;
  max-width: 100%;
}

.config-pack-submit-row {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  margin-top: 4px;
}

.config-pack-submit {
  width: min(560px, 100%);
  min-height: 48px;
  padding: 12px 20px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0;
}

.api-asset-actions {
  display: flex;
  align-items: end;
  min-height: 38px;
}

.api-empty {
  padding: 14px;
  margin: 0;
}

.relation-form select,
.add-relation-form select {
  margin-bottom: 0;
}

.inline-action {
  margin-top: 8px;
}

.inline-action button {
  margin: 0;
}

.section-jump-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.card[id],
.config-section-fold[id] {
  scroll-margin-top: 84px;
}

.actions-cell {
  min-width: 100px;
}

.action-stack {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.action-stack form {
  margin: 0;
}

.license-renew-form,
.license-transfer-form {
  display: grid;
  gap: 5px;
  min-width: 162px;
}

.license-renew-form label,
.license-transfer-form label {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.license-renew-form input[type="datetime-local"],
.license-transfer-form input {
  min-width: 162px;
  margin: 0;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin: 0 8px 8px 0;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  vertical-align: top;
}

.status-badge-licensed {
  color: #067647;
  border-color: #abefc6;
  background: #ecfdf3;
}

.status-badge-bound {
  color: #6b4aa6;
  border-color: #dbc9fb;
  background: #f5efff;
}

.status-badge-unbound {
  color: #b54708;
  border-color: #fedf89;
  background: #fffaeb;
}

.status-badge-expired {
  color: #b42318;
  border-color: #fecdca;
  background: #fef3f2;
}

.copy-code {
  display: inline-block;
  max-width: 100%;
  margin: 0 8px 8px 0;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #0f172a;
  background: #f8fafc;
  font-family: "Cascadia Mono", Consolas, "Courier New", monospace;
  font-size: 12px;
  word-break: break-all;
}

.copy-code[data-copy] {
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease;
}

.copy-code[data-copy]:hover {
  border-color: var(--brand);
  background: #eef6ff;
}

.copy-code.is-copied::after {
  content: " 已复制";
  color: #0f8b4c;
  font-family: inherit;
  font-weight: 700;
}

.copy-btn {
  min-height: 30px;
  padding: 5px 9px;
  box-shadow: none;
  font-size: 12px;
}

.store-hero,
.user-guide-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  margin-bottom: 20px;
  padding: 24px;
  border: 1px solid rgba(226, 232, 240, .96);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 241, 242, .96), rgba(240, 249, 255, .94) 54%, rgba(236, 253, 245, .94)),
    #fff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, .10), inset 0 1px 0 rgba(255, 255, 255, .78);
  overflow: hidden;
}

.store-hero::after,
.user-guide-panel::after {
  content: "";
  position: absolute;
  inset: auto 22px 0;
  height: 4px;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(90deg, var(--brand), #0f766e, #f59e0b);
  opacity: .74;
}

.store-hero-copy,
.user-guide-copy {
  position: relative;
  z-index: 1;
}

.store-kicker,
.guide-kicker {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 5px 9px;
  border: 1px solid rgba(225, 29, 72, .18);
  border-radius: 999px;
  background: rgba(255, 255, 255, .74);
  color: #be123c;
  font-size: 12px;
  font-weight: 900;
}

.store-hero h2,
.user-guide-panel h2 {
  margin: 0 0 10px;
  color: #111827;
  font-size: 26px;
  line-height: 1.22;
}

.store-hero p,
.user-guide-panel p {
  max-width: 720px;
  margin: 0;
  color: #475569;
  font-size: 16px;
  line-height: 1.75;
}

.store-cat,
.guide-cat {
  position: relative;
  z-index: 1;
  width: clamp(126px, 18vw, 210px);
  height: auto;
  filter: drop-shadow(0 14px 18px rgba(15, 23, 42, .12));
}

.guide-logo-wrap {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: clamp(132px, 18vw, 210px);
  aspect-ratio: 1;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.guide-logo {
  width: 72%;
  height: 72%;
  object-fit: contain;
  filter: drop-shadow(0 14px 18px rgba(15, 23, 42, .16));
}

.store-logo-wrap {
  width: clamp(126px, 18vw, 196px);
}

.store-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.store-product-card {
  position: relative;
  display: flex;
  min-height: 238px;
  flex-direction: column;
  gap: 14px;
  padding: 22px;
  border: 1px solid rgba(226, 232, 240, .96);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(248, 250, 252, .96)),
    #fff;
  box-shadow: 0 16px 32px rgba(15, 23, 42, .10), 0 2px 0 rgba(15, 23, 42, .04);
  transform: translateY(0);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.store-product-card:hover {
  border-color: rgba(229, 72, 77, .28);
  box-shadow: 0 24px 46px rgba(15, 23, 42, .14), 0 3px 0 rgba(225, 29, 72, .12);
  transform: translateY(-3px);
}

.store-product-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(90deg, var(--brand), #0f766e, #f59e0b);
}

.store-product-badge {
  align-self: flex-start;
  max-width: 100%;
  padding: 5px 9px;
  border-radius: 999px;
  background: #fff1f2;
  color: #be123c;
  font-size: 12px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.store-product-top {
  display: grid;
  gap: 8px;
}

.store-product-top h3 {
  margin: 0;
  color: #111827;
  font-size: 20px;
  line-height: 1.28;
}

.store-product-top strong {
  width: fit-content;
  padding: 6px 10px;
  border-radius: 7px;
  background: #ecfdf5;
  color: #047857;
  font-size: 18px;
  line-height: 1.15;
}

.store-product-card p {
  margin: 0;
  color: #475569;
  font-size: 15px;
  line-height: 1.72;
  overflow-wrap: anywhere;
}

.store-product-link {
  width: 100%;
  margin-top: auto;
}

.store-product-link.disabled {
  pointer-events: none;
  opacity: .72;
}

.guide-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.guide-steps > div,
.guide-note {
  padding: 15px;
  border: 1px solid rgba(203, 213, 225, .78);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .76);
  box-shadow: 0 10px 22px rgba(15, 23, 42, .06);
}

.guide-steps strong,
.guide-note strong {
  display: block;
  margin-bottom: 7px;
  color: #111827;
  font-size: 17px;
  line-height: 1.3;
}

.guide-steps p,
.guide-note p {
  font-size: 15px;
}

.guide-note {
  margin-top: 12px;
  border-color: rgba(245, 158, 11, .28);
  background: rgba(255, 251, 235, .82);
}

.tutorial-hero {
  align-items: center;
  padding: 30px;
}

.tutorial-command-strip {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
  padding: 10px 12px;
  border: 1px solid rgba(15, 118, 110, .22);
  border-radius: 8px;
  background: rgba(255, 255, 255, .82);
  color: #0f766e;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .07);
}

.tutorial-command-strip code {
  font-size: 14px;
}

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

.tutorial-card {
  position: relative;
  min-height: 190px;
  padding: 22px 22px 22px 78px;
  border: 1px solid rgba(226, 232, 240, .96);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(248, 250, 252, .94)),
    #fff;
  box-shadow: 0 16px 34px rgba(15, 23, 42, .09), inset 0 1px 0 rgba(255, 255, 255, .82);
  overflow: hidden;
}

.tutorial-card::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, rgba(229, 72, 77, .78), rgba(15, 118, 110, .78), rgba(245, 158, 11, .78));
  opacity: .82;
}

.tutorial-card h2 {
  margin: 0 0 10px;
  color: #111827;
  font-size: 22px;
  line-height: 1.24;
}

.tutorial-card p {
  margin: 0;
  color: #475569;
  font-size: 17px;
  line-height: 1.78;
}

.tutorial-card code {
  padding: 2px 5px;
  border-radius: 5px;
  background: #f1f5f9;
  color: #0f172a;
  font-size: .92em;
}

.tutorial-copy-command,
.tutorial-card .tutorial-copy-command,
.tutorial-command-strip .tutorial-copy-command {
  display: inline-block;
  margin: 0;
  padding: 5px 8px;
  border: 1px solid rgba(15, 118, 110, .22);
  border-radius: 6px;
  background: #f0fdfa;
  color: #115e59;
  font-weight: 900;
  line-height: 1.35;
  cursor: pointer;
  word-break: break-word;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.tutorial-copy-command:hover {
  border-color: rgba(15, 118, 110, .44);
  background: #ccfbf1;
  box-shadow: 0 8px 18px rgba(15, 118, 110, .10);
}

.tutorial-copy-command.is-copied::after {
  color: #047857;
}

.tutorial-step {
  position: absolute;
  top: 22px;
  left: 22px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand), #0f766e);
  color: #fff;
  font-size: 18px;
  font-weight: 950;
  box-shadow: 0 10px 20px rgba(15, 23, 42, .13);
}

.tutorial-card-accent {
  border-color: rgba(15, 118, 110, .24);
  background:
    linear-gradient(180deg, rgba(240, 253, 250, .98), rgba(255, 255, 255, .94)),
    #fff;
}

.tutorial-card-accent .tutorial-step {
  background: linear-gradient(135deg, #0f766e, #f59e0b);
}

.tutorial-note {
  margin-top: 18px;
  padding: 20px;
}

.tutorial-note strong {
  font-size: 20px;
}

.tutorial-note p {
  max-width: none;
  font-size: 17px;
}

.store-admin-form {
  display: grid;
}

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

.store-admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px;
  border: 1px solid rgba(203, 213, 225, .78);
  border-radius: var(--radius);
  background: rgba(248, 250, 252, .92);
}

.store-admin-toolbar p {
  margin: 0;
}

.store-admin-toolbar-bottom {
  margin-top: 2px;
}

.store-admin-help {
  background:
    linear-gradient(135deg, rgba(239, 246, 255, .98), rgba(236, 253, 245, .96)),
    #fff;
}

.store-admin-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.store-admin-item {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(203, 213, 225, .84);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 12px 26px rgba(15, 23, 42, .08);
}

.store-admin-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.store-admin-item-head h3 {
  min-width: 0;
  margin: 0;
  font-size: 17px;
  line-height: 1.32;
  overflow-wrap: anywhere;
}

.store-admin-actions {
  display: flex;
  justify-content: flex-end;
}

.store-admin-delete {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.store-admin-delete input {
  margin: 0;
}

.dashboard-claim-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 18px;
  align-items: flex-end;
}

.dashboard-claim-copy h2 {
  margin-bottom: 8px;
}

.dashboard-claim-form {
  margin: 0;
}

.dashboard-claim-form label {
  margin-bottom: 8px;
}

.dashboard-claim-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.dashboard-claim-row input {
  margin: 0;
}

.dashboard-notice-stack {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.dashboard-notice {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  padding: 16px;
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: var(--radius);
  background: #fff;
}

.dashboard-notice h2 {
  margin: 0 0 6px;
  font-size: 17px;
}

.dashboard-notice p {
  margin: 0;
  color: var(--muted);
}

.dashboard-notice-info {
  border-left-color: #2563eb;
}

.dashboard-notice-warning {
  border-left-color: #d97706;
  background: #fffbeb;
}

.dashboard-notice-success {
  border-left-color: #059669;
  background: #f0fdf4;
}

.expiry-reminder-list {
  display: grid;
  gap: 4px;
  margin-top: 10px;
  color: #7c2d12;
  font-size: 13px;
}

.dashboard-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 14px;
}

.dashboard-section-head h2 {
  margin: 0 0 4px;
}

.dashboard-section-head p {
  margin: 0;
}

.dashboard-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.dashboard-stat {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .9);
  color: #334155;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 6px 16px rgba(15, 23, 42, .05);
}

.dashboard-product-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 14px;
  align-items: end;
  position: relative;
  z-index: 40;
  margin: 0 0 18px;
  padding: 14px;
  border: 1px solid rgba(226, 232, 240, .92);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .76);
  box-shadow: 0 10px 28px rgba(15, 23, 42, .06);
}

.dashboard-product-filter {
  position: relative;
}

.dashboard-product-filter label {
  margin: 0 0 7px;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}

.dashboard-product-filter-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.dashboard-product-filter-row input {
  margin: 0;
}

.dashboard-product-filter-meta {
  padding-bottom: 9px;
  font-size: 12px;
  white-space: nowrap;
}

.dashboard-product-filter-meta strong {
  color: #111827;
}

.dashboard-product-suggestions {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 80;
  display: grid;
  gap: 6px;
  max-height: 280px;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid rgba(203, 213, 225, .96);
  border-radius: 10px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 18px 36px rgba(15, 23, 42, .12);
  backdrop-filter: blur(12px) saturate(1.08);
}

.dashboard-product-suggestion {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid rgba(226, 232, 240, .92);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255, 255, 255, .98), rgba(247, 250, 252, .95));
  color: #0f172a;
  text-align: left;
  box-shadow: none;
}

.dashboard-product-suggestion:hover {
  border-color: rgba(37, 99, 235, .28);
  background: linear-gradient(135deg, rgba(239, 246, 255, .98), rgba(255, 255, 255, .98));
}

.dashboard-product-suggestion-kind {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  color: #475569;
  background: rgba(226, 232, 240, .6);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.dashboard-product-suggestion-main {
  min-width: 0;
}

.dashboard-product-suggestion-label {
  display: block;
  color: #111827;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  word-break: break-word;
}

.dashboard-product-suggestion-search {
  display: block;
  margin-top: 2px;
  color: #64748b;
  font-size: 11px;
  line-height: 1.3;
  word-break: break-word;
}

.dashboard-product-list,
.dashboard-license-list {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 24px;
}

.license-card {
  padding: 20px;
  border: 1px solid rgba(203, 213, 225, .96);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .82), 0 14px 34px rgba(15, 23, 42, .08);
}

.license-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.license-card-main {
  min-width: 0;
  flex: 1 1 auto;
}

.license-card-topline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin-bottom: 8px;
}

.license-key-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.license-key-row .copy-code,
.license-key-row .copy-btn {
  margin: 0;
}

.license-card-summary {
  display: grid;
  grid-auto-flow: column;
  gap: 14px;
  flex: 0 0 auto;
}

.license-card-summary div {
  min-width: 72px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  text-align: center;
}

.license-card-summary span {
  display: block;
  margin-bottom: 2px;
  font-size: 12px;
}

.license-card-summary strong {
  display: block;
  color: #111827;
  font-size: 18px;
  line-height: 1.1;
}

.product-title-line {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}

.product-title-code {
  color: #0f172a;
  font-size: 24px;
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: 0;
  word-break: break-all;
}

.product-title-name {
  color: #64748b;
  font-size: 24px;
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: 0;
  word-break: break-word;
}

.product-license-list {
  margin-top: 16px;
  border-top: 1px solid var(--line);
  max-height: 560px;
  max-height: min(62vh, 560px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 6px;
  scrollbar-gutter: stable;
}

.product-license-entry {
  margin-top: 10px;
  padding: 18px;
  border: 1px solid rgba(226, 232, 240, .96);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(250, 252, 254, .99), rgba(236, 241, 248, .97));
  box-shadow: 0 1px 0 rgba(255, 255, 255, .86), 0 14px 32px rgba(15, 23, 42, .06);
}

.product-license-entry:last-child {
  margin-bottom: 2px;
}

.product-license-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}

.license-left-panel,
.license-right-panel {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.license-code-status {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(226, 232, 240, .86);
}

.license-status-inline {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  align-self: start;
  max-width: 100%;
  padding-top: 0;
}

.license-status-inline .status-badge {
  margin: 0;
}

.license-status-meta {
  margin-top: 1px;
  font-size: 13px;
  line-height: 1.4;
}

.product-license-code-block {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.product-license-code-block label {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  margin: 0;
  padding: 0 7px;
  border-radius: 999px;
  color: #64748b;
  background: rgba(226, 232, 240, .58);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.product-license-code-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.product-license-code-row .copy-code {
  margin: 0;
  font-size: 15px;
  padding: 7px 10px;
}

.product-license-code-row .copy-btn {
  margin: 0;
}

.license-binding-meta,
.license-left-panel,
.license-note-form {
  min-width: 0;
  padding: 12px 13px;
  border: 1px solid rgba(226, 232, 240, .94);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(255, 255, 255, .92), rgba(247, 250, 252, .97));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .72);
}

.license-binding-ops {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0;
}

.license-binding-version,
.license-binding-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.license-binding-version {
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(226, 232, 240, .86);
}

.license-binding-actions {
  padding-top: 12px;
}

.license-binding-version label,
.license-note-form label {
  margin: 0;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.license-binding-version small {
  margin: 0;
}

.license-binding-meta {
  display: grid;
  flex: 1 1 auto;
  gap: 12px;
}

.license-binding-meta > div {
  display: grid;
  gap: 4px;
}

.license-binding-meta code,
.license-binding-meta span {
  font-size: 13px;
  word-break: break-all;
}

.license-binding-actions form {
  margin: 0;
}

.license-note-form {
  display: grid;
  align-content: center;
  gap: 6px;
  min-height: 0;
}

.license-note-inline {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.license-note-toggle {
  --button-glow: rgba(71, 85, 105, .28);
  --button-shadow: rgba(71, 85, 105, .18);
  width: 30px;
  min-width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  border: 1px solid rgba(203, 213, 225, .96);
  border-radius: 7px;
  background: #475569;
  box-shadow: 0 8px 18px rgba(71, 85, 105, .16);
}

.license-note-toggle:hover {
  background: #334155;
}

.license-note-icon {
  width: 15px;
  height: 15px;
  stroke: #fff;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.license-note-preview {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px dashed rgba(203, 213, 225, .96);
  border-radius: 7px;
  background: rgba(248, 250, 252, .92);
  color: #334155;
  line-height: 18px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.license-note-preview.is-empty {
  color: var(--muted);
  font-style: italic;
}

.license-note-editor {
  flex: 1 1 auto;
  min-width: 0;
}

.license-note-editor[hidden],
.license-note-preview[hidden] {
  display: none !important;
}

.license-note-form input {
  min-height: 30px;
  margin: 0;
  padding: 5px 9px;
  font-family: inherit;
  line-height: 18px;
}

.license-note-form button {
  justify-self: start;
  margin: 0;
}

.license-note-muted {
  margin-top: 0;
  font-size: 12px;
}

.dashboard-product-empty {
  margin-top: 16px;
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .72);
  text-align: center;
}

.dashboard-claim-card {
  align-items: center;
  padding: 18px 20px;
  border-color: rgba(148, 163, 184, .62);
}

.dashboard-claim-copy h2 {
  font-size: 18px;
}

.dashboard-section-head {
  padding: 2px 2px 4px;
}

.dashboard-section-head h2 {
  font-size: 24px;
  line-height: 1.15;
}

.dashboard-stat {
  border-color: rgba(203, 213, 225, .84);
  background: rgba(255, 255, 255, .72);
  box-shadow: 0 10px 24px rgba(15, 23, 42, .05);
}

.dashboard-product-toolbar {
  border-color: rgba(203, 213, 225, .70);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .88), rgba(255, 255, 255, .70)),
    linear-gradient(120deg, rgba(239, 246, 255, .70), rgba(236, 253, 245, .46));
  box-shadow: 0 14px 34px rgba(15, 23, 42, .07);
  backdrop-filter: blur(14px) saturate(1.08);
}

.license-card {
  position: relative;
  overflow: hidden;
  padding: 0;
  border-color: rgba(148, 163, 184, .66);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(248, 251, 255, .92)),
    linear-gradient(135deg, rgba(255, 244, 246, .62), rgba(235, 248, 255, .64));
  box-shadow: 0 1px 0 rgba(255, 255, 255, .90), 0 22px 54px rgba(15, 23, 42, .11);
}

.license-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, var(--brand), var(--blue) 58%, var(--sky-mint));
}

.license-card-header {
  position: relative;
  top: auto;
  z-index: 4;
  align-items: center;
  padding: 18px 20px 16px 24px;
  border-bottom: 1px solid rgba(226, 232, 240, .86);
  background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(16px) saturate(1.08);
}

.product-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.product-icon img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  filter: drop-shadow(0 8px 12px rgba(15, 23, 42, .12));
}

.license-card-main p {
  margin: 6px 0 0;
}

.license-card-summary div {
  min-width: 82px;
  border-color: rgba(203, 213, 225, .78);
  background: rgba(248, 250, 252, .86);
}

.product-title-line {
  align-items: center;
}

.product-title-code {
  font-size: 26px;
}

.product-title-name {
  color: #64748b;
  font-size: 18px;
}

.product-license-list {
  margin: 0;
  max-height: none;
  overflow: visible;
  padding: 14px 16px 16px 20px;
  border-top: 0;
}

.product-license-entry {
  position: relative;
  margin-top: 0;
  padding: 0;
  border-color: rgba(203, 213, 225, .76);
  border-radius: 8px;
  background: rgba(255, 255, 255, .84);
  box-shadow: 0 12px 30px rgba(15, 23, 42, .06);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.product-license-entry.reveal-in {
  opacity: 1;
  transform: none;
}

.product-license-entry.reveal-in.is-visible {
  animation: none;
}

.product-license-entry + .product-license-entry {
  margin-top: 12px;
}

.license-card.is-collapsed:not(.is-filtering) [data-license-extra="1"] {
  display: none;
}

.product-license-entry:hover {
  border-color: rgba(37, 99, 235, .30);
  box-shadow: 0 18px 38px rgba(15, 23, 42, .09);
  transform: translateY(-1px);
}

.product-license-layout {
  grid-template-columns: minmax(320px, 1.18fr) minmax(300px, .82fr);
  gap: 0;
}

.license-left-panel,
.license-right-panel {
  gap: 0;
}

.license-left-panel,
.license-binding-meta,
.license-note-form {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.license-left-panel {
  padding: 16px;
}

.license-right-panel {
  padding: 16px;
  border-left: 1px solid rgba(226, 232, 240, .82);
  background: rgba(248, 250, 252, .56);
}

.license-code-status {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding-bottom: 14px;
}

.product-license-code-block label,
.license-binding-actions label,
.license-binding-version label,
.license-note-form label,
.license-binding-meta .muted {
  width: max-content;
  max-width: 100%;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

.product-license-code-row {
  margin-top: 7px;
}

.product-license-code-row .copy-code {
  max-width: min(100%, 520px);
  padding: 9px 11px;
  border: 1px solid rgba(203, 213, 225, .86);
  border-radius: 7px;
  background: #f8fafc;
  color: #0f172a;
  font-size: 14px;
  line-height: 1.35;
  white-space: normal;
  word-break: break-all;
  cursor: pointer;
}

.product-license-code-row .copy-code:hover {
  border-color: rgba(229, 72, 77, .36);
  background: #fff7f7;
}

.product-license-code-row .copy-btn {
  min-height: 34px;
}

.license-status-inline {
  display: grid;
  justify-items: end;
  gap: 7px;
}

.license-status-inline .status-badge {
  justify-self: end;
}

.license-status-meta {
  white-space: nowrap;
}

.license-binding-ops {
  display: grid;
  grid-template-columns: minmax(210px, 1fr) minmax(160px, auto);
  gap: 14px;
  align-items: start;
  padding-top: 14px;
  border-top: 1px solid rgba(226, 232, 240, .86);
}

.license-binding-version,
.license-binding-actions {
  padding: 0;
  border: 0;
}

.license-binding-version select {
  margin: 7px 0 0;
}

.license-binding-actions {
  align-items: flex-start;
}

.license-binding-actions .warning {
  margin-top: 7px;
}

.license-note-form {
  padding: 0 0 14px;
  border-bottom: 1px solid rgba(226, 232, 240, .86);
}

.license-note-inline {
  margin-top: 7px;
}

.license-note-preview {
  background: rgba(255, 255, 255, .78);
}

.license-binding-meta {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 14px 0 0;
}

.license-binding-meta > div {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(226, 232, 240, .84);
  border-radius: 7px;
  background: rgba(255, 255, 255, .70);
}

.license-binding-meta code,
.license-binding-meta span {
  color: #1f2937;
  font-size: 12px;
  line-height: 1.35;
}

.license-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px 16px 20px;
}

.license-card-footer .muted {
  font-size: 13px;
}

.license-card-footer button {
  flex: 0 0 auto;
}

#license-list {
  scroll-margin-top: 84px;
}

.runtime-config-form {
  margin: 0;
}

.config-section-fold {
  display: block;
}

.config-section-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin: -4px 0 12px;
}

.config-section-summary span {
  color: #111827;
  font-size: 20px;
  font-weight: 900;
}

.config-section-summary small {
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #64748b;
  background: #fff;
  font-weight: 800;
}

.config-section-summary::before {
  content: ">";
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  color: #64748b;
  font-weight: 900;
  transition: transform .16s ease;
}

.config-section-fold[open] .config-section-summary::before {
  transform: rotate(90deg);
}

.config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.config-field {
  display: block;
  min-height: 150px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.config-label {
  display: block;
  margin-bottom: 8px;
  color: #111827;
  font-weight: 800;
}

.config-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.config-control input {
  margin: 0;
}

.config-unit {
  min-width: 42px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: #475569;
  background: #fff;
  text-align: center;
  font-weight: 800;
}

.config-help {
  display: block;
  margin-top: 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.form-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

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

.toast-stack {
  position: fixed;
  top: max(10px, env(safe-area-inset-top));
  left: 50%;
  z-index: 3200;
  display: grid;
  gap: 12px;
  width: min(460px, calc(100vw - 32px));
  transform: translateX(-50%);
  pointer-events: none;
}

.toast {
  position: relative;
  display: grid;
  gap: 4px;
  min-height: 58px;
  padding: 15px 18px 15px 52px;
  border: 1px solid rgba(15, 23, 42, .10);
  border-radius: 10px;
  color: #0f172a;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 24px 70px rgba(15, 23, 42, .24), 0 8px 22px rgba(15, 23, 42, .10);
  backdrop-filter: blur(18px) saturate(1.12);
  pointer-events: auto;
  cursor: pointer;
  animation: toast-in .18s ease-out;
}

.toast::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 50%;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  transform: translateY(-50%);
  box-shadow: inset 0 0 0 2px currentColor;
}

.toast::after {
  content: "";
  position: absolute;
  left: 26px;
  top: 50%;
  width: 7px;
  height: 11px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-62%) rotate(42deg);
}

.toast-success {
  color: #047857;
  border-color: rgba(4, 120, 87, .18);
  background: linear-gradient(135deg, rgba(240, 253, 244, .98), rgba(255, 255, 255, .98));
}

.toast-error,
.toast.err {
  color: #b42318;
  border-color: rgba(180, 35, 24, .20);
  background: linear-gradient(135deg, rgba(255, 241, 242, .98), rgba(255, 255, 255, .98));
}

.toast-error::after,
.toast.err::after {
  left: 25px;
  width: 10px;
  height: 2px;
  border: 0;
  border-radius: 999px;
  background: currentColor;
  transform: translateY(-50%) rotate(45deg);
  box-shadow: 0 0 0 0 currentColor;
}

.toast-error::before,
.toast.err::before {
  box-shadow: inset 0 0 0 2px currentColor;
}

.toast-error {
  font-weight: 800;
}

.toast.is-hiding {
  opacity: 0;
  transform: translateY(8px) scale(.98);
  transition: opacity .18s ease, transform .18s ease;
}

.inline-alert {
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(8, 135, 93, .18);
  border-radius: 8px;
  color: #05603a;
  background: #ecfdf3;
  box-shadow: 0 10px 25px rgba(8, 135, 93, .08);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.err {
  border-color: rgba(220, 38, 38, .18);
  color: #991b1b;
  background: #fef2f2;
}

.profile-security-warning {
  margin-top: 12px;
}

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

.log-alert-card {
  display: flex;
  flex-direction: column;
  min-height: 118px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.log-alert-card strong {
  flex: 0 0 auto;
  display: block;
  margin-bottom: 10px;
  color: #111827;
  font-size: 15px;
}

.log-alert-list {
  display: grid;
  gap: 10px;
  max-height: 260px;
  overflow: auto;
  padding-right: 4px;
}

.log-alert-line {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  transition: border-color .16s ease, background .16s ease, transform .16s ease, box-shadow .16s ease;
}

.log-alert-line:first-of-type {
  margin-top: 0;
}

.log-alert-line[data-log-link] {
  cursor: pointer;
}

.log-alert-line[data-log-link]:hover,
.log-alert-line[data-log-link]:focus-visible {
  border-color: var(--brand);
  background: #f9fbff;
  box-shadow: 0 10px 24px rgba(20, 28, 38, .08);
  transform: translateY(-1px);
  outline: none;
}

.log-row:target td {
  background: #eef6ff;
}

.log-row {
  scroll-margin-top: 96px;
}

.log-filter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 12px;
}

.log-filter-grid label {
  margin: 0;
}

.log-toolbar,
.log-export-form,
.log-pagination {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.log-toolbar {
  margin-top: 12px;
}

.login-resend-form {
  margin-top: 12px;
}

.login-resend-form button {
  width: 100%;
}

.log-export-form {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.log-retention-form {
  display: grid;
  grid-template-columns: minmax(140px, 180px) minmax(180px, 240px) minmax(160px, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin: 0 0 14px;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--line);
}

.log-retention-form label,
.log-retention-form input,
.log-retention-form select {
  margin: 0;
}

.maintenance-summary-grid,
.lookup-summary-grid,
.api-monitor-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.lookup-summary-grid,
.api-monitor-summary-grid {
  margin-bottom: 16px;
}

.maintenance-summary-grid div,
.lookup-summary-grid div,
.api-monitor-summary-grid div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.maintenance-summary-grid strong,
.lookup-summary-grid strong,
.api-monitor-summary-grid strong {
  display: block;
  color: #111827;
  font-size: 22px;
  line-height: 1.1;
}

.maintenance-summary-grid span,
.lookup-summary-grid span,
.api-monitor-summary-grid span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.api-monitor-filter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 12px;
}

.api-monitor-filter-grid label {
  margin: 0;
}

.api-monitor-keyword {
  grid-column: span 3;
}

.api-monitor-table {
  min-width: 1120px;
}

.api-monitor-device {
  display: inline-block;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.api-monitor-pagination {
  justify-content: flex-end;
}

.api-access-grid,
.announcement-admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 12px;
}

.api-access-grid {
  margin: 12px 0;
}

.api-access-grid label,
.announcement-admin-grid label {
  margin: 0;
}

.api-access-form textarea {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
}

.sidebar-order-form {
  display: grid;
  gap: 14px;
}

.sidebar-order-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 10px;
}

.sidebar-order-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  gap: 10px;
  align-items: center;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .86);
}

.sidebar-order-field > span {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: #334155;
  font-weight: 800;
}

.sidebar-order-field .side-icon {
  width: 24px;
  height: 24px;
  flex-basis: 24px;
  font-size: 11px;
}

.sidebar-order-field input {
  min-width: 0;
  margin: 0;
}

.announcement-admin-form {
  display: grid;
  gap: 14px;
}

.announcement-admin-list {
  display: grid;
  gap: 14px;
}

.announcement-admin-item {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.announcement-admin-item h3 {
  margin: 0;
}

.announcement-admin-fold {
  display: block;
  padding: 0;
  overflow: hidden;
}

.announcement-admin-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px 14px;
  cursor: pointer;
  list-style: none;
  background: var(--surface);
}

.announcement-admin-summary::-webkit-details-marker {
  display: none;
}

.announcement-admin-summary::before {
  content: ">";
  display: inline-grid;
  grid-column: 1;
  grid-row: 1;
  place-items: center;
  width: 18px;
  height: 18px;
  color: var(--muted);
  font-weight: 800;
  transition: transform .16s ease;
}

.announcement-admin-fold[open] .announcement-admin-summary::before {
  transform: rotate(90deg);
}

.announcement-admin-summary-main {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding-left: 26px;
}

.announcement-admin-summary-main strong,
.announcement-admin-summary-main span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.announcement-admin-summary-main strong {
  color: #111827;
  font-size: 15px;
}

.announcement-admin-summary-meta {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  max-width: 360px;
}

.announcement-admin-summary-meta .status-badge {
  margin: 0;
}

.announcement-admin-body {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.announcement-admin-new {
  background: #fff;
}

.checkbox-row {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin: 0;
  color: #374151;
}

.checkbox-row input[type="checkbox"] {
  width: auto;
  margin: 0;
}

.log-maintenance-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.log-maintenance-actions form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.lookup-log-detail {
  max-width: 260px;
  color: var(--muted);
  word-break: break-word;
}

.log-device {
  max-width: 220px;
  color: var(--muted);
  word-break: break-all;
}

.log-detail {
  width: 74px;
  white-space: nowrap;
}

.log-detail-dialog {
  width: min(860px, calc(100vw - 32px));
}

.log-detail-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 14px;
}

.log-detail-meta div {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.log-detail-meta dt {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.log-detail-meta dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.log-detail-pre {
  max-height: min(440px, calc(100vh - 330px));
  margin: 0;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fafc;
  color: #334155;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: "Cascadia Mono", Consolas, "Courier New", monospace;
  font-size: 12px;
  line-height: 1.65;
}

.log-pagination {
  margin-top: 14px;
}

.auth-page .wrap {
  width: min(460px, calc(100% - 36px));
  margin-top: 64px;
}

.auth-page .page-head {
  text-align: center;
  justify-content: center;
}

.auth-page .page-title {
  font-size: 30px;
}

.auth-page .card {
  padding: 28px;
  border-color: rgba(255, 255, 255, .78);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .95), rgba(255, 255, 255, .84)),
    linear-gradient(142deg, rgba(255, 244, 246, .72), rgba(237, 245, 255, .76) 54%, rgba(232, 255, 250, .50));
  box-shadow: 0 1px 0 rgba(255, 255, 255, .92), 0 34px 90px rgba(15, 23, 42, .17), 0 0 0 1px rgba(255, 255, 255, .20) inset;
  backdrop-filter: blur(22px) saturate(1.12);
}

.auth-page .card h2 {
  text-align: center;
  font-size: 20px;
}

.auth-page .login-form {
  max-width: 340px;
  margin: 0 auto;
}

.auth-page .login-actions {
  display: flex;
  justify-content: center;
  margin-top: 4px;
}

.auth-page .login-submit {
  min-width: 150px;
}

.auth-page .login-help {
  margin: 12px 0 0;
  text-align: center;
}

.auth-page .login-help a {
  color: #c24a53;
  font-weight: 700;
}

.auth-page .login-help a:hover {
  color: #a93b44;
}

.fade-in {
  animation: fade-in .28s ease both;
}

.reveal-in {
  opacity: 0;
  transform: translateY(14px);
}

.reveal-in.is-visible {
  animation: reveal-up .58s cubic-bezier(.22, 1, .36, 1) both;
  animation-delay: var(--reveal-delay, 0ms);
}

.is-submitting {
  cursor: wait;
}

.is-submitting .card {
  filter: saturate(.96);
}

.sidebar,
.modal-panel,
.toast,
.inline-alert {
  will-change: transform, opacity;
}

@keyframes ambient-sheen {
  0%,
  24% {
    opacity: .18;
    transform: translateX(-42%);
  }
  54% {
    opacity: .44;
    transform: translateX(42%);
  }
  100% {
    opacity: .18;
    transform: translateX(42%);
  }
}

@keyframes nav-light-pass {
  0%,
  36% {
    transform: translateX(-18%);
  }
  70%,
  100% {
    transform: translateX(18%);
  }
}

@keyframes reveal-up {
  from {
    opacity: 0;
    transform: translateY(14px) scale(.992);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes button-glow {
  0% {
    box-shadow: 0 8px 18px var(--button-shadow), 0 0 0 0 var(--button-glow);
  }
  45% {
    box-shadow: 0 12px 26px var(--button-shadow), 0 0 0 8px var(--button-glow), 0 0 32px var(--button-glow);
  }
  100% {
    box-shadow: 0 8px 18px var(--button-shadow), 0 0 0 16px rgba(255, 255, 255, 0);
  }
}

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

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

  .reveal-in {
    opacity: 1;
    transform: none;
  }
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--brand);
}

@media (max-width: 760px) {
  .topbar {
    position: static;
    flex-wrap: wrap;
    align-items: flex-start;
    padding: 14px 16px;
  }

  .nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .nav a {
    white-space: nowrap;
  }

  .user-area {
    margin-left: auto;
  }

  .wrap {
    width: min(100% - 24px, 1120px);
    margin-top: 18px;
  }

  .page-head {
    align-items: flex-start;
  }

  .page-title {
    font-size: 22px;
  }

  .card {
    padding: 16px;
  }

  .card table.responsive-table,
  .card table.responsive-table tbody,
  .card table.responsive-table tr,
  .card table.responsive-table td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .card table.responsive-table {
    border-collapse: separate;
    border-spacing: 0 10px;
  }

  .card table.responsive-table th {
    display: none;
  }

  .card table.responsive-table tr {
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
  }

  .card table.responsive-table td {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 10px;
    padding: 7px 0;
    border-bottom: 1px dashed var(--line);
  }

  .card table.responsive-table td:last-child {
    border-bottom: 0;
  }

  .card table.responsive-table td::before {
    content: attr(data-label);
    color: #64748b;
    font-size: 12px;
    font-weight: 900;
  }

  .store-hero,
  .user-guide-panel {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .store-hero h2,
  .user-guide-panel h2 {
    font-size: 22px;
  }

  .store-hero p,
  .user-guide-panel p {
    font-size: 15px;
  }

  .store-cat,
  .guide-cat {
    width: 132px;
    justify-self: center;
  }

  .guide-logo-wrap {
    width: 132px;
    justify-self: center;
  }

  .store-product-grid,
  .guide-steps,
  .tutorial-grid,
  .store-admin-list,
  .store-admin-delete,
  .api-access-grid,
  .announcement-admin-grid,
  .log-retention-form {
    grid-template-columns: 1fr;
  }

  .announcement-admin-summary {
    grid-template-columns: 1fr;
  }

  .announcement-admin-summary-meta {
    justify-content: flex-start;
    max-width: none;
    padding-left: 26px;
  }

  .tutorial-card {
    min-height: 0;
    padding: 18px 18px 18px 70px;
  }

  .tutorial-card h2 {
    font-size: 20px;
  }

  .tutorial-card p,
  .tutorial-note p {
    font-size: 15px;
  }

  .store-admin-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .store-admin-toolbar button {
    width: 100%;
  }

  .store-admin-delete button {
    width: 100%;
  }

  .dashboard-claim-card,
  .dashboard-claim-row {
    grid-template-columns: 1fr;
  }

  .dashboard-claim-row button {
    width: 100%;
  }

  .dashboard-notice {
    display: grid;
  }

  .dashboard-section-head {
    display: block;
  }

  .dashboard-stats {
    justify-content: flex-start;
    margin-top: 12px;
  }

  .dashboard-product-toolbar {
    grid-template-columns: 1fr;
  }

  .dashboard-product-suggestions {
    position: static;
    top: auto;
    left: auto;
    right: auto;
    width: 100%;
    max-height: 220px;
    margin-top: 8px;
  }

  .dashboard-product-filter-meta {
    padding-bottom: 0;
    white-space: normal;
  }

  .dashboard-product-list,
  .dashboard-license-list {
    gap: 18px;
  }

  .product-title-line {
    gap: 6px;
  }

  .product-title-code {
    font-size: 20px;
  }

  .product-title-name {
    font-size: 20px;
  }

  .license-card {
    padding: 0;
  }

  .license-card-header {
    display: block;
    position: relative;
    top: auto;
    padding: 16px;
  }

  .product-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 10px;
    font-size: 18px;
  }

  .license-card-summary {
    grid-auto-flow: row;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 12px;
  }

  .product-license-layout {
    grid-template-columns: 1fr;
  }

  .product-license-list {
    max-height: none;
    overflow: visible;
    padding: 12px;
  }

  .product-license-entry {
    border-radius: 8px;
  }

  .license-left-panel,
  .license-right-panel {
    padding: 14px;
  }

  .license-right-panel {
    border-left: 0;
    border-top: 1px solid rgba(226, 232, 240, .86);
  }

  .license-code-status,
  .license-binding-ops,
  .license-binding-meta {
    grid-template-columns: 1fr;
  }

  .license-status-inline {
    justify-content: flex-start;
    max-width: none;
    padding-top: 8px;
    justify-items: start;
  }

  .license-status-meta {
    font-size: 13px;
  }

  .license-binding-meta,
  .license-left-panel,
  .license-note-form {
    padding: 11px;
  }

  .license-binding-meta {
    padding: 12px 0 0;
  }

  .license-card-footer {
    align-items: stretch;
    flex-direction: column;
    padding: 0 12px 14px;
  }

  .license-card-footer button {
    width: 100%;
  }

  .license-card-key-head {
    display: block;
  }

  .license-card-key-head span:last-child {
    text-align: left;
  }

  .filter-row {
    grid-template-columns: 1fr;
  }

  .dependency-group-head {
    display: block;
  }

  .relation-form,
  .add-relation-form,
  .api-asset-form {
    grid-template-columns: 1fr;
  }

  .log-alert-grid,
  .log-filter-grid,
  .api-monitor-filter-grid,
  .api-access-grid,
  .sidebar-order-grid,
  .announcement-admin-grid,
  .log-retention-form,
  .config-grid {
    grid-template-columns: 1fr;
  }

  .api-monitor-keyword {
    grid-column: auto;
  }
}

.topbar-spacer {
  flex: 1;
}

.sidebar-toggle {
  display: none;
  width: 38px;
  min-width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .30);
  border-radius: 7px;
  background: rgba(255, 255, 255, .15);
  box-shadow: 0 8px 20px rgba(15, 23, 42, .14);
}

.sidebar-toggle span {
  display: block;
  width: 16px;
  height: 2px;
  margin: 2px 0;
  border-radius: 99px;
  background: #fff;
}

.layout-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
  gap: 0;
  min-height: calc(100vh - 64px);
}

.sidebar {
  position: sticky;
  top: 64px;
  align-self: start;
  height: calc(100vh - 64px);
  overflow-y: auto;
  padding: 18px 14px;
  border-right: 1px solid rgba(203, 213, 225, .78);
  background: rgba(255, 255, 255, .84);
  box-shadow: 12px 0 34px rgba(15, 23, 42, .06);
  backdrop-filter: blur(14px) saturate(1.08);
}

.sidebar-section-title {
  margin: 10px 10px 8px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.side-nav {
  display: grid;
  gap: 6px;
  margin-bottom: 18px;
}

.side-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #334155;
  font-weight: 800;
  transition: background .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.side-link:hover,
.side-link.active {
  color: #111827;
  border-color: rgba(229, 72, 77, .18);
  background: linear-gradient(135deg, rgba(255, 241, 242, .95), rgba(239, 246, 255, .95));
  box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
}

.side-link:hover {
  transform: translateX(2px);
}

.side-link.disabled {
  cursor: not-allowed;
  opacity: .58;
}

.side-link.disabled:hover {
  transform: none;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.side-icon {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  flex: 0 0 25px;
  border-radius: 7px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--blue));
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 8px 16px rgba(37, 99, 235, .16);
}

.sidebar-backdrop {
  display: none;
}

.info-table {
  min-width: 0;
}

.info-table th {
  width: 120px;
}

@media (min-width: 901px) {
  .app-page .wrap {
    width: min(1120px, calc(100% - 48px));
  }
}

@media (max-width: 900px) {
  .topbar {
    position: sticky;
    flex-wrap: nowrap;
    align-items: center;
    min-height: 58px;
    padding: 10px 12px;
  }

  .sidebar-toggle {
    display: inline-grid;
    place-items: center;
  }

  .brand {
    min-width: 0;
    font-size: 15px;
  }

  .brand > span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .user-area {
    margin-left: 0;
    gap: 6px;
  }

  .user-chip {
    max-width: 96px;
    padding: 6px 8px;
  }

  .topbar .btn {
    min-height: 32px;
    padding: 6px 9px;
  }

  .layout-shell {
    display: block;
    min-height: auto;
  }

  .sidebar {
    position: fixed;
    inset: 58px auto 0 0;
    z-index: 30;
    width: min(82vw, 286px);
    height: calc(100vh - 58px);
    max-height: calc(100dvh - 58px);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding-bottom: max(18px, env(safe-area-inset-bottom));
    transform: translateX(-104%);
    transition: transform .28s cubic-bezier(.22, 1, .36, 1), box-shadow .28s ease;
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
    box-shadow: 22px 0 46px rgba(15, 23, 42, .18);
  }

  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 58px 0 0;
    z-index: 25;
    background: rgba(15, 23, 42, .38);
    opacity: 0;
    pointer-events: none;
    transition: opacity .28s ease;
    backdrop-filter: blur(3px);
  }

  body.sidebar-open .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .nav {
    order: initial;
    width: auto;
    flex: 0 0 auto;
    overflow: visible;
    padding-bottom: 0;
  }

  .auth-nav {
    margin-left: auto;
  }
}

@media (max-width: 520px) {
  .topbar {
    gap: 8px;
  }

  .brand-mark {
    width: 36px;
    height: 31px;
    font-size: 12px;
  }

  .brand > span:last-child {
    max-width: 118px;
  }

  .user-chip {
    display: none;
  }

  .license-card-summary {
    grid-template-columns: 1fr;
  }

  .auth-nav a {
    min-height: 32px;
    padding: 6px 8px;
  }
}
