/* ============================================================
   IM P3：售后工单（商家 / 用户 / 平台共用样式）
   前缀：imt- 商家，utk- 用户，atk- 平台
   ============================================================ */

/* ---------------- 通用 ---------------- */
.imt-page, .atk-card { color: var(--text-1, #e8e2d6); }
.imt-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 14px; }
.imt-head h2 { margin: 0 0 6px; font-size: 20px; letter-spacing: 1px; }
.imt-head p { margin: 0; font-size: 12px; color: var(--text-3, #8c8478); }
.imt-head-actions { display: flex; gap: 8px; }
.danger { color: #e0654f !important; }

/* ---------------- 商家 KPI ---------------- */
.imt-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin-bottom: 14px; }
.imt-kpi { background: rgba(255, 255, 255, .03); border: 1px solid var(--line, #2a2520); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.imt-kpi span { font-size: 11px; color: var(--text-3, #8c8478); }
.imt-kpi b { font-size: 22px; color: var(--gold-2, #c8a96a); font-weight: 600; }
.imt-kpi.danger b { color: #e0654f; }

/* ---------------- 商家卡片 / 筛选 ---------------- */
.imt-card { background: var(--bg-2, #17140f); border: 1px solid var(--line, #2a2520); border-radius: 12px; padding: 14px; }
.imt-tabs { display: flex; gap: 6px; flex-wrap: wrap; padding-bottom: 12px; border-bottom: 1px solid var(--line-soft, #241f19); margin-bottom: 12px; }
.imt-tab { background: transparent; border: 1px solid transparent; color: var(--text-2, #b6ad9d); border-radius: 14px; padding: 4px 12px; font-size: 12px; cursor: pointer; }
.imt-tab.active { background: rgba(200, 169, 106, .14); border-color: var(--gold-2, #c8a96a); color: var(--gold-2, #c8a96a); }
.imt-tab em { font-style: normal; margin-left: 4px; font-size: 10px; color: var(--gold-2, #c8a96a); }
.imt-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.imt-tools .input { max-width: 220px; }
.imt-check { font-size: 12px; color: var(--text-2, #b6ad9d); display: flex; align-items: center; gap: 6px; }
.imt-type { min-width: 130px; }
.imt-list { display: flex; flex-direction: column; gap: 8px; }
.imt-empty { text-align: center; padding: 50px 0; color: var(--text-3, #8c8478); font-size: 13px; }
.imt-row { display: flex; justify-content: space-between; gap: 14px; padding: 12px 14px; border: 1px solid var(--line-soft, #241f19); border-radius: 10px; cursor: pointer; transition: .15s; }
.imt-row:hover { border-color: var(--gold-2, #c8a96a); background: rgba(200, 169, 106, .04); }
.imt-row.overdue { border-left: 3px solid #e0654f; }
.imt-row-main { min-width: 0; flex: 1; }
.imt-row-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.imt-no { font-family: Consolas, monospace; font-size: 12px; color: var(--gold-2, #c8a96a); }
.imt-overdue-tag { font-size: 10px; color: #e0654f; border: 1px solid rgba(224, 101, 79, .5); border-radius: 8px; padding: 0 6px; }
.imt-row-title-text { font-size: 13.5px; font-weight: 600; margin-bottom: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.imt-row-meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11.5px; color: var(--text-3, #8c8478); }
.imt-row-side { text-align: right; font-size: 11px; white-space: nowrap; }
.imt-row-time { color: var(--text-3, #8c8478); margin-bottom: 6px; }
.imt-row-due { color: var(--text-2, #b6ad9d); }
.imt-pager { display: flex; justify-content: center; align-items: center; gap: 14px; padding-top: 14px; font-size: 12px; color: var(--text-3, #8c8478); }

/* ---------------- 商家详情 ---------------- */
.imt-detail-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.imt-detail-title { font-size: 16px; font-weight: 600; margin-bottom: 14px; }
.imt-info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; padding: 12px; border: 1px solid var(--line-soft, #241f19); border-radius: 10px; margin-bottom: 12px; }
.imt-info-grid label { display: block; font-size: 10.5px; color: var(--text-3, #8c8478); margin-bottom: 3px; }
.imt-info-grid span { font-size: 12.5px; color: var(--text-1, #e8e2d6); }
.imt-block { margin-bottom: 12px; }
.imt-block > label, .atk-block > label, .utk-block > label { display: block; font-size: 11px; color: var(--text-3, #8c8478); margin-bottom: 6px; }
.imt-block p, .atk-block p, .utk-block p { margin: 0; font-size: 12.5px; line-height: 1.7; color: var(--text-2, #b6ad9d); white-space: pre-wrap; }
.imt-imgs, .atk-imgs { display: flex; gap: 8px; flex-wrap: wrap; }
.imt-imgs img, .atk-imgs img { width: 84px; height: 84px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line, #2a2520); }
.imt-order { font-size: 12px; color: var(--text-2, #b6ad9d); background: rgba(255, 255, 255, .02); border-radius: 8px; padding: 10px 12px; }
.imt-order-item { font-size: 11.5px; color: var(--text-3, #8c8478); margin-top: 4px; }
.imt-timeline { position: relative; padding-left: 14px; border-left: 1px solid var(--line, #2a2520); }
.imt-log { position: relative; padding: 0 0 14px 10px; }
.imt-log-dot { position: absolute; left: -19px; top: 5px; width: 8px; height: 8px; border-radius: 50%; background: var(--gold-2, #c8a96a); }
.imt-log-head { display: flex; gap: 10px; align-items: baseline; font-size: 12px; }
.imt-log-head b { color: var(--gold-2, #c8a96a); font-weight: 600; }
.imt-log-head span { color: var(--text-2, #b6ad9d); }
.imt-log-head em { margin-left: auto; font-style: normal; font-size: 10.5px; color: var(--text-3, #8c8478); }
.imt-log-status { font-size: 11px; color: var(--text-3, #8c8478); margin-top: 3px; }
.imt-log-note { font-size: 12px; color: var(--text-2, #b6ad9d); margin-top: 4px; }
.imt-actions { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--line-soft, #241f19); }
.imt-field { margin-bottom: 12px; }
.imt-field label { display: block; font-size: 11.5px; color: var(--text-3, #8c8478); margin-bottom: 5px; }
.imt-field .input, .imt-field textarea { width: 100%; }
.imt-field-hint { font-size: 11px; color: var(--text-3, #8c8478); }

/* ---------------- 用户端 ---------------- */
.utk-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 10px 2px; }
.utk-tab { flex: 0 0 auto; border: 1px solid var(--line, #2a2520); background: transparent; color: var(--text-2, #b6ad9d); border-radius: 14px; padding: 5px 14px; font-size: 12px; }
.utk-tab.active { border-color: var(--gold-2, #c8a96a); color: var(--gold-2, #c8a96a); background: rgba(200, 169, 106, .1); }
.utk-card { margin-top: 10px; padding: 14px !important; }
.utk-card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.utk-no { font-family: Consolas, monospace; font-size: 11.5px; color: var(--gold-2, #c8a96a); }
.utk-title { font-size: 13.5px; font-weight: 600; margin-bottom: 8px; }
.utk-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 11px; color: var(--text-3, #8c8478); }
.utk-tip { margin-top: 8px; font-size: 11.5px; color: var(--gold-2, #c8a96a); }
.utk-form label, .utk-label { display: block; font-size: 12px; color: var(--text-3, #8c8478); margin: 10px 0 5px; }
.utk-form .input, .utk-form select, .utk-form textarea { width: 100%; box-sizing: border-box; }
.utk-check { display: flex !important; align-items: center; gap: 6px; font-size: 12px !important; }
.utk-submit { width: 100%; margin-top: 16px; }
.utk-thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.utk-thumbs img { width: 70px; height: 70px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line, #2a2520); }
.utk-info { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; padding: 12px; background: rgba(255, 255, 255, .02); border-radius: 10px; margin-bottom: 12px; }
.utk-info label { display: block; font-size: 10.5px; color: var(--text-3, #8c8478); margin-bottom: 2px; }
.utk-info span { font-size: 12px; }
.utk-block { margin-bottom: 12px; }
.utk-timeline { padding-left: 12px; border-left: 1px solid var(--line, #2a2520); }
.utk-log { padding-bottom: 10px; }
.utk-log b { font-size: 12px; color: var(--gold-2, #c8a96a); }
.utk-log span { font-size: 10.5px; color: var(--text-3, #8c8478); margin-left: 8px; }
.utk-log p { margin: 3px 0 0; font-size: 11.5px; color: var(--text-2, #b6ad9d); }
.utk-actions { display: flex; gap: 10px; margin-top: 14px; }
.utk-actions .btn { flex: 1; }
.utk-stars { display: flex; gap: 10px; font-size: 30px; color: #4a443b; cursor: pointer; }
.utk-stars span.on { color: var(--gold-2, #c8a96a); }

/* ---------------- 平台端 ---------------- */
.atk-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-bottom: 14px; }
.atk-kpi { background: #fff; border: 1px solid #e8e2d6; border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.atk-kpi span { font-size: 11px; color: #8c8478; }
.atk-kpi b { font-size: 22px; color: #b08d4f; }
.atk-kpi.danger b { color: #d23c3c; }
.atk-tools { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.atk-tools .input { max-width: 200px; }
.atk-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.atk-table th { text-align: left; font-size: 11px; color: #8c8478; font-weight: 500; padding: 8px 10px; border-bottom: 1px solid #ece6da; }
.atk-table td { padding: 10px; border-bottom: 1px solid #f2ede4; }
.atk-table tbody tr { cursor: pointer; }
.atk-table tbody tr:hover { background: #faf7f0; }
.atk-table tr.overdue td:first-child { box-shadow: inset 3px 0 0 #d23c3c; }
.atk-title-cell { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.atk-sub { font-size: 10.5px; color: #8c8478; }
.atk-tag { font-size: 10px; color: #d23c3c; border: 1px solid rgba(210, 60, 60, .4); border-radius: 6px; padding: 0 4px; }
.atk-pager { display: flex; justify-content: center; align-items: center; gap: 14px; padding-top: 14px; font-size: 12px; color: #8c8478; }
.atk-detail-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.atk-title-lg { font-size: 16px; font-weight: 600; margin-bottom: 12px; }
.atk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; padding: 12px; background: #faf7f0; border-radius: 10px; margin-bottom: 12px; }
.atk-grid label { display: block; font-size: 10.5px; color: #8c8478; margin-bottom: 3px; }
.atk-grid span { font-size: 12.5px; }
.atk-block { margin-bottom: 12px; }
.atk-timeline { display: flex; flex-direction: column; gap: 8px; }
.atk-log { display: flex; gap: 8px; font-size: 12px; }
.atk-log-dot { width: 7px; height: 7px; border-radius: 50%; background: #b08d4f; margin-top: 6px; flex: 0 0 auto; }
.atk-log em { font-style: normal; color: #8c8478; font-size: 10.5px; }
.atk-log-sub { font-size: 11px; color: #8c8478; margin-top: 2px; }
.atk-actions { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid #ece6da; }
.atk-form label { display: block; font-size: 12px; color: #8c8478; margin: 10px 0 5px; }
.atk-form .input, .atk-form textarea { width: 100%; box-sizing: border-box; }
