/*
 * LinsGeek ERP —— Mercado Livre「纠纷」页面样式（配合 90-ml-claims.js）。全部用 #lg-mlc 作用域，不影响其他页面。
 * 电脑：左边列表、右边详情；手机：先看列表，点进去整屏看详情，可返回。
 * 回滚：删除 90-ml-claims.css + 90-ml-claims.js。
 */
#lg-mlc {
  --c-brand: #0d7b6d; --c-soft: #e7f2f0; --c-ink: #0f1a18; --c-muted: #6b7a77; --c-line: rgba(15, 35, 30, .08);
  --c-bad: #c53b3b; --c-bad-bg: #fdecec; --c-warn: #a86a12; --c-warn-bg: #fff4e0;
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: var(--c-ink); padding: 4px 0 24px; max-width: 1280px; min-width: 0;
}
#lg-mlc *, #lg-mlc *::before, #lg-mlc *::after { box-sizing: border-box; }
#lg-mlc svg { width: 16px; height: 16px; flex: 0 0 auto; }
#lg-mlc .mlc-head { margin-bottom: 12px; }
#lg-mlc .mlc-title h1 { margin: 0; font-size: 24px; font-weight: 700; }
#lg-mlc .mlc-title p { margin: 4px 0 0; color: var(--c-muted); font-size: 13.5px; max-width: 760px; }
#lg-mlc .mlc-affect { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; padding: 10px 14px; border-radius: 12px; background: var(--c-bad-bg); color: var(--c-bad); font-size: 13.5px; font-weight: 600; }
#lg-mlc .mlc-affect[hidden] { display: none; }

#lg-mlc .mlc-app {
  display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
  height: calc(100vh - 210px); min-height: 560px;
  background: #fff; border: 1px solid var(--c-line); border-radius: 20px; overflow: hidden;
  box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 18px 40px -32px rgba(13,123,109,.45);
}
#lg-mlc .mlc-side { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--c-line); background: #fbfcfc; }
#lg-mlc .mlc-filters { display: flex; flex-direction: column; gap: 8px; padding: 14px 14px 8px; }
#lg-mlc .mlc-field { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border: 1px solid #dfe6e4; border-radius: 12px; background: #fff; color: var(--c-muted); min-width: 0; }
#lg-mlc .mlc-field:focus-within { border-color: #13b8a6; box-shadow: 0 0 0 3px rgba(19,184,166,.15); }
#lg-mlc .mlc-field input, #lg-mlc .mlc-field select { all: unset; flex: 1; min-width: 0; height: 100%; font-size: 14px; color: var(--c-ink); font-family: inherit; }
/* select 用 all: unset 后文字会贴顶：用行高把它放到正中 */
#lg-mlc .mlc-field select { line-height: 36px; }
#lg-mlc .mlc-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-mlc .mlc-tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); padding: 0 6px; border-bottom: 1px solid var(--c-line); }
#lg-mlc .mlc-tab { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 3px; padding: 9px 2px 7px; font-size: 13px; line-height: 1.25; text-align: center; color: #4b5a57; border-bottom: 2px solid transparent; font-family: inherit; min-width: 0; overflow-wrap: anywhere; }
#lg-mlc .mlc-tab b { font-size: 11px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: #eef2f1; display: inline-flex; align-items: center; justify-content: center; }
#lg-mlc .mlc-tab.hot b { background: var(--c-bad-bg); color: var(--c-bad); }
#lg-mlc .mlc-tab.on { color: var(--c-brand); font-weight: 700; border-bottom-color: var(--c-brand); }
#lg-mlc .mlc-tab.on b { background: var(--c-brand); color: #fff; }
#lg-mlc .mlc-tab:focus-visible, #lg-mlc .mlc-row:focus-visible, #lg-mlc .mlc-link:focus-visible, #lg-mlc .mlc-back:focus-visible { outline: 2px solid #13b8a6; outline-offset: -2px; }

#lg-mlc .mlc-list { flex: 1; overflow-y: auto; padding: 6px; }
#lg-mlc .mlc-row { all: unset; box-sizing: border-box; cursor: pointer; display: flex; gap: 10px; width: 100%; padding: 10px; border-radius: 14px; font-family: inherit; transition: background .12s; }
#lg-mlc .mlc-row:hover { background: #f1f6f5; }
#lg-mlc .mlc-row.on { background: var(--c-soft); }
#lg-mlc .mlc-thumb { width: 44px; height: 44px; flex: 0 0 auto; border-radius: 10px; object-fit: cover; background: #eef2f1; border: 1px solid var(--c-line); }
#lg-mlc .mlc-thumb.ph { display: inline-flex; align-items: center; justify-content: center; color: #9aa8a5; }
#lg-mlc .mlc-thumb.ph svg { width: 20px; height: 20px; }
#lg-mlc .mlc-row-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
#lg-mlc .mlc-row-top { display: flex; align-items: baseline; gap: 8px; }
#lg-mlc .mlc-row-top b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
#lg-mlc .mlc-row-top time { font-size: 11.5px; color: var(--c-muted); white-space: nowrap; }
#lg-mlc .mlc-row-reason { font-size: 13px; color: #2c3836; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#lg-mlc .mlc-row-sub { font-size: 12px; color: var(--c-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#lg-mlc .mlc-pills { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
#lg-mlc .mlc-pill { font-style: normal; display: inline-flex; align-items: center; gap: 3px; height: 20px; padding: 0 8px; border-radius: 999px; background: #eef2f1; color: #4b5a57; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
#lg-mlc .mlc-pill svg { width: 12px; height: 12px; }
#lg-mlc .mlc-pill.warn { background: var(--c-warn-bg); color: var(--c-warn); }
#lg-mlc .mlc-pill.bad { background: var(--c-bad-bg); color: var(--c-bad); }
#lg-mlc .mlc-pill.dark { background: #2b3533; color: #fff; }
#lg-mlc .mlc-list-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 8px 6px; font-size: 12.5px; color: var(--c-muted); }
#lg-mlc .mlc-link { all: unset; cursor: pointer; color: var(--c-brand); font-weight: 600; font-size: 13px; }
#lg-mlc .mlc-link[disabled] { opacity: .5; cursor: default; }
#lg-mlc .mlc-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 40px 16px; text-align: center; color: var(--c-muted); font-size: 13.5px; }
#lg-mlc .mlc-empty b { color: #3d4a47; font-size: 14px; }
#lg-mlc .mlc-empty.big { height: 100%; justify-content: center; }
#lg-mlc .mlc-empty.big svg { width: 40px; height: 40px; color: #b7c4c1; }

/* ---------- 详情 ---------- */
#lg-mlc .mlc-detail { min-width: 0; min-height: 0; overflow-y: auto; padding: 18px 22px 28px; display: flex; flex-direction: column; gap: 14px; }
#lg-mlc .mlc-back { all: unset; display: none; cursor: pointer; align-items: center; gap: 4px; color: var(--c-brand); font-weight: 600; font-size: 13.5px; }
#lg-mlc .mlc-dhead { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
#lg-mlc .mlc-dhead h2 { margin: 0; font-size: 19px; font-weight: 700; }
#lg-mlc .mlc-dhead p { margin: 4px 0 0; color: var(--c-muted); font-size: 13px; }
#lg-mlc .mlc-ml { padding: 12px 14px; border-radius: 14px; background: #f3f7ff; border: 1px solid #dbe6ff; font-size: 13.5px; color: #24324f; }
#lg-mlc .mlc-ml p { margin: 4px 0 0; }
#lg-mlc .mlc-card { border: 1px solid var(--c-line); border-radius: 16px; padding: 14px 16px; background: #fff; }
#lg-mlc .mlc-card h3 { margin: 0 0 10px; font-size: 14.5px; font-weight: 700; }
#lg-mlc .mlc-card.now { border-color: #f2d7a7; background: #fffaf0; }
#lg-mlc .mlc-now-lead { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font-weight: 600; font-size: 13.5px; color: var(--c-warn); }
#lg-mlc .mlc-now-lead.bad { color: var(--c-bad); }
#lg-mlc .mlc-acts { margin: 0; padding-left: 20px; font-size: 13.5px; line-height: 1.9; }
#lg-mlc .mlc-next { margin: 10px 0 0; font-size: 12.5px; color: var(--c-muted); }
#lg-mlc .mlc-kvs { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px 18px; margin: 0; }
#lg-mlc .mlc-kv dt { font-size: 12px; color: var(--c-muted); }
#lg-mlc .mlc-kv dd { margin: 2px 0 0; font-size: 13.5px; word-break: break-word; }
#lg-mlc .mlc-muted { color: var(--c-muted); font-size: 13px; margin: 0; }
#lg-mlc .mlc-muted.small { font-size: 12px; margin-top: 10px; }
#lg-mlc .mlc-note { display: flex; align-items: flex-start; gap: 6px; margin: 0; padding: 10px 12px; border-radius: 12px; font-size: 13px; }
#lg-mlc .mlc-note.warn { background: var(--c-warn-bg); color: var(--c-warn); }
#lg-mlc .mlc-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
#lg-mlc .mlc-items li { display: flex; align-items: center; gap: 10px; }
#lg-mlc .mlc-items li > span:nth-child(2) { flex: 1; min-width: 0; display: flex; flex-direction: column; }
#lg-mlc .mlc-items b { font-size: 13.5px; font-weight: 600; }
#lg-mlc .mlc-items small { color: var(--c-muted); font-size: 12px; }
#lg-mlc .mlc-item-num { display: flex; flex-direction: column; align-items: flex-end; font-size: 13px; }
#lg-mlc .mlc-msgs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
#lg-mlc .mlc-msg { display: flex; flex-direction: column; max-width: 78%; }
#lg-mlc .mlc-msg.me { align-self: flex-end; align-items: flex-end; }
#lg-mlc .mlc-msg-meta { display: flex; gap: 6px; align-items: baseline; font-size: 12px; color: var(--c-muted); margin-bottom: 3px; }
#lg-mlc .mlc-msg-meta b { color: #3d4a47; }
#lg-mlc .mlc-bubble { padding: 9px 12px; border-radius: 14px; background: #f1f4f3; font-size: 13.5px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
#lg-mlc .mlc-msg.me .mlc-bubble { background: var(--c-soft); }
#lg-mlc .mlc-msg.ml .mlc-bubble { background: #f3f7ff; border: 1px solid #dbe6ff; }
#lg-mlc .mlc-files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
#lg-mlc .mlc-file { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 8px; background: #fff; border: 1px solid var(--c-line); font-size: 12px; }
#lg-mlc .mlc-blocked { display: flex; align-items: center; gap: 4px; margin-top: 6px; font-size: 12px; color: var(--c-bad); }

@media (max-width: 860px) {
  #lg-mlc .mlc-app { grid-template-columns: 1fr; height: auto; min-height: 0; }
  #lg-mlc .mlc-side { border-right: 0; max-height: none; }
  #lg-mlc .mlc-list { max-height: 70vh; }
  #lg-mlc .mlc-detail { display: none; }
  #lg-mlc.is-detail .mlc-side { display: none; }
  #lg-mlc.is-detail .mlc-detail { display: flex; padding: 14px; }
  #lg-mlc .mlc-back { display: inline-flex; }
  #lg-mlc .mlc-msg { max-width: 92%; }
}
@media (prefers-reduced-motion: reduce) { #lg-mlc .mlc-row { transition: none; } }

/* 左侧菜单「纠纷」：高亮和徽标（样式同 44 的买家提问，但类名独立，避免被 44 改写数量） */
aside [data-lg-mlc-menu] .lg-mlq-active { background: #e8f8f6 !important; color: #0d7b6d !important; }
.lg-mlc-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-mlc-badge[hidden] { display: none; }
