* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f3f5f8;
  color: #1f2937;
  font-family: Arial, "Microsoft YaHei", sans-serif;
  font-size: 14px;
}

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

button {
  border: 0;
  border-radius: 7px;
  background: #1f4f8f;
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  min-height: 36px;
  padding: 8px 14px;
}

button:hover {
  background: #173d70;
}

button.ghost {
  background: #eef1f5;
  color: #1f2937;
}

button.warning {
  background: #d97706;
}

button.danger {
  background: #dc2626;
}

button:disabled {
  background: #d1d5db;
  color: #6b7280;
  cursor: not-allowed;
}

input,
select,
textarea {
  background: #fff;
  border: 1px solid #ccd3dd;
  border-radius: 7px;
  color: #111827;
  min-height: 38px;
  padding: 8px 10px;
  width: 100%;
}

textarea {
  line-height: 1.55;
  resize: vertical;
}

label {
  color: #4b5563;
  display: grid;
  font-weight: 700;
  gap: 6px;
}

.login-page {
  align-items: center;
  display: flex;
  min-height: 100vh;
  justify-content: center;
}

.login-panel {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 28px;
  width: min(420px, calc(100vw - 32px));
}

.login-panel h1 {
  margin: 0 0 22px;
}

.form {
  display: grid;
  gap: 16px;
}

.topbar {
  align-items: center;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  padding: 16px 28px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar h1,
.topbar p {
  margin: 0;
}

.topbar h1 {
  color: #111827;
  font-size: 22px;
  line-height: 1.25;
}

.topbar p {
  color: #6b7280;
  font-size: 13px;
  margin-top: 4px;
}

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

.topbar-actions select {
  min-width: 120px;
}

.admin-layout {
  margin: 0 auto;
  max-width: 1280px;
  padding: 22px 28px 38px;
}

.split-layout {
  display: grid;
  gap: 18px;
  grid-template-columns: 220px minmax(0, 1fr);
}

.module-nav {
  align-self: start;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 10px;
  position: sticky;
  top: 18px;
}

.module-tab {
  background: transparent;
  border-radius: 6px;
  color: #374151;
  display: block;
  font-weight: 700;
  padding: 12px 14px;
  text-align: left;
  text-decoration: none;
}

.module-tab:hover {
  background: #eff6ff;
  color: #1d4ed8;
}

.module-tab.active {
  background: #2563eb;
  color: #fff;
}

.module-panel {
  display: none;
  min-width: 0;
}

.module-panel.active {
  display: block;
}

.section-title {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
}

.section-actions {
  align-items: center;
  display: flex;
  gap: 10px;
}

.section-actions select {
  min-width: 128px;
}

.section-title h2 {
  margin: 0;
}

.message {
  color: #2563eb;
  min-height: 20px;
}

.message[data-type="success"] {
  color: #166534;
}

.message[data-type="error"] {
  color: #dc2626;
}

.hidden {
  display: none !important;
}

.cloud-login-panel {
  background: #fff;
  border: 1px solid #dfe4ec;
  border-radius: 10px;
  box-shadow: 0 18px 48px rgba(17, 24, 39, 0.08);
  margin: 72px auto;
  max-width: 520px;
  padding: 30px;
}

.cloud-login-panel h2 {
  margin: 0 0 10px;
}

.cloud-login-panel p {
  color: #6b7280;
  line-height: 1.7;
  margin: 0 0 18px;
}

.cloud-login-form {
  display: flex;
  gap: 10px;
}

.cloud-login-form input {
  flex: 1;
}

.cloud-tabs {
  background: #fff;
  border: 1px solid #dfe4ec;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(17, 24, 39, 0.04);
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-bottom: 16px;
  padding: 10px;
}

.cloud-tabs button {
  background: transparent;
  border-radius: 8px;
  color: #374151;
  font-weight: 700;
  min-height: 42px;
}

.cloud-tabs button:hover,
.cloud-tabs button.active {
  background: #1f4f8f;
  color: #fff;
}

.admin-panel {
  display: none;
}

.admin-panel.active {
  display: block;
}

.panel-head {
  align-items: center;
  background: #fff;
  border: 1px solid #dfe4ec;
  border-radius: 10px;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 18px 20px;
}

.panel-head h2,
.panel-head p {
  margin: 0;
}

.panel-head h2 {
  color: #111827;
  font-size: 20px;
  line-height: 1.25;
}

.panel-head p {
  color: #6b7280;
  font-size: 13px;
  margin-top: 4px;
}

.panel-head select {
  max-width: 180px;
}

.import-panel {
  align-items: center;
  background: #fff;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 320px) auto;
  margin-top: 14px;
  padding: 16px;
}

.import-panel h3,
.import-panel p {
  margin: 0;
}

.import-panel h3 {
  color: #111827;
  font-size: 16px;
}

.import-panel p {
  color: #6b7280;
  font-size: 13px;
  margin-top: 4px;
}

.artist-head-actions {
  align-items: center;
  display: flex;
  gap: 10px;
}

.artist-stats-panel {
  background: #fff;
  border: 1px solid #dfe4ec;
  border-radius: 12px;
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
  padding: 16px;
}

.artist-summary-cards {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.artist-summary-card {
  background: #f8fafc;
  border: 1px solid #dfe4ec;
  border-radius: 10px;
  color: #0f172a;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  margin: 0;
  min-height: 72px;
  padding: 16px;
  text-align: left;
}

.artist-summary-card strong {
  color: #b7791f;
  font-size: 28px;
  line-height: 1;
}

.artist-summary-card.is-featured strong {
  color: #0f766e;
}

.artist-summary-card.is-on-duty strong {
  color: #15803d;
}

.artist-summary-card.is-not-on-duty strong {
  color: #c2410c;
}

.artist-summary-card.active {
  background: #fff7ed;
  border-color: #fb923c;
}

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

.mini-section-head {
  align-items: baseline;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 10px;
}

.mini-section-head span {
  color: #64748b;
  font-size: 12px;
}

.artist-type-list {
  display: grid;
  gap: 8px;
}

.artist-type-chip {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  color: #334155;
  cursor: pointer;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin: 0;
  padding: 10px 12px;
  text-align: left;
}

.artist-type-chip.active {
  background: #ecfeff;
  border-color: #22d3ee;
  color: #155e75;
}

.artist-type-chip span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.artist-type-chip strong {
  flex: 0 0 auto;
}

.compact-empty {
  padding: 12px;
}

.compact-search-input {
  min-width: 220px;
}

.artist-list {
  display: grid;
  gap: 16px;
}

.artist-manager-layout {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1fr);
}

.artist-form {
  margin-bottom: 4px;
}

.artist-card.is-hidden {
  opacity: 0.68;
}

.artist-state-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.artist-state {
  background: #f3f4f6;
  border-radius: 999px;
  color: #4b5563;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 9px;
}

.artist-media-preview {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.artist-media-preview .media-thumb-button {
  height: 96px;
  width: 96px;
}

.log-list {
  display: grid;
  gap: 12px;
}

.log-card {
  background: #fff;
  border: 1px solid #dfe4ec;
  border-radius: 10px;
  padding: 14px 16px;
}

.log-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.log-head strong {
  color: #111827;
}

.log-head span,
.log-meta {
  color: #6b7280;
  font-size: 13px;
}

.log-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.log-card pre {
  background: #f8fafc;
  border: 1px solid #edf0f4;
  border-radius: 8px;
  color: #374151;
  font-size: 12px;
  line-height: 1.55;
  margin: 12px 0 0;
  overflow-x: auto;
  padding: 10px;
}

.booking-list {
  display: grid;
  gap: 12px;
  margin-bottom: 28px;
}

.news-form {
  background: #fff;
  border: 1px solid #dfe4ec;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(17, 24, 39, 0.04);
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 16px;
  padding: 18px;
}

.news-form .wide,
.news-form .form-actions {
  grid-column: 1 / -1;
}

.case-manager-layout {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(340px, 430px) minmax(0, 1fr);
}

.case-form {
  align-self: start;
  background: #fff;
  border: 1px solid #dfe4ec;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(17, 24, 39, 0.04);
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 18px;
  position: sticky;
  top: 92px;
}

.case-form .wide {
  grid-column: 1 / -1;
}

.case-admin-list {
  display: grid;
  gap: 12px;
}

.case-admin-card {
  background: #fff;
  border: 1px solid #dfe4ec;
  border-radius: 10px;
  display: grid;
  gap: 14px;
  grid-template-columns: 180px minmax(0, 1fr);
  padding: 14px;
}

.media-thumb-button {
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  cursor: zoom-in;
  display: block;
  height: 120px;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  position: relative;
  width: 180px;
}

.media-thumb-button:hover {
  background: #eef1f5;
}

.case-admin-cover {
  background: #f3f4f6;
  border: 0;
  border-radius: 0;
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.case-admin-cover.is-empty,
.news-cover.is-empty {
  background: repeating-linear-gradient(135deg, #f3f4f6, #f3f4f6 10px, #e5e7eb 10px, #e5e7eb 20px);
}

.media-thumb-empty {
  color: #6b7280;
  display: none;
  font-size: 13px;
  font-weight: 700;
  inset: 0;
  place-items: center;
  position: absolute;
}

.case-admin-cover.is-empty + .media-thumb-empty,
.news-cover.is-empty + .media-thumb-empty {
  display: grid;
}

.case-admin-head {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.case-admin-head h3,
.case-admin-head p,
.case-admin-summary {
  margin: 0;
}

.case-admin-head h3 {
  color: #111827;
  font-size: 17px;
  line-height: 1.35;
}

.case-admin-head p,
.case-admin-summary {
  color: #4b5563;
  margin-top: 6px;
}

.case-admin-summary {
  line-height: 1.55;
}

.text-link {
  color: #2563eb;
  font-weight: 700;
  text-decoration: none;
}

.checkbox-label {
  align-content: end;
  display: flex;
  gap: 8px;
  min-height: 70px;
}

.checkbox-label input {
  width: auto;
}

.form-actions {
  display: flex;
  gap: 10px;
}

.news-admin-list {
  display: grid;
  gap: 12px;
}

.news-card {
  background: #fff;
  border: 1px solid #dfe4ec;
  border-radius: 10px;
  display: grid;
  gap: 14px;
  grid-template-columns: 160px minmax(0, 1fr);
  padding: 14px;
}

.news-card .media-thumb-button {
  height: 108px;
  width: 160px;
}

.news-cover {
  background: #f3f4f6;
  border: 0;
  border-radius: 0;
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.news-card h3 {
  margin: 0;
}

.news-card p {
  color: #4b5563;
  margin: 6px 0 0;
}

.news-meta {
  color: #6b7280;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
  margin-top: 8px;
}

.empty {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  color: #6b7280;
  padding: 32px;
  text-align: center;
}

.artist-card {
  background: #fff;
  border: 1px solid #dfe4ec;
  border-radius: 10px;
  padding: 16px;
}

.booking-card {
  background: #fff;
  border: 1px solid #dfe4ec;
  border-radius: 10px;
  padding: 16px;
}

.booking-card h3,
.booking-card p {
  margin: 0;
}

.booking-card p {
  color: #4b5563;
  margin-top: 6px;
}

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

.phone-text {
  color: #111827;
  font-weight: 700;
}

.link-button {
  background: transparent;
  color: #2563eb;
  font-size: 13px;
  padding: 0 0 0 8px;
}

.link-button:hover {
  background: transparent;
  color: #1d4ed8;
}

.status-badge {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  padding: 7px 10px;
  white-space: nowrap;
}

.status-pending {
  background: #fef3c7;
  color: #92400e;
}

.status-contacted {
  background: #dbeafe;
  color: #1d4ed8;
}

.status-closed {
  background: #e5e7eb;
  color: #4b5563;
}

.status-published {
  background: #dcfce7;
  color: #166534;
}

.status-draft {
  background: #fef3c7;
  color: #92400e;
}

.status-hidden {
  background: #e5e7eb;
  color: #4b5563;
}

.status-approved {
  background: #dcfce7;
  color: #166534;
}

.status-rejected {
  background: #fee2e2;
  color: #991b1b;
}

.status-request-card .bio:empty::before {
  color: #9ca3af;
  content: "暂无申请备注";
}

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

.artist-card h3 {
  margin: 0;
}

.artist-card p {
  color: #4b5563;
  margin: 6px 0 0;
}

.artist-card p span + span::before {
  content: " / ";
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 12px;
}

.actions button {
  min-height: 32px;
  padding: 7px 11px;
}

.info-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 18px 0 0;
}

.info-grid.compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 12px;
}

.info-grid div {
  min-width: 0;
}

.info-grid dt {
  color: #6b7280;
  font-size: 13px;
}

.info-grid dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
}

.bio {
  background: #f8fafc;
  border: 1px solid #edf0f4;
  border-radius: 8px;
  color: #4b5563;
  line-height: 1.6;
  padding: 12px;
}

.media-panel {
  border-top: 1px solid #e5e7eb;
  display: grid;
  gap: 14px;
  grid-template-columns: 140px 1fr;
  margin-top: 16px;
  padding-top: 16px;
}

.media-group {
  min-width: 0;
}

.video-group {
  grid-column: 1 / -1;
}

.media-title {
  color: #6b7280;
  font-size: 13px;
  margin-bottom: 8px;
}

.media-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.media-thumb {
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  display: block;
  height: 92px;
  overflow: hidden;
  width: 92px;
}

.avatar-thumb {
  height: 116px;
  width: 116px;
}

.media-thumb img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.media-video-link {
  color: #2563eb;
  display: block;
  overflow-wrap: anywhere;
}

.media-preview-modal {
  align-items: center;
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 24px;
  position: fixed;
  z-index: 100;
}

.media-preview-backdrop {
  background: rgba(15, 23, 42, 0.68);
  inset: 0;
  position: absolute;
}

.media-preview-dialog {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.32);
  max-height: calc(100vh - 48px);
  max-width: min(960px, calc(100vw - 48px));
  overflow: hidden;
  position: relative;
  width: 100%;
  z-index: 1;
}

.media-preview-head {
  align-items: center;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  padding: 14px 16px;
}

.media-preview-head h3 {
  font-size: 17px;
  margin: 0;
}

.media-preview-body {
  align-items: center;
  background: #0f172a;
  display: flex;
  justify-content: center;
  min-height: 360px;
  padding: 18px;
}

.media-preview-image {
  display: block;
  max-height: calc(100vh - 180px);
  max-width: 100%;
  object-fit: contain;
}

.media-preview-video {
  background: #000;
  display: block;
  max-height: calc(100vh - 180px);
  max-width: 100%;
  width: 100%;
}

.edit-panel {
  margin-top: 14px;
}

.edit-panel summary {
  cursor: pointer;
}

.edit-form {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 14px;
}

.edit-form .wide {
  grid-column: 1 / -1;
}

@media (max-width: 800px) {
  .topbar,
  .panel-head,
  .import-panel,
  .artist-card-header,
  .booking-head {
    align-items: stretch;
    flex-direction: column;
  }

  .artist-manager-layout {
    grid-template-columns: 1fr;
  }

  .artist-form {
    position: static;
  }

  .artist-summary-cards,
  .artist-type-columns {
    grid-template-columns: 1fr;
  }

  .topbar-actions,
  .artist-head-actions,
  .actions,
  .cloud-login-form {
    justify-content: flex-start;
  }

  .artist-head-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .cloud-login-form {
    flex-direction: column;
  }

  .info-grid,
  .edit-form,
  .news-form,
  .cloud-tabs,
  .case-manager-layout,
  .case-form,
  .case-admin-card,
  .news-card,
  .media-panel {
    grid-template-columns: 1fr;
  }

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

  .module-nav {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    position: static;
  }

  .news-cover {
    width: 100%;
  }

  .media-thumb-button,
  .news-card .media-thumb-button {
    width: 100%;
  }

  .module-tab {
    text-align: center;
  }

  .panel-head select {
    max-width: none;
  }

  .compact-search-input {
    min-width: 0;
    width: 100%;
  }

  .import-panel {
    grid-template-columns: 1fr;
  }
}
