:root {
  --bg-ink: #0f5f67;
  --bg-deep: #073a41;
  --bg-paper: rgba(247, 244, 234, 0.92);
  --bg-card: rgba(255, 255, 255, 0.9);
  --line-soft: rgba(7, 58, 65, 0.12);
  --line-strong: rgba(7, 58, 65, 0.2);
  --text-main: #12373c;
  --text-subtle: #56757a;
  --teal: #0d737d;
  --teal-soft: #d6efee;
  --gold: #d9a53f;
  --gold-soft: #fff3d7;
  --rose: #c96c74;
  --rose-soft: #fde6e8;
  --danger: #b94f57;
  --shadow-lg: 0 24px 60px rgba(6, 44, 49, 0.22);
  --shadow-md: 0 14px 32px rgba(6, 44, 49, 0.12);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  color: var(--text-main);
  font-family: "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255, 226, 167, 0.45), transparent 26%),
    radial-gradient(circle at bottom right, rgba(255, 255, 255, 0.14), transparent 24%),
    linear-gradient(160deg, #0a6771 0%, #0a5962 36%, #08373e 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, transparent 0, transparent 46%, rgba(255, 255, 255, 0.06) 47%, transparent 52%),
    repeating-linear-gradient(
      180deg,
      transparent 0,
      transparent 34px,
      rgba(255, 255, 255, 0.03) 35px,
      transparent 36px
    );
}

button,
input,
textarea,
select {
  font: inherit;
}

img {
  display: block;
  max-width: 100%;
}

button {
  cursor: pointer;
}

input,
textarea,
select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.85);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: rgba(13, 115, 125, 0.55);
  box-shadow: 0 0 0 4px rgba(13, 115, 125, 0.12);
  transform: translateY(-1px);
}

textarea {
  resize: vertical;
  min-height: 88px;
}

code {
  word-break: break-all;
  font-family: "JetBrains Mono", "Cascadia Code", Consolas, monospace;
}

.auth-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 440px);
  gap: 28px;
  min-height: 100vh;
  padding: 28px;
  align-items: stretch;
}

.auth-stage__visual {
  position: relative;
  overflow: hidden;
  padding: 38px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  background:
    radial-gradient(circle at top right, rgba(255, 236, 181, 0.38), transparent 22%),
    radial-gradient(circle at bottom left, rgba(255, 255, 255, 0.12), transparent 26%),
    linear-gradient(145deg, rgba(7, 58, 65, 0.88), rgba(13, 115, 125, 0.84));
  color: #f7f5ef;
  display: grid;
  gap: 24px;
  align-content: start;
}

.auth-stage__visual::before,
.auth-stage__visual::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.auth-stage__visual::before {
  right: -48px;
  top: -64px;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(255, 229, 163, 0.36), rgba(255, 229, 163, 0));
}

.auth-stage__visual::after {
  left: -96px;
  bottom: -96px;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0));
}

.auth-stage__eyebrow {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(247, 245, 239, 0.72);
}

.auth-stage__title {
  margin: 0;
  font-family: "STZhongsong", "Songti SC", "Noto Serif SC", serif;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1.08;
  max-width: 8ch;
}

.auth-stage__copy {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: 46ch;
  font-size: 16px;
  line-height: 1.9;
  color: rgba(247, 245, 239, 0.88);
}

.auth-stage__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.auth-stage__tile {
  padding: 18px 18px 16px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
}

.auth-stage__tile strong {
  display: block;
  margin-bottom: 8px;
  font-size: 16px;
}

.auth-stage__tile p {
  margin: 0;
  color: rgba(247, 245, 239, 0.74);
  line-height: 1.7;
}

.auth-stage__footer {
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: rgba(247, 245, 239, 0.72);
}

.auth-stage__footer code {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff4d1;
}

.auth-card--login {
  display: grid;
  gap: 18px;
  align-self: stretch;
  padding: 30px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(247, 244, 234, 0.92));
  backdrop-filter: blur(12px);
}

.auth-card__header--login {
  margin-bottom: 0;
}

.auth-card__meta--login {
  padding-top: 2px;
}

.primary-button--wide {
  width: 100%;
  justify-content: center;
}

body.is-authenticated .auth-stage {
  display: none;
}

body:not(.is-authenticated) .app-shell {
  display: none;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
  min-height: 100vh;
  padding: 24px;
}

.sidebar {
  position: sticky;
  top: 24px;
  height: calc(100vh - 48px);
  padding: 28px;
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(248, 244, 234, 0.94), rgba(248, 244, 234, 0.82));
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.brand-block {
  position: relative;
  padding-bottom: 22px;
}

.brand-block::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(217, 165, 63, 0), rgba(217, 165, 63, 0.85), rgba(13, 115, 125, 0));
}

.brand-kicker,
.section-kicker,
.hero-kicker {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-subtle);
}

.brand-block h1,
.hero-copy h2,
.section-heading h3,
.auth-card h3,
.panel-title-row h4 {
  margin: 0;
  font-family: "STZhongsong", "Songti SC", "Noto Serif SC", serif;
}

.brand-block h1 {
  font-size: 32px;
  line-height: 1.15;
}

.brand-copy,
.hero-text,
.auth-card__demo,
.form-tip,
.sidebar-note p,
.auth-card__meta span {
  margin: 0;
  color: var(--text-subtle);
  line-height: 1.7;
}

.nav-list {
  display: grid;
  gap: 18px;
  align-content: start;
  overflow: auto;
  padding-right: 4px;
}

.nav-group {
  display: grid;
  gap: 10px;
}

.nav-group__label {
  margin: 0;
  padding-left: 4px;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-subtle);
}

.nav-empty {
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px dashed var(--line-strong);
  color: var(--text-subtle);
  background: rgba(255, 255, 255, 0.58);
}

.nav-item {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 8px;
  padding: 14px 18px;
  border: 1px solid transparent;
  border-radius: 18px;
  background: rgba(13, 115, 125, 0.08);
  color: var(--text-main);
  text-align: left;
  font-weight: 700;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.nav-item:hover,
.nav-item.is-active {
  transform: translateX(4px);
  border-color: rgba(13, 115, 125, 0.16);
  box-shadow: var(--shadow-md);
}

.nav-item.is-active {
  background: linear-gradient(135deg, rgba(13, 115, 125, 0.18), rgba(217, 165, 63, 0.18));
}

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

.nav-item__icon {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
}

.nav-item__title {
  font-size: 15px;
}

.nav-item__desc {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-subtle);
  font-weight: 500;
}

.nav-item--teal {
  background: rgba(13, 115, 125, 0.08);
}

.nav-item--teal .nav-item__icon {
  color: #ffffff;
  background: linear-gradient(135deg, #0d737d, #0a5962);
}

.nav-item--gold {
  background: rgba(217, 165, 63, 0.12);
}

.nav-item--gold .nav-item__icon {
  color: #6a4300;
  background: linear-gradient(135deg, #f6d186, #d9a53f);
}

.nav-item--rose {
  background: rgba(201, 108, 116, 0.12);
}

.nav-item--rose .nav-item__icon {
  color: #ffffff;
  background: linear-gradient(135deg, #d97983, #b7525e);
}

.sidebar-profile {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.74), rgba(214, 239, 238, 0.72));
  border: 1px solid rgba(13, 115, 125, 0.12);
}

.sidebar-profile__avatar {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  background: linear-gradient(135deg, #0d737d, #d9a53f);
  box-shadow: 0 12px 24px rgba(13, 115, 125, 0.22);
}

.sidebar-profile__main {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.sidebar-profile__name {
  display: block;
  font-size: 18px;
}

.sidebar-profile__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.role-chip,
.sidebar-profile__code {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.role-chip {
  color: var(--teal);
  background: rgba(13, 115, 125, 0.12);
}

.sidebar-profile__code {
  color: var(--text-subtle);
  background: rgba(255, 255, 255, 0.68);
}

.permission-summary {
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px dashed rgba(13, 115, 125, 0.18);
  background: rgba(255, 255, 255, 0.5);
  color: var(--text-subtle);
  line-height: 1.7;
}

.sidebar-note {
  margin-top: auto;
  padding: 18px;
  border-radius: 18px;
  background: rgba(13, 115, 125, 0.08);
}

.main-shell {
  display: grid;
  gap: 20px;
}

.topbar,
.hero-panel,
.section-card {
  border-radius: var(--radius-xl);
  background: var(--bg-paper);
  box-shadow: var(--shadow-lg);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
}

.status-group,
.topbar-actions,
.section-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(13, 115, 125, 0.12);
  color: var(--teal);
  font-weight: 700;
}

.status-pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.status-pill--ghost {
  color: var(--gold);
  background: rgba(217, 165, 63, 0.14);
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 420px);
  gap: 24px;
  padding: 28px;
  overflow: hidden;
}

.hero-panel--workspace {
  background:
    radial-gradient(circle at top right, rgba(217, 165, 63, 0.18), transparent 18%),
    linear-gradient(180deg, rgba(247, 244, 234, 0.96), rgba(255, 255, 255, 0.88));
}

.hero-copy {
  position: relative;
  padding: 18px 6px 18px 8px;
}

.hero-copy::after {
  content: "";
  position: absolute;
  right: -64px;
  bottom: -48px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(217, 165, 63, 0.28), rgba(217, 165, 63, 0) 68%);
}

.hero-copy h2 {
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.25;
  max-width: 16ch;
}

.hero-sidecard {
  position: relative;
  z-index: 1;
  align-self: center;
  padding: 24px;
  border-radius: 24px;
  background: linear-gradient(150deg, rgba(13, 115, 125, 0.12), rgba(255, 243, 215, 0.8));
  border: 1px solid rgba(13, 115, 125, 0.12);
  box-shadow: var(--shadow-md);
}

.hero-sidecard strong {
  display: inline-flex;
  margin-bottom: 8px;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-subtle);
}

.hero-sidecard h3 {
  margin: 0 0 10px;
  font-family: "STZhongsong", "Songti SC", "Noto Serif SC", serif;
  font-size: 26px;
  line-height: 1.25;
}

.hero-sidecard p {
  margin: 0;
  color: var(--text-subtle);
  line-height: 1.8;
}

.auth-card {
  position: relative;
  z-index: 1;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(13, 115, 125, 0.12);
}

.auth-card__header,
.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

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

.stack-form label {
  display: grid;
  gap: 8px;
  color: var(--text-main);
  font-weight: 600;
}

.checkbox-row {
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: 10px;
}

.checkbox-row input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.auth-card__meta {
  margin-top: 16px;
  display: grid;
  gap: 8px;
}

.payment-panel {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid rgba(13, 115, 125, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.66);
}

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

.payment-panel__header span {
  font-weight: 700;
}

.payment-panel__message {
  margin: 12px 0 0;
  color: var(--text-subtle);
  line-height: 1.7;
}

.payment-panel__meta {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.payment-panel__meta li {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-top: 10px;
  border-top: 1px solid rgba(7, 58, 65, 0.08);
}

.payment-panel__meta li:first-child {
  padding-top: 0;
  border-top: 0;
}

.payment-panel__meta span {
  color: var(--text-subtle);
}

.payment-panel__meta strong {
  max-width: 70%;
  text-align: right;
  word-break: break-word;
}

.payment-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.payment-pill--ready {
  color: #1d6455;
  background: #dff6ee;
}

.payment-pill--warn {
  color: #8a5a13;
  background: #fff0d0;
}

.payment-pill--muted {
  color: #56757a;
  background: rgba(13, 115, 125, 0.12);
}

.auth-card__demo,
.form-tip {
  margin-top: 14px;
}

.primary-button,
.ghost-button,
.danger-button,
.text-button {
  border: none;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 700;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

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

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, #0d737d, #138a95);
  box-shadow: 0 12px 24px rgba(13, 115, 125, 0.22);
}

.ghost-button {
  color: var(--text-main);
  background: rgba(13, 115, 125, 0.08);
}

.danger-button {
  color: #fff;
  background: linear-gradient(135deg, #bf5e65, #a53c4e);
  box-shadow: 0 12px 24px rgba(165, 60, 78, 0.2);
}

.text-button {
  padding: 0;
  background: transparent;
  color: var(--teal);
}

.flash {
  padding: 14px 18px;
  border-radius: 18px;
  font-weight: 700;
  box-shadow: var(--shadow-md);
}

.flash--success {
  color: #1d6455;
  background: #dff6ee;
}

.flash--error {
  color: #8a3340;
  background: #fde6ea;
}

.flash--info {
  color: #285764;
  background: #e3f3f7;
}

.section-card {
  padding: 24px;
}

.section-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 22px;
}

.section-layout--narrow {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.list-panel,
.form-panel {
  padding: 20px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
}

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

.panel-count {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(217, 165, 63, 0.16);
  color: #89611d;
  font-weight: 700;
}

.metric-grid,
.shortcut-grid {
  display: grid;
  gap: 16px;
}

.metric-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: 18px;
}

.shortcut-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.preflight-panel {
  margin-top: 20px;
  padding: 22px;
  border-radius: 24px;
  border: 1px solid rgba(13, 115, 125, 0.12);
  background:
    linear-gradient(155deg, rgba(13, 115, 125, 0.06), rgba(255, 255, 255, 0.96)),
    rgba(255, 255, 255, 0.88);
}

.preflight-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.preflight-panel__header h4 {
  margin: 0;
  font-size: 22px;
}

.preflight-panel__intro,
.preflight-meta,
.preflight-suite__header p,
.preflight-check p {
  margin: 0;
  color: var(--text-subtle);
  line-height: 1.7;
}

.preflight-panel__intro {
  margin-top: 10px;
}

.preflight-meta {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(13, 115, 125, 0.08);
  font-size: 13px;
}

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

.preflight-suite {
  border-radius: 20px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.92);
  padding: 18px;
}

.preflight-suite--success {
  border-color: rgba(47, 133, 90, 0.2);
}

.preflight-suite--warn {
  border-color: rgba(181, 126, 33, 0.2);
}

.preflight-suite--fail {
  border-color: rgba(175, 73, 90, 0.22);
}

.preflight-suite__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.preflight-suite__header h4 {
  margin: 0;
  font-size: 18px;
}

.preflight-suite__header p {
  margin-top: 6px;
}

.preflight-checks {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.preflight-check {
  padding-top: 12px;
  border-top: 1px solid rgba(7, 58, 65, 0.08);
}

.preflight-check:first-child {
  padding-top: 0;
  border-top: 0;
}

.preflight-check__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.preflight-check__header strong {
  font-size: 14px;
}

.preflight-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.preflight-pill--compact {
  min-width: 58px;
  padding: 4px 10px;
  font-size: 12px;
}

.preflight-pill--success {
  color: #1d6455;
  background: #dff6ee;
}

.preflight-pill--warn {
  color: #8a5a13;
  background: #fff0d0;
}

.preflight-pill--fail {
  color: #8a3340;
  background: #fde6ea;
}

.preflight-pill--running,
.preflight-pill--idle {
  color: #56757a;
  background: rgba(13, 115, 125, 0.12);
}

.metric-card,
.shortcut-card,
.entity-card,
.detail-card {
  border-radius: 20px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.9);
  padding: 18px;
}

.metric-card {
  background:
    linear-gradient(160deg, rgba(13, 115, 125, 0.08), rgba(255, 255, 255, 0.98)),
    rgba(255, 255, 255, 0.9);
}

.metric-card h4,
.shortcut-card h4,
.entity-card h4,
.detail-card h4 {
  margin: 0 0 8px;
  font-size: 18px;
}

.metric-value {
  margin: 0 0 10px;
  font-size: 30px;
  font-weight: 800;
  color: var(--teal);
}

.metric-helper,
.shortcut-card p,
.entity-meta,
.detail-card p,
.empty-state {
  margin: 0;
  color: var(--text-subtle);
  line-height: 1.65;
}

.entity-list,
.detail-stack {
  display: grid;
  gap: 14px;
}

.entity-card__header,
.entity-card__actions,
.entity-pill-row,
.detail-grid,
.search-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.entity-card__header {
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.entity-card__hero,
.detail-card__hero {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1;
}

.entity-card__copy,
.detail-card__copy {
  min-width: 0;
}

.entity-pill,
.theme-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.entity-pill {
  color: var(--teal);
  background: var(--teal-soft);
}

.theme-pill {
  color: #8f6210;
  background: var(--gold-soft);
}

.entity-meta {
  display: grid;
  gap: 6px;
}

.entity-avatar,
.ranking-avatar,
.actor-avatar-preview__fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, #0d737d, #d9a53f);
  color: #ffffff;
  font-weight: 800;
  flex-shrink: 0;
}

.entity-avatar {
  width: 56px;
  height: 56px;
  font-size: 22px;
}

.ranking-avatar {
  width: 48px;
  height: 48px;
  font-size: 18px;
}

.entity-avatar__image,
.ranking-avatar__image,
.actor-avatar-preview__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.entity-card__actions {
  margin-top: 14px;
}

.mini-button {
  border: none;
  border-radius: 999px;
  padding: 9px 12px;
  font-weight: 700;
  color: var(--text-main);
  background: rgba(13, 115, 125, 0.08);
}

.mini-button--danger {
  color: #8e3443;
  background: rgba(201, 108, 116, 0.16);
}

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

.detail-grid--summary .detail-card {
  background:
    linear-gradient(160deg, rgba(217, 165, 63, 0.12), rgba(255, 255, 255, 0.96)),
    rgba(255, 255, 255, 0.9);
}

.detail-card strong,
.entity-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--text-subtle);
}

.search-row {
  margin-bottom: 18px;
}

.search-row--compact {
  align-items: stretch;
}

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

.detail-card--ranking {
  background:
    linear-gradient(160deg, rgba(13, 115, 125, 0.08), rgba(255, 255, 255, 0.96)),
    rgba(255, 255, 255, 0.9);
}

.detail-card__copy p {
  margin: 0;
}

.actor-avatar-upload {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px dashed var(--line-strong);
  border-radius: 18px;
  background: rgba(13, 115, 125, 0.04);
}

.actor-avatar-upload__header,
.actor-avatar-upload__body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.actor-avatar-upload__header strong {
  margin-bottom: 4px;
}

.actor-avatar-upload__header p {
  margin: 0;
  color: var(--text-subtle);
  line-height: 1.6;
}

.actor-avatar-preview {
  width: 88px;
  height: 88px;
}

.actor-avatar-preview__fallback {
  width: 88px;
  height: 88px;
  font-size: 30px;
}

.ghost-button--inline {
  white-space: nowrap;
}

.search-row input {
  flex: 1 1 280px;
}

.search-row select {
  flex: 0 0 180px;
}

.search-row .primary-button {
  min-width: 124px;
}

.merch-toolbar,
.merch-summary {
  margin-bottom: 16px;
}

.merch-image-upload {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px dashed var(--line-strong);
  border-radius: 18px;
  background: rgba(201, 108, 116, 0.05);
}

.merch-image-upload__header,
.merch-image-upload__body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.merch-image-upload__header strong {
  display: block;
  margin-bottom: 4px;
}

.merch-image-upload__header p {
  margin: 0;
  color: var(--text-subtle);
  line-height: 1.6;
}

.merch-image-preview {
  width: min(100%, 280px);
  aspect-ratio: 16 / 9;
  border-radius: 20px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(201, 108, 116, 0.2), rgba(13, 115, 125, 0.18)),
    rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(13, 115, 125, 0.12);
}

.merch-image-preview__image,
.entity-cover__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.merch-image-preview__fallback,
.entity-cover {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(201, 108, 116, 0.18), rgba(13, 115, 125, 0.18)),
    rgba(255, 255, 255, 0.7);
  color: var(--text-main);
  font-weight: 800;
}

.merch-image-preview__fallback {
  width: 100%;
  height: 100%;
  padding: 18px;
  text-align: center;
  line-height: 1.5;
}

.entity-cover {
  width: 96px;
  height: 72px;
  border-radius: 18px;
  flex-shrink: 0;
}

.entity-pill--muted {
  color: var(--text-subtle);
  background: rgba(86, 117, 122, 0.14);
}

.entity-pill--danger {
  color: #8e3443;
  background: rgba(201, 108, 116, 0.16);
}

.role-card__permissions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.permission-chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(13, 115, 125, 0.1);
  color: var(--teal);
  font-size: 12px;
  font-weight: 700;
}

.permission-chip--empty {
  background: rgba(86, 117, 122, 0.14);
  color: var(--text-subtle);
}

.role-form__summary {
  padding: 16px 18px;
}

.permission-grid {
  display: grid;
  gap: 12px;
}

.permission-option {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.78);
}

.permission-option input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

.permission-option__body {
  display: grid;
  gap: 4px;
}

.permission-option__body strong {
  margin: 0;
  font-size: 15px;
  color: var(--text-main);
}

.permission-option__body small {
  color: var(--text-subtle);
  line-height: 1.6;
}

.shortcut-card {
  position: relative;
  overflow: hidden;
}

.shortcut-card::after {
  content: "";
  position: absolute;
  right: -20px;
  bottom: -20px;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(13, 115, 125, 0.16), rgba(13, 115, 125, 0));
}

.shortcut-card code {
  display: inline-block;
  margin-top: 8px;
  color: var(--teal);
}

.empty-state {
  padding: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.55);
}

[hidden] {
  display: none !important;
}

@media (max-width: 1100px) {
  .auth-stage {
    grid-template-columns: 1fr;
    min-height: auto;
  }

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

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

  .hero-panel,
  .section-layout,
  .section-layout--narrow {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .auth-stage,
  .app-shell {
    padding: 14px;
  }

  .auth-stage__visual,
  .auth-card--login,
  .sidebar,
  .topbar,
  .hero-panel,
  .section-card {
    border-radius: 22px;
  }

  .auth-stage__visual,
  .auth-card--login {
    padding: 24px;
  }

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

  .auth-stage__footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .status-group,
  .topbar-actions {
    justify-content: space-between;
  }

  .section-heading,
  .auth-card__header,
  .panel-title-row,
  .preflight-panel__header,
  .preflight-check__header {
    flex-direction: column;
    align-items: stretch;
  }

  .sidebar-profile {
    padding: 16px;
  }

  .hero-sidecard {
    padding: 18px;
  }
}

/* Claymorphism refresh */
:root {
  --clay-canvas: #f4f1fa;
  --clay-foreground: #332f3a;
  --clay-muted: #635f69;
  --clay-accent: #7c3aed;
  --clay-accent-alt: #db2777;
  --clay-info: #0ea5e9;
  --clay-success: #10b981;
  --clay-warn: #f59e0b;
  --clay-card-bg: rgba(255, 255, 255, 0.84);
  --clay-glass-bg: rgba(255, 255, 255, 0.62);
  --clay-border: rgba(124, 58, 237, 0.12);
  --clay-border-strong: rgba(124, 58, 237, 0.2);
  --clay-radius-sm: 20px;
  --clay-radius-md: 28px;
  --clay-radius-lg: 32px;
  --clay-radius-xl: 40px;
  --clay-radius-hero: 56px;
  --shadow-clay-surface:
    30px 30px 60px rgba(205, 198, 217, 0.75),
    -24px -24px 56px rgba(255, 255, 255, 0.92),
    inset 10px 10px 22px rgba(124, 58, 237, 0.04),
    inset -10px -10px 20px rgba(255, 255, 255, 0.9);
  --shadow-clay-card:
    16px 16px 34px rgba(185, 176, 203, 0.45),
    -12px -12px 28px rgba(255, 255, 255, 0.96),
    inset 6px 6px 14px rgba(255, 255, 255, 0.52),
    inset -6px -6px 14px rgba(124, 58, 237, 0.03);
  --shadow-clay-button:
    12px 12px 24px rgba(124, 58, 237, 0.24),
    -8px -8px 18px rgba(255, 255, 255, 0.8),
    inset 4px 4px 10px rgba(255, 255, 255, 0.4),
    inset -4px -4px 10px rgba(69, 31, 135, 0.08);
  --shadow-clay-pressed:
    inset 10px 10px 20px rgba(208, 200, 223, 0.92),
    inset -10px -10px 20px rgba(255, 255, 255, 0.98);
  --clay-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --clay-duration: 320ms;
  --font-display: "Nunito", "Trebuchet MS", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "DM Sans", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --bg-paper: var(--clay-glass-bg);
  --bg-card: var(--clay-card-bg);
  --line-soft: var(--clay-border);
  --line-strong: rgba(99, 95, 105, 0.18);
  --text-main: var(--clay-foreground);
  --text-subtle: var(--clay-muted);
  --teal: var(--clay-accent);
  --teal-soft: rgba(124, 58, 237, 0.12);
  --gold: var(--clay-warn);
  --gold-soft: rgba(245, 158, 11, 0.14);
  --rose: var(--clay-accent-alt);
  --rose-soft: rgba(219, 39, 119, 0.12);
  --danger: #e11d48;
  --shadow-lg: var(--shadow-clay-surface);
  --shadow-md: var(--shadow-clay-card);
  --radius-xl: var(--clay-radius-xl);
  --radius-lg: var(--clay-radius-lg);
  --radius-md: var(--clay-radius-sm);
}

@keyframes clay-float {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }

  50% {
    transform: translate3d(0, -24px, 0) rotate(4deg);
  }
}

@keyframes clay-float-alt {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }

  50% {
    transform: translate3d(0, 20px, 0) rotate(-5deg);
  }
}

@keyframes clay-breathe {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.72;
  }

  50% {
    transform: scale(1.18);
    opacity: 1;
  }
}

html,
body {
  background: var(--clay-canvas);
}

body {
  position: relative;
  overflow-x: hidden;
  color: var(--clay-foreground);
  font-family: var(--font-body);
  background:
    radial-gradient(circle at 12% 18%, rgba(124, 58, 237, 0.16), transparent 24%),
    radial-gradient(circle at 86% 18%, rgba(14, 165, 233, 0.14), transparent 22%),
    radial-gradient(circle at 82% 82%, rgba(219, 39, 119, 0.12), transparent 18%),
    linear-gradient(180deg, #fbf9ff 0%, #f4f1fa 48%, #f1eef8 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  border-radius: 999px;
  filter: blur(70px);
  pointer-events: none;
  z-index: 0;
}

body::before {
  top: -140px;
  left: -120px;
  width: 360px;
  height: 360px;
  background: rgba(124, 58, 237, 0.18);
  animation: clay-float 11s ease-in-out infinite;
}

body::after {
  right: -100px;
  top: 160px;
  width: 320px;
  height: 320px;
  background: rgba(14, 165, 233, 0.16);
  animation: clay-float-alt 13s ease-in-out infinite;
}

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

.auth-stage,
.app-shell {
  isolation: isolate;
}

.auth-stage::before,
.app-shell::before {
  content: "";
  position: fixed;
  right: -120px;
  bottom: -120px;
  width: 340px;
  height: 340px;
  border-radius: 999px;
  background: rgba(219, 39, 119, 0.14);
  filter: blur(86px);
  pointer-events: none;
  animation: clay-float 14s ease-in-out infinite;
  z-index: 0;
}

.clay-card {
  border-radius: var(--clay-radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.68);
  background: var(--clay-card-bg);
  backdrop-filter: blur(22px);
  box-shadow: var(--shadow-clay-card);
}

.clay-card--glass {
  background: var(--clay-glass-bg);
}

.clay-card--hero {
  border-radius: var(--clay-radius-hero);
  box-shadow: var(--shadow-clay-surface);
}

.clay-pressed {
  box-shadow: var(--shadow-clay-pressed);
}

.clay-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--clay-foreground);
  box-shadow: var(--shadow-clay-card);
  font-weight: 700;
}

.clay-button,
.primary-button,
.ghost-button,
.danger-button {
  min-height: 48px;
  border-radius: var(--clay-radius-sm);
  transition:
    transform var(--clay-duration) var(--clay-ease),
    box-shadow var(--clay-duration) var(--clay-ease),
    background var(--clay-duration) var(--clay-ease),
    color var(--clay-duration) var(--clay-ease),
    border-color var(--clay-duration) var(--clay-ease);
}

.clay-button--primary,
.primary-button {
  color: #ffffff;
  background: linear-gradient(135deg, #a78bfa 0%, #7c3aed 58%, #db2777 100%);
  box-shadow: var(--shadow-clay-button);
}

.clay-button--secondary,
.ghost-button {
  color: var(--clay-foreground);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-clay-card);
}

.danger-button {
  color: #ffffff;
  background: linear-gradient(135deg, #fb7185 0%, #db2777 100%);
  box-shadow:
    12px 12px 24px rgba(219, 39, 119, 0.22),
    -8px -8px 18px rgba(255, 255, 255, 0.82);
}

.primary-button:hover,
.ghost-button:hover,
.danger-button:hover,
.nav-item:hover,
.metric-card:hover,
.shortcut-card:hover,
.preflight-suite:hover {
  transform: translateY(-6px);
}

.primary-button:active,
.ghost-button:active,
.danger-button:active {
  transform: translateY(1px) scale(0.94);
  box-shadow: var(--shadow-clay-pressed);
}

input,
textarea,
select {
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: var(--clay-radius-sm);
  color: var(--clay-foreground);
  background: rgba(239, 235, 245, 0.94);
  box-shadow: var(--shadow-clay-pressed);
}

input::placeholder,
textarea::placeholder {
  color: rgba(99, 95, 105, 0.76);
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 4px rgba(124, 58, 237, 0.18),
    var(--shadow-clay-card);
}

.brand-block h1,
.hero-copy h2,
.section-heading h3,
.auth-card h3,
.panel-title-row h4,
.auth-stage__title,
.hero-sidecard h3 {
  font-family: var(--font-display);
}

.auth-stage {
  gap: 32px;
  padding: 28px;
}

.auth-stage__visual,
.auth-card--login,
.sidebar,
.topbar,
.hero-panel,
.section-card,
.preflight-panel,
.metric-card,
.shortcut-card,
.entity-card,
.detail-card,
.payment-panel,
.hero-sidecard,
.sidebar-profile,
.permission-summary,
.empty-state {
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: var(--clay-glass-bg);
  backdrop-filter: blur(22px);
  box-shadow: var(--shadow-clay-card);
}

.auth-stage__visual {
  padding: 42px;
  border-radius: var(--clay-radius-hero);
  color: var(--clay-foreground);
  background:
    radial-gradient(circle at 12% 15%, rgba(124, 58, 237, 0.18), transparent 26%),
    radial-gradient(circle at 92% 18%, rgba(14, 165, 233, 0.16), transparent 24%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(243, 239, 250, 0.94));
  box-shadow: var(--shadow-clay-surface);
}

.auth-stage__eyebrow,
.auth-stage__footer,
.auth-stage__tile p,
.auth-stage__copy,
.auth-stage__footer span {
  color: var(--clay-muted);
}

.auth-stage__title {
  max-width: 9ch;
  color: transparent;
  background: linear-gradient(135deg, var(--clay-foreground) 10%, var(--clay-accent) 58%, var(--clay-accent-alt) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  letter-spacing: -0.04em;
}

.auth-stage__tile {
  border-radius: var(--clay-radius-md);
  border: 1px solid rgba(255, 255, 255, 0.76);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-clay-card);
}

.auth-stage__tile strong,
.auth-stage__footer code,
.brand-kicker,
.section-kicker,
.hero-kicker {
  color: var(--clay-accent);
}

.auth-stage__footer code {
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-clay-card);
}

.auth-card--login {
  padding: 34px;
  border-radius: var(--clay-radius-xl);
  box-shadow: var(--shadow-clay-surface);
}

.status-pill,
.payment-pill,
.role-chip,
.sidebar-profile__code,
.panel-count,
.preflight-pill {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: var(--shadow-clay-card);
}

.status-pill,
.payment-pill--muted,
.sidebar-profile__code,
.preflight-pill--idle,
.preflight-pill--running {
  color: var(--clay-muted);
  background: rgba(255, 255, 255, 0.76);
}

.status-pill::before {
  box-shadow: 0 0 0 6px rgba(124, 58, 237, 0.12);
}

.status-pill--ghost,
.payment-pill--warn,
.preflight-pill--warn {
  color: #9a6806;
  background: rgba(245, 158, 11, 0.18);
}

.payment-pill--ready,
.preflight-pill--success {
  color: #0f766e;
  background: rgba(16, 185, 129, 0.16);
}

.preflight-pill--fail,
.flash--error {
  color: #be185d;
  background: rgba(244, 114, 182, 0.16);
}

.flash--success {
  background: rgba(16, 185, 129, 0.18);
  color: #0f766e;
}

.flash--info {
  background: rgba(14, 165, 233, 0.16);
  color: #0369a1;
}

.sidebar {
  background:
    radial-gradient(circle at 18% 16%, rgba(124, 58, 237, 0.12), transparent 22%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(247, 243, 252, 0.92));
  box-shadow: var(--shadow-clay-surface);
}

.brand-block::after {
  height: 4px;
  background: linear-gradient(90deg, transparent 0%, rgba(124, 58, 237, 0.72) 25%, rgba(219, 39, 119, 0.78) 80%, transparent 100%);
}

.sidebar-profile {
  padding: 20px;
}

.sidebar-profile__avatar,
.nav-item__icon {
  border-radius: 22px;
  box-shadow:
    12px 12px 20px rgba(124, 58, 237, 0.18),
    -8px -8px 16px rgba(255, 255, 255, 0.92);
}

.sidebar-profile__avatar {
  background: linear-gradient(135deg, #a78bfa 0%, #7c3aed 58%, #db2777 100%);
}

.permission-summary,
.sidebar-note {
  background: rgba(255, 255, 255, 0.56);
}

.nav-item {
  padding: 16px 18px;
  border-radius: var(--clay-radius-md);
  background: rgba(255, 255, 255, 0.64);
  box-shadow: var(--shadow-clay-card);
}

.nav-item:hover,
.nav-item.is-active {
  transform: translateY(-6px);
  border-color: var(--clay-border-strong);
}

.nav-item.is-active {
  background: linear-gradient(145deg, rgba(167, 139, 250, 0.24), rgba(219, 39, 119, 0.12));
}

.nav-item--teal .nav-item__icon {
  background: linear-gradient(135deg, #60a5fa 0%, #0ea5e9 100%);
}

.nav-item--gold .nav-item__icon {
  color: #6d3b02;
  background: linear-gradient(135deg, #fcd34d 0%, #f59e0b 100%);
}

.nav-item--rose .nav-item__icon {
  background: linear-gradient(135deg, #f472b6 0%, #db2777 100%);
}

.topbar,
.section-card,
.hero-panel {
  border-radius: var(--clay-radius-xl);
}

.topbar {
  background: rgba(255, 255, 255, 0.58);
}

.hero-panel--workspace {
  padding: 32px;
  background:
    radial-gradient(circle at 90% 20%, rgba(14, 165, 233, 0.12), transparent 20%),
    radial-gradient(circle at 12% 18%, rgba(124, 58, 237, 0.14), transparent 26%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.76), rgba(243, 239, 250, 0.96));
  box-shadow: var(--shadow-clay-surface);
}

.hero-copy h2 {
  max-width: 15ch;
  font-size: clamp(34px, 3vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.04em;
  color: var(--clay-foreground);
}

.hero-copy::after {
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(219, 39, 119, 0.16), rgba(219, 39, 119, 0) 70%);
}

.hero-sidecard {
  padding: 28px;
  border-radius: var(--clay-radius-lg);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(244, 241, 250, 0.98)),
    linear-gradient(135deg, rgba(167, 139, 250, 0.18), rgba(14, 165, 233, 0.12));
}

.metric-grid,
.shortcut-grid {
  gap: 18px;
}

.metric-card,
.shortcut-card,
.preflight-suite {
  position: relative;
  overflow: hidden;
  min-height: 156px;
}

.metric-card::before,
.shortcut-card::before,
.preflight-suite::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.82), transparent 30%),
    radial-gradient(circle at bottom right, rgba(124, 58, 237, 0.08), transparent 24%);
  pointer-events: none;
}

.metric-card h4,
.shortcut-card h4,
.preflight-suite__header h4 {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
}

.metric-value {
  position: relative;
  z-index: 1;
  color: var(--clay-accent);
  font-size: 36px;
}

.metric-helper,
.shortcut-card p,
.preflight-panel__intro,
.preflight-meta,
.preflight-suite__header p,
.preflight-check p,
.auth-card__demo,
.form-tip,
.brand-copy,
.hero-text {
  color: var(--clay-muted);
}

.shortcut-card code {
  color: var(--clay-accent);
}

.preflight-panel {
  padding: 24px;
  border-radius: var(--clay-radius-lg);
  background:
    radial-gradient(circle at top right, rgba(124, 58, 237, 0.08), transparent 24%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.74), rgba(248, 244, 252, 0.98));
}

.preflight-meta,
.preflight-check {
  background: rgba(255, 255, 255, 0.48);
  border-radius: 20px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.68);
}

.preflight-check {
  border-top: 0;
}

.preflight-check:first-child {
  padding-top: 14px;
}

.preflight-checks {
  gap: 14px;
}

.section-card,
.detail-card,
.entity-card {
  background: rgba(255, 255, 255, 0.66);
}

.empty-state {
  border-style: solid;
  color: var(--clay-muted);
}

.overview-ribbon,
.preflight-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
}

.overview-ribbon {
  margin-bottom: 18px;
}

.overview-ribbon:empty,
.preflight-stats:empty {
  display: none;
}

.overview-chip,
.preflight-stat,
.metric-card,
.shortcut-card,
.preflight-suite {
  --overview-accent: rgba(124, 58, 237, 0.14);
  --overview-accent-strong: var(--clay-accent);
  position: relative;
  overflow: hidden;
}

.overview-chip--violet,
.metric-card--violet,
.shortcut-card--violet,
.preflight-suite--violet,
.preflight-stat--violet {
  --overview-accent: rgba(124, 58, 237, 0.16);
  --overview-accent-strong: #7c3aed;
}

.overview-chip--pink,
.metric-card--pink,
.shortcut-card--pink,
.preflight-suite--pink,
.preflight-stat--pink {
  --overview-accent: rgba(219, 39, 119, 0.16);
  --overview-accent-strong: #db2777;
}

.overview-chip--sky,
.metric-card--sky,
.shortcut-card--sky,
.preflight-suite--sky,
.preflight-stat--sky {
  --overview-accent: rgba(14, 165, 233, 0.16);
  --overview-accent-strong: #0ea5e9;
}

.overview-chip--mint,
.metric-card--mint,
.shortcut-card--mint,
.preflight-suite--mint,
.preflight-stat--mint {
  --overview-accent: rgba(16, 185, 129, 0.16);
  --overview-accent-strong: #10b981;
}

.overview-chip--gold,
.metric-card--gold,
.shortcut-card--gold,
.preflight-suite--gold,
.preflight-stat--gold {
  --overview-accent: rgba(245, 158, 11, 0.16);
  --overview-accent-strong: #f59e0b;
}

.overview-chip,
.preflight-stat {
  padding: 22px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(244, 241, 250, 0.98));
  box-shadow: var(--shadow-clay-card);
}

.overview-chip::before,
.preflight-stat::before,
.metric-card::before,
.shortcut-card::before,
.preflight-suite::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.84), transparent 30%),
    radial-gradient(circle at bottom right, var(--overview-accent), transparent 28%);
  pointer-events: none;
}

.overview-chip__head,
.preflight-stat__head,
.metric-card__top,
.shortcut-card__top,
.preflight-suite__meta {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.accent-orb {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  border-radius: 20px;
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 900;
  box-shadow:
    12px 12px 24px rgba(124, 58, 237, 0.2),
    -8px -8px 18px rgba(255, 255, 255, 0.92);
}

.accent-orb--violet {
  background: linear-gradient(135deg, #a78bfa 0%, #7c3aed 100%);
}

.accent-orb--pink {
  background: linear-gradient(135deg, #f472b6 0%, #db2777 100%);
}

.accent-orb--sky {
  background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 100%);
}

.accent-orb--mint {
  background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
}

.accent-orb--gold {
  background: linear-gradient(135deg, #fcd34d 0%, #f59e0b 100%);
  color: #6d3b02;
}

.overview-chip__eyebrow,
.preflight-stat__eyebrow,
.metric-card__eyebrow,
.shortcut-card__eyebrow,
.preflight-suite__eyebrow {
  margin: 0 0 6px;
  color: var(--overview-accent-strong);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.overview-chip__value,
.preflight-stat__value {
  display: block;
  color: var(--clay-foreground);
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 900;
  line-height: 1.05;
}

.overview-chip__copy,
.preflight-stat__copy {
  position: relative;
  z-index: 1;
  margin: 16px 0 0;
  color: var(--clay-muted);
  font-size: 14px;
  line-height: 1.6;
}

.metric-card,
.shortcut-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 188px;
  padding: 22px;
}

.metric-card__head,
.shortcut-card__head {
  min-width: 0;
}

.metric-card h4,
.shortcut-card h4 {
  margin: 0;
  color: var(--clay-foreground);
}

.metric-value {
  margin: 4px 0 0;
  color: var(--overview-accent-strong);
}

.metric-card__foot {
  position: relative;
  z-index: 1;
  margin-top: auto;
}

.metric-foot__hint,
.shortcut-card__hint,
.preflight-suite__count {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--clay-muted);
  font-size: 12px;
  font-weight: 700;
  box-shadow: var(--shadow-clay-card);
}

.shortcut-card__meta {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: auto;
}

.shortcut-card__meta code {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-clay-card);
}

.preflight-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.preflight-suite {
  padding: 22px;
  border-radius: 32px;
}

.preflight-suite--success {
  border-color: rgba(16, 185, 129, 0.22);
}

.preflight-suite--warn {
  border-color: rgba(245, 158, 11, 0.22);
}

.preflight-suite--fail {
  border-color: rgba(219, 39, 119, 0.22);
}

.preflight-suite__header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.preflight-suite__orb {
  width: 50px;
  height: 50px;
  flex-basis: 50px;
  font-size: 18px;
}

.preflight-suite__side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.preflight-suite__header h4 {
  margin: 0;
}

.preflight-checks {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.preflight-check {
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.58);
  padding: 16px 18px;
}

.preflight-check--success {
  background: linear-gradient(145deg, rgba(236, 253, 245, 0.9), rgba(255, 255, 255, 0.74));
}

.preflight-check--warn {
  background: linear-gradient(145deg, rgba(255, 247, 237, 0.94), rgba(255, 255, 255, 0.74));
}

.preflight-check--fail {
  background: linear-gradient(145deg, rgba(253, 242, 248, 0.94), rgba(255, 255, 255, 0.74));
}

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

.preflight-check__title {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.preflight-check__index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--clay-foreground);
  font-size: 12px;
  font-weight: 800;
  box-shadow: var(--shadow-clay-card);
}

@media (max-width: 900px) {
  .overview-ribbon,
  .preflight-stats {
    grid-template-columns: 1fr;
  }

  .preflight-suite__header {
    flex-direction: column;
  }

  .preflight-suite__side {
    align-items: flex-start;
  }
}

[data-section-panel] {
  --section-accent: rgba(124, 58, 237, 0.14);
  --section-accent-strong: var(--clay-accent);
  position: relative;
  overflow: hidden;
}

[data-section-panel]::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(circle at top right, var(--section-accent), transparent 28%),
    radial-gradient(circle at bottom left, rgba(255, 255, 255, 0.68), transparent 24%);
  pointer-events: none;
}

[data-section-panel="roles"] {
  --section-accent: rgba(245, 158, 11, 0.16);
  --section-accent-strong: #d97706;
}

[data-section-panel="cards"] {
  --section-accent: rgba(124, 58, 237, 0.16);
  --section-accent-strong: #7c3aed;
}

[data-section-panel="merch"] {
  --section-accent: rgba(219, 39, 119, 0.14);
  --section-accent-strong: #db2777;
}

[data-section-panel="notices"] {
  --section-accent: rgba(14, 165, 233, 0.14);
  --section-accent-strong: #0ea5e9;
}

[data-section-panel="users"] {
  --section-accent: rgba(16, 185, 129, 0.14);
  --section-accent-strong: #10b981;
}

[data-section-panel="gifts"] {
  --section-accent: rgba(236, 72, 153, 0.14);
  --section-accent-strong: #db2777;
}

[data-section-panel="rankings"] {
  --section-accent: rgba(139, 92, 246, 0.16);
  --section-accent-strong: #8b5cf6;
}

[data-section-panel="actors"] {
  --section-accent: rgba(6, 182, 212, 0.14);
  --section-accent-strong: #0891b2;
}

[data-section-panel] > * {
  position: relative;
  z-index: 1;
}

[data-section-panel] .section-heading > div {
  display: grid;
  gap: 8px;
  max-width: min(760px, 100%);
}

.section-copy {
  margin: 0;
  color: var(--clay-muted);
  line-height: 1.7;
}

[data-section-panel] .list-panel,
[data-section-panel] .form-panel {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.84), rgba(244, 241, 250, 0.98));
  box-shadow: var(--shadow-clay-card);
}

[data-section-panel] .list-panel::before,
[data-section-panel] .form-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.88), transparent 28%),
    radial-gradient(circle at bottom right, var(--section-accent), transparent 26%);
  pointer-events: none;
}

[data-section-panel] .panel-title-row,
[data-section-panel] .entity-list,
[data-section-panel] .detail-stack,
[data-section-panel] .detail-grid,
[data-section-panel] .search-row,
[data-section-panel] .stack-form,
[data-section-panel] .permission-grid,
[data-section-panel] .merch-image-upload,
[data-section-panel] .actor-avatar-upload {
  position: relative;
  z-index: 1;
}

[data-section-panel] .panel-title-row {
  margin-bottom: 18px;
}

[data-section-panel] .panel-title-row h4 {
  margin: 0;
}

[data-section-panel] .entity-list,
[data-section-panel] .detail-stack {
  gap: 16px;
}

[data-section-panel] .search-row {
  align-items: center;
  padding: 14px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.66);
  box-shadow: var(--shadow-clay-card);
}

[data-section-panel] .stack-form > label,
[data-section-panel] .stack-form > .detail-card,
[data-section-panel] .stack-form > .permission-grid,
[data-section-panel] .stack-form > .merch-image-upload,
[data-section-panel] .stack-form > .actor-avatar-upload {
  padding: 16px 18px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.62);
  box-shadow: var(--shadow-clay-card);
}

[data-section-panel] .stack-form > label > span:first-child {
  color: var(--section-accent-strong);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

[data-section-panel] .stack-form > label.checkbox-row {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
}

[data-section-panel] .stack-form > label.checkbox-row > span:last-child {
  color: var(--clay-foreground);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: normal;
  text-transform: none;
}

[data-section-panel] .text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-clay-card);
}

[data-section-panel] .form-tip {
  padding: 14px 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: var(--shadow-clay-card);
}

[data-section-panel] .permission-option,
[data-section-panel] .merch-image-upload,
[data-section-panel] .actor-avatar-upload {
  border-radius: 24px;
  border-style: solid;
  background: rgba(255, 255, 255, 0.6);
  box-shadow: var(--shadow-clay-card);
}

[data-section-panel] .permission-option {
  grid-template-columns: auto 1fr;
}

[data-section-panel] .entity-card,
[data-section-panel] .detail-card,
[data-section-panel] .permission-option,
[data-section-panel] .list-panel,
[data-section-panel] .form-panel,
[data-section-panel] .search-row,
[data-section-panel] .merch-image-upload,
[data-section-panel] .actor-avatar-upload {
  transition:
    transform var(--clay-duration) var(--clay-ease),
    box-shadow var(--clay-duration) var(--clay-ease),
    border-color var(--clay-duration) var(--clay-ease);
}

[data-section-panel] .entity-card:hover,
[data-section-panel] .detail-card:hover,
[data-section-panel] .permission-option:hover,
[data-section-panel] .merch-image-upload:hover,
[data-section-panel] .actor-avatar-upload:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-clay-surface);
}

.entity-card--role,
.entity-card--member,
.entity-card--merch,
.entity-card--notice,
.entity-card--gift,
.entity-card--actor,
.detail-card--metric-mini,
.detail-card--user-summary,
.detail-card--member-record,
.detail-card--rights-record,
.detail-card--log-record,
.detail-card--history-record,
.detail-card--ranking-board {
  position: relative;
  overflow: hidden;
}

.entity-card--role::after,
.entity-card--member::after,
.entity-card--merch::after,
.entity-card--notice::after,
.entity-card--gift::after,
.entity-card--actor::after,
.detail-card--metric-mini::after,
.detail-card--user-summary::after,
.detail-card--member-record::after,
.detail-card--rights-record::after,
.detail-card--log-record::after,
.detail-card--history-record::after,
.detail-card--ranking-board::after {
  content: "";
  position: absolute;
  right: -22px;
  bottom: -22px;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  pointer-events: none;
}

.entity-card--role {
  background: linear-gradient(155deg, rgba(255, 251, 235, 0.94), rgba(255, 255, 255, 0.9));
}

.entity-card--role::after {
  background: radial-gradient(circle, rgba(245, 158, 11, 0.18), rgba(245, 158, 11, 0));
}

.entity-card--member {
  background: linear-gradient(155deg, rgba(245, 243, 255, 0.94), rgba(255, 255, 255, 0.9));
}

.entity-card--member::after,
.detail-card--member-record::after,
.detail-card--history-record::after,
.detail-card--ranking-board::after {
  background: radial-gradient(circle, rgba(124, 58, 237, 0.16), rgba(124, 58, 237, 0));
}

.entity-card--merch {
  background: linear-gradient(155deg, rgba(253, 242, 248, 0.94), rgba(255, 255, 255, 0.9));
}

.entity-card--merch::after,
.entity-card--gift::after,
.detail-card--log-record::after {
  background: radial-gradient(circle, rgba(219, 39, 119, 0.16), rgba(219, 39, 119, 0));
}

.entity-card--notice,
.entity-card--actor {
  background: linear-gradient(155deg, rgba(239, 246, 255, 0.94), rgba(255, 255, 255, 0.9));
}

.entity-card--notice::after,
.entity-card--actor::after,
.detail-card--metric-mini::after {
  background: radial-gradient(circle, rgba(14, 165, 233, 0.16), rgba(14, 165, 233, 0));
}

.entity-card--gift {
  background: linear-gradient(155deg, rgba(253, 242, 248, 0.94), rgba(255, 255, 255, 0.9));
}

.detail-card--user-summary,
.detail-card--rights-record {
  background: linear-gradient(155deg, rgba(236, 253, 245, 0.96), rgba(255, 255, 255, 0.9));
}

.detail-card--user-summary::after,
.detail-card--rights-record::after {
  background: radial-gradient(circle, rgba(16, 185, 129, 0.16), rgba(16, 185, 129, 0));
}

.detail-card--log-record {
  background: linear-gradient(155deg, rgba(253, 242, 248, 0.96), rgba(255, 255, 255, 0.9));
}

.detail-card--history-record,
.detail-card--ranking-board {
  background: linear-gradient(155deg, rgba(245, 243, 255, 0.96), rgba(255, 255, 255, 0.9));
}

[data-section-panel] .entity-card__actions {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(124, 58, 237, 0.08);
}

[data-section-panel] .entity-pill,
[data-section-panel] .theme-pill,
[data-section-panel] .permission-chip {
  box-shadow: var(--shadow-clay-card);
}

[data-section-panel="users"] .detail-grid--summary {
  gap: 14px;
}

[data-section-panel="users"] .detail-card--user-summary h4 {
  color: var(--clay-accent);
}

[data-section-panel="rankings"] .section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.primary-button:disabled,
.ghost-button:disabled,
.danger-button:disabled,
.text-button:disabled,
.mini-button:disabled {
  cursor: not-allowed;
  opacity: 0.72;
  transform: none !important;
}

.primary-button.is-busy,
.ghost-button.is-busy,
.danger-button.is-busy,
.text-button.is-busy {
  position: relative;
  padding-right: 44px;
}

.primary-button.is-busy::after,
.ghost-button.is-busy::after,
.danger-button.is-busy::after,
.text-button.is-busy::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 50%;
  width: 12px;
  height: 12px;
  margin-top: -6px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.7;
  animation: clay-breathe 1.1s ease-in-out infinite;
}

.preview-shell {
  display: grid;
  gap: 14px;
  padding: 14px;
  border-radius: 24px;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.86), rgba(244, 241, 250, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-clay-card);
}

.preview-shell--sky {
  background:
    radial-gradient(circle at top right, rgba(14, 165, 233, 0.12), transparent 28%),
    linear-gradient(150deg, rgba(255, 255, 255, 0.86), rgba(244, 241, 250, 0.98));
}

.preview-shell--pink {
  background:
    radial-gradient(circle at top right, rgba(219, 39, 119, 0.12), transparent 28%),
    linear-gradient(150deg, rgba(255, 255, 255, 0.86), rgba(244, 241, 250, 0.98));
}

.preview-shell__head {
  display: flex;
  justify-content: flex-end;
}

.preview-shell__badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--clay-foreground);
  font-size: 12px;
  font-weight: 800;
  box-shadow: var(--shadow-clay-card);
}

.preview-shell__stage {
  display: flex;
  justify-content: center;
}

.preview-shell__hint {
  margin: 0;
  color: var(--clay-muted);
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
}

.actor-avatar-preview,
.merch-image-preview {
  position: relative;
  box-shadow: var(--shadow-clay-card);
}

.actor-avatar-preview {
  width: 108px;
  height: 108px;
  border-radius: 32px;
  overflow: hidden;
}

.actor-avatar-preview--empty {
  background:
    linear-gradient(145deg, rgba(224, 242, 254, 0.92), rgba(255, 255, 255, 0.82));
}

.actor-avatar-preview--ready {
  background: rgba(255, 255, 255, 0.82);
}

.actor-avatar-preview__fallback {
  width: 100%;
  height: 100%;
  border-radius: inherit;
}

.merch-image-preview {
  width: min(100%, 320px);
}

.merch-image-preview--empty,
.merch-image-preview--ready {
  border-radius: 24px;
}

.empty-state {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 24px 20px;
  text-align: center;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.84), rgba(244, 241, 250, 0.98));
  box-shadow: var(--shadow-clay-card);
}

.empty-state--violet {
  background:
    radial-gradient(circle at top right, rgba(124, 58, 237, 0.14), transparent 26%),
    linear-gradient(150deg, rgba(255, 255, 255, 0.84), rgba(244, 241, 250, 0.98));
}

.empty-state--pink {
  background:
    radial-gradient(circle at top right, rgba(219, 39, 119, 0.14), transparent 26%),
    linear-gradient(150deg, rgba(255, 255, 255, 0.84), rgba(244, 241, 250, 0.98));
}

.empty-state--sky {
  background:
    radial-gradient(circle at top right, rgba(14, 165, 233, 0.14), transparent 26%),
    linear-gradient(150deg, rgba(255, 255, 255, 0.84), rgba(244, 241, 250, 0.98));
}

.empty-state--mint {
  background:
    radial-gradient(circle at top right, rgba(16, 185, 129, 0.14), transparent 26%),
    linear-gradient(150deg, rgba(255, 255, 255, 0.84), rgba(244, 241, 250, 0.98));
}

.empty-state--gold {
  background:
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.14), transparent 26%),
    linear-gradient(150deg, rgba(255, 255, 255, 0.84), rgba(244, 241, 250, 0.98));
}

.empty-state__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 22px;
  background: linear-gradient(135deg, #a78bfa 0%, #7c3aed 58%, #db2777 100%);
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 900;
  box-shadow:
    12px 12px 24px rgba(124, 58, 237, 0.18),
    -8px -8px 18px rgba(255, 255, 255, 0.92);
}

.empty-state--sky .empty-state__icon {
  background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 100%);
}

.empty-state--mint .empty-state__icon {
  background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
}

.empty-state--gold .empty-state__icon {
  background: linear-gradient(135deg, #fcd34d 0%, #f59e0b 100%);
  color: #6d3b02;
}

.empty-state__body {
  display: grid;
  gap: 8px;
  max-width: 34ch;
}

.empty-state__title {
  color: var(--clay-foreground);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 900;
}

.empty-state__copy {
  margin: 0;
  color: var(--clay-muted);
  line-height: 1.65;
}

.toast-stack {
  position: fixed;
  top: 22px;
  right: 22px;
  z-index: 1600;
  display: grid;
  gap: 14px;
  width: min(360px, calc(100vw - 28px));
  pointer-events: none;
}

.toast-stack[hidden] {
  display: none !important;
}

.toast {
  pointer-events: auto;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 18px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.84);
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.86), rgba(244, 241, 250, 0.98));
  box-shadow: var(--shadow-clay-surface);
  backdrop-filter: blur(18px);
  opacity: 0;
  transform: translateY(-10px) scale(0.97);
  transition:
    transform var(--clay-duration) var(--clay-ease),
    opacity var(--clay-duration) var(--clay-ease);
}

.toast--open {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.toast__orb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 18px;
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 900;
  box-shadow: var(--shadow-clay-button);
}

.toast__orb--success {
  background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
}

.toast__orb--error {
  background: linear-gradient(135deg, #fb7185 0%, #db2777 100%);
}

.toast__orb--info {
  background: linear-gradient(135deg, #38bdf8 0%, #7c3aed 100%);
}

.toast__copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.toast__title {
  color: var(--clay-foreground);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 900;
}

.toast__message {
  margin: 0;
  color: var(--clay-muted);
  line-height: 1.65;
  word-break: break-word;
}

.toast__close {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 14px;
  color: var(--clay-muted);
  background: rgba(255, 255, 255, 0.74);
  box-shadow: var(--shadow-clay-card);
  font-size: 24px;
  line-height: 1;
}

.toast__close:hover {
  color: var(--clay-accent);
}

.batch-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) auto auto;
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
  padding: 16px 18px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  background:
    radial-gradient(circle at top right, rgba(167, 139, 250, 0.12), transparent 26%),
    linear-gradient(150deg, rgba(255, 255, 255, 0.82), rgba(244, 241, 250, 0.98));
  box-shadow: var(--shadow-clay-card);
}

.batch-toolbar__summary {
  display: grid;
  gap: 6px;
}

.batch-toolbar__eyebrow {
  color: var(--clay-accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.batch-toolbar__summary strong {
  color: var(--clay-foreground);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 900;
}

.batch-toolbar__summary p {
  margin: 0;
  color: var(--clay-muted);
  line-height: 1.6;
}

.batch-toolbar__controls,
.batch-toolbar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.mini-button--primary {
  color: #ffffff;
  background: linear-gradient(135deg, #a78bfa 0%, #7c3aed 100%);
  box-shadow:
    10px 10px 22px rgba(124, 58, 237, 0.24),
    -6px -6px 14px rgba(255, 255, 255, 0.88);
}

.entity-card__tail {
  display: grid;
  justify-items: end;
  gap: 10px;
}

.entity-card--selected {
  border-color: rgba(124, 58, 237, 0.26) !important;
  box-shadow:
    0 0 0 4px rgba(124, 58, 237, 0.1),
    var(--shadow-clay-surface) !important;
}

.batch-selector {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  cursor: pointer;
}

.batch-selector__input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
}

.batch-selector__ui {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 10px;
  border: 1px solid rgba(124, 58, 237, 0.14);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow-clay-card);
  transition:
    transform var(--clay-duration) var(--clay-ease),
    background var(--clay-duration) var(--clay-ease),
    box-shadow var(--clay-duration) var(--clay-ease);
}

.batch-selector__ui::after {
  content: "✓";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 14px;
  font-weight: 900;
  opacity: 0;
  transform: scale(0.72);
  transition:
    opacity var(--clay-duration) var(--clay-ease),
    transform var(--clay-duration) var(--clay-ease);
}

.batch-selector__input:checked + .batch-selector__ui {
  background: linear-gradient(135deg, #a78bfa 0%, #7c3aed 60%, #db2777 100%);
  box-shadow: var(--shadow-clay-button);
  transform: translateY(-1px);
}

.batch-selector__input:checked + .batch-selector__ui::after {
  opacity: 1;
  transform: scale(1);
}

.batch-selector__input:focus-visible + .batch-selector__ui {
  box-shadow:
    0 0 0 4px rgba(124, 58, 237, 0.18),
    var(--shadow-clay-card);
}

.field-guidance {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 10px 0 0;
  color: var(--clay-muted);
}

.field-guidance__copy {
  flex: 1 1 220px;
  min-width: 0;
  font-size: 13px;
  line-height: 1.6;
}

.field-guidance__meta {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--section-accent-strong, var(--clay-accent));
  font-size: 12px;
  font-weight: 800;
  box-shadow: var(--shadow-clay-card);
}

.field-guidance__meta:empty {
  display: none;
}

body.dialog-open {
  overflow: hidden;
}

.confirm-dialog {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: grid;
  place-items: center;
  padding: 24px;
}

.confirm-dialog__scrim {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  background:
    radial-gradient(circle at top left, rgba(167, 139, 250, 0.2), transparent 26%),
    rgba(51, 47, 58, 0.34);
  cursor: pointer;
}

.confirm-dialog__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 520px);
  display: grid;
  gap: 24px;
  padding: 28px;
  border-radius: var(--clay-radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.82);
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.84), rgba(244, 241, 250, 0.96));
  box-shadow: var(--shadow-clay-surface);
  backdrop-filter: blur(22px);
  transform: translateY(12px) scale(0.98);
  opacity: 0;
  transition:
    transform var(--clay-duration) var(--clay-ease),
    opacity var(--clay-duration) var(--clay-ease);
}

.confirm-dialog--open .confirm-dialog__panel {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.confirm-dialog__hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.confirm-dialog__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 28px;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 900;
  color: #ffffff;
  background: linear-gradient(135deg, #f472b6 0%, #db2777 100%);
  box-shadow: var(--shadow-clay-button);
}

.confirm-dialog--primary .confirm-dialog__icon {
  background: linear-gradient(135deg, #a78bfa 0%, #7c3aed 100%);
}

.confirm-dialog__copy {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.confirm-dialog__eyebrow {
  margin: 0;
  color: var(--clay-accent-alt);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.confirm-dialog--primary .confirm-dialog__eyebrow {
  color: var(--clay-accent);
}

.confirm-dialog__copy h3 {
  margin: 0;
  color: var(--clay-foreground);
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 34px);
  font-weight: 900;
  line-height: 1.08;
}

.confirm-dialog__copy p:last-child,
.confirm-dialog__message {
  margin: 0;
  color: var(--clay-muted);
  line-height: 1.75;
}

.confirm-dialog__actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
}

.confirm-dialog__actions .ghost-button,
.confirm-dialog__actions .primary-button,
.confirm-dialog__actions .danger-button {
  min-width: 124px;
}

.mini-button.is-busy {
  position: relative;
  padding-right: 34px;
}

.mini-button.is-busy::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  width: 10px;
  height: 10px;
  margin-top: -5px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.72;
  animation: clay-breathe 1.1s ease-in-out infinite;
}

form.is-validating input:invalid,
form.is-validating textarea:invalid,
form.is-validating select:invalid,
input[aria-invalid="true"],
textarea[aria-invalid="true"],
select[aria-invalid="true"] {
  border-color: rgba(219, 39, 119, 0.36);
  background: rgba(255, 245, 247, 0.96);
  box-shadow:
    0 0 0 4px rgba(219, 39, 119, 0.12),
    var(--shadow-clay-pressed);
}

form.is-validating input:invalid:focus-visible,
form.is-validating textarea:invalid:focus-visible,
form.is-validating select:invalid:focus-visible,
input[aria-invalid="true"]:focus-visible,
textarea[aria-invalid="true"]:focus-visible,
select[aria-invalid="true"]:focus-visible {
  box-shadow:
    0 0 0 4px rgba(219, 39, 119, 0.16),
    var(--shadow-clay-pressed);
}

@media (max-width: 720px) {
  [data-section-panel] .search-row,
  [data-section-panel] .stack-form > label,
  [data-section-panel] .stack-form > .detail-card,
  [data-section-panel] .stack-form > .permission-grid,
  [data-section-panel] .stack-form > .merch-image-upload,
  [data-section-panel] .stack-form > .actor-avatar-upload {
    padding: 14px;
  }

  [data-section-panel] .text-button {
    width: 100%;
    justify-content: center;
  }

  .confirm-dialog {
    padding: 18px;
  }

  .toast-stack {
    top: 16px;
    right: 16px;
    left: 16px;
    width: auto;
  }

  .toast {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .toast__close {
    grid-column: 2;
    justify-self: end;
  }

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

  .batch-toolbar__controls,
  .batch-toolbar__actions {
    justify-content: stretch;
  }

  .batch-toolbar__controls > *,
  .batch-toolbar__actions > * {
    flex: 1 1 100%;
    justify-content: center;
  }

  .entity-card__tail {
    width: 100%;
    justify-items: start;
  }

  .confirm-dialog__panel {
    padding: 22px;
    border-radius: var(--clay-radius-lg);
  }

  .confirm-dialog__hero {
    grid-template-columns: 1fr;
  }

  .confirm-dialog__actions > * {
    width: 100%;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media (max-width: 1100px) {
  .auth-stage::before,
  .app-shell::before {
    width: 260px;
    height: 260px;
  }
}

@media (max-width: 720px) {
  body::before,
  body::after,
  .auth-stage::before,
  .app-shell::before {
    filter: blur(56px);
    opacity: 0.78;
  }

  .auth-stage__visual,
  .auth-card--login,
  .sidebar,
  .topbar,
  .hero-panel,
  .section-card {
    border-radius: 26px;
  }

  .auth-stage__title,
  .hero-copy h2 {
    max-width: none;
  }

  .nav-item:hover,
  .nav-item.is-active,
  .metric-card:hover,
  .shortcut-card:hover,
  .preflight-suite:hover,
  .primary-button:hover,
  .ghost-button:hover,
  .danger-button:hover {
    transform: none;
  }
}
