/*
 * LinsGeek ERP —— Mercado Livre「买家提问」页面样式（配合 44-ml-questions.js）
 * 回滚：删除 44-ml-questions.css + 44-ml-questions.js。
 */
#lg-mlq {
  --q-brand: #0d7b6d; --q-bright: #13b8a6; --q-soft: #e7f2f0; --q-ink: #0f1a18; --q-muted: #6b7a77; --q-line: rgba(15, 35, 30, .08);
  --q-warn: #b7791f; --q-warn-bg: #fff7ea; --q-danger: #d64545; --q-danger-bg: #fdecec;
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: var(--q-ink); padding: 4px 0 40px; max-width: 1180px; min-width: 0;
}
#lg-mlq *, #lg-mlq *::before, #lg-mlq *::after { box-sizing: border-box; }
#lg-mlq svg { width: 16px; height: 16px; flex: 0 0 auto; }

/* ---------- 标题区 ---------- */
#lg-mlq .mlq-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
#lg-mlq .mlq-title h1 { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -.01em; }
#lg-mlq .mlq-title p { margin: 4px 0 0; color: var(--q-muted); font-size: 13.5px; }
#lg-mlq .mlq-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- 按钮 ---------- */
.mlq-btn {
  all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 38px; padding: 0 16px; border-radius: 999px; font-size: 14px; font-weight: 600; white-space: nowrap;
  font-family: inherit; transition: background .15s, color .15s, box-shadow .15s;
}
.mlq-btn svg { width: 16px; height: 16px; }
.mlq-btn.sm { height: 32px; padding: 0 13px; font-size: 13px; }
.mlq-btn.primary { background: #0d7b6d; color: #fff; box-shadow: 0 8px 18px -12px rgba(13,123,109,.7); }
.mlq-btn.primary:hover { background: #0a6257; }
.mlq-btn.ghost { background: #e7f2f0; color: #0d7b6d; }
.mlq-btn.ghost:hover { background: #d7ebe7; }
.mlq-btn.danger { background: #d64545; color: #fff; }
.mlq-btn.danger:hover { background: #bd3434; }
.mlq-btn:focus-visible, .mlq-link:focus-visible, .mlq-tab:focus-visible, .mlq-chip:focus-visible { outline: 2px solid #13b8a6; outline-offset: 2px; }
.mlq-btn[disabled] { opacity: .45; cursor: not-allowed; box-shadow: none; }
.mlq-btn.spin svg { animation: mlq-spin .8s linear infinite; }
@keyframes mlq-spin { to { transform: rotate(360deg); } }
.mlq-link { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; color: #0d7b6d; font-family: inherit; }
.mlq-link:hover { text-decoration: underline; }
.mlq-link.danger { color: #d64545; }
.mlq-link svg { width: 14px; height: 14px; }

/* ---------- 回复时效 ---------- */
#lg-mlq .mlq-rt {
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px 24px;
  padding: 16px 20px; margin-bottom: 14px; border-radius: 18px; color: #fff;
  background: linear-gradient(120deg, #0d7b6d 0%, #13b8a6 100%); box-shadow: 0 16px 34px -26px rgba(13,123,109,.8);
}
#lg-mlq .mlq-rt-main { display: flex; align-items: center; gap: 12px; }
#lg-mlq .mlq-rt-main svg { width: 34px; height: 34px; padding: 7px; border-radius: 12px; background: rgba(255,255,255,.16); }
#lg-mlq .mlq-rt-main small { display: block; font-size: 12.5px; opacity: .85; }
#lg-mlq .mlq-rt-main strong { font-size: 26px; font-weight: 700; line-height: 1.2; }
#lg-mlq .mlq-rt-segs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
#lg-mlq .mlq-rt-seg { padding: 8px 12px; border-radius: 12px; background: rgba(255,255,255,.12); min-width: 0; }
#lg-mlq .mlq-rt-seg small { display: block; font-size: 12px; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#lg-mlq .mlq-rt-seg b { font-size: 16px; }
#lg-mlq .mlq-rt-seg.slow b::after { content: ''; display: inline-block; width: 7px; height: 7px; margin-left: 6px; border-radius: 50%; background: #ffd27a; vertical-align: middle; }
#lg-mlq .mlq-rt-tip { grid-column: 1 / -1; font-size: 13px; padding: 7px 12px; border-radius: 10px; background: rgba(255,255,255,.14); }
#lg-mlq .mlq-rt-empty { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; font-size: 14px; }

/* ---------- 筛选与状态 ---------- */
#lg-mlq .mlq-panel { background: #fff; border: 1px solid var(--q-line); border-radius: 18px; padding: 14px 16px 6px; margin-bottom: 14px; }
#lg-mlq .mlq-bar { display: grid; grid-template-columns: minmax(150px, 220px) minmax(0, 1fr) minmax(120px, 160px); gap: 10px; }
#lg-mlq .mlq-field {
  display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; min-width: 0;
  border: 1px solid #dfe6e4; border-radius: 12px; background: #fff; color: var(--q-muted);
}
#lg-mlq .mlq-field:focus-within { border-color: #13b8a6; box-shadow: 0 0 0 3px rgba(19,184,166,.15); }
#lg-mlq .mlq-field select, #lg-mlq .mlq-field input {
  all: unset; flex: 1; min-width: 0; height: 100%; font-size: 14px; color: var(--q-ink); font-family: inherit;
}
#lg-mlq .mlq-field select { cursor: pointer; background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7a77' stroke-width='2'><path d='m6 9 6 6 6-6'/></svg>") right center / 16px no-repeat; padding-right: 20px; }
#lg-mlq .mlq-field input::placeholder { color: #9aa6a3; }
#lg-mlq .mlq-tabs { display: flex; gap: 4px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; }
#lg-mlq .mlq-tabs::-webkit-scrollbar { display: none; }
#lg-mlq .mlq-tab {
  all: unset; cursor: pointer; flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 14px; font-size: 14px; color: #4b5a57; border-bottom: 2px solid transparent; font-family: inherit; white-space: nowrap;
}
#lg-mlq .mlq-tab b { font-size: 12px; font-weight: 700; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #eef2f1; color: #4b5a57; display: inline-flex; align-items: center; justify-content: center; }
#lg-mlq .mlq-tab.urgent b { background: #fdecec; color: #d64545; }
#lg-mlq .mlq-tab.on { color: #0d7b6d; font-weight: 700; border-bottom-color: #0d7b6d; }
#lg-mlq .mlq-tab.on b { background: #0d7b6d; color: #fff; }

/* ---------- 批量操作 ---------- */
#lg-mlq .mlq-batch { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 12px; border-radius: 14px; background: #e7f2f0; font-size: 14px; font-weight: 600; color: #0d7b6d; }
#lg-mlq .mlq-batch > span { margin-right: auto; }
#lg-mlq .mlq-batch[hidden] { display: none; }

/* ---------- 提问卡片 ---------- */
#lg-mlq .mlq-list { display: flex; flex-direction: column; gap: 12px; transition: opacity .15s; }
#lg-mlq .mlq-list.busy { opacity: .55; pointer-events: none; }
#lg-mlq .mlq-card {
  background: #fff; border: 1px solid var(--q-line); border-radius: 18px; overflow: hidden;
  box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 10px 26px -22px rgba(13,123,109,.35);
}
#lg-mlq .mlq-card.is-new { border-left: 4px solid #13b8a6; }
#lg-mlq .mlq-card.is-sel { box-shadow: 0 0 0 2px #13b8a6; }
#lg-mlq .mlq-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: #f7faf9; border-bottom: 1px solid var(--q-line); }
#lg-mlq .mlq-check { display: inline-flex; padding: 4px; cursor: pointer; }
#lg-mlq .mlq-check input { width: 16px; height: 16px; accent-color: #0d7b6d; cursor: pointer; margin: 0; }
#lg-mlq .mlq-thumb { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; background: #fff; border: 1px solid var(--q-line); flex: 0 0 auto; }
#lg-mlq .mlq-thumb.ph { background: #e7f2f0; }
#lg-mlq .mlq-item-info { flex: 1 1 auto; min-width: 0; }
#lg-mlq .mlq-item-title { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#lg-mlq .mlq-item-meta { display: flex; flex-wrap: wrap; gap: 2px 12px; margin-top: 2px; font-size: 12.5px; color: var(--q-muted); }
#lg-mlq .mlq-item-tags { display: flex; gap: 6px; flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end; }
.mlq-tag { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.mlq-tag.st-unanswered { background: #fdecec; color: #d64545; }
.mlq-tag.st-answered { background: #e7f2f0; color: #0d7b6d; }
.mlq-tag.st-under_review { background: #fff7ea; color: #b7791f; }
.mlq-tag.st-closed_unanswered, .mlq-tag.st-deleted, .mlq-tag.st-disabled { background: #eef2f1; color: #6b7a77; }
.mlq-tag.st-banned { background: #2b3533; color: #fff; }
.mlq-tag.soft { background: #eef2f1; color: #4b5a57; font-weight: 600; }
.mlq-tag.soft.warn { background: #fff7ea; color: #b7791f; }

#lg-mlq .mlq-q { display: flex; gap: 12px; padding: 14px 16px 6px; }
#lg-mlq .mlq-avatar { width: 36px; height: 36px; flex: 0 0 auto; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: #0d7b6d; background: #e7f2f0; }
#lg-mlq .mlq-q-body { flex: 1 1 auto; min-width: 0; }
#lg-mlq .mlq-q-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; font-size: 13px; color: var(--q-muted); }
#lg-mlq .mlq-q-head b { color: var(--q-ink); font-size: 14px; }
#lg-mlq .mlq-sub { font-size: 12px; }
#lg-mlq .mlq-q-text { margin: 6px 0 0; font-size: 15px; line-height: 1.6; overflow-wrap: anywhere; }
#lg-mlq .mlq-q-text.muted { color: var(--q-muted); font-style: italic; font-size: 14px; }
#lg-mlq .mlq-old { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 4px 10px; border-radius: 8px; font-size: 12.5px; color: #b7791f; background: #fff7ea; }
#lg-mlq .mlq-answer { margin: 10px 0 4px; padding: 10px 14px; border-radius: 4px 14px 14px 14px; background: #f1f8f6; border: 1px solid #d7ebe7; }
#lg-mlq .mlq-answer-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 12.5px; color: var(--q-muted); }
#lg-mlq .mlq-answer-head b { color: #0d7b6d; }
#lg-mlq .mlq-answer p { margin: 4px 0 0; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }

/* 回答框 */
#lg-mlq .mlq-reply { margin: 6px 16px 4px 64px; }
#lg-mlq .mlq-tpl-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 8px; font-size: 12.5px; color: var(--q-muted); }
.mlq-chip { all: unset; cursor: pointer; padding: 4px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: #0d7b6d; background: #e7f2f0; font-family: inherit; }
.mlq-chip:hover { background: #d7ebe7; }
#lg-mlq .mlq-reply textarea {
  display: block; width: 100%; min-height: 96px; resize: vertical; padding: 12px 14px; border-radius: 14px;
  border: 1px solid #cfe5e2; font: inherit; font-size: 14px; line-height: 1.6; color: var(--q-ink); background: #fff; outline: none;
}
#lg-mlq .mlq-reply textarea:focus { border-color: #13b8a6; box-shadow: 0 0 0 3px rgba(19,184,166,.15); }
#lg-mlq .mlq-reply-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
#lg-mlq .mlq-warn { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: #b7791f; margin-right: auto; }
#lg-mlq .mlq-warn[hidden] { display: none; }
#lg-mlq .mlq-count { font-size: 12.5px; color: var(--q-muted); margin-left: auto; font-variant-numeric: tabular-nums; }
#lg-mlq .mlq-warn:not([hidden]) + .mlq-count { margin-left: 0; }
#lg-mlq .mlq-count.near { color: #d64545; font-weight: 700; }

#lg-mlq .mlq-actions { display: flex; align-items: center; gap: 8px 18px; flex-wrap: wrap; padding: 10px 16px 14px 64px; }
#lg-mlq .mlq-spacer { flex: 1; }

/* 空状态 / 分页 */
#lg-mlq .mlq-state { all: unset; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 48px 16px; width: 100%; text-align: center; color: var(--q-muted); font-size: 14px; background: #fff; border-radius: 18px; border: 1px dashed #cfe5e2; font-family: inherit; }
#lg-mlq .mlq-state b { color: var(--q-ink); font-size: 15px; }
#lg-mlq .mlq-state.err { cursor: pointer; color: #d64545; }
#lg-mlq .mlq-empty-ico svg { width: 36px; height: 36px; color: #13b8a6; }
#lg-mlq .mlq-pager { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 16px; font-size: 13.5px; color: var(--q-muted); }
#lg-mlq .mlq-pager > span { margin-right: auto; white-space: nowrap; }
#lg-mlq .mlq-pager b { color: var(--q-ink); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- 弹窗 / 提示 ---------- */
.mlq-modal { position: fixed; inset: 0; z-index: 3000; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(10, 30, 26, .45); font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif; }
.mlq-dialog { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: #fff; border-radius: 20px; padding: 20px; box-shadow: 0 30px 60px -20px rgba(0,0,0,.35); color: #0f1a18; }
.mlq-dialog.small { width: min(400px, 100%); }
.mlq-dialog-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.mlq-dialog-head h2 { margin: 0; font-size: 18px; }
.mlq-x { all: unset; cursor: pointer; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 22px; color: #6b7a77; }
.mlq-x:hover { background: #eef2f1; }
.mlq-confirm-text { margin: 4px 0 18px; font-size: 15px; line-height: 1.6; }
.mlq-dialog-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.mlq-tpl-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.mlq-tpl-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: #f7faf9; border: 1px solid rgba(15,35,30,.06); }
.mlq-tpl-item > div:first-child { flex: 1; min-width: 0; }
.mlq-tpl-item b { font-size: 14px; }
.mlq-tpl-item p { margin: 4px 0 0; font-size: 13px; color: #4b5a57; line-height: 1.5; overflow-wrap: anywhere; }
.mlq-tpl-ops { display: flex; gap: 12px; flex: 0 0 auto; }
.mlq-tpl-form { display: flex; flex-direction: column; gap: 8px; border-top: 1px dashed #cfe5e2; padding-top: 14px; }
.mlq-tpl-form input, .mlq-tpl-form textarea { font: inherit; font-size: 14px; padding: 10px 12px; border-radius: 12px; border: 1px solid #dfe6e4; outline: none; resize: vertical; color: #0f1a18; }
.mlq-tpl-form input:focus, .mlq-tpl-form textarea:focus { border-color: #13b8a6; box-shadow: 0 0 0 3px rgba(19,184,166,.15); }
.mlq-toast { position: fixed; left: 50%; top: 72px; z-index: 3100; transform: translateX(-50%); padding: 10px 18px; border-radius: 999px; background: #0d7b6d; color: #fff; font-size: 14px; font-weight: 600; box-shadow: 0 12px 30px -12px rgba(0,0,0,.4); max-width: calc(100vw - 32px); font-family: 'Noto Sans SC', sans-serif; transition: opacity .3s, transform .3s; }
.mlq-toast.bad { background: #d64545; }
.mlq-toast.out { opacity: 0; transform: translate(-50%, -8px); }

/* ---------- 菜单入口 ---------- */
aside [data-lg-mlq-menu] .lg-mlq-active { background: #e8f8f6 !important; color: #0d7b6d !important; }
.lg-mlq-badge { font-style: normal; margin-left: 8px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #d64545; color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; align-self: center; }
.lg-mlq-badge[hidden] { display: none; }
/* 本页时左侧「客户列表」等原菜单不应显示高亮 */
body.lg-mlq-on aside li:not([data-lg-mlq-menu]) .\!bg-\[\#E8F8F6\] { background: transparent !important; }

/* ---------- 平板 / 手机 ---------- */
@media (max-width: 1023px) {
  #lg-mlq .mlq-rt { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767px) {
  #lg-mlq { padding: 0 0 32px; }
  #lg-mlq .mlq-head { align-items: flex-start; }
  #lg-mlq .mlq-title h1 { font-size: 20px; }
  #lg-mlq .mlq-head-actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  #lg-mlq .mlq-rt { padding: 14px; border-radius: 16px; }
  #lg-mlq .mlq-rt-segs { grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
  #lg-mlq .mlq-rt-seg { padding: 6px 8px; }
  #lg-mlq .mlq-rt-seg small { font-size: 11px; white-space: normal; }
  #lg-mlq .mlq-panel { padding: 12px 12px 4px; border-radius: 16px; }
  #lg-mlq .mlq-bar { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  #lg-mlq .mlq-search { grid-column: 1 / -1; order: -1; }
  #lg-mlq .mlq-item { flex-wrap: wrap; padding: 10px 12px; gap: 8px 10px; }
  #lg-mlq .mlq-item-info { flex-basis: calc(100% - 110px); }
  #lg-mlq .mlq-item-title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  #lg-mlq .mlq-item-tags { width: 100%; justify-content: flex-start; padding-left: 34px; }
  #lg-mlq .mlq-q { padding: 12px 12px 4px; gap: 10px; }
  #lg-mlq .mlq-avatar { width: 30px; height: 30px; font-size: 11px; }
  #lg-mlq .mlq-reply { margin: 6px 12px 4px; }
  #lg-mlq .mlq-reply-foot .mlq-btn { flex: 1 1 0; }
  #lg-mlq .mlq-warn { width: 100%; }
  #lg-mlq .mlq-count { margin-left: auto; }
  #lg-mlq .mlq-actions { padding: 8px 12px 12px; gap: 8px 14px; }
  #lg-mlq .mlq-actions > .mlq-btn { flex: 1 1 100%; }
  #lg-mlq .mlq-pager { justify-content: center; flex-wrap: wrap; }
  #lg-mlq .mlq-pager > span { width: 100%; text-align: center; margin: 0; }
  .mlq-tpl-item { flex-direction: column; }
}
