/* ============ 后台管理：与前台统一马卡龙新拟态 ============ */
.admin-stage {
  min-height: 100vh;
  display: flex;
  background: linear-gradient(135deg, var(--bg-1) 0%, var(--bg-2) 50%, var(--bg-3) 100%);
  background-attachment: fixed;
}

/* ---------- 侧栏（桌面/平板横向） ---------- */
.admin-side {
  flex: none;
  width: 232px;
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  position: sticky;
  top: 0;
  height: 100vh;
  background: rgba(255, 255, 255, 0.42);
  border-right: 1px solid rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 8px 0 30px rgba(255, 182, 193, 0.12);
  z-index: 20;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 14px;
}

.admin-brand .brand-logo {
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pink-soft), var(--blue));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 22px rgba(255, 182, 193, 0.36), inset 0 2px 0 rgba(255, 255, 255, 0.55);
}

.admin-brand h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.06em;
  background: linear-gradient(135deg, var(--indigo), var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
}

.admin-brand p {
  margin: 3px 0 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-nav button {
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-soft);
  border-radius: var(--r-md);
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 700;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  transition: var(--fast);
}

.admin-nav button .nav-ico {
  width: 20px;
  height: 20px;
  flex: none;
  opacity: 0.8;
}

.admin-nav button:hover {
  background: rgba(255, 255, 255, 0.55);
  color: var(--indigo);
}

.admin-nav button.active {
  color: #fff;
  background: linear-gradient(135deg, var(--pink-soft) 0%, var(--blue) 100%);
  box-shadow: 0 10px 22px rgba(255, 182, 193, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.admin-side-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px dashed rgba(148, 163, 184, 0.3);
}

/* ---------- 主区域 ---------- */
.admin-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.admin-head {
  position: sticky;
  top: 0;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 26px 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.2));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.6);
}

.admin-head-title h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--ink);
}

.admin-head-title p {
  margin: 4px 0 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.04em;
}

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

.admin-user {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-soft);
  padding: 8px 14px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 3px 3px 8px rgba(255, 182, 193, 0.18);
}

.admin-body {
  flex: 1;
  padding: 18px 26px 40px;
}

.admin-section {
  display: none;
  animation: sectionIn 0.35s ease-out;
}

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

@keyframes sectionIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.panel {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--r-xl);
  padding: 20px;
  box-shadow: 0 16px 40px rgba(255, 182, 193, 0.16), 0 16px 40px rgba(135, 206, 235, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  margin-bottom: 18px;
}

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

.panel-head h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: 0.03em;
}

.panel-head .panel-sub {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-top: 3px;
}

.panel-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ---------- 工具条 / 筛选 ---------- */
.filter-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
}

.filter-bar .q-field {
  margin: 0;
}

/* ---------- 表格 ---------- */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--r-md);
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
  min-width: 640px;
}

.data-table thead th {
  text-align: left;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--muted);
  padding: 4px 14px;
  white-space: nowrap;
}

.data-table tbody tr {
  background: linear-gradient(145deg, #ffffff, #f6f9fc);
  box-shadow: 3px 3px 8px rgba(255, 182, 193, 0.16), -3px -3px 8px rgba(135, 206, 235, 0.14);
}

.data-table tbody tr td {
  padding: 13px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  vertical-align: middle;
}

.data-table tbody tr td:first-child {
  border-radius: var(--r-md) 0 0 var(--r-md);
}

.data-table tbody tr td:last-child {
  border-radius: 0 var(--r-md) var(--r-md) 0;
  white-space: nowrap;
  text-align: right;
}

.data-table .cell-strong {
  color: var(--ink);
  font-weight: 800;
}

.data-table .cell-mono {
  font-family: var(--font-mono);
  font-size: 12px;
}

.person-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 800;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 2px 2px 6px rgba(255, 182, 193, 0.18);
}

.person-tag .q-dot {
  width: 7px;
  height: 7px;
}

.row-actions {
  display: inline-flex;
  gap: 6px;
  justify-content: flex-end;
}

/* ---------- 轨迹多选删除 ---------- */
.bulk-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 2px 10px;
}

.bulk-count {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.bulk-bar .bulk-del {
  margin-left: auto;
  min-height: 36px;
  padding: 0 16px;
}

.bulk-bar .bulk-del:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  box-shadow: none;
  filter: saturate(0.4);
}

/* 马卡龙风格复选框：40px 触控热区 + 18px 视觉方框 */
.row-check {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 36px;
  height: 36px;
  flex: none;
  cursor: pointer;
  border-radius: 12px;
  -webkit-tap-highlight-color: transparent;
}

.row-check.with-text {
  width: auto;
  padding: 0 10px 0 2px;
}

.row-check input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.rc-box {
  position: relative;
  width: 18px;
  height: 18px;
  flex: none;
  border-radius: 6px;
  background: #fff;
  border: 2px solid rgba(255, 143, 176, 0.55);
  box-shadow: inset 1px 2px 4px rgba(255, 182, 193, 0.22), 2px 2px 6px rgba(255, 182, 193, 0.14);
  transition: background 0.16s, border-color 0.16s, box-shadow 0.16s;
}

.rc-box::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 46%;
  width: 9px;
  height: 5px;
  border-left: 2.2px solid #fff;
  border-bottom: 2.2px solid #fff;
  transform: translate(-50%, -50%) rotate(-45deg) scale(0.7);
  opacity: 0;
  transition: opacity 0.16s, transform 0.16s;
}

.row-check input:checked + .rc-box {
  background: linear-gradient(145deg, #ffb8cb, #ff8fb0);
  border-color: #ff8fb0;
  box-shadow: 2px 3px 8px rgba(255, 143, 176, 0.4);
}

.row-check input:checked + .rc-box::after {
  opacity: 1;
  transform: translate(-50%, -50%) rotate(-45deg) scale(1);
}

.row-check input:indeterminate + .rc-box {
  background: linear-gradient(145deg, #ffe0ea, #ffd0de);
  border-color: #ffa9c1;
}

.row-check input:indeterminate + .rc-box::after {
  width: 8px;
  height: 2px;
  border: 0;
  background: #ff8fb0;
  border-radius: 2px;
  opacity: 1;
  transform: translate(-50%, -50%) rotate(0deg);
}

.row-check input:focus-visible + .rc-box {
  outline: 2px solid rgba(77, 159, 232, 0.45);
  outline-offset: 3px;
}

.rc-text {
  font-size: 12px;
  font-weight: 800;
  color: var(--ink-soft);
}

.traj-table .th-check,
.log-table .th-check {
  width: 52px;
  padding-left: 8px;
  padding-right: 0;
}

.traj-table .cell-check,
.log-table .cell-check {
  width: 52px;
  padding: 6px 0 6px 8px;
}

/* ---------- 刻度配置 ---------- */
.config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.config-tip {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.7;
  margin-top: 10px;
}

/* ---------- 响应式：平板 / 手机 ---------- */
@media (max-width: 1023px) {
  .admin-side {
    width: 200px;
    padding: 18px 12px;
  }
  .admin-head {
    padding: 16px 20px 14px;
  }
  .admin-body {
    padding: 14px 20px 32px;
  }
}

@media (max-width: 767px) {
  .admin-stage {
    flex-direction: column;
  }
  .admin-side {
    position: static;
    width: 100%;
    height: auto;
    padding: 12px 14px;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 8px 24px rgba(255, 182, 193, 0.12);
    overflow-x: auto;
    scrollbar-width: none;
  }
  .admin-side::-webkit-scrollbar {
    display: none;
  }
  .admin-brand {
    flex: none;
    padding: 0 6px 0 0;
  }
  .admin-brand h2 {
    font-size: 14px;
  }
  .admin-brand p {
    display: none;
  }
  .admin-brand .brand-logo {
    width: 34px;
    height: 34px;
  }
  .admin-nav {
    flex: 1;
    flex-direction: row;
    gap: 6px;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .admin-nav::-webkit-scrollbar {
    display: none;
  }
  .admin-nav button {
    white-space: nowrap;
    padding: 9px 13px;
    font-size: 12px;
    background: rgba(255, 255, 255, 0.55);
    border-radius: var(--r-pill);
    min-height: 38px;
    flex: none;
  }
  .admin-nav button .nav-ico {
    display: none;
  }
  .admin-side-foot {
    flex: none;
    margin: 0;
    padding: 0;
    border: none;
    flex-direction: row;
    gap: 6px;
  }
  .admin-side-foot .q-btn {
    min-height: 36px;
    padding: 7px 12px;
    font-size: 12px;
  }

  .admin-head {
    position: static;
    padding: 14px 16px 12px;
  }
  .admin-head-title h1 {
    font-size: 19px;
  }
  .admin-head-title p {
    font-size: 11px;
  }
  .admin-user {
    display: none;
  }

  .admin-body {
    padding: 12px 14px 30px;
  }

  .panel {
    padding: 16px 14px;
    border-radius: var(--r-lg);
  }

  .filter-bar {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .data-table {
    min-width: 0;
    border-spacing: 0 10px;
  }

  .data-table thead {
    display: none;
  }

  .data-table tbody tr {
    display: block;
    border-radius: var(--r-md);
    padding: 6px 0;
  }

  .data-table tbody tr td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 7px 14px;
    text-align: right;
    border-radius: 0 !important;
  }

  .data-table tbody tr td:first-child {
    padding-top: 11px;
    border-radius: var(--r-md) var(--r-md) 0 0 !important;
  }

  .data-table tbody tr td:last-child {
    padding-bottom: 12px;
    text-align: right;
    justify-content: flex-end;
    border-radius: 0 0 var(--r-md) var(--r-md) !important;
  }

  .data-table tbody tr td::before {
    content: attr(data-label);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: var(--muted);
    flex: none;
    text-align: left;
  }

  .table-wrap {
    overflow-x: visible;
  }

  /* 手机端：复选框放在卡片左上，触控热区 44px */
  .bulk-bar {
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 0 8px;
  }

  .row-check {
    width: 44px;
    height: 44px;
  }

  .row-check.with-text {
    width: auto;
    height: 40px;
    padding: 0 8px 0 0;
  }

  .traj-table .cell-check,
.log-table .cell-check {
    width: 100%;
    justify-content: flex-start;
    padding: 4px 14px 0 !important;
  }

  .traj-table .cell-check::before,
  .log-table .cell-check::before {
    display: none;
  }

  .bulk-bar .bulk-del {
    min-height: 40px;
    padding: 0 14px;
  }
}

@media (max-width: 479px) {
  .admin-side {
    padding: 10px 10px;
    flex-wrap: wrap;
    row-gap: 8px;
  }
  .admin-nav {
    order: 1;
    flex: 1 1 100%;
  }
  .admin-side-foot {
    order: 2;
    flex: 1 1 100%;
    justify-content: flex-end;
  }
  .admin-brand {
    display: none;
  }
  .admin-head {
    padding: 12px 12px 10px;
  }
  .admin-head-title h1 {
    font-size: 17px;
  }
  .panel-actions .q-btn {
    font-size: 12px;
    padding: 8px 12px;
    min-height: 38px;
  }
  .admin-body {
    padding: 10px 10px 28px;
  }
  .filter-bar {
    grid-template-columns: 1fr;
  }
  .config-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .admin-body {
    padding: 16px 22px 34px;
  }
  .panel {
    padding: 18px;
  }
}

/* 后台卡片动效（复用前台） */
@keyframes cardEntrance {
  from {
    opacity: 0;
    transform: translateY(26px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ---------- 轨迹表单：省份/城市联动 + 时间确认 ---------- */
.city-cascade {
  display: flex;
  gap: 8px;
}

.city-cascade .q-input {
  flex: 1;
  min-width: 0;
}

/* ---------- 自定义时间选择器（日历点选，确认按钮在面板内） ---------- */
.dt-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  text-align: left;
  font: inherit;
  color: var(--ink);
  background: #fff;
  cursor: pointer;
}

.dt-display-ico {
  flex: none;
  font-size: 15px;
}

.dt-panel {
  margin-top: 8px;
  padding: 10px 12px 12px;
  border: 1px solid #e6e8f0;
  border-radius: 12px;
  background: #fbfcff;
  animation: cardEntrance 0.18s ease;
}

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

.dt-head strong {
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
}

.dt-nav {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid #e6e8f0;
  background: #fff;
  color: #4a4f63;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.dt-nav:hover { background: #eef2ff; }

.dt-week,
.dt-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.dt-week { margin-bottom: 4px; }

.dt-week span {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: #9aa0b4;
}

.dt-day {
  height: 32px;
  border: 0;
  background: transparent;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #3c4152;
  cursor: pointer;
}

.dt-day:hover { background: #eef2ff; }

.dt-day.is-empty {
  visibility: hidden;
  pointer-events: none;
}

.dt-day.is-today { box-shadow: inset 0 0 0 1px #c9d4f0; }

.dt-day.is-sel {
  background: linear-gradient(135deg, #8fb4ff, #f4a9c4);
  color: #fff;
  font-weight: 800;
}

.dt-time {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
}

.dt-time-label {
  font-size: 12px;
  font-weight: 700;
  color: #7b8199;
}

.dt-sel {
  width: auto;
  min-width: 72px;
  flex: none;
  padding: 6px 8px;
}

.dt-colon {
  color: #7b8199;
  font-weight: 700;
}

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

.time-hint {
  margin-top: 7px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.time-hint.err {
  color: #e5484d;
}

/* ---------- 轨迹表单：交通方式 + 班次号同行（窄选择框，同行不溢出） ---------- */
.transport-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.transport-row .q-input {
  flex: 0 0 auto;
  width: 108px;
  min-width: 0;
}

.transport-row .voyage-input {
  flex: 1 1 0;
  width: auto;
  min-width: 0;
}
.q-hint {
  margin-top: 5px;
  font-size: 11px;
  color: var(--muted);
}

/* ---------- 影像素材上传 ---------- */
.media-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.media-pick {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 7px 14px;
  border-radius: 10px;
  border: 1px dashed rgba(102, 126, 234, 0.45);
  background: rgba(102, 126, 234, 0.06);
  color: var(--indigo, #5b6ee1);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}
.media-pick:hover {
  background: rgba(102, 126, 234, 0.12);
  border-color: rgba(102, 126, 234, 0.7);
}
.media-tip {
  font-size: 11px;
  color: var(--muted);
  flex: 1 1 200px;
  min-width: 0;
}
.media-list {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 8px;
}
.media-list.is-busy {
  opacity: 0.55;
  pointer-events: none;
}
.media-empty {
  grid-column: 1 / -1;
  padding: 10px 2px;
  font-size: 11px;
  color: var(--muted);
}
.media-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 6px;
  border-radius: 10px;
  border: 1px solid var(--line, #e6e8f0);
  background: #fff;
}
.media-thumb {
  position: relative;
  border-radius: 7px;
  overflow: hidden;
  background: rgba(102, 126, 234, 0.08);
}
.media-thumb img,
.media-thumb video {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}
.media-kind {
  position: absolute;
  left: 5px;
  bottom: 5px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(20, 24, 40, 0.62);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
}
.media-card .media-name {
  width: 100%;
  font-size: 11px;
  padding: 5px 7px;
}
.media-del {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: none;
  background: rgba(20, 24, 40, 0.55);
  color: #fff;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}
.media-del:hover { background: rgba(226, 84, 116, 0.9); }

.media-grip {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: none;
  background: rgba(20, 24, 40, 0.55);
  color: #fff;
  font-size: 9px;
  letter-spacing: -1px;
  line-height: 1;
  cursor: grab;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.media-grip:active { cursor: grabbing; }
.media-card.is-dragging { opacity: 0.45; transform: scale(0.96); }
.media-card.is-drop {
  outline: 2px dashed var(--indigo, #6b7dd8);
  outline-offset: -2px;
  background: rgba(107, 125, 216, 0.08);
}

/* 单张素材的隐私开关 */
.media-privbtn {
  width: 100%;
  margin-top: 4px;
  padding: 4px 6px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  background: rgba(255, 255, 255, 0.9);
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: var(--fast);
}
.media-privbtn:hover { color: #7b4fd8; border-color: rgba(155, 107, 240, 0.55); }
.media-privbtn.on {
  color: #7b4fd8;
  background: rgba(243, 233, 255, 0.95);
  border-color: rgba(155, 107, 240, 0.5);
}
.media-privbtn.is-busy { opacity: 0.6; cursor: default; }

/* 加密素材占位（不显示画面） */
.media-locked {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  height: 100%;
  min-height: 70px;
  background: linear-gradient(135deg, rgba(255, 228, 240, 0.9), rgba(226, 234, 255, 0.9));
  color: #7b4fd8;
  font-size: 11px;
  font-weight: 800;
}
.media-locked .media-lock-ico { font-size: 18px; line-height: 1; }
.media-card.is-priv .media-name { color: #7b4fd8; }

/* 隐私密码设置行 */
.privacy-row {
  display: flex;
  gap: 10px;
  align-items: center;
}
.privacy-row .q-input { flex: 1; }

/* ---------- 备注富文本编辑器 ---------- */
.rte {
  border: 1px solid var(--line, #e6e8f0);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}
.rte-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  padding: 5px 6px;
  background: linear-gradient(180deg, #f7f8fc, #eef0f7);
  border-bottom: 1px solid var(--line, #e6e8f0);
}
.rte-toolbar button {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: #4a4f63;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  padding: 5px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.rte-toolbar button:hover {
  background: #fff;
  border-color: #d8dcec;
}
.rte-toolbar button:active {
  background: #e6e9f5;
}
.rte-sep {
  width: 1px;
  height: 14px;
  background: #d8dcec;
  margin: 0 4px;
}
.rte-toolbar .rte-sel {
  height: 26px;
  padding: 0 4px;
  border: 1px solid #d8dcec;
  border-radius: 6px;
  background: #fff;
  color: #4a4f63;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.rte-color {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px 6px;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
}
.rte-color:hover {
  background: #fff;
  border-color: #d8dcec;
}
.rte-color input[type="color"] {
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.rte-color span {
  font-size: 12px;
  font-weight: 800;
  color: #4a4f63;
}
.rte-content {
  min-height: 120px;
  max-height: 280px;
  overflow-y: auto;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.6;
  color: #2a2d3a;
  outline: none;
}
.rte-content:empty::before {
  content: attr(data-placeholder);
  color: #b4b8c9;
  pointer-events: none;
}
.rte-content img {
  max-width: 100%;
  border-radius: 8px;
  display: block;
  margin: 6px 0;
}
.rte-content a {
  color: #4d9fe8;
  text-decoration: underline;
}
.rte-content h2 {
  font-size: 17px;
  font-weight: 800;
  margin: 8px 0 4px;
}
.rte-content h3 {
  font-size: 15px;
  font-weight: 800;
  margin: 6px 0 3px;
}
.rte-content blockquote {
  margin: 6px 0;
  padding: 3px 10px;
  border-left: 3px solid #d8dcec;
  color: #5b6072;
}
.rte-content ul,
.rte-content ol {
  margin: 6px 0;
  padding-left: 22px;
}
.rte-content hr {
  border: 0;
  border-top: 1px solid #e6e8f0;
  margin: 10px 0;
}

/* ============================================================
   音乐管理 / 访问限制
   ============================================================ */
.music-upload {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.music-upload .media-tip {
  flex: 1;
  min-width: 160px;
}

.music-table td {
  vertical-align: middle;
}

.music-table .music-cell-input {
  width: 100%;
  min-width: 120px;
  padding: 7px 10px;
  border-radius: 9px;
  border: 1px solid rgba(102, 126, 234, 0.16);
  background: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.music-table .music-cell-input:focus {
  outline: none;
  border-color: var(--pink-soft);
  box-shadow: 0 0 0 3px rgba(255, 182, 193, 0.25);
}

.music-table .music-lyric-state {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.music-table .music-lyric-state.has {
  color: var(--indigo);
}

.music-lyrics-input {
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.7;
  resize: vertical;
  min-height: 180px;
}

/* 开关 */
.switch-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.switch-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch-track {
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.35);
  position: relative;
  transition: background 0.2s ease;
}

.switch-dot {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(74, 85, 104, 0.25);
  transition: transform 0.2s ease;
}

.switch-row input:checked + .switch-track {
  background: linear-gradient(135deg, var(--pink), var(--indigo));
}

.switch-row input:checked + .switch-track .switch-dot {
  transform: translateX(20px);
}

.switch-text {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.access-add {
  display: flex;
  gap: 8px;
  align-items: center;
}

.access-add .q-input {
  flex: 1;
  max-width: 280px;
}

.access-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  min-height: 8px;
}

.access-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(102, 126, 234, 0.16);
  box-shadow: 2px 2px 5px rgba(255, 182, 193, 0.18);
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  font-family: var(--font-mono);
}

.access-chip button {
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  padding: 0;
}

.access-chip button:hover {
  color: #e05a7a;
}

.access-empty {
  font-size: 12px;
  color: var(--faint);
  font-weight: 600;
}