/* admin/admin.css -- admin 专属样式（复用 /assets/style.css 的卡/工具栏/弹窗/按钮） */
/* .admin-user / .admin-email: layout/color from style.css .header-actions */

/* 卡片上的价格徽标 + 管理按钮 */
.card-price {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(15, 18, 24, 0.85);
  color: #ffd54f;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
}
.card-media { position: relative; }
.card-admin-actions {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

/* 表单 */
#card-form { display: flex; flex-direction: column; gap: 0.6rem; }
.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.form-row label,
.form-full {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.85rem;
  color: var(--muted, #9aa3b2);
}
.form-row label { flex: 1 1 120px; min-width: 110px; }
.form-full { width: 100%; }
#card-form input,
#card-form select,
#card-form textarea {
  background: var(--bg-input, #1a1f29);
  border: 1px solid var(--border, #2a3140);
  color: var(--text, #e6e9f0);
  border-radius: 6px;
  padding: 0.45rem 0.55rem;
  font-size: 0.95rem;
}
.form-preview {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.form-preview img { width: 60px; height: 84px; object-fit: cover; border-radius: 4px; }
.form-preview p { margin: 0; font-weight: 600; }
.form-hint { color: var(--muted, #9aa3b2); font-size: 0.82rem; margin: 0.25rem 0; }
.form-hint:empty { margin: 0; }

/* 批量/导入 */
.batch-text {
  width: 100%;
  background: var(--bg-input, #1a1f29);
  border: 1px solid var(--border, #2a3140);
  color: var(--text, #e6e9f0);
  border-radius: 6px;
  padding: 0.5rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85rem;
  resize: vertical;
  min-height: 12rem;
  box-sizing: border-box;
}
.format-help {
  background: var(--bg-input, #1a1f29);
  border: 1px solid var(--border, #2a3140);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
  color: var(--muted, #9aa3b2);
  white-space: pre-wrap;
  margin: 0.5rem 0;
  overflow-x: auto;
}

/* 批量弹窗：左输入 / 右字段规则（覆盖详情弹窗「左图右文」两列） */
#batch-modal .batch-panel {
  grid-template-columns: 1fr minmax(240px, 320px);
  width: min(960px, 100%);
}
#batch-modal .modal-content {
  min-width: 0;
}
#batch-modal .batch-side {
  padding: 1.25rem 1.1rem 1.5rem;
  border-left: 1px solid var(--border, #2a3140);
  background: #0a0d12;
  overflow: auto;
  min-width: 0;
}
#batch-modal .batch-side-title {
  margin: 0 0 0.45rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text, #e6e9f0);
}
#batch-modal .batch-side-title + .format-help {
  margin-top: 0.25rem;
}
#batch-modal .batch-side-title:not(:first-child) {
  margin-top: 0.85rem;
}
#batch-modal .batch-field-table {
  margin: 0.2rem 0 0.4rem;
}
#batch-modal .batch-side-note {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  line-height: 1.5;
}
#batch-modal .batch-side .format-help {
  margin: 0.25rem 0 0;
  font-size: 0.72rem;
  line-height: 1.45;
}
#batch-modal .batch-side .guide-table code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--accent-soft, rgba(100, 160, 255, 0.12));
  color: var(--accent, #7eb6ff);
  padding: 0.05rem 0.28rem;
  border-radius: 4px;
  font-size: 0.85em;
}

@media (max-width: 720px) {
  #batch-modal .batch-panel {
    grid-template-columns: 1fr;
  }
  #batch-modal .batch-side {
    border-left: 0;
    border-top: 1px solid var(--border, #2a3140);
    padding: 0.85rem 1rem calc(1rem + env(safe-area-inset-bottom, 0px));
  }
  #batch-modal .batch-text {
    min-height: 9rem;
  }
}

@media (max-width: 900px) and (orientation: landscape) and (max-height: 480px) {
  #batch-modal .batch-panel {
    grid-template-columns: 1fr minmax(200px, 280px);
  }
}

.modal-actions { display: flex; gap: 0.5rem; margin-top: 0.5rem; }

/* profile 警告条 */
#profile-warn {
  background: rgba(255, 180, 0, 0.12);
  border: 1px solid rgba(255, 180, 0, 0.4);
  color: #ffd54f;
  padding: 0.6rem 0.9rem;
  border-radius: 6px;
  margin-bottom: 0.75rem;
}

/* Admin has more header buttons — wrap cleanly on phones */
@media (max-width: 720px) {
  .header-actions.admin-user {
    max-width: 100%;
    justify-content: flex-end;
  }
}

@media (max-width: 520px) {
  .site-header .header-top {
    flex-direction: column;
    align-items: stretch;
  }
  .header-actions.admin-user {
    justify-content: flex-start;
    margin-top: 0.35rem;
  }
}
