/* ============================================================
   艺视介 — Creator Center Styles
   ============================================================ */

/* --- Layout --- */
.creator-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100dvh;
  padding-top: 60px; /* header height */
}

/* --- Sidebar --- */
.creator-sidebar {
  background: var(--color-bg-elevated);
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 60px;
  height: calc(100dvh - 60px);
  overflow-y: auto;
  padding: var(--sp-4) 0 var(--sp-6);
}

.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  padding: 0 var(--sp-3);
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-3);
  border-radius: var(--radius-md);
  color: var(--color-text-secondary);
  font-size: var(--fs-sm);
  font-weight: 500;
  transition: all var(--duration-fast);
  cursor: pointer;
}

.sidebar-item:hover {
  background: var(--color-bg-hover);
  color: var(--color-text-primary);
}

.sidebar-item.active {
  background: var(--color-accent-subtle);
  color: var(--color-accent);
  border: 1px solid oklch(68% 0.28 145 / 0.2);
}

.sidebar-item svg {
  flex-shrink: 0;
  opacity: 0.7;
}

.sidebar-item.active svg {
  opacity: 1;
}

.sidebar-item-alt {
  color: var(--color-hybrid);
}

.sidebar-item-alt:hover {
  color: var(--color-hybrid);
  background: oklch(65% 0.18 170 / 0.08);
}

.sidebar-divider {
  height: 1px;
  background: var(--color-border);
  margin: var(--sp-3) var(--sp-3);
}

/* --- Sidebar Membership --- */
.sidebar-membership {
  margin: var(--sp-4) var(--sp-3) 0;
  padding: var(--sp-4);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.membership-badge {
  display: inline-flex;
  padding: var(--sp-1) var(--sp-2);
  border-radius: var(--radius-sm);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: var(--sp-1);
}

.membership-badge.pro {
  background: linear-gradient(135deg, oklch(68% 0.28 145), oklch(62% 0.22 160));
  color: oklch(12% 0.01 80);
}

.membership-info {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--sp-3);
}

.membership-progress {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}

.progress-bar {
  height: 4px;
  background: var(--color-border);
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--color-accent);
  border-radius: 2px;
  transition: width var(--duration-slow);
}

.progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
}

/* --- Main Content --- */
.creator-main {
  background: var(--color-bg);
  padding: var(--sp-8) var(--sp-8) var(--sp-16);
  min-height: calc(100dvh - 60px);
}

/* --- User Avatar in Header --- */
.user-avatar-btn {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-1) var(--sp-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  cursor: pointer;
  transition: all var(--duration-fast);
}

.user-avatar-btn:hover {
  border-color: var(--color-accent);
  background: var(--color-bg-hover);
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-accent);
  color: oklch(12% 0.01 80);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-xs);
  font-weight: 700;
}

.user-name {
  font-size: var(--fs-sm);
  font-weight: 500;
}

/* --- Content Sections --- */
.content-section {
  display: none;
}

.content-section.active {
  display: block;
}

.block-title {
  font-family: var(--font-heading);
  font-size: var(--fs-xl);
  font-weight: 700;
  color: var(--color-text-primary);
}

.block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-4);
}

.page-section-title {
  font-family: var(--font-heading);
  font-size: var(--fs-3xl);
  font-weight: 700;
  color: var(--color-text-primary);
}

.section-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-6);
}

.sub-section-title {
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--color-text-primary);
  margin: var(--sp-8) 0 var(--sp-4);
}

/* --- Welcome Bar --- */
.welcome-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-8);
  gap: var(--sp-4);
}

.welcome-text h1 {
  font-family: var(--font-heading);
  font-size: var(--fs-3xl);
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: var(--sp-1);
}

.welcome-text p {
  color: var(--color-text-secondary);
  font-size: var(--fs-base);
}

/* --- Stat Cards --- */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-4);
  margin-bottom: var(--sp-8);
}

.stat-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--sp-4) var(--sp-5);
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  transition: border-color var(--duration-fast);
}

.stat-card:hover {
  border-color: var(--color-text-muted);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-content {
  flex: 1;
}

.stat-value {
  font-size: var(--fs-2xl);
  font-weight: 700;
  color: var(--color-text-primary);
  font-family: 'DM Sans', monospace;
  line-height: 1.2;
}

.stat-label {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  margin-top: var(--sp-1);
}

.stat-trend {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  white-space: nowrap;
}

.stat-trend.up {
  color: var(--color-success);
}

/* --- Quick Actions --- */
.quick-actions-block {
  margin-bottom: var(--sp-8);
}

.quick-actions-block .block-title {
  margin-bottom: var(--sp-4);
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-4);
}

.quick-card {
  display: flex;
  flex-direction: column;
  padding: var(--sp-5);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  transition: all var(--duration-normal);
  position: relative;
  overflow: hidden;
}

.quick-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, oklch(68% 0.28 145 / 0.05), transparent 60%);
  opacity: 0;
  transition: opacity var(--duration-normal);
}

.quick-card:hover::before { opacity: 1; }

.quick-card:hover {
  border-color: var(--color-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.quick-card.accent {
  background: linear-gradient(135deg, oklch(68% 0.28 145 / 0.12), oklch(65% 0.18 170 / 0.06));
  border-color: oklch(68% 0.28 145 / 0.3);
}

.quick-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--color-bg-input);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--sp-3);
  color: var(--color-accent);
}

.quick-name {
  font-size: var(--fs-base);
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: var(--sp-1);
}

.quick-desc {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  line-height: 1.5;
  flex: 1;
}

.quick-arrow {
  font-size: var(--fs-lg);
  color: var(--color-text-muted);
  margin-top: var(--sp-3);
  transition: transform var(--duration-fast), color var(--duration-fast);
}

.quick-card:hover .quick-arrow {
  transform: translateX(4px);
  color: var(--color-accent);
}

/* --- Projects List (Recent) --- */
.recent-block {
  margin-bottom: var(--sp-8);
}

.projects-list {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.project-row {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--color-border-light);
  transition: background var(--duration-fast);
}

.project-row:last-child {
  border-bottom: none;
}

.project-row:hover {
  background: var(--color-bg-hover);
}

.project-thumb {
  position: relative;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.project-thumb img {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  object-fit: cover;
}

.project-thumb-placeholder {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--color-bg-input);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
}

.project-type-dot {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--color-bg-card);
}

.project-type-dot.digital { background: var(--color-digital); }
.project-type-dot.hybrid { background: var(--color-hybrid); }
.project-type-dot.real { background: var(--color-real); }

.project-info {
  flex: 1;
  min-width: 0;
}

.project-name {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--color-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-meta {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  margin-top: var(--sp-1);
}

.project-status {
  font-size: var(--fs-xs);
  font-weight: 600;
  padding: 3px var(--sp-2);
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.project-status.done {
  background: oklch(65% 0.16 160 / 0.12);
  color: var(--color-success);
}

.project-status.progress {
  background: oklch(70% 0.14 230 / 0.12);
  color: var(--color-digital);
}

.project-status.pending {
  background: oklch(72% 0.16 85 / 0.12);
  color: var(--color-warning);
}

.project-actions {
  display: flex;
  gap: var(--sp-2);
}

/* --- Fav Actors --- */
.fav-block {
  margin-bottom: var(--sp-8);
}

.fav-actors {
  display: flex;
  gap: var(--sp-4);
  flex-wrap: wrap;
}

.fav-actor-card {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: all var(--duration-fast);
  min-width: 200px;
  cursor: pointer;
}

.fav-actor-card:hover {
  border-color: var(--color-accent);
  background: var(--color-bg-hover);
}

.fav-actor-img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.fav-actor-info .fav-name {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--color-text-primary);
}

.fav-actor-info .fav-type {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
}

/* --- Projects Grid (Full) --- */
.filter-bar {
  display: flex;
  gap: var(--sp-2);
  margin-bottom: var(--sp-6);
  flex-wrap: wrap;
}

.filter-btn {
  padding: var(--sp-2) var(--sp-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--color-text-secondary);
  font-size: var(--fs-sm);
  cursor: pointer;
  transition: all var(--duration-fast);
}

.filter-btn:hover { border-color: var(--color-text-muted); color: var(--color-text-primary); }
.filter-btn.active { border-color: var(--color-accent); color: var(--color-accent); background: var(--color-accent-subtle); }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--sp-4);
}

.proj-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: all var(--duration-normal);
}

.proj-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-text-muted);
}

.proj-card-thumb {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
}

.proj-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.proj-thumb-pending {
  width: 100%;
  height: 100%;
  background: var(--color-bg-input);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  color: var(--color-text-muted);
  font-size: var(--fs-xs);
}

.proj-badge {
  position: absolute;
  top: var(--sp-2);
  left: var(--sp-2);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.proj-badge.digital { background: var(--color-digital); color: #fff; }
.proj-badge.hybrid { background: var(--color-hybrid); color: #fff; }
.proj-badge.real { background: var(--color-real); color: #fff; }

.generating-overlay {
  position: absolute;
  inset: 0;
  background: oklch(12% 0.01 145 / 0.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  color: var(--color-text-primary);
  font-size: var(--fs-sm);
  font-weight: 600;
  z-index: 1;
}

.gen-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid oklch(68% 0.28 145 / 0.2);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.proj-card-body {
  padding: var(--sp-4);
}

.proj-card-name {
  font-size: var(--fs-base);
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: var(--sp-1);
}

.proj-card-actor {
  font-size: var(--fs-xs);
  color: var(--color-text-secondary);
  margin-bottom: var(--sp-1);
}

.proj-card-date {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--sp-3);
}

.proj-card-actions {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
}

.proj-card-new {
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-xl);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  padding: var(--sp-8);
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
  cursor: pointer;
  transition: all var(--duration-fast);
  min-height: 200px;
}

.proj-card-new:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: var(--color-accent-subtle);
}

/* --- Fav Full Grid --- */
.fav-full-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--sp-4);
}

/* --- License List --- */
.license-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.license-row {
  display: grid;
  grid-template-columns: 180px 1fr 120px 200px 80px 160px;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--color-border-light);
  transition: background var(--duration-fast);
}

.license-row:last-child { border-bottom: none; }
.license-row:hover { background: var(--color-bg-hover); }

.license-actor {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.license-actor img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.la-name {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--color-text-primary);
}

.la-type {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  display: inline-block;
  margin-top: 2px;
}

.badge-digital { background: oklch(70% 0.14 230 / 0.15); color: var(--color-digital); }
.badge-hybrid { background: oklch(65% 0.18 170 / 0.15); color: var(--color-hybrid); }
.badge-real { background: oklch(68% 0.15 30 / 0.15); color: var(--color-real); }

.license-no, .license-scene, .license-period {
  font-size: var(--fs-xs);
  color: var(--color-text-secondary);
  font-family: 'DM Sans', monospace;
}

.license-status {
  font-size: var(--fs-xs);
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.active-badge { background: oklch(65% 0.16 160 / 0.12); color: var(--color-success); }
.expiring-badge { background: oklch(72% 0.16 85 / 0.12); color: var(--color-warning); }
.expired-badge { background: oklch(60% 0.02 0 / 0.12); color: var(--color-text-muted); }

.license-actions { display: flex; gap: var(--sp-2); }

/* --- Billing --- */
.billing-overview {
  display: grid;
  grid-template-columns: 220px 260px 1fr;
  gap: var(--sp-4);
  margin-bottom: var(--sp-8);
  align-items: start;
}

.balance-card {
  background: linear-gradient(135deg, oklch(68% 0.28 145 / 0.15), oklch(65% 0.18 170 / 0.05));
  border: 1px solid oklch(68% 0.28 145 / 0.25);
  border-radius: var(--radius-xl);
  padding: var(--sp-6);
}

.balance-label {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  letter-spacing: 0.05em;
  margin-bottom: var(--sp-2);
}

.balance-amount {
  font-size: var(--fs-3xl);
  font-weight: 700;
  color: var(--color-accent);
  font-family: 'DM Sans', monospace;
  margin-bottom: var(--sp-4);
}

.balance-actions { display: flex; gap: var(--sp-2); }

.plan-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--sp-5);
}

.plan-badge {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: var(--sp-2);
}

.plan-badge.pro {
  background: linear-gradient(135deg, oklch(68% 0.28 145), oklch(62% 0.22 160));
  color: oklch(12% 0.01 80);
}

.plan-name {
  font-size: var(--fs-base);
  font-weight: 700;
  color: var(--color-text-primary);
}

.plan-expire {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--sp-4);
}

.plan-usage { display: flex; flex-direction: column; gap: var(--sp-2); }

.usage-row {
  display: flex;
  justify-content: space-between;
  font-size: var(--fs-xs);
  color: var(--color-text-secondary);
}

.usage-progress-bar {
  height: 3px;
  background: var(--color-border);
  border-radius: 2px;
  overflow: hidden;
}

.usage-progress-bar > div {
  height: 100%;
  background: var(--color-accent);
}

.pkg-cards {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.pkg-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--sp-4);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  position: relative;
  transition: border-color var(--duration-fast);
}

.pkg-card:hover { border-color: var(--color-text-muted); }

.pkg-card.featured {
  border-color: var(--color-accent);
  background: var(--color-accent-subtle);
}

.pkg-badge {
  position: absolute;
  top: -8px;
  left: var(--sp-4);
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  background: var(--color-accent);
  color: oklch(12% 0.01 80);
  border-radius: var(--radius-sm);
  letter-spacing: 0.05em;
}

.pkg-name {
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--color-text-primary);
  min-width: 48px;
}

.pkg-price {
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--color-accent);
  font-family: 'DM Sans', monospace;
  min-width: 60px;
}

.pkg-detail {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  flex: 1;
}

/* --- Bill Table --- */
.bill-table {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.bill-row {
  display: grid;
  grid-template-columns: 100px 1fr 120px 100px 80px 80px 80px;
  gap: var(--sp-4);
  padding: var(--sp-3) var(--sp-5);
  border-bottom: 1px solid var(--color-border-light);
  font-size: var(--fs-sm);
  color: var(--color-text-secondary);
  align-items: center;
}

.bill-row:last-child { border-bottom: none; }
.bill-row.header {
  background: var(--color-bg-elevated);
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.bill-row:not(.header):hover { background: var(--color-bg-hover); }

.bill-status.ok { color: var(--color-success); font-weight: 600; }
.bill-status.pending { color: var(--color-warning); font-weight: 600; }
.bill-status.unpaid { color: var(--color-warning); font-weight: 600; }
.bill-status.refunded { color: var(--color-text-muted); font-weight: 600; }

/* --- Settings --- */
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-6);
}

.settings-group {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
}

.settings-group h3 {
  font-size: var(--fs-base);
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: var(--sp-4);
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--color-border);
}

.setting-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--color-border-light);
}

.setting-item:last-child { border-bottom: none; }

.setting-label {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--color-text-primary);
}

.setting-value, .setting-desc {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  margin-top: 2px;
}

/* --- Toggle Switch --- */
.toggle-switch {
  position: relative;
  cursor: pointer;
}

.toggle-switch input { display: none; }

.toggle-track {
  display: block;
  width: 40px;
  height: 22px;
  background: var(--color-border);
  border-radius: 11px;
  transition: background var(--duration-fast);
  position: relative;
}

.toggle-track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform var(--duration-fast);
}

.toggle-switch input:checked + .toggle-track {
  background: var(--color-accent);
}

.toggle-switch input:checked + .toggle-track::after {
  transform: translateX(18px);
}

/* --- Responsive --- */
@media (max-width: 1200px) {
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
  .quick-actions { grid-template-columns: repeat(2, 1fr); }
  .billing-overview { grid-template-columns: 1fr 1fr; }
  .license-row { grid-template-columns: 160px 1fr 100px 100px; }
  .license-row .license-period, .license-row .license-status { display: none; }
}

@media (max-width: 900px) {
  .creator-layout { grid-template-columns: 1fr; }
  .creator-sidebar {
    position: static;
    height: auto;
    flex-direction: row;
    padding: var(--sp-2) var(--sp-3);
    overflow-x: auto;
  }
  .sidebar-nav {
    flex-direction: row;
    padding: 0;
  }
  .sidebar-item span:not(svg) { display: none; }
  .sidebar-membership { display: none; }
  .creator-main { padding: var(--sp-4); }
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
  .quick-actions { grid-template-columns: repeat(2, 1fr); }
  .bill-row { grid-template-columns: 90px 1fr 80px 80px; }
  .bill-row span:nth-child(3),
  .bill-row span:nth-child(4),
  .bill-row span:nth-child(7) { display: none; }
  .settings-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .quick-actions { grid-template-columns: 1fr 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   新增组件样式 — API 驱动版
   ============================================================ */

/* --- Sidebar Badge (通知未读数) --- */
.sidebar-badge {
  margin-left: auto;
  background: var(--color-warning, oklch(72% 0.16 85));
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
  line-height: 1.5;
}

/* --- Sidebar Logout --- */
.sidebar-logout {
  color: oklch(60% 0.2 25);
}
.sidebar-logout:hover {
  background: oklch(60% 0.2 25 / 0.08);
  color: oklch(55% 0.22 25);
}

/* --- Empty / Error / Loading States --- */
.state-empty,
.state-error,
.state-loading {
  text-align: center;
  padding: var(--sp-12) var(--sp-6);
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
}
.state-error {
  color: oklch(60% 0.2 25);
}
.state-error .retry-link {
  color: var(--color-accent);
  cursor: pointer;
  text-decoration: underline;
  margin-left: var(--sp-1);
}
.state-empty a {
  color: var(--color-accent);
}

/* --- Notifications List --- */
.notifications-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.notification-item {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--sp-4) var(--sp-5);
  cursor: pointer;
  transition: all var(--duration-fast);
  position: relative;
  display: flex;
  gap: var(--sp-3);
  align-items: flex-start;
}

.notification-item:hover {
  border-color: var(--color-text-muted);
  background: var(--color-bg-hover);
}

.notification-item.unread {
  border-left: 3px solid var(--color-accent);
}

.notification-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-accent);
  flex-shrink: 0;
  margin-top: 6px;
}

.notification-dot.read {
  background: transparent;
  border: 1px solid var(--color-border);
}

.notification-body {
  flex: 1;
  min-width: 0;
}

.notification-title {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: var(--sp-1);
}

.notification-content {
  font-size: var(--fs-xs);
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin-bottom: var(--sp-2);
}

.notification-time {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
}

.notification-type-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  font-size: 10px;
  font-weight: 700;
  margin-right: var(--sp-2);
  vertical-align: middle;
}

.notification-type-badge.order { background: oklch(70% 0.14 230 / 0.15); color: var(--color-digital); }
.notification-type-badge.license { background: oklch(65% 0.16 160 / 0.15); color: var(--color-success); }
.notification-type-badge.system { background: oklch(72% 0.16 85 / 0.15); color: var(--color-warning); }

/* --- Settings Form --- */
.settings-form {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.settings-form .form-group {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.settings-form .form-label {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.settings-form .form-input {
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg-input);
  color: var(--color-text-primary);
  font-size: var(--fs-sm);
  font-family: inherit;
  transition: border-color var(--duration-fast);
}

.settings-form .form-input:focus {
  border-color: var(--color-accent);
  outline: none;
  box-shadow: 0 0 0 3px var(--color-accent-subtle);
}

.settings-form .form-input[readonly] {
  opacity: 0.6;
  cursor: not-allowed;
}

.settings-actions {
  display: flex;
  gap: var(--sp-3);
  margin-top: var(--sp-2);
}

.settings-alert {
  font-size: var(--fs-xs);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius-md);
  margin-top: var(--sp-2);
}

.settings-alert.success {
  background: oklch(65% 0.16 160 / 0.1);
  color: var(--color-success);
}

.settings-alert.error {
  background: oklch(60% 0.2 25 / 0.1);
  color: oklch(60% 0.2 25);
}

/* --- Billing Summary --- */
.billing-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-4);
  margin-bottom: var(--sp-8);
}

.summary-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--sp-5);
}

.summary-label {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--sp-2);
}

.summary-value {
  font-size: var(--fs-2xl);
  font-weight: 700;
  color: var(--color-text-primary);
  font-family: 'DM Sans', monospace;
}

.summary-value.accent {
  color: var(--color-accent);
}

/* --- Order Card Status Badges --- */
.order-status-badge {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: 600;
  padding: 3px var(--sp-2);
  border-radius: var(--radius-sm);
  margin-right: var(--sp-1);
}

.order-status-badge.paid { background: oklch(65% 0.16 160 / 0.12); color: var(--color-success); }
.order-status-badge.unpaid { background: oklch(72% 0.16 85 / 0.12); color: var(--color-warning); }
.order-status-badge.refunded { background: oklch(60% 0.2 25 / 0.12); color: oklch(60% 0.2 25); }

/* --- Favorite Card with Remove --- */
.fav-card-remove {
  position: absolute;
  top: var(--sp-2);
  right: var(--sp-2);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: oklch(12% 0.01 80 / 0.6);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--duration-fast);
  z-index: 1;
}

.fav-actor-card:hover .fav-card-remove {
  opacity: 1;
}

/* --- Responsive for new components --- */
@media (max-width: 900px) {
  .billing-summary { grid-template-columns: 1fr; }
  .notification-item { flex-direction: column; }
}

@media (max-width: 1200px) {
  .billing-summary { grid-template-columns: repeat(2, 1fr); }
}
