/* 业务模块特定样式：卡片列表、音质标签、外链指示器、夸克面板等 */

.module-page {
  display: grid;
  gap: 20px;
}

/* Original media library visual system, shared verbatim by System A and B. */
.yg-media-library {
  display: block !important;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif;
}
.yg-media-library > header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 0 0 28px;
  padding: 0;
  border: 0;
  background: transparent;
}
.yg-media-library > header .eyebrow {
  margin: 0 0 7px;
  color: var(--blue);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
}
.yg-media-library > header h1 {
  margin: 0;
  color: var(--text);
  font-size: 32px;
  line-height: 1.15;
  letter-spacing: -0.04em;
}
.yg-media-library > header p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.yg-media-library .media-summary {
  display: grid;
  min-width: 158px;
  padding: 13px 16px;
  border: 1px solid rgba(20, 25, 45, 0.07);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(26, 35, 68, 0.055);
  text-align: right;
}
.yg-media-library .media-summary b {
  font-size: 22px;
  line-height: 1;
}
.yg-media-library .media-summary span,
.yg-media-library .media-summary small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}
.yg-media-library .album-overview {
  position: relative;
  margin-bottom: 26px;
  overflow: visible;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.yg-media-library .album-overview::before {
  display: none;
}
.yg-media-library .section-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
}
.yg-media-library .section-title h2 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
}
.yg-media-library .section-title p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
}
.yg-media-library .media-library-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}
.yg-media-library .library-search {
  display: flex;
  width: min(260px, 32vw);
  height: 34px;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 0 10px;
  border: 1px solid #dce1eb;
  border-radius: 10px;
  background: #fff;
  color: #8c93a2;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.yg-media-library .library-search input {
  width: 100%;
  height: 30px;
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 10px;
  box-shadow: none;
}
.yg-media-library .library-filter-button {
  width: auto !important;
  height: 34px !important;
  margin: 0 !important;
  padding: 0 13px !important;
  border: 1px solid #dce1eb !important;
  border-radius: 10px !important;
  background: #fff !important;
  color: #4b5565 !important;
  font-size: 10px !important;
  font-weight: 650 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}
.yg-media-library .library-filter-button.is-active {
  border-color: #c9ddff !important;
  background: #eef5ff !important;
  color: #1769c2 !important;
}
.yg-media-library .album-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 22px;
  overflow: visible;
  padding-bottom: 4px;
}
.yg-media-library .album-card.album-open {
  display: block;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  text-align: left;
  box-shadow: none;
  cursor: pointer;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.yg-media-library .album-card.album-open::after {
  display: none;
}
.yg-media-library .album-card.album-open:hover,
.yg-media-library .album-card.album-open.is-active {
  transform: translateY(-4px);
  box-shadow: none;
}
.yg-media-library .album-art {
  position: relative;
  display: grid !important;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  place-items: center;
  border: 2px solid transparent;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(145deg, #7899ff, #ad72e9);
  box-shadow:
    0 2px 3px rgba(15, 20, 35, 0.08),
    0 12px 25px rgba(29, 36, 65, 0.13);
  font-size: 40px;
  transition: border-color 0.3s, border-radius 0.3s, transform 0.35s, box-shadow 0.35s;
}
.yg-media-library .album-card:hover .album-art,
.yg-media-library .album-card.is-active .album-art {
  border-color: rgba(43, 127, 255, 0.46);
  border-radius: 22px;
  transform: scale(1.012);
  box-shadow:
    0 3px 6px rgba(15, 20, 35, 0.08),
    0 18px 32px rgba(29, 36, 65, 0.16);
}
.yg-media-library .album-art::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.32), transparent 35%, rgba(13, 9, 42, 0.22));
  content: "";
  pointer-events: none;
}
.yg-media-library .album-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s;
}
.yg-media-library .album-card:hover .album-art img {
  transform: scale(1.06);
}
.yg-media-library .album-art i {
  font-style: normal;
}
.yg-media-library .album-art em {
  position: absolute;
  z-index: 2;
  right: 9px;
  bottom: 9px;
  padding: 5px 8px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 16, 21, 0.52);
  font-size: 9px;
  font-style: normal;
  box-shadow: none;
}
.yg-media-library .album-copy {
  display: block !important;
  min-width: 0;
  padding: 12px 3px 0;
}
.yg-media-library .album-copy small,
.yg-media-library .album-copy b,
.yg-media-library .album-copy > span {
  display: block;
}
.yg-media-library .album-copy small {
  display: none;
}
.yg-media-library .album-copy b {
  margin: 0 0 4px;
  overflow: hidden;
  color: #18191d;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.yg-media-library .album-copy > span {
  overflow: hidden;
  color: #92959f;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.yg-media-library .album-empty {
  display: grid;
  min-height: 150px;
  place-items: center;
  border: 1px dashed #d2d2d7;
  border-radius: 18px;
  color: var(--muted);
}
.yg-media-library .library-section {
  margin-top: 34px;
}
.yg-media-library .track-list {
  display: grid;
  gap: 10px;
}
.yg-media-library .track-card.quality-card {
  display: flex;
  gap: 16px;
  padding: 18px;
  overflow: visible;
  border: 1px solid rgba(20, 25, 45, 0.07);
  border-radius: 22px;
  background: #fff;
  box-shadow:
    0 1px 2px rgba(15, 20, 40, 0.03),
    0 10px 34px rgba(26, 35, 68, 0.055);
}
.yg-media-library .track-cover {
  display: grid;
  flex: 0 0 62px;
  width: 62px;
  height: 62px;
  overflow: hidden;
  place-items: center;
  border-radius: 16px;
  color: var(--blue);
  background: linear-gradient(145deg, #eef1f7, #dfe5f1);
  font-size: 22px;
  box-shadow: none;
}
.yg-media-library .track-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.yg-media-library .track-main {
  min-width: 0;
  flex: 1;
}
.yg-media-library .track-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.yg-media-library .track-title > div:first-child {
  min-width: 0;
}
.yg-media-library .track-title h3 {
  max-width: 560px;
  margin: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.yg-media-library .track-title p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
}
.yg-media-library .album-pill {
  display: inline-flex;
  max-width: 280px;
  margin-bottom: 4px;
  padding: 2px 7px;
  overflow: hidden;
  border-radius: 999px;
  color: #5d55b2;
  background: #f0efff;
  font-size: 8px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.yg-media-library .track-actions {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid rgba(35, 42, 68, 0.07);
  border-radius: 13px;
  background: #f4f5f8;
}
.yg-media-library .track-actions button,
.yg-media-library .track-actions summary {
  display: inline-flex;
  width: auto !important;
  height: 34px !important;
  align-items: center;
  justify-content: center;
  margin: 0 !important;
  padding: 0 13px !important;
  border: 0 !important;
  border-radius: 10px !important;
  color: #525866 !important;
  background: transparent !important;
  font-size: 9px !important;
  font-weight: 650 !important;
  box-shadow: none !important;
  cursor: pointer;
  list-style: none;
  white-space: nowrap;
}
.yg-media-library .track-actions summary::-webkit-details-marker {
  display: none;
}
.yg-media-library .track-actions .play-track {
  color: #fff !important;
  background: #15161a !important;
  box-shadow: 0 5px 13px rgba(12, 13, 17, 0.17) !important;
}
.yg-media-library .track-actions .status-badge {
  margin: 0;
  white-space: nowrap;
}
.yg-media-library .track-cover-editor {
  position: relative;
}
.yg-media-library .track-cover-editor[open] summary {
  color: #1769c2 !important;
  background: #fff !important;
}
.yg-media-library .track-cover-editor form {
  position: absolute;
  z-index: 30;
  top: 42px;
  right: 0;
  display: grid;
  width: min(350px, calc(100vw - 64px));
  gap: 10px;
  margin: 0;
  padding: 14px;
  border: 1px solid #dce1eb;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(25, 31, 67, 0.16);
}
.yg-media-library .track-cover-editor label {
  margin: 0;
  color: #596273;
  font-size: 10px;
  font-weight: 650;
}
.yg-media-library .track-cover-editor input {
  width: 100%;
  height: 36px;
  margin: 6px 0 0;
  padding: 0 10px;
  border: 1px solid #dce1eb;
  border-radius: 9px;
  font-size: 10px;
}
.yg-media-library .track-cover-editor form button {
  color: #fff !important;
  background: #15161a !important;
}
.yg-media-library .asset-list {
  display: grid;
  gap: 1px;
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid rgba(30, 36, 60, 0.065);
  border-radius: 15px;
  background: #e9eaf0;
}
.yg-media-library .asset-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(210px, 1fr) auto auto minmax(230px, auto);
  align-items: center;
  gap: 14px;
  margin: 0;
  padding: 11px 12px;
  border-radius: 0;
  background: #fafafd;
}
.yg-media-library .asset-row + .asset-row {
  border-top: 1px solid rgba(30, 36, 60, 0.06);
}
.yg-media-library .asset-kind {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}
.yg-media-library .asset-kind > i {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  place-items: center;
  border-radius: 10px;
  color: #424a60;
  background: #eceef5;
  font-style: normal;
}
.yg-media-library .asset-kind > div {
  min-width: 0;
}
.yg-media-library .asset-kind b,
.yg-media-library .asset-kind small {
  display: block;
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.yg-media-library .asset-kind b {
  color: var(--text);
  font-size: 10px;
}
.yg-media-library .asset-kind b span {
  margin-left: 5px;
  color: #9196a6;
  font-size: 9px;
  font-weight: 500;
}
.yg-media-library .asset-kind small {
  margin-top: 2px;
  color: var(--tertiary);
  font-size: 8px;
}
.yg-media-library .asset-location {
  display: flex;
  align-items: center;
  gap: 5px;
}
.yg-media-library .asset-location span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 8px;
  font-weight: 650;
  white-space: nowrap;
}
.yg-media-library .asset-location span::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  content: "";
}
.yg-media-library .asset-location .local {
  color: #806213;
  border-color: #f1dfac;
  background: #fff9e9;
}
.yg-media-library .asset-location .local::before {
  background: #e9a91d;
  box-shadow: 0 0 0 3px rgba(233, 169, 29, 0.12);
}
.yg-media-library .asset-location .cloud {
  color: #1767a6;
  border-color: #cce6fa;
  background: #eff8ff;
}
.yg-media-library .asset-location .cloud::before {
  background: #268bea;
  box-shadow: 0 0 0 3px rgba(38, 139, 234, 0.12);
}
.yg-media-library .asset-location .quark {
  color: #136f9b;
  border-color: #bfe8f7;
  background: #edfbff;
}
.yg-media-library .asset-location .quark::before {
  background: #22a6d5;
}
.yg-media-library .asset-location .missing {
  color: #a43d46;
  background: #fff0f1;
}
.yg-media-library .asset-location .missing::before {
  background: #d6515e;
}
.yg-media-library .asset-status {
  min-width: 72px;
}
.yg-media-library .asset-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #737786;
  font-size: 8px;
  white-space: nowrap;
}
.yg-media-library .asset-status-badge i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #9ba1af;
}
.yg-media-library .asset-status-badge.success i {
  background: #25a268;
  box-shadow: 0 0 0 3px rgba(37, 162, 104, 0.1);
}
.yg-media-library .asset-status-badge.pending i,
.yg-media-library .asset-status-badge.processing i {
  background: #e9a91d;
  box-shadow: 0 0 0 3px rgba(233, 169, 29, 0.1);
  animation: ygMediaPulse 1.2s infinite;
}
.yg-media-library .asset-status-badge.failed {
  color: #b8323e;
}
.yg-media-library .asset-status-badge.failed i,
.yg-media-library .asset-status-badge.missing i {
  background: #d6515e;
}
.yg-media-library .asset-actions {
  display: flex;
  justify-content: flex-end;
  gap: 3px;
  padding: 3px;
  border-radius: 10px;
  background: #f0f1f5;
}
.yg-media-library .asset-actions form {
  margin: 0;
}
.yg-media-library .asset-actions button {
  width: auto !important;
  height: 27px !important;
  margin: 0 !important;
  padding: 0 8px !important;
  border: 0 !important;
  border-radius: 7px !important;
  color: #737786 !important;
  background: transparent !important;
  font-size: 8px !important;
  font-weight: 600 !important;
  box-shadow: none !important;
  white-space: nowrap;
}
.yg-media-library .asset-actions button:hover {
  color: #ba2c3b !important;
  background: #fff !important;
  box-shadow: 0 2px 7px rgba(26, 30, 49, 0.08) !important;
}
.yg-media-library .asset-actions .action-primary {
  color: #1769c2 !important;
}
.yg-media-library .asset-actions .action-danger {
  color: #b8323e !important;
}
.yg-media-library .asset-actions button:disabled {
  cursor: wait;
  opacity: 0.55;
}
.yg-media-library .no-assets {
  margin: 0;
  padding: 13px;
  color: var(--tertiary);
  background: #fafafd;
  font-size: 10px;
}
.yg-media-library .library-empty {
  padding: 46px;
  border: 1px dashed #d2d2d7;
  border-radius: 18px;
  text-align: center;
}
.yg-media-library .library-empty > div {
  color: var(--blue);
  font-size: 28px;
}
.yg-media-library .library-empty h3 {
  margin: 8px 0 2px;
}
.yg-media-library .library-empty p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
@keyframes ygMediaPulse {
  50% { opacity: 0.35; transform: scale(0.82); }
}
@media (max-width: 1050px) {
  .yg-media-library .asset-row {
    grid-template-columns: minmax(210px, 1fr) auto auto;
  }
  .yg-media-library .asset-actions {
    grid-column: 1 / -1;
    justify-self: end;
  }
}
@media (max-width: 800px) {
  .yg-media-library .album-grid {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }
  .yg-media-library .asset-row {
    grid-template-columns: 1fr auto;
  }
  .yg-media-library .asset-status {
    justify-self: end;
  }
  .yg-media-library .asset-actions {
    grid-column: 1 / 3;
  }
}
@media (max-width: 560px) {
  .yg-media-library > header,
  .yg-media-library .section-title {
    align-items: flex-start;
    flex-direction: column;
  }
  .yg-media-library > header h1 {
    font-size: 27px;
  }
  .yg-media-library .media-summary {
    width: 100%;
    text-align: left;
  }
  .yg-media-library .media-library-tools {
    width: 100%;
  }
  .yg-media-library .library-search {
    width: auto;
    flex: 1;
  }
  .yg-media-library .album-grid {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }
  .yg-media-library .album-art {
    border-radius: 14px;
  }
  .yg-media-library .track-card.quality-card {
    align-items: flex-start;
  }
  .yg-media-library .track-cover {
    flex-basis: 48px;
    width: 48px;
    height: 48px;
  }
  .yg-media-library .track-title {
    flex-direction: column;
  }
  .yg-media-library .track-actions {
    align-self: flex-start;
  }
  .yg-media-library .asset-row {
    grid-template-columns: 1fr;
  }
  .yg-media-library .asset-location,
  .yg-media-library .asset-status,
  .yg-media-library .asset-actions {
    grid-column: auto;
    justify-self: start;
  }
  .yg-media-library .asset-actions {
    max-width: 100%;
    flex-wrap: wrap;
  }
}
/* End shared original media library visual system. */


/* Unified song/resource library */
.media-asset-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}
.media-asset-row {
  display: grid;
  grid-template-columns: minmax(260px, 1.5fr) minmax(
      160px,
      0.75fr
    ) 110px minmax(260px, auto);
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
}
.media-asset-row:last-child {
  border-bottom: 0;
}
.media-asset-kind {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.media-asset-kind .media-file {
  min-width: 0;
}
.media-asset-kind .media-file strong,
.media-asset-kind .media-file small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.media-asset-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 7px;
}
.media-asset-actions form {
  margin: 0;
}
.media-asset-actions button {
  width: auto;
  min-height: 32px;
  padding: 0 10px;
  font-size: 10px;
}
.danger-outline {
  border: 1px solid #fecaca !important;
  background: #fff7f7 !important;
  color: #c24141 !important;
}
.asset-location .quark {
  background: #eef7ff;
  border: 1px solid #bfdbfe;
  color: #2563eb;
}
@media (max-width: 1050px) {
  .media-asset-row {
    grid-template-columns: minmax(220px, 1fr) 1fr;
  }
  .media-asset-state {
    justify-self: start;
  }
  .media-asset-actions {
    justify-content: flex-start;
  }
}
@media (max-width: 680px) {
  .media-asset-row {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px 16px;
  }
}

.track-grid,
.announcement-list,
.version-list,
.user-list {
  display: grid;
  gap: 12px;
}

.track-card,
.announcement-item,
.version-item,
.user-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  background: rgba(255, 255, 255, 0.75);
  transition: all 0.18s ease;
}

.track-card:hover,
.announcement-item:hover,
.version-item:hover,
.user-item:hover {
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
  transform: translateY(-1px);
}

.track-info h3,
.announcement-item h3,
.version-item h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
}

.track-info p,
.announcement-item p,
.version-item p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.05);
  color: var(--muted);
}

.meta-pill.pro {
  background: #eef2ff;
  color: #4f46e5;
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.meta-pill.link {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.meta-pill.quark {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.actions-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 按钮尺寸变种 */
button.mini,
.button.mini {
  padding: 6px 12px;
  font-size: 11px;
  border-radius: 8px;
}

/* 表格化展示 */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.data-table th,
.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.data-table th {
  color: var(--tertiary);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.05em;
}

.data-table tr:hover td {
  background: rgba(0, 0, 0, 0.015);
}

/* System A refreshed module surfaces */
.track-grid,
.announcement-list,
.version-list,
.user-list {
  gap: 10px;
}

.track-card,
.announcement-item,
.version-item,
.user-item {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.02);
}

.track-card:hover,
.announcement-item:hover,
.version-item:hover,
.user-item:hover {
  border-color: rgba(0, 113, 227, 0.16);
  box-shadow: var(--shadow-sm);
}

.announcement-item > div {
  min-width: 0;
}
.announcement-item > div > span {
  color: var(--blue);
  font-size: 10px;
  font-weight: 700;
}
.announcement-item p {
  overflow-wrap: anywhere;
}

.data-table {
  min-width: 680px;
}

.panel:has(> .data-table) {
  overflow-x: auto;
}

.data-table th {
  padding: 11px 14px;
  background: rgba(248, 250, 252, 0.8);
}

.data-table td {
  padding: 13px 14px;
}

.data-table td form {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
}

.data-table td form select,
.data-table td form input {
  width: auto;
  min-width: 92px;
  margin: 0;
  padding: 7px 9px;
}

.data-table td form button {
  padding: 7px 11px;
  font-size: 11px;
}

code {
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.04);
  color: #334155;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
}

/* SMTP configuration */
.smtp-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.smtp-summary-item {
  min-width: 0;
  padding: 17px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.025);
}

.smtp-summary-item span,
.smtp-summary-item b,
.smtp-summary-item small {
  display: block;
}

.smtp-summary-item span {
  margin-bottom: 7px;
  color: var(--tertiary);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.smtp-summary-item b {
  overflow: hidden;
  color: var(--text);
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.smtp-summary-item small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

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

.smtp-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  margin-top: 7px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(248, 250, 252, 0.82);
  cursor: pointer;
}

.smtp-toggle input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--blue);
}

.smtp-toggle span,
.smtp-toggle b,
.smtp-toggle small {
  display: block;
}

.smtp-toggle b {
  color: var(--text);
  font-size: 12.5px;
}

.smtp-toggle small {
  margin-top: 3px;
}

@media (max-width: 640px) {
  .smtp-summary {
    grid-template-columns: 1fr;
  }

  .smtp-form-grid .smtp-wide {
    grid-column: auto;
  }

  .track-card,
  .announcement-item,
  .version-item,
  .user-item {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
}

@media (min-width: 641px) and (max-width: 1180px) {
  .smtp-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* User management */
.user-management-page {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

.user-page-header h1 {
  margin: 0;
}

.user-page-header p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13.5px;
}

.user-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 22px 0 14px;
}

.user-stats > div {
  display: flex;
  min-width: 112px;
  min-height: 66px;
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
  gap: 3px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.68);
}

.user-stats span {
  color: var(--muted);
  font-size: 11.5px;
}
.user-stats strong {
  color: var(--text);
  font-size: 20px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.user-stats .pro {
  border-color: rgba(91, 94, 188, 0.16);
  background: #f7f7fc;
}
.user-stats .pro strong {
  color: #5458a6;
}
.user-stats em {
  margin-left: 4px;
  padding: 1px 5px;
  border-radius: 5px;
  background: #ececf8;
  color: #6265a9;
  font-size: 8px;
  font-style: normal;
  font-weight: 750;
  letter-spacing: 0.06em;
}

.user-table-card {
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 3px 14px rgba(15, 23, 42, 0.035);
}

.user-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 16px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.055);
  flex-wrap: wrap;
}

.user-search {
  display: flex;
  align-items: center;
  width: min(100%, 390px);
  height: 40px;
  border: 1px solid #dfe3e8;
  border-radius: 11px;
  background: #fff;
  transition:
    border-color 0.18s,
    box-shadow 0.18s;
}

.user-search:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.1);
}

.user-search svg {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  margin-left: 12px;
  color: var(--tertiary);
}
.user-search input {
  min-width: 0;
  height: 38px;
  margin: 0;
  padding: 0 12px 0 10px;
  border: 0;
  border-radius: 0 11px 11px 0;
  box-shadow: none;
  background: transparent;
}
.user-search input:focus {
  border: 0;
  box-shadow: none;
  background: transparent;
}

.user-filters {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}
.user-filters select {
  width: auto;
  min-width: 116px;
  height: 40px;
  margin: 0;
  padding: 0 30px 0 11px;
  border-color: #dfe3e8;
  font-size: 12px;
  white-space: nowrap;
}
.user-filters select:nth-of-type(3) {
  min-width: 142px;
}

.user-refresh {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 11px;
  border-radius: 9px;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
}

.user-refresh:hover {
  background: #f3f6f9;
  color: var(--blue);
}
.user-refresh svg {
  width: 16px;
  height: 16px;
}
.user-table-scroll {
  max-width: 100%;
  overflow-x: auto;
}

.data-table.user-table {
  min-width: 960px;
  table-layout: fixed;
  font-size: 13px;
}

.user-table th {
  height: 42px;
  padding: 0 18px;
  background: #f8f9fb;
  color: #737b87;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.02em;
  text-transform: none;
}

.user-table td {
  height: 62px;
  padding: 10px 18px;
  border-bottom-color: rgba(15, 23, 42, 0.045);
  vertical-align: middle;
}

.user-table tbody tr:last-child td {
  border-bottom: 0;
}
.user-table tbody tr:hover td {
  background: #f8fafc;
}
.user-table th:nth-child(1) {
  width: 150px;
}
.user-table th:nth-child(2) {
  width: 22%;
}
.user-table th:nth-child(3) {
  width: 110px;
}
.user-table th:nth-child(4) {
  width: 115px;
}
.user-table th:nth-child(5),
.user-table th:nth-child(6) {
  width: 165px;
}
.user-table th:last-child {
  width: 150px;
  text-align: right;
}
.user-table td:last-child {
  text-align: right;
}
.user-id {
  display: block;
  max-width: 150px;
  overflow: hidden;
  color: #263244;
  font-size: 13px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-id.pro-nickname {
  color: #b58a16;
}
.user-email {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-table time {
  color: #697386;
  font-size: 12px;
}

.user-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.user-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.user-status.active {
  border-color: #d8ecdd;
  background: #f2f9f4;
  color: #39754a;
}
.user-status.disabled {
  border-color: #ecdede;
  background: #faf4f4;
  color: #986060;
}
.user-type {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid #e4e7eb;
  border-radius: 7px;
  background: #f8f9fa;
  color: #697386;
  font-size: 10.5px;
  font-weight: 650;
  white-space: nowrap;
}
.user-type.pro {
  border-color: #dcdcf0;
  background: #f3f3fa;
  color: #575b9e;
  font-weight: 750;
  letter-spacing: 0.05em;
}
.pro-state {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  color: #575b9e;
  font-weight: 650;
}
.pro-state i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.user-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

.user-detail-link,
.user-more {
  padding: 7px 10px;
  border-radius: 8px;
  background: transparent;
  color: var(--blue);
  font-size: 12px;
  font-weight: 600;
}

.user-detail-link:hover,
.user-more:hover {
  background: #f0f6fc;
  box-shadow: none;
}
.user-more {
  width: 32px;
  padding: 5px;
  color: #7a8492;
  font-size: 16px;
  letter-spacing: 1px;
}

.user-empty {
  display: flex;
  min-height: 210px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 36px 20px;
  text-align: center;
}

.user-empty > svg {
  width: 42px;
  height: 42px;
  margin-bottom: 15px;
  color: #93a0b0;
}
.user-empty h2 {
  margin: 0;
  font-size: 15px;
}
.user-empty p {
  margin: 6px 0 18px;
  color: var(--muted);
  font-size: 12.5px;
}

.user-pagination {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  min-height: 62px;
  padding: 10px 16px;
  border-top: 1px solid rgba(15, 23, 42, 0.055);
  color: var(--muted);
  font-size: 12px;
}

.user-pagination nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.user-page-link {
  display: grid;
  place-items: center;
  min-width: 30px;
  height: 30px;
  padding: 0 7px;
  border-radius: 8px;
  color: #586273;
}
.user-page-link:hover {
  background: #f1f5f9;
}
.user-page-link.active {
  background: #eaf3fc;
  color: var(--blue);
  font-weight: 700;
}
.user-page-link.disabled {
  opacity: 0.32;
  pointer-events: none;
}
.user-page-link.arrow {
  font-size: 20px;
  font-weight: 400;
}
.user-page-gap {
  padding: 0 3px;
  color: var(--tertiary);
}
.user-page-size {
  justify-self: end;
}
.user-page-size label {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}
.user-page-size select {
  width: 66px;
  height: 32px;
  margin: 0;
  padding: 0 22px 0 9px;
  font-size: 12px;
}

.user-drawer-layer {
  position: fixed;
  z-index: 1200;
  inset: 0;
  visibility: hidden;
  pointer-events: none;
}
.user-drawer-layer.open {
  visibility: visible;
  pointer-events: auto;
}
.user-drawer-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border-radius: 0;
  background: rgba(15, 23, 42, 0.18);
  opacity: 0;
  transition: opacity 0.18s ease;
}
.user-drawer-backdrop:hover {
  background: rgba(15, 23, 42, 0.18);
  box-shadow: none;
}
.user-drawer-layer.open .user-drawer-backdrop {
  opacity: 1;
}
.user-drawer {
  position: absolute;
  top: 0;
  right: 0;
  width: min(460px, 100vw);
  height: 100%;
  overflow-y: auto;
  border-left: 1px solid rgba(15, 23, 42, 0.08);
  background: #fff;
  box-shadow: -12px 0 38px rgba(15, 23, 42, 0.09);
  transform: translateX(100%);
  transition: transform 0.2s ease;
}

.user-drawer-layer.open .user-drawer {
  transform: translateX(0);
}
.user-drawer > header {
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}
.user-drawer > header span {
  color: var(--muted);
  font-size: 12px;
}
.user-drawer > header h2 {
  margin: 3px 0 0;
  font-size: 19px;
}
.user-drawer-close {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 10px;
  background: #f4f6f8;
  color: #5c6675;
}
.user-drawer-close:hover {
  background: #e9edf1;
  box-shadow: none;
}
.user-drawer-close svg {
  width: 17px;
  height: 17px;
}
.user-drawer-body {
  padding: 8px 22px 28px;
}
.user-drawer-body section {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.user-drawer-body section:last-child {
  border-bottom: 0;
}
.user-drawer-body h3 {
  margin: 0 0 15px;
  color: #606a78;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.user-drawer dl {
  margin: 0;
}
.user-drawer dl > div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 16px;
  padding: 8px 0;
}
.user-drawer dt {
  color: var(--muted);
  font-size: 12px;
}
.user-drawer dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  color: #2f3948;
  font-size: 12.5px;
  text-align: right;
}
.user-security-row {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.user-security-row + .user-security-row {
  border-top: 1px solid rgba(15, 23, 42, 0.05);
}
.user-security-row span,
.user-security-row strong {
  display: block;
}
.user-security-row span {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 12px;
}
.user-security-row strong {
  color: #3f4957;
  font-size: 13px;
  letter-spacing: 0.08em;
}
.user-security-row strong.verified {
  color: #39754a;
  letter-spacing: 0;
}
.user-account-actions p {
  margin: -5px 0 16px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}
.user-account-actions form {
  margin: 0;
}
.user-account-actions form button {
  width: 100%;
}
.user-drawer-open {
  overflow: hidden;
}
.user-email-copy {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.user-email-copy > span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.user-email-copy button {
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: 6px;
  background: #f3f5f7;
  color: #687386;
  font-size: 10px;
}
.user-email-copy button:hover {
  background: #e9eef3;
  box-shadow: none;
}
.user-membership-actions,
.user-inline-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.user-membership-actions {
  margin-top: 16px;
}
.user-membership-actions button {
  flex: 1;
  padding: 9px 12px;
}
.user-inline-actions {
  justify-content: flex-end;
}
.pro-expired {
  color: #9a6767;
}
.user-account-actions > button,
.user-danger-zone > button {
  width: 100%;
}
.user-danger-zone p {
  margin: -5px 0 16px;
  color: var(--muted);
  font-size: 12px;
}
.user-danger-zone button.danger {
  border: 1px solid rgba(190, 55, 65, 0.18);
  background: #fff7f7;
}

.user-action-backdrop {
  position: fixed;
  z-index: 1500;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.22);
  opacity: 0;
  transition: opacity 0.18s ease;
}
.user-action-backdrop.open {
  opacity: 1;
}
.user-action-modal {
  width: min(100%, 430px);
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.16);
  transform: translateY(8px);
  transition: transform 0.18s ease;
}
.user-action-backdrop.open .user-action-modal {
  transform: none;
}
.user-action-modal > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}
.user-action-modal > header span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.user-action-modal > header h2 {
  margin: 3px 0 0;
  font-size: 18px;
}
.user-action-close {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 9px;
  background: #f3f5f7;
  color: #667085;
  font-size: 20px;
}
.user-action-close:hover {
  background: #e9edf2;
  box-shadow: none;
}
.user-action-modal form {
  margin: 0;
}
.user-action-user {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 20px;
  background: #f8f9fb;
  font-size: 12px;
}
.user-action-user span {
  color: var(--muted);
}
.user-action-user strong {
  overflow-wrap: anywhere;
  text-align: right;
}
.user-action-content {
  padding: 18px 20px 20px;
}
.user-action-content > p {
  margin: 0 0 14px;
  color: #596273;
  font-size: 12.5px;
  line-height: 1.65;
}
.user-action-content label {
  margin-top: 13px;
}
.user-action-content label:first-child {
  margin-top: 0;
}
.user-action-summary {
  margin: 18px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fafbfc;
}
.user-action-summary div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 0;
  font-size: 12px;
}
.user-action-summary dt {
  color: var(--muted);
}
.user-action-summary dd {
  margin: 0;
  font-weight: 600;
}
.user-action-warning {
  margin: 13px 0 0 !important;
  padding: 10px 12px;
  border-radius: 9px;
  background: #fff5f5;
  color: #98545a !important;
}
.user-action-modal footer {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
}
.user-action-modal footer button {
  min-width: 88px;
}

@media (max-width: 1100px) {
  .user-last-login {
    display: none;
  }
  .user-table th:nth-child(2) {
    width: 30%;
  }
  .user-pagination {
    grid-template-columns: 1fr auto;
  }
  .user-page-size {
    display: none;
  }
}

@media (max-width: 760px) {
  .user-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
  .user-search {
    width: 100%;
    max-width: none;
  }
  .user-filters {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }
  .user-filters select {
    min-width: 0;
    flex: 1;
  }
  .user-refresh span {
    display: none;
  }
  .user-stats {
    overflow-x: auto;
  }
  .user-stats > div {
    white-space: nowrap;
  }
  .user-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .data-table.user-table {
    min-width: 790px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .user-drawer,
  .user-drawer-backdrop,
  .user-action-backdrop,
  .user-action-modal {
    transition: none;
  }
}

/* System A media workspace */
.media-admin-page {
  display: grid;
  gap: 22px;
}
.media-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 5px 2px 2px;
}
.media-page-head h1 {
  margin: 5px 0 6px;
  font-size: clamp(28px, 3vw, 38px);
  letter-spacing: -0.035em;
}
.media-page-head p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.page-eyebrow {
  color: var(--blue);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.16em;
}
.media-page-refresh {
  flex: 0 0 auto;
  min-width: 98px;
}

.media-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
}
.media-overview > div {
  position: relative;
  min-height: 126px;
  overflow: hidden;
  padding: 19px 20px;
  border: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.045);
}
.media-overview > div::after {
  content: "";
  position: absolute;
  right: -24px;
  bottom: -34px;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: rgba(0, 113, 227, 0.055);
}
.media-overview span,
.media-overview small {
  display: block;
  color: var(--muted);
}
.media-overview span {
  font-size: 12px;
  font-weight: 650;
}
.media-overview strong {
  display: block;
  margin: 5px 0 1px;
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: -0.04em;
}
.media-overview small {
  font-size: 11px;
}
.media-overview .has-error strong {
  color: var(--red);
}
.media-overview .has-error::after {
  background: rgba(215, 0, 21, 0.055);
}

.media-albums {
  display: grid;
  gap: 14px;
}
.media-album-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(145px, 1fr));
  gap: 20px;
}
.media-album-card {
  min-width: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  text-align: left;
  box-shadow: none;
  cursor: pointer;
}
.media-album-card:hover,
.media-album-card.is-active {
  transform: translateY(-4px);
}
.media-album-art {
  position: relative;
  display: grid;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  place-items: center;
  border: 2px solid transparent;
  border-radius: 18px;
  background: linear-gradient(145deg, #7899ff, #ad72e9);
  color: #fff;
  font-size: 40px;
  box-shadow: 0 12px 25px rgba(29, 36, 65, 0.13);
  transition: border-color 0.2s, border-radius 0.3s, box-shadow 0.3s;
}
.media-album-card:hover .media-album-art,
.media-album-card.is-active .media-album-art {
  border-color: rgba(0, 113, 227, 0.5);
  border-radius: 22px;
  box-shadow: 0 18px 32px rgba(29, 36, 65, 0.18);
}
.media-album-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-album-art i {
  font-style: normal;
}
.media-album-art em {
  position: absolute;
  right: 9px;
  bottom: 9px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(15, 16, 21, 0.52);
  color: #fff;
  font-size: 9px;
  font-style: normal;
}
.media-album-copy {
  display: block;
  min-width: 0;
  padding: 12px 3px 0;
}
.media-album-copy small,
.media-album-copy b,
.media-album-copy > span {
  display: block;
}
.media-album-copy small {
  color: #8069eb;
  font-size: 8px;
  letter-spacing: 0.16em;
}
.media-album-copy b {
  margin: 3px 0 4px;
  overflow: hidden;
  color: #18191d;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.media-album-copy > span {
  color: var(--muted);
  font-size: 9px;
}
.media-album-reset {
  width: auto;
  margin: 0;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 11px;
  box-shadow: none;
}
.media-album-reset.is-active {
  border-color: #b9d9ff;
  background: #eaf4ff;
  color: var(--blue);
}
@media (max-width: 980px) {
  .media-album-grid {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }
}
@media (max-width: 560px) {
  .media-album-grid {
    gap: 13px;
  }
}

.media-create-panel {
  padding: 0;
  overflow: hidden;
}
.media-create-panel .panel-head {
  padding: 20px 22px 0;
  border: 0;
}
.media-create-panel .panel-head > div {
  display: flex;
  align-items: center;
  gap: 12px;
}
.media-create-panel .panel-head h2 {
  margin: 0 0 2px;
  font-size: 17px;
}
.media-create-panel .panel-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.media-panel-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 11px;
  background: #edf6ff;
  color: var(--blue);
  font-size: 21px;
  font-weight: 400;
}
.media-create-form {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr auto;
  gap: 12px;
  align-items: end;
  padding: 18px 22px 22px;
}
.media-create-form label,
.media-cover-form label,
.media-form-grid label {
  margin: 0;
  color: #596273;
  font-size: 11px;
  font-weight: 650;
}
.media-create-form input,
.media-cover-form input,
.media-form-grid input,
.media-form-grid select {
  margin-top: 7px;
}
.media-create-form button {
  min-height: 43px;
  white-space: nowrap;
}

.media-list-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding: 4px 2px 0;
}
.media-list-head h2 {
  margin: 0 0 3px;
  font-size: 19px;
}
.media-list-head p,
.media-list-head > span {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.media-list-head > span {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.045);
}
.media-track-list {
  display: grid;
  gap: 15px;
}
.media-track-card {
  padding: 0;
  overflow: hidden;
}
.media-track-head {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px 22px 15px;
}
.media-cover {
  display: grid;
  flex: 0 0 58px;
  width: 58px;
  height: 58px;
  overflow: hidden;
  place-items: center;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 15px;
  background: linear-gradient(145deg, #eef5fc, #e2eaf3);
  color: #56708d;
  font-size: 23px;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.75);
}
.media-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-track-copy {
  min-width: 0;
  flex: 1;
}
.media-track-title {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
}
.media-track-title h2 {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  font-size: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.media-track-title > span {
  flex: 0 0 auto;
  color: var(--tertiary);
  font-size: 10px;
  font-weight: 650;
}
.media-track-copy > p {
  margin: 4px 0 7px;
  color: var(--muted);
  font-size: 12px;
}
.media-track-copy > p i {
  margin: 0 7px;
  color: #c4c7cc;
  font-style: normal;
}
.media-track-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.media-track-meta span {
  padding: 3px 8px;
  border-radius: 999px;
  background: #f1f4f7;
  color: #667085;
  font-size: 10px;
}
.media-track-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 185px;
  gap: 12px;
  padding: 0 22px 18px;
}
.media-cover-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}
.media-cover-form label > span {
  display: block;
}
.media-cover-form button {
  min-height: 43px;
  white-space: nowrap;
}
.media-resource-create {
  position: relative;
  align-self: end;
}
.media-resource-create summary {
  display: flex;
  min-height: 43px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 12px;
  background: #eef6ff;
  color: var(--blue);
  cursor: pointer;
  list-style: none;
  font-size: 12px;
  font-weight: 650;
}
.media-resource-create summary::-webkit-details-marker {
  display: none;
}
.media-resource-create summary small {
  color: #7589a0;
  font-size: 9px;
  font-weight: 500;
}
.media-resource-create[open] summary {
  border-radius: 12px 12px 0 0;
}
.media-resource-create form {
  position: absolute;
  z-index: 20;
  top: 100%;
  right: 0;
  width: min(600px, calc(100vw - 72px));
  padding: 16px;
  border: 1px solid rgba(15, 23, 42, 0.09);
  border-radius: 16px 0 16px 16px;
  background: #fff;
  box-shadow: 0 22px 55px rgba(15, 23, 42, 0.14);
}
.media-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.media-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
}
.media-form-actions small {
  color: var(--muted);
  font-size: 10px;
}
.media-resource-table {
  overflow-x: auto;
  border-top: 1px solid var(--line);
}
.media-resource-table .data-table {
  margin: 0;
  min-width: 680px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.media-resource-table .data-table th {
  padding-top: 11px;
  padding-bottom: 11px;
  background: #fafbfc;
  color: #8a919e;
  font-size: 10px;
  letter-spacing: 0.04em;
}
.media-resource-table .data-table td {
  vertical-align: middle;
}
.media-kind {
  display: inline-flex;
  min-width: 42px;
  justify-content: center;
  padding: 5px 8px;
  border-radius: 8px;
  background: #edf4fb;
  color: #486783;
  font-size: 10px;
  font-weight: 700;
}
.media-kind-cover {
  background: #f5f0ff;
  color: #7156a0;
}
.media-kind-lyrics {
  background: #f0f6f3;
  color: #4f7560;
}
.media-file strong,
.media-file small {
  display: block;
  max-width: 430px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.media-file strong {
  color: #313a48;
  font-size: 12px;
}
.media-file small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}
.media-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #677180;
  font-size: 11px;
  white-space: nowrap;
}
.media-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #aeb4bd;
}
.media-status.success {
  color: #34744a;
}
.media-status.success i {
  background: #34a853;
  box-shadow: 0 0 0 3px rgba(52, 168, 83, 0.1);
}
.media-status.processing,
.media-status.pending {
  color: #756328;
}
.media-status.processing i,
.media-status.pending i {
  background: #d1a928;
  box-shadow: 0 0 0 3px rgba(209, 169, 40, 0.1);
}
.media-status.failed {
  color: #a94b57;
}
.media-status.failed i {
  background: #d95b69;
  box-shadow: 0 0 0 3px rgba(217, 91, 105, 0.1);
}
.media-sync-error {
  display: block;
  max-width: 180px;
  margin-top: 3px;
  overflow: hidden;
  color: #b16b73;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.media-sync-button {
  min-width: 82px;
  padding: 7px 10px;
  border-radius: 9px;
  font-size: 11px;
}
.media-empty-row {
  padding: 22px;
  text-align: center;
}
.media-empty-row b,
.media-empty-row span {
  display: block;
}
.media-empty-row b {
  font-size: 12px;
}
.media-empty-row span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}
.media-library-empty {
  padding: 54px 24px;
  text-align: center;
}
.media-library-empty > div {
  display: grid;
  width: 52px;
  height: 52px;
  margin: 0 auto 13px;
  place-items: center;
  border-radius: 16px;
  background: #eef4fa;
  color: #627b96;
  font-size: 22px;
}
.media-library-empty h2 {
  margin: 0 0 5px;
  font-size: 16px;
}
.media-library-empty p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.quark-admin-page {
  display: grid;
  gap: 22px;
}
.quark-cookie-panel form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
  padding: 0 22px 22px;
}
.quark-cookie-panel label {
  margin: 0;
  color: #596273;
  font-size: 11px;
  font-weight: 650;
}
.quark-cookie-panel textarea {
  margin-top: 7px;
  min-height: 76px;
  resize: vertical;
}
.quark-cookie-panel button {
  min-height: 43px;
  white-space: nowrap;
}
.quark-browser {
  padding: 0;
  overflow: hidden;
}
.quark-browser-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}
.quark-browser-head h2 {
  margin: 0 0 6px;
  font-size: 18px;
}
.quark-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
}
.quark-breadcrumb a {
  color: var(--blue);
  text-decoration: none;
}
.quark-directory-guide {
  display: grid;
  gap: 4px;
  margin: 16px 22px 0;
  padding: 13px 15px;
  border: 1px solid #dce9f5;
  border-radius: 13px;
  background: #f5f9fd;
}
.quark-directory-guide b {
  color: #3f5e7b;
  font-size: 11px;
}
.quark-directory-guide span {
  color: #718096;
  font-size: 10px;
}
.quark-selection-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 22px;
}
.quark-selection-bar label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #667085;
  font-size: 11px;
}
.quark-selection-bar input {
  width: 16px;
  height: 16px;
  margin: 0;
}
.quark-selection-bar button {
  width: auto;
  min-height: 38px;
}
.quark-progress-hint {
  flex: 1;
  color: #8491a3;
  font-size: 10px;
  text-align: right;
}
.quark-table-wrap {
  overflow-x: auto;
  border-top: 1px solid var(--line);
}
.quark-file-table {
  min-width: 720px;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.quark-file-table th:first-child,
.quark-file-table td:first-child {
  width: 48px;
  text-align: center;
}
.quark-file-table input[type="checkbox"] {
  width: 16px;
  height: 16px;
}
.quark-folder-row {
  cursor: pointer;
}
.quark-folder-row td {
  background: #fbfcfe;
}
.quark-file-name {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #303948;
  text-decoration: none;
}
.quark-file-name strong {
  display: block;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}
.quark-quality {
  display: grid;
  gap: 4px;
  min-width: 150px;
}
.quark-quality small {
  max-width: 250px;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.quality-badge {
  display: inline-flex;
  width: max-content;
  max-width: 180px;
  padding: 4px 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #f0f1f5;
  color: #666d7a;
  font-size: 9px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.quality-standard {
  color: #626b78;
  background: #f0f2f5;
}
.quality-high {
  color: #1767a6;
  background: #edf7ff;
}
.quality-lossless {
  color: #277044;
  background: #edf8f1;
}
.quality-hires {
  color: #7657ac;
  background: #f3efff;
}
.quality-spatial {
  color: #9a5d12;
  background: #fff5df;
}
.quality-master {
  color: #a13b55;
  background: #fff0f4;
}
.asset-location {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  min-width: 125px;
}
.asset-location span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 8px;
  font-weight: 650;
  white-space: nowrap;
}
.asset-location span::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  content: "";
}
.asset-location .local {
  color: #806213;
  border-color: #f1dfac;
  background: #fff9e9;
}
.asset-location .local::before {
  background: #e9a91d;
  box-shadow: 0 0 0 3px rgba(233, 169, 29, 0.12);
}
.asset-location .cloud {
  color: #1767a6;
  border-color: #cce6fa;
  background: #eff8ff;
}
.asset-location .cloud::before {
  background: #268bea;
  box-shadow: 0 0 0 3px rgba(38, 139, 234, 0.12);
}
.asset-location .syncing {
  color: #756328;
  border-color: #eee2b8;
  background: #fffae8;
}
.asset-location .syncing::before {
  background: #d1a928;
  box-shadow: 0 0 0 3px rgba(209, 169, 40, 0.1);
}
.asset-location .missing {
  color: #8a6470;
  background: #fff1f3;
}
.asset-location .missing::before {
  background: #cb7180;
}
.quark-file-icon {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  place-items: center;
  border-radius: 10px;
  background: #edf4fb;
  color: #52718f;
  font-style: normal;
}
.quark-file-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.quark-file-icon.folder {
  background: #fff3cf;
  color: #9b7417;
}
.quark-file-icon.lyrics {
  background: #eef7f1;
  color: #4f7560;
}
.quark-root-panel form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  padding: 0 22px 14px;
}
.quark-root-panel form label {
  margin: 0;
  color: #596273;
  font-size: 11px;
  font-weight: 650;
}
.quark-root-panel form input {
  margin-top: 7px;
}
.quark-cookie-health {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 22px 20px;
}
.quark-cookie-health span {
  padding: 5px 9px;
  border-radius: 999px;
  background: #f2f5f8;
  color: #697386;
  font-size: 10px;
}
.quark-row-action {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}
.quark-status-cell {
  min-width: 90px;
  white-space: nowrap;
}
.quark-operation-cell {
  width: 96px;
  text-align: right;
}
.quark-operation-cell button {
  width: auto;
  min-width: 78px;
  padding: 7px 11px;
  font-size: 11px;
}
.quark-row-action button {
  width: auto;
  min-width: 78px;
  padding: 7px 11px;
  font-size: 11px;
}
.quark-open-hint {
  color: #98a1ad;
  font-size: 10px;
}
.status-pill.is-online {
  color: var(--green);
  background: #eaf8ed;
}
.status-pill.is-warning {
  color: var(--orange);
  background: #fff3e8;
}

@media (max-width: 980px) {
  .media-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .media-create-form {
    grid-template-columns: 1fr 1fr;
  }
  .media-create-form button {
    width: 100%;
  }
  .media-track-tools {
    grid-template-columns: 1fr;
  }
  .media-resource-create form {
    left: 0;
    right: auto;
    border-radius: 0 16px 16px 16px;
  }
}
@media (max-width: 640px) {
  .media-page-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .media-page-refresh {
    width: 100%;
  }
  .media-overview {
    grid-template-columns: 1fr 1fr;
    gap: 9px;
  }
  .media-overview > div {
    min-height: 108px;
    padding: 16px;
  }
  .media-create-form,
  .media-form-grid {
    grid-template-columns: 1fr;
  }
  .media-track-head {
    align-items: flex-start;
    padding: 17px 16px 13px;
  }
  .media-track-tools {
    padding: 0 16px 16px;
  }
  .media-cover-form {
    grid-template-columns: 1fr;
  }
  .media-cover-form button {
    width: 100%;
  }
  .media-resource-create form {
    width: calc(100vw - 40px);
  }
  .quark-cookie-panel form {
    grid-template-columns: 1fr;
    padding: 0 16px 16px;
  }
  .quark-root-panel form {
    grid-template-columns: 1fr;
    padding: 0 16px 14px;
  }
  .quark-browser-head,
  .quark-selection-bar {
    align-items: flex-start;
    flex-direction: column;
    padding-left: 16px;
    padding-right: 16px;
  }
  .quark-selection-bar button {
    width: 100%;
  }
  .quark-progress-hint {
    text-align: left;
  }
  .quark-directory-guide {
    margin-left: 16px;
    margin-right: 16px;
  }
}
