:root{
  --bg:#f4f7fb;
  --card:#ffffff;
  --text:#152033;
  --muted:#708097;
  --line:#e5ebf3;
  --primary:#2563eb;
  --primary2:#0ea5e9;
  --danger:#ef4444;
  --success:#16a34a;
  --shadow:0 18px 45px rgba(21,32,51,.08);
  --radius:18px;
}
*{box-sizing:border-box}
body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei",Arial,sans-serif;background:var(--bg);color:var(--text)}
a{text-decoration:none;color:inherit}
.sidebar{position:fixed;left:0;top:0;bottom:0;width:245px;background:#0f172a;color:#fff;padding:22px 18px;display:flex;flex-direction:column;z-index:10}
.brand{display:flex;gap:12px;align-items:center}
.brand-mark{width:42px;height:42px;border-radius:14px;background:linear-gradient(135deg,var(--primary),var(--primary2));display:grid;place-items:center;color:#fff;font-weight:900;box-shadow:0 12px 25px rgba(37,99,235,.35)}
.brand-title{font-size:18px;font-weight:800;letter-spacing:.3px}.brand-sub{font-size:12px;color:#9fb0cb;margin-top:3px}.nav{margin-top:36px;display:grid;gap:10px}.nav-link{padding:13px 14px;border-radius:14px;color:#dbeafe;background:rgba(255,255,255,.05);transition:.2s}.nav-link:hover{background:rgba(255,255,255,.12);transform:translateX(3px)}
.sidebar-footer{margin-top:auto;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.08);border-radius:16px;padding:14px}.who{font-weight:800;margin:4px 0 9px}.logout{display:block;margin-top:12px;color:#bfdbfe;font-size:13px}.main{margin-left:245px;min-height:100vh}.main-center{margin-left:0}.topbar{height:118px;padding:26px 34px;display:flex;align-items:center;justify-content:space-between;background:linear-gradient(135deg,#fff,#eef6ff);border-bottom:1px solid var(--line)}.topbar h1{margin:0;font-size:26px}.topbar p{margin:8px 0 0;color:var(--muted)}.content{padding:28px 34px}.token-card{background:#fff;border:1px solid var(--line);border-radius:14px;padding:12px 14px;box-shadow:var(--shadow);display:grid;gap:5px}.token-card span{font-size:12px;color:var(--muted)}code{font-family:ui-monospace,SFMono-Regular,Consolas,"Liberation Mono",monospace;background:#f1f5f9;border:1px solid #e2e8f0;border-radius:8px;padding:3px 7px;color:#0f172a}.big-code{font-size:15px;font-weight:700}.card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);padding:22px;margin-bottom:22px}.card h2{margin:0 0 16px;font-size:19px}.card-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}.card-head h2{margin:0}.subtle{background:linear-gradient(135deg,#fff,#f8fbff)}.grid{display:grid;gap:20px}.two{grid-template-columns:1fr 1fr}.stats{grid-template-columns:repeat(4,1fr);margin-bottom:22px}.stat{margin:0;padding:22px}.stat span{color:var(--muted)}.stat strong{display:block;font-size:34px;margin-top:10px}.form.stack{display:grid;gap:10px}.form label{font-size:13px;color:var(--muted);font-weight:700}.form input,.form select,.filters input,.filters select,.record-actions input,.employee-form input,.inline-password input{width:100%;border:1px solid var(--line);background:#fff;border-radius:12px;padding:12px 13px;outline:none;font-size:14px}.form input:focus,.form select:focus,.filters input:focus,.filters select:focus,.record-actions input:focus,.employee-form input:focus{border-color:#93c5fd;box-shadow:0 0 0 4px rgba(37,99,235,.12)}.btn{border:1px solid var(--line);background:#fff;color:var(--text);border-radius:12px;padding:10px 14px;font-weight:800;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:6px;transition:.18s;white-space:nowrap}.btn:hover{transform:translateY(-1px);box-shadow:0 10px 22px rgba(15,23,42,.08)}.btn.primary{background:linear-gradient(135deg,var(--primary),var(--primary2));border-color:transparent;color:#fff}.btn.danger{background:#fff1f2;color:#be123c;border-color:#fecdd3}.btn.full{width:100%}.btn.tiny{font-size:12px;padding:7px 9px;border-radius:9px}.table-wrap{overflow:auto;border:1px solid var(--line);border-radius:14px}table{width:100%;border-collapse:collapse;min-width:880px}th,td{padding:13px 12px;text-align:left;border-bottom:1px solid var(--line);font-size:14px;vertical-align:top}thead th{background:#f8fafc;color:#475569;font-size:13px;position:sticky;top:0}tbody tr:hover{background:#f8fbff}tbody tr:last-child td{border-bottom:0}.empty{text-align:center;color:var(--muted);padding:32px}.badge{display:inline-flex;align-items:center;border-radius:999px;padding:5px 9px;font-size:12px;font-weight:800}.role-admin{background:#fee2e2;color:#991b1b}.role-agent{background:#dbeafe;color:#1d4ed8}.role-support{background:#ede9fe;color:#6d28d9}.role-employee{background:#dcfce7;color:#166534}.status-submitted{background:#e0f2fe;color:#075985}.status-request_confirm{background:#fef3c7;color:#92400e}.status-done{background:#dcfce7;color:#166534}.status-failed{background:#fee2e2;color:#991b1b}.status-used{background:#ede9fe;color:#5b21b6}.status-closed{background:#e5e7eb;color:#374151}.actions,.record-actions{display:flex;gap:7px;flex-wrap:wrap}.record-actions{min-width:260px}.record-actions input{padding:8px 10px;min-width:180px}.inline-password{display:flex;gap:6px}.inline-password input{width:110px;padding:7px 8px;border-radius:9px}.filters{display:flex;gap:10px;align-items:center}.filters input{max-width:320px}.filters select{max-width:180px}.small{font-size:12px}.muted{color:var(--muted)}.center{text-align:center}.hint{font-size:13px;color:var(--muted);line-height:1.65}.warn{padding:12px;border-radius:12px;background:#fff7ed;color:#9a3412;border:1px solid #fed7aa}.flash-wrap{display:grid;gap:10px;margin-bottom:18px}.alert{border-radius:14px;padding:12px 14px;font-weight:700}.alert-success{background:#dcfce7;color:#166534;border:1px solid #bbf7d0}.alert-danger{background:#fee2e2;color:#991b1b;border:1px solid #fecaca}.login-shell{min-height:100vh;display:grid;place-items:center;background:radial-gradient(circle at 20% 20%,#dbeafe,transparent 30%),radial-gradient(circle at 80% 10%,#cffafe,transparent 26%),#f8fbff}.login-card{width:min(430px,92vw);background:#fff;border:1px solid var(--line);border-radius:26px;box-shadow:0 28px 80px rgba(15,23,42,.13);padding:34px}.login-brand{margin-bottom:26px}.employee-grid{align-items:stretch}.submit-card{background:linear-gradient(135deg,#fff,#eef6ff)}.employee-form{display:flex;gap:10px}.employee-form input{font-size:19px;padding:16px}.employee-form button{min-width:120px}.notice{margin-bottom:22px;background:linear-gradient(135deg,#fef3c7,#fffbeb);border:1px solid #fcd34d;border-radius:18px;padding:18px 20px;display:grid;gap:6px;color:#78350f}.notice strong{font-size:20px}.pulse{animation:pulse 1.6s infinite}@keyframes pulse{0%,100%{box-shadow:0 0 0 0 rgba(245,158,11,.24)}50%{box-shadow:0 0 0 8px rgba(245,158,11,0)}}.highlight{background:#fffbeb}.error-card{max-width:560px}.copyable{cursor:pointer;word-break:break-all}
@media (max-width: 980px){.sidebar{position:relative;width:100%;height:auto}.main{margin-left:0}.topbar{height:auto;align-items:flex-start;gap:16px;flex-direction:column}.stats,.two{grid-template-columns:1fr}.content{padding:18px}.filters,.employee-form{flex-direction:column;align-items:stretch}.token-card{width:100%}}
.top-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap;justify-content:flex-end}.card-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.live-notice{display:none;margin-bottom:18px;border:1px solid #fcd34d;background:linear-gradient(135deg,#fffbeb,#fff7ed);border-radius:18px;padding:14px 16px;color:#78350f;align-items:center;justify-content:space-between;gap:12px;box-shadow:0 16px 32px rgba(245,158,11,.13)}.live-notice.show{display:flex}.live-notice strong{display:block;font-size:16px}.live-notice span{display:block;margin-top:3px;font-size:14px}.live-notice.shake{animation:shake .6s ease both}@keyframes shake{0%,100%{transform:translateX(0)}20%{transform:translateX(-4px)}40%{transform:translateX(4px)}60%{transform:translateX(-3px)}80%{transform:translateX(3px)}}.admin-notice,.readonly-notice{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.readonly-notice{background:linear-gradient(135deg,#eef6ff,#fff);border-color:#bfdbfe;color:#1e3a8a}.feedback-form{display:grid;gap:8px;min-width:320px}.feedback-form textarea{width:100%;min-height:68px;resize:vertical;border:1px solid var(--line);background:#fff;border-radius:12px;padding:10px 12px;outline:none;font-size:14px;font-family:inherit}.feedback-form textarea:focus{border-color:#93c5fd;box-shadow:0 0 0 4px rgba(37,99,235,.12)}.feedback-buttons{display:flex;gap:8px;flex-wrap:wrap}.employee-form input[data-draft-key]{background:#fff}.record-actions.feedback-form{display:grid}.record-actions.feedback-form input{min-width:0}@media (max-width: 980px){.top-actions{width:100%;justify-content:stretch}.top-actions .btn,.top-actions .token-card{flex:1}.live-notice{align-items:flex-start;flex-direction:column}.card-actions{width:100%;justify-content:space-between}.feedback-form{min-width:260px}}

/* v1.2 员工反馈输入框：放到提交号码下面，尺寸加大 */
.employee-feedback-panel{margin-top:16px;border:1px solid #bfdbfe;background:linear-gradient(135deg,#fff,#f8fbff);border-radius:16px;padding:16px}
.employee-feedback-panel h3{margin:0 0 12px;font-size:18px}
.employee-feedback-main{display:grid;gap:10px}
.employee-feedback-main label{font-size:13px;color:var(--muted);font-weight:800}
.employee-feedback-main select,.employee-feedback-main textarea{width:100%;border:1px solid var(--line);background:#fff;border-radius:12px;padding:12px 13px;outline:none;font-size:15px;font-family:inherit}
.employee-feedback-main textarea{min-height:120px;resize:vertical;line-height:1.6}
.employee-feedback-main select:focus,.employee-feedback-main textarea:focus{border-color:#93c5fd;box-shadow:0 0 0 4px rgba(37,99,235,.12)}
.sound-hint{font-size:12px;color:#92400e}

/* v1.3 员工反馈：和提交号码一样的长输入框 + 一个提交按钮，去掉工单选择文字 */
.employee-feedback-panel{margin-top:18px;border:0;background:transparent;border-radius:0;padding:0}
.employee-feedback-panel h2{margin:0 0 12px;font-size:19px}
.employee-feedback-form{display:flex;gap:10px;width:100%}
.employee-feedback-form input:not([type="hidden"]){flex:1;font-size:19px;padding:16px;min-height:60px}
.employee-feedback-form button{min-width:120px}
.sound-toggle.primary{color:#fff;border-color:transparent;background:linear-gradient(135deg,var(--success),#22c55e)}
@media (max-width: 980px){.employee-feedback-form{flex-direction:column;align-items:stretch}}

/* v1.4 员工工作台：双栏手机号/验证码 + 操作日志 */
.employee-console-card{max-width:1180px;margin-left:auto;margin-right:auto;padding:28px 30px}
.employee-console-grid{display:grid;grid-template-columns:1fr 1fr;gap:28px;align-items:start}
.employee-field-group{display:grid;grid-template-columns:74px 1fr;grid-template-rows:auto auto;column-gap:14px;row-gap:14px;align-items:start}
.employee-field-group>label{grid-column:1;grid-row:1;color:#475569;font-size:18px;font-weight:800;padding-top:14px;text-align:right;white-space:nowrap}
.employee-big-textarea{grid-column:2;grid-row:1;width:100%;min-height:305px;resize:vertical;border:1px solid var(--line);border-radius:12px;background:#fff;padding:16px 18px;font:17px/1.8 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;outline:none;color:var(--text);box-sizing:border-box}
.employee-big-textarea:focus{border-color:#93c5fd;box-shadow:0 0 0 4px rgba(37,99,235,.12)}
.employee-upload-btn{grid-column:1 / span 2;grid-row:2;min-height:50px;font-size:17px;border-radius:8px}
.employee-log-row{display:grid;grid-template-columns:74px 1fr;gap:14px;align-items:start;margin-top:28px}
.employee-log-row>label{color:#475569;font-size:18px;font-weight:800;padding-top:10px;text-align:right}
.employee-log-textarea{width:100%;min-height:145px;resize:vertical;border:1px solid var(--line);border-radius:12px;background:#fbfdff;padding:14px 16px;font:14px/1.65 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;color:#334155;outline:none;box-sizing:border-box}
.employee-console-tip{margin:18px 0 0 88px;padding:12px 14px;border-radius:12px;background:#eff6ff;border:1px solid #bfdbfe;color:#1e3a8a;display:grid;gap:6px;font-size:13px;line-height:1.55}
.employee-console-tip code{background:#fff;border:1px solid #dbeafe;border-radius:6px;padding:1px 5px}
.employee-info-grid{margin-top:22px}
@media (max-width:980px){
  .employee-console-card{padding:18px}
  .employee-console-grid{grid-template-columns:1fr;gap:22px}
  .employee-field-group{grid-template-columns:1fr;grid-template-rows:auto auto auto;gap:8px}
  .employee-field-group>label{grid-column:1;grid-row:1;text-align:left;padding-top:0}
  .employee-big-textarea{grid-column:1;grid-row:2;min-height:220px}
  .employee-upload-btn{grid-column:1;grid-row:3}
  .employee-log-row{grid-template-columns:1fr;gap:8px;margin-top:22px}
  .employee-log-row>label{text-align:left;padding-top:0}
  .employee-console-tip{margin-left:0}
}

/* v1.5 员工端：极简号码提交 + 记录内反馈 */
.employee-simple-card{max-width:760px;margin:0 auto 22px;padding:20px 22px}
.employee-simple-form{display:grid;grid-template-columns:minmax(0,1fr) 126px;gap:12px;align-items:stretch}
.employee-simple-form textarea{width:100%;height:112px;min-height:112px;max-height:220px;resize:vertical;border:1px solid var(--line);border-radius:12px;background:#fff;padding:13px 15px;outline:none;font:16px/1.65 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;color:var(--text)}
.employee-simple-form textarea:focus{border-color:#93c5fd;box-shadow:0 0 0 4px rgba(37,99,235,.12)}
.employee-simple-form .btn{min-height:46px;align-self:end}
.employee-record-card{padding:20px}
.employee-record-table{min-width:820px}
.employee-record-table th:nth-child(1){width:64px}
.employee-record-table th:nth-child(2){width:180px}
.employee-record-table th:nth-child(3){width:120px}
.employee-record-table th:nth-child(4){width:260px}
.employee-record-table th:nth-child(5){width:330px}
.employee-record-table th:nth-child(6){width:170px}
.employee-inline-feedback{display:flex;gap:8px;align-items:center;min-width:280px}
.employee-inline-feedback input{flex:1;min-width:180px;border:1px solid var(--line);background:#fff;border-radius:9px;padding:8px 10px;outline:none;font-size:14px}
.employee-inline-feedback input:focus{border-color:#93c5fd;box-shadow:0 0 0 3px rgba(37,99,235,.10)}
body[data-role="employee"] .topbar .token-card{display:none}
body[data-role="employee"] .topbar{min-height:98px;height:auto}
body[data-role="employee"] .content{padding-top:22px}
@media (max-width:980px){
  .employee-simple-card{max-width:none;padding:16px}
  .employee-simple-form{grid-template-columns:1fr}
  .employee-simple-form .btn{width:100%}
  .employee-inline-feedback{min-width:240px}
}

/* v1.6：待处理 / 反馈记录分离，侧栏统计和个人资料精简 */
.sidebar{width:236px;padding:20px 16px}
.main{margin-left:236px}
.nav{margin-top:28px;gap:8px}
.nav-link{padding:12px 13px;border-radius:12px}
.sidebar-history{margin-top:18px;padding-top:16px;border-top:1px solid rgba(255,255,255,.10)}
.sidebar-history-title{font-size:12px;color:#8fa4c4;margin-bottom:9px}
.sidebar-history-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.sidebar-history-grid a{display:grid;gap:5px;padding:10px;border-radius:11px;background:rgba(255,255,255,.055);border:1px solid rgba(255,255,255,.06)}
.sidebar-history-grid span{font-size:11px;color:#a9b9d1}.sidebar-history-grid strong{font-size:18px;color:#fff}
.sidebar-footer.profile-card{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:start;padding:12px}
.profile-account{min-width:0;display:grid;gap:5px}.profile-account strong{font-size:16px;overflow:hidden;text-overflow:ellipsis}
.profile-account .badge{width:max-content}
.profile-token{display:grid;gap:5px;justify-items:end}.profile-token>span{font-size:11px;color:#8fa4c4}.token-mini{font-size:11px;max-width:78px;overflow:hidden;white-space:nowrap;cursor:pointer;background:#17243a;color:#dbeafe;border-color:#2b3a55}
.profile-card .logout{grid-column:1/-1;margin-top:2px;padding-top:9px;border-top:1px solid rgba(255,255,255,.08)}
.topbar{height:96px;padding:20px 28px}.topbar h1{font-size:23px}.topbar p{margin-top:5px;font-size:13px}.content{padding:22px 28px}
.card{padding:18px;margin-bottom:18px;border-radius:16px}.card h2{font-size:17px}.compact-stats{gap:14px;margin-bottom:18px}.compact-stats .stat{padding:16px 18px}.compact-stats .stat strong{font-size:28px;margin-top:6px}
.compact-filter{padding:12px 14px}.filters{gap:8px}.filters input,.filters select{padding:10px 11px}
.notice.compact-notice{display:flex;align-items:center;justify-content:space-between;padding:12px 15px;border-radius:13px;margin-bottom:14px}.notice.compact-notice strong{font-size:15px}.notice.compact-notice span{font-size:13px}
.v16-submit-card{max-width:560px;margin-left:0;padding:14px 16px}.v16-submit-form{grid-template-columns:minmax(0,1fr) 108px;gap:10px}.v16-submit-form textarea{height:84px;min-height:84px;max-height:160px;padding:11px 12px;font-size:15px}.v16-submit-form .btn{min-height:42px;padding:9px 12px}
.employee-record-card{padding:16px}.employee-record-table{min-width:780px}.employee-inline-feedback{min-width:260px}.employee-inline-feedback input{padding:7px 9px}
.history-summary{display:grid;grid-template-columns:repeat(2,minmax(160px,220px));gap:12px;margin-bottom:14px}.history-mini-card{background:#fff;border:1px solid var(--line);border-radius:14px;padding:14px 16px;box-shadow:0 10px 26px rgba(21,32,51,.05);display:flex;align-items:center;justify-content:space-between}.history-mini-card span{color:var(--muted);font-size:13px}.history-mini-card strong{font-size:26px}
@media (max-width:980px){.sidebar{width:100%;position:relative}.main{margin-left:0}.sidebar-history-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.sidebar-footer.profile-card{grid-template-columns:1fr auto}.topbar{height:auto;padding:18px}.content{padding:14px}.v16-submit-card{max-width:none}.v16-submit-form{grid-template-columns:1fr}.history-summary{grid-template-columns:1fr 1fr}}

/* v1.7：管理员最终确认 + 反馈记录按员工归档 */
.btn.success{background:#ecfdf5;color:#047857;border-color:#a7f3d0}
.status-review{background:#ede9fe;color:#6d28d9}
.review-ready{background:#faf7ff}
.review-ready:hover{background:#f5f0ff}
.records-help{margin:5px 0 0;line-height:1.5}
.admin-record-table{min-width:1180px}
.admin-record-table .operate-cell{min-width:340px}
.admin-review-actions{display:grid;gap:8px;min-width:320px}
.admin-review-actions>input{width:100%;min-width:300px}
.admin-review-buttons{display:flex;gap:7px;flex-wrap:wrap}
.feedback-text{max-width:280px;white-space:normal;line-height:1.55;word-break:break-word}
.employee-feedback-wait{display:grid;gap:4px;min-width:210px}
.employee-feedback-wait strong{font-size:13px;line-height:1.45;color:#334155;word-break:break-word}
.employee-feedback-wait span{font-size:12px;color:#6d28d9}
.history-directory-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin:4px 0 14px}
.history-directory-head h2{margin:0;font-size:20px}
.history-directory-head p{margin:5px 0 0;font-size:13px}
.employee-history-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.employee-history-card{display:grid;gap:15px;background:#fff;border:1px solid var(--line);border-radius:16px;padding:17px;box-shadow:0 10px 28px rgba(21,32,51,.055);transition:.18s}
.employee-history-card:hover{transform:translateY(-2px);border-color:#bfdbfe;box-shadow:0 16px 34px rgba(37,99,235,.10)}
.employee-history-top{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.employee-history-top>div{display:grid;gap:4px;min-width:0}
.employee-history-top strong{font-size:17px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.employee-history-top span{font-size:12px;color:var(--muted)}
.employee-history-arrow{color:var(--primary)!important;font-weight:800;white-space:nowrap}
.employee-history-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:7px}
.employee-history-stats span{display:grid;gap:3px;background:#f8fafc;border:1px solid #eef2f7;border-radius:10px;padding:8px 6px;text-align:center;font-size:11px;color:var(--muted)}
.employee-history-stats b{font-size:16px;color:var(--text)}
.employee-history-time{font-size:12px;color:var(--muted);padding-top:2px}
.employee-history-empty{grid-column:1/-1;margin:0}
.history-detail-head{display:flex;align-items:center;gap:14px;margin-bottom:14px}
.history-detail-head>div{display:grid;gap:3px}
.history-detail-head h2{margin:0;font-size:21px}
.history-summary.four{grid-template-columns:repeat(4,minmax(150px,1fr));max-width:900px}
.history-summary.four .history-mini-card{cursor:default}
.history-employee-filter .filters input{max-width:420px}
@media (max-width:1200px){
  .employee-history-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:760px){
  .employee-history-grid{grid-template-columns:1fr}
  .employee-history-stats{grid-template-columns:repeat(2,1fr)}
  .history-directory-head{align-items:flex-start;flex-direction:column}
  .history-detail-head{align-items:flex-start;flex-direction:column}
  .history-summary.four{grid-template-columns:1fr 1fr;max-width:none}
  .admin-review-actions,.admin-review-actions>input{min-width:260px}
}

/* v1.7.3：管理员接单开关 + 反馈记录清除 */
.admin-accept-card,.history-clear-card{display:flex;align-items:center;justify-content:space-between;gap:16px;border-left:5px solid var(--success)}
.admin-accept-card.is-paused{border-left-color:var(--danger);background:#fff7f7}
.admin-accept-card h2,.history-clear-card h2{margin:0 0 6px;font-size:18px}
.admin-accept-card p,.history-clear-card p{margin:0;line-height:1.55}
.employee-stop-card{max-width:720px;margin:0 0 22px;padding:26px 28px;border:1px solid #fecaca;background:#fff7f7;text-align:center}
.employee-stop-card h2{margin:0 0 10px;color:#b91c1c;font-size:24px}
.employee-stop-card p{margin:0 0 18px;color:#7f1d1d;font-size:15px}
.employee-stop-card .btn[disabled]{opacity:.7;cursor:not-allowed}
.history-detail-head form{margin-left:auto}
@media (max-width:760px){.admin-accept-card,.history-clear-card{align-items:flex-start;flex-direction:column}.history-detail-head form{margin-left:0}.admin-accept-card .btn,.history-clear-card .btn,.history-detail-head form .btn{width:100%}}

/* v1.7.4：发/收任务 + 员工单条提交 + 重新提交 */
.btn.warning{background:#fff7ed;color:#c2410c;border-color:#fed7aa}
.task-type-send{background:#dbeafe;color:#1d4ed8}
.task-type-receive{background:#ccfbf1;color:#0f766e}
.employee-single-card{max-width:820px}
.employee-single-form{display:grid;grid-template-columns:138px minmax(0,1fr) 118px;gap:10px;align-items:stretch}
.employee-single-form>input{width:100%;border:1px solid var(--line);background:#fff;border-radius:12px;padding:11px 13px;outline:none;font-size:15px}
.employee-single-form>input:focus{border-color:#93c5fd;box-shadow:0 0 0 4px rgba(37,99,235,.12)}
.employee-type-toggle{display:grid;grid-template-columns:1fr 1fr;gap:7px}
.employee-type-toggle label{cursor:pointer;display:block}
.employee-type-toggle input{position:absolute;opacity:0;pointer-events:none}
.employee-type-toggle span{height:100%;min-height:42px;display:flex;align-items:center;justify-content:center;border:1px solid var(--line);border-radius:12px;background:#f8fafc;font-weight:900;color:#475569;transition:.18s}
.employee-type-toggle input:checked+span{background:linear-gradient(135deg,var(--primary),var(--primary2));border-color:transparent;color:#fff;box-shadow:0 10px 22px rgba(37,99,235,.16)}
.employee-feedback-box{display:grid;gap:7px}
.employee-resubmit-hint{width:max-content;border-radius:999px;background:#fff7ed;color:#c2410c;border:1px solid #fed7aa;padding:4px 9px;font-size:12px;font-weight:900}
.employee-history-stats{grid-template-columns:repeat(6,1fr)}
.history-summary.six{grid-template-columns:repeat(6,minmax(120px,1fr));max-width:1180px}
.admin-record-table{min-width:1280px}
@media (max-width:980px){
  .employee-single-form{grid-template-columns:1fr;gap:9px}
  .employee-single-form .btn{width:100%}
  .history-summary.six{grid-template-columns:1fr 1fr;max-width:none}
  .employee-history-stats{grid-template-columns:repeat(2,1fr)}
}

/* v1.7.5：发提交自动生成发记录并转入收任务；收为原等待反馈流程 */
.employee-transfer-form{grid-template-columns:180px minmax(0,1fr) 96px;align-items:start}
.employee-type-wrap{display:grid;gap:8px}
.employee-send-warning{border:1px solid #fed7aa;background:#fff7ed;color:#c2410c;border-radius:11px;padding:8px 10px;font-size:12px;font-weight:900;text-align:center;line-height:1.35}
@media (max-width:980px){.employee-transfer-form{grid-template-columns:1fr}.employee-send-warning{text-align:left}}


/* v1.7.6：员工页提示调整 */
.employee-resubmit-hint{display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;margin-right:2px;border-radius:999px;background:#fff7ed;color:#c2410c;border:1px solid #fed7aa;padding:6px 10px;font-size:13px;font-weight:900}
.employee-send-warning{font-size:16px;padding:12px 14px;border-width:2px;border-radius:13px;box-shadow:0 8px 18px rgba(194,65,12,.08);letter-spacing:.5px}
@media (max-width:980px){.employee-inline-feedback{align-items:stretch}.employee-resubmit-hint{width:max-content}.employee-send-warning{font-size:15px;text-align:center}}


/* v1.7.7：发功能提示一行展示 + 管理员可自定义 */
.admin-setting-card{display:grid;grid-template-columns:minmax(240px,1fr) minmax(360px,560px);align-items:center;gap:16px;border-left:5px solid var(--primary)}
.admin-setting-card h2{margin:0 0 6px;font-size:18px}
.admin-setting-card p{margin:0;line-height:1.55}
.admin-setting-form{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center}
.admin-setting-form input{width:100%;border:1px solid var(--line);background:#fff;border-radius:12px;padding:11px 13px;outline:none;font-size:15px;font-weight:800;color:var(--text)}
.admin-setting-form input:focus{border-color:#93c5fd;box-shadow:0 0 0 4px rgba(37,99,235,.12)}
.employee-transfer-form{grid-template-columns:max-content minmax(0,1fr) 96px;align-items:start}
.employee-type-wrap{display:grid;grid-template-columns:140px max-content;align-items:stretch;gap:10px}
.employee-send-warning{display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;width:max-content;max-width:none;min-height:42px;font-size:17px!important;padding:10px 16px!important;line-height:1!important;text-align:center!important}
@media (max-width:1100px){.employee-transfer-form{grid-template-columns:1fr}.employee-type-wrap{grid-template-columns:140px max-content}.admin-setting-card{grid-template-columns:1fr}.admin-setting-form{grid-template-columns:1fr auto}}
@media (max-width:760px){.employee-type-wrap{grid-template-columns:1fr}.employee-send-warning{white-space:normal;width:100%;line-height:1.25!important}.admin-setting-form{grid-template-columns:1fr}.admin-setting-form .btn{width:100%}}

/* v1.7.8：员工提交栏自动适应，号码输入框始终可见 */
.employee-transfer-form{
  display:grid!important;
  grid-template-columns:140px minmax(240px,1fr) 96px!important;
  gap:10px!important;
  align-items:stretch!important;
  max-width:100%;
}
.employee-transfer-form>.employee-type-toggle{
  grid-column:1;
  grid-row:1;
  min-width:0;
}
.employee-transfer-form>input[name="phone"]{
  grid-column:2;
  grid-row:1;
  min-width:240px;
  width:100%;
}
.employee-transfer-form>.btn[type="submit"]{
  grid-column:3;
  grid-row:1;
  white-space:nowrap;
}
.employee-transfer-form>.employee-send-warning{
  grid-column:1 / -1;
  grid-row:2;
  justify-self:start;
  max-width:100%;
  width:auto!important;
  min-height:0;
  white-space:nowrap;
  overflow-x:auto;
  overflow-y:hidden;
  line-height:1.15!important;
  -webkit-overflow-scrolling:touch;
}
@media (max-width:760px){
  .employee-transfer-form{
    grid-template-columns:1fr!important;
  }
  .employee-transfer-form>.employee-type-toggle,
  .employee-transfer-form>input[name="phone"],
  .employee-transfer-form>.btn[type="submit"],
  .employee-transfer-form>.employee-send-warning{
    grid-column:1;
    grid-row:auto;
    width:100%;
  }
  .employee-transfer-form>input[name="phone"]{
    min-width:0;
  }
  .employee-transfer-form>.employee-send-warning{
    justify-self:stretch;
  }
}


/* v1.8.0：员工页恢复只显示未处理 + 重新提交输入框防重叠 */
.employee-record-table{min-width:980px}
.employee-record-table th:nth-child(1){width:68px}
.employee-record-table th:nth-child(2){width:90px}
.employee-record-table th:nth-child(3){width:150px}
.employee-record-table th:nth-child(4){width:130px}
.employee-record-table th:nth-child(5){width:260px}
.employee-record-table th:nth-child(6){width:320px}
.employee-record-table th:nth-child(7){width:170px}
.employee-record-table td:nth-child(7){white-space:nowrap}
.employee-feedback-box{min-width:0}
.employee-inline-feedback{display:grid;grid-template-columns:max-content minmax(160px,1fr) auto;gap:8px;align-items:center;min-width:0;width:100%}
.employee-inline-feedback input{min-width:0;width:100%}
.employee-inline-feedback .btn{min-width:54px}
.employee-record-card .table-wrap{overflow-x:auto}
@media (max-width:980px){
  .employee-record-table{min-width:860px}
  .employee-inline-feedback{grid-template-columns:1fr;align-items:stretch}
  .employee-inline-feedback .btn{width:100%}
}

/* =========================================================
   v1.8.5：H5 / 手机自动适配
   桌面端保持表格；<=760px 自动切换为卡片式记录。
   ========================================================= */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{min-width:0;overflow-x:hidden}
img,svg,video,canvas{max-width:100%;height:auto}
input,select,textarea,button{font:inherit}

@media (max-width:760px){
  body{background:#f5f7fb;padding-bottom:env(safe-area-inset-bottom)}
  .sidebar{position:relative!important;inset:auto!important;width:100%!important;height:auto!important;padding:12px 12px 10px;border-bottom:1px solid rgba(255,255,255,.10)}
  .brand{gap:9px}.brand-mark{width:36px;height:36px;border-radius:11px}.brand-title{font-size:16px}.brand-sub{font-size:11px}
  .nav{margin-top:12px!important;display:flex!important;gap:8px!important;overflow-x:auto;padding-bottom:3px;scrollbar-width:none;-webkit-overflow-scrolling:touch}
  .nav::-webkit-scrollbar{display:none}
  .nav-link{flex:0 0 auto;padding:10px 12px;border-radius:11px;font-size:14px;min-height:42px;display:flex;align-items:center}
  .sidebar-history{display:none!important}
  .sidebar-footer.profile-card{margin-top:10px!important;padding:10px 11px!important;display:grid!important;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:8px 10px;border-radius:13px}
  .profile-account{min-width:0}.profile-account .small{display:none}.profile-account strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .profile-token{min-width:0}.profile-token>span{display:none}.token-mini{max-width:96px;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .logout{margin:0!important;padding:8px 4px;font-size:13px}
  .main{margin-left:0!important;width:100%;min-width:0}
  .topbar{height:auto!important;padding:15px 13px!important;gap:12px!important;align-items:stretch!important;background:linear-gradient(135deg,#fff,#f3f8ff)}
  .topbar h1{font-size:21px;line-height:1.25}.topbar p{font-size:13px;line-height:1.45;margin-top:5px}
  .top-actions{display:grid!important;grid-template-columns:1fr 1fr;width:100%;gap:8px!important}
  .top-actions .btn{width:100%;min-height:42px}
  .content{padding:12px!important;min-width:0}
  .card{padding:14px!important;margin-bottom:12px!important;border-radius:15px!important;box-shadow:0 8px 24px rgba(21,32,51,.055)}
  .card h2{font-size:17px;margin-bottom:12px}
  .card-head{align-items:flex-start;gap:9px;margin-bottom:12px}.card-head h2{margin:0}.card-head>.btn{flex:0 0 auto}
  .notice,.live-notice{padding:13px!important;border-radius:14px!important;margin-bottom:12px!important;align-items:stretch!important;flex-direction:column!important}
  .live-notice .btn,.notice .btn{width:100%}
  .grid.two{grid-template-columns:1fr!important;gap:12px!important}
  .stats,.compact-stats{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;margin-bottom:12px!important}
  .stat{padding:14px!important}.stat span{font-size:12px}.stat strong{font-size:28px;margin-top:6px}
  .filters{display:grid!important;grid-template-columns:1fr!important;gap:8px!important;width:100%}
  .filters input,.filters select,.filters .btn,.filters a.btn{max-width:none!important;width:100%!important;min-height:44px}
  .form input,.form select,.filters input,.filters select,.record-actions input,.employee-form input,.inline-password input,.admin-setting-form input,.employee-single-form>input,.feedback-form textarea{font-size:16px!important;min-height:44px}
  .btn{min-height:42px;padding:10px 12px}.btn.tiny{min-height:38px;padding:8px 10px}
  .actions,.record-actions,.card-actions{gap:8px}
  .actions>*{flex:1 1 140px}.actions .btn{width:100%}
  .inline-password{width:100%;display:grid!important;grid-template-columns:minmax(0,1fr) auto}.inline-password input{width:100%!important}
  .admin-setting-card,.admin-accept-card,.history-clear-card{grid-template-columns:1fr!important;display:grid!important;align-items:stretch!important;gap:12px!important}
  .admin-setting-form{grid-template-columns:1fr!important}.admin-setting-form .btn,.admin-accept-card form,.admin-accept-card .btn,.history-clear-card form,.history-clear-card .btn{width:100%!important}
  .employee-transfer-form,.employee-single-form{grid-template-columns:1fr!important;gap:9px!important}
  .employee-transfer-form>.employee-type-toggle,.employee-transfer-form>input[name="phone"],.employee-transfer-form>.btn[type="submit"],.employee-transfer-form>.employee-send-warning{grid-column:1!important;grid-row:auto!important;width:100%!important;min-width:0!important}
  .employee-type-toggle span{min-height:46px}.employee-transfer-form>.btn[type="submit"]{min-height:48px;font-size:16px}
  .employee-send-warning{white-space:normal!important;overflow:visible!important;text-align:center!important;font-size:14px!important;line-height:1.45!important}
  .employee-stop-card{max-width:none!important;margin-bottom:12px!important;padding:18px!important}
  .employee-inline-feedback{grid-template-columns:1fr!important;gap:8px!important}.employee-inline-feedback .btn{width:100%!important;min-height:44px}.employee-resubmit-hint{width:max-content!important}
  .employee-feedback-wait{min-width:0;word-break:break-word}

  /* 表格 -> H5 卡片 */
  .table-wrap{overflow:visible!important;border:0!important;border-radius:0!important;background:transparent!important}
  table.h5-table,table.h5-table tbody{display:block!important;width:100%!important;min-width:0!important}
  table.h5-table thead{display:none!important}
  table.h5-table tr{display:block!important;width:100%!important;background:#fff!important;border:1px solid var(--line)!important;border-radius:14px!important;margin:0 0 10px!important;padding:4px 12px!important;box-shadow:0 6px 18px rgba(15,23,42,.045)}
  table.h5-table tr.review-ready,table.h5-table tr.highlight{border-color:#fcd34d!important;background:#fffbeb!important}
  table.h5-table td{display:grid!important;grid-template-columns:88px minmax(0,1fr)!important;gap:10px!important;align-items:start!important;width:100%!important;min-width:0!important;padding:10px 0!important;border:0!important;border-bottom:1px dashed #e5eaf1!important;font-size:14px!important;white-space:normal!important;word-break:break-word!important}
  table.h5-table td:last-child{border-bottom:0!important}
  table.h5-table td::before{content:attr(data-label);font-size:12px;line-height:1.55;color:var(--muted);font-weight:800;min-width:0}
  table.h5-table td.h5-empty-cell{display:block!important;text-align:center!important;padding:22px 5px!important;border:0!important}
  table.h5-table td.h5-empty-cell::before{display:none!important}
  table.h5-table td code{max-width:100%;word-break:break-all;white-space:normal}
  table.h5-table .operate-cell,.admin-record-table .operate-cell{display:grid!important}
  table.h5-table .record-actions,.admin-review-actions{width:100%!important;min-width:0!important;display:grid!important;grid-template-columns:1fr!important}
  table.h5-table .record-actions input,.admin-review-actions>input{width:100%!important;min-width:0!important}
  .admin-review-buttons{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important}.admin-review-buttons .btn{width:100%!important}
  .employee-record-table,.admin-record-table{min-width:0!important}
  .feedback-text{white-space:normal!important}

  .employee-history-grid{grid-template-columns:1fr!important;gap:10px!important}
  .employee-history-card{padding:14px!important}.employee-history-stats{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .history-summary.four,.history-summary.six{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
  .history-detail-head,.history-directory-head{align-items:stretch!important;flex-direction:column!important;gap:10px!important}.history-detail-head form{margin-left:0!important}.history-detail-head .btn{width:100%}
  .login-shell{min-height:100svh;padding:16px 12px}.login-card{width:100%!important;max-width:430px;padding:22px!important;border-radius:20px!important}.login-brand{margin-bottom:20px!important}
  .copyable{word-break:break-all}
}

@media (max-width:420px){
  .content{padding:10px!important}.card{padding:12px!important}
  .stats,.compact-stats{grid-template-columns:repeat(2,minmax(0,1fr))!important}.stat strong{font-size:25px}
  table.h5-table td{grid-template-columns:76px minmax(0,1fr)!important;gap:8px!important}
  .sidebar-footer.profile-card{grid-template-columns:minmax(0,1fr) auto}.profile-token{display:none!important}
  .top-actions{grid-template-columns:1fr 1fr}
  .employee-history-stats{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}


/* v1.8.5 hotfix3：员工端顶部成功/失败实时统计 + 手机字体紧凑化
   只作用于员工端；统计数字由现有 /api/notifications 5 秒静默轮询更新。 */
.employee-topbar{position:relative}
.employee-top-summary{
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  z-index:2;
}
.employee-top-stat{
  min-width:88px;
  padding:8px 14px;
  border:1px solid var(--line);
  border-radius:14px;
  background:rgba(255,255,255,.94);
  box-shadow:0 8px 22px rgba(15,23,42,.06);
  display:flex;
  align-items:baseline;
  justify-content:center;
  gap:8px;
  white-space:nowrap;
}
.employee-top-stat span{font-size:13px;font-weight:800;color:var(--muted)}
.employee-top-stat strong{font-size:22px;line-height:1;font-weight:900}
.employee-top-stat.success strong{color:#16a34a}
.employee-top-stat.failed strong{color:#dc2626}

@media (max-width:980px){
  .employee-topbar .employee-top-summary{
    position:static;
    transform:none;
    width:100%;
    order:-1;
    justify-content:center;
  }
}

@media (max-width:760px){
  /* 仅员工端缩小手机显示字体；输入框保持 16px，避免 iPhone 聚焦时自动放大页面。 */
  body[data-role="employee"]{font-size:13px}
  body[data-role="employee"] .sidebar{padding:10px 10px 8px!important}
  body[data-role="employee"] .brand-title{font-size:14px}
  body[data-role="employee"] .brand-sub{font-size:10px}
  body[data-role="employee"] .nav-link{font-size:12px;padding:8px 10px;min-height:36px}
  body[data-role="employee"] .sidebar-footer.profile-card{padding:8px 9px!important}
  body[data-role="employee"] .profile-account strong{font-size:14px}
  body[data-role="employee"] .badge{font-size:11px;padding:4px 8px}
  body[data-role="employee"] .logout{font-size:12px}
  body[data-role="employee"] .topbar{padding:11px 11px!important;gap:9px!important}
  body[data-role="employee"] .topbar h1{font-size:18px!important}
  body[data-role="employee"] .topbar p{font-size:11px!important;margin-top:3px}
  body[data-role="employee"] .top-actions .btn{font-size:13px;min-height:38px;padding:8px 10px}
  body[data-role="employee"] .content{padding:10px!important}
  body[data-role="employee"] .card{padding:12px!important;margin-bottom:10px!important}
  body[data-role="employee"] .card h2{font-size:15px!important;margin-bottom:10px}
  body[data-role="employee"] .card-head{margin-bottom:10px}
  body[data-role="employee"] .card-head>.btn{font-size:12px;min-height:36px;padding:7px 10px}
  body[data-role="employee"] .notice.compact-notice strong{font-size:13px}
  body[data-role="employee"] .notice.compact-notice span{font-size:11px}
  body[data-role="employee"] .live-notice strong{font-size:14px}
  body[data-role="employee"] .live-notice span{font-size:11px}
  body[data-role="employee"] .employee-stop-card{padding:14px!important}
  body[data-role="employee"] .employee-stop-card h2{font-size:17px!important;margin-bottom:7px}
  body[data-role="employee"] .employee-stop-card p{font-size:12px;margin-bottom:12px}
  body[data-role="employee"] .employee-stop-card .btn{font-size:13px;min-height:38px}
  body[data-role="employee"] .employee-type-toggle span{font-size:13px;min-height:40px}
  body[data-role="employee"] .employee-transfer-form>.btn[type="submit"]{font-size:14px;min-height:42px}
  body[data-role="employee"] .employee-send-warning{font-size:12px!important;padding:8px 10px!important}
  body[data-role="employee"] table.h5-table td{font-size:12px!important;padding:8px 0!important}
  body[data-role="employee"] table.h5-table td::before{font-size:11px}
  body[data-role="employee"] .small{font-size:11px}
  body[data-role="employee"] .employee-inline-feedback .btn{font-size:12px;min-height:38px}
  body[data-role="employee"] .employee-feedback-wait span{font-size:11px}
  .employee-top-summary{gap:8px}
  .employee-top-stat{min-width:78px;padding:7px 11px;border-radius:12px;gap:6px}
  .employee-top-stat span{font-size:11px}
  .employee-top-stat strong{font-size:18px}
}


/* =========================================================
   v1.8.5 hotfix3：员工手机端字体再缩小一档。
   只改字体/字号，不改变现有 H5 布局；输入框保持 16px，避免 iPhone 聚焦自动放大。
   ========================================================= */
@media (max-width:760px){
  body[data-role="employee"]{font-size:12px}
  body[data-role="employee"] .brand-title{font-size:13px}
  body[data-role="employee"] .brand-sub{font-size:9px}
  body[data-role="employee"] .nav-link{font-size:11px}
  body[data-role="employee"] .profile-account strong{font-size:13px}
  body[data-role="employee"] .badge{font-size:10px;padding:3px 7px}
  body[data-role="employee"] .logout{font-size:11px}
  body[data-role="employee"] .topbar h1{font-size:16px!important}
  body[data-role="employee"] .topbar p{font-size:10px!important}
  body[data-role="employee"] .top-actions .btn{font-size:12px}
  body[data-role="employee"] .card h2{font-size:14px!important}
  body[data-role="employee"] .card-head>.btn{font-size:11px}
  body[data-role="employee"] .notice.compact-notice strong{font-size:12px}
  body[data-role="employee"] .notice.compact-notice span{font-size:10px}
  body[data-role="employee"] .live-notice strong{font-size:12px}
  body[data-role="employee"] .live-notice span{font-size:10px}
  body[data-role="employee"] .employee-stop-card h2{font-size:15px!important}
  body[data-role="employee"] .employee-stop-card p{font-size:11px}
  body[data-role="employee"] .employee-stop-card .btn{font-size:12px}
  body[data-role="employee"] .employee-type-toggle span{font-size:12px}
  body[data-role="employee"] .employee-transfer-form>.btn[type="submit"]{font-size:13px}
  body[data-role="employee"] .employee-send-warning{font-size:11px!important}
  body[data-role="employee"] table.h5-table td{font-size:11px!important}
  body[data-role="employee"] table.h5-table td::before{font-size:10px}
  body[data-role="employee"] .big-code{font-size:13px}
  body[data-role="employee"] .small{font-size:10px}
  body[data-role="employee"] .employee-inline-feedback .btn{font-size:11px}
  body[data-role="employee"] .employee-feedback-wait span{font-size:10px}
  body[data-role="employee"] .employee-resubmit-hint{font-size:11px}
  body[data-role="employee"] .employee-top-stat span{font-size:10px}
  body[data-role="employee"] .employee-top-stat strong{font-size:16px}
}


/* v1.8.5 hotfix6：员工顶部成功/失败可点击查看号码明细；手机端屏蔽“反馈”入口。 */
.employee-top-stat{
  color:inherit;
  text-decoration:none;
  cursor:pointer;
}
.employee-top-stat:visited{color:inherit}
.employee-top-stat:active{transform:translateY(1px)}

.employee-result-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:15px 16px;
  margin-bottom:10px;
  background:#fff;
  border:1px solid #e1e4e8;
  border-radius:12px;
}
.employee-result-toolbar h2{margin:0;font-size:20px}
.employee-result-toolbar p{margin:4px 0 0;color:#6b7280;font-size:12px}
.employee-result-tabs{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  margin-bottom:10px;
}
.employee-result-tabs a{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:42px;
  border:1px solid #dfe3e8;
  border-radius:10px;
  background:#fff;
  color:#4b5563;
  text-decoration:none;
  font-weight:800;
}
.employee-result-tabs a.active{border-color:#7ab8ef;background:#eef7ff;color:#1478c9}
.employee-result-list{
  overflow:hidden;
  background:#fff;
  border:1px solid #e1e4e8;
  border-radius:12px;
}
.employee-result-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:13px 14px;
  border-bottom:1px solid #eceef1;
}
.employee-result-row:last-child{border-bottom:0}
.employee-result-main{min-width:0;display:grid;gap:5px}
.employee-result-phone{font-size:18px;letter-spacing:.2px;color:#1f2328}
.employee-result-meta{display:flex;align-items:center;gap:7px;color:#7a828d;font-size:11px}
.employee-result-note{max-width:680px;color:#555d68;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.employee-result-status{
  flex:0 0 auto;
  min-width:66px;
  padding:7px 12px;
  border-radius:999px;
  text-align:center;
  font-size:12px;
  font-weight:800;
}
.employee-result-status.success{background:#dff5eb;color:#16835f}
.employee-result-status.failed{background:#ffe6e9;color:#c73545}
.employee-result-empty{padding:34px 16px;text-align:center;color:#8a929d}

@media (max-width:760px){
  body[data-role="employee"] .employee-result-toolbar{
    padding:10px!important;
    margin-bottom:7px!important;
    border-radius:8px!important;
    box-shadow:none!important;
  }
  body[data-role="employee"] .employee-result-toolbar h2{font-size:15px!important;margin:0!important}
  body[data-role="employee"] .employee-result-toolbar p{font-size:10px!important;margin-top:2px!important}
  body[data-role="employee"] .employee-result-home{min-height:34px!important;height:34px!important;padding:5px 10px!important;font-size:11px!important;border-radius:8px!important}
  body[data-role="employee"] .employee-result-tabs{gap:6px!important;margin-bottom:7px!important}
  body[data-role="employee"] .employee-result-tabs a{min-height:36px!important;border-radius:8px!important;font-size:11px!important}
  body[data-role="employee"] .employee-result-list{border-radius:8px!important;box-shadow:none!important}
  body[data-role="employee"] .employee-result-row{padding:10px!important;gap:8px!important}
  body[data-role="employee"] .employee-result-phone{font-size:14px!important}
  body[data-role="employee"] .employee-result-meta{font-size:9px!important;gap:5px!important}
  body[data-role="employee"] .employee-result-note{font-size:10px!important;max-width:210px!important}
  body[data-role="employee"] .employee-result-status{min-width:52px!important;padding:5px 8px!important;font-size:10px!important}
  body[data-role="employee"] .employee-result-empty{padding:28px 10px!important;font-size:11px!important}
}

/* =========================================================
   v1.8.5 hotfix4：员工手机端改成“号码列表”紧凑表格样式
   - 手机端仅显示三列：手机 / 信息 / 状态
   - 保留顶部成功、失败实时统计
   - 发/收、号码提交、验证码/重新提交、反馈记录、刷新、退出功能保留
   - 桌面端继续使用原来的完整工单表格
   ========================================================= */
.employee-mobile-records{display:none}
.employee-mobile-top-link{display:none!important}

@media (max-width:760px){
  body[data-role="employee"]{
    background:#f4f5f7!important;
    font-size:12px;
  }

  /* 手机员工端取消原来的深色侧栏，避免占据大块屏幕。 */
  body[data-role="employee"] .sidebar{display:none!important}
  body[data-role="employee"] .main{margin-left:0!important;width:100%!important}

  /* 顶部只保留成功/失败统计和几个紧凑操作。 */
  body[data-role="employee"] .employee-topbar{
    position:sticky!important;
    top:0;
    z-index:30;
    min-height:54px!important;
    padding:7px 9px!important;
    display:flex!important;
    flex-direction:row!important;
    align-items:center!important;
    justify-content:space-between!important;
    gap:7px!important;
    background:rgba(255,255,255,.97)!important;
    border-bottom:1px solid #e5e7eb!important;
    box-shadow:0 2px 9px rgba(15,23,42,.05)!important;
    backdrop-filter:saturate(160%) blur(10px);
  }
  body[data-role="employee"] .employee-topbar .topbar-title{display:none!important}
  body[data-role="employee"] .employee-topbar .employee-top-summary{
    position:static!important;
    transform:none!important;
    width:auto!important;
    order:0!important;
    flex:1 1 auto!important;
    justify-content:flex-start!important;
    gap:6px!important;
  }
  body[data-role="employee"] .employee-top-stat{
    min-width:70px!important;
    height:36px!important;
    padding:5px 9px!important;
    gap:5px!important;
    border-radius:8px!important;
    box-shadow:none!important;
    background:#fff!important;
  }
  body[data-role="employee"] .employee-top-stat.success{border-color:#b7e3d0!important;background:#f0fbf6!important}
  body[data-role="employee"] .employee-top-stat.failed{border-color:#f3c2c7!important;background:#fff5f6!important}
  body[data-role="employee"] .employee-top-stat span{font-size:10px!important;font-weight:700!important}
  body[data-role="employee"] .employee-top-stat strong{font-size:16px!important;line-height:1!important}

  body[data-role="employee"] .employee-topbar .top-actions{
    width:auto!important;
    flex:0 0 auto!important;
    display:flex!important;
    grid-template-columns:none!important;
    align-items:center!important;
    gap:5px!important;
  }
  body[data-role="employee"] .employee-topbar .sound-toggle{display:none!important}
  body[data-role="employee"] .employee-mobile-top-link{display:inline-flex!important}
  body[data-role="employee"] .employee-topbar .top-actions .btn{
    width:auto!important;
    min-width:42px!important;
    min-height:34px!important;
    height:34px!important;
    padding:5px 8px!important;
    border-radius:8px!important;
    font-size:11px!important;
    font-weight:700!important;
    box-shadow:none!important;
  }

  body[data-role="employee"] .content{
    padding:8px!important;
    width:100%!important;
  }
  body[data-role="employee"] .flash-wrap{margin-bottom:7px!important;gap:6px!important}
  body[data-role="employee"] .alert{padding:8px 10px!important;border-radius:8px!important;font-size:11px!important}
  body[data-role="employee"] .live-notice{
    margin-bottom:7px!important;
    padding:8px 10px!important;
    border-radius:8px!important;
    gap:6px!important;
  }

  /* 待反馈提示改成一行小条。 */
  body[data-role="employee"] .employee-action-notice{
    margin:0 0 7px!important;
    padding:8px 10px!important;
    border-radius:8px!important;
    display:flex!important;
    flex-direction:row!important;
    align-items:center!important;
    justify-content:flex-start!important;
    gap:8px!important;
    box-shadow:none!important;
    animation:none!important;
  }
  body[data-role="employee"] .employee-action-notice strong{font-size:11px!important;white-space:nowrap}
  body[data-role="employee"] .employee-action-notice span{font-size:10px!important;margin:0!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

  /* 提交区域：像图二顶部工具条一样紧凑，不再使用大卡片。 */
  body[data-role="employee"] .employee-compact-submit{
    max-width:none!important;
    margin:0 0 7px!important;
    padding:8px!important;
    border:1px solid #e3e6eb!important;
    border-radius:9px!important;
    box-shadow:none!important;
    background:#fff!important;
  }
  body[data-role="employee"] .employee-compact-submit .employee-transfer-form{
    display:grid!important;
    grid-template-columns:80px minmax(0,1fr) 60px!important;
    grid-template-rows:38px auto!important;
    gap:6px!important;
    align-items:stretch!important;
  }
  body[data-role="employee"] .employee-compact-submit .employee-type-toggle{
    grid-column:1!important;
    grid-row:1!important;
    width:80px!important;
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:4px!important;
  }
  body[data-role="employee"] .employee-compact-submit .employee-type-toggle span{
    min-height:38px!important;
    height:38px!important;
    padding:0!important;
    border-radius:7px!important;
    font-size:12px!important;
    box-shadow:none!important;
  }
  body[data-role="employee"] .employee-compact-submit input[name="phone"]{
    grid-column:2!important;
    grid-row:1!important;
    min-width:0!important;
    min-height:38px!important;
    height:38px!important;
    padding:6px 9px!important;
    border-radius:7px!important;
    font-size:16px!important;
    border-color:#dfe3e8!important;
  }
  body[data-role="employee"] .employee-compact-submit>.employee-transfer-form>.btn[type="submit"]{
    grid-column:3!important;
    grid-row:1!important;
    width:60px!important;
    min-width:60px!important;
    min-height:38px!important;
    height:38px!important;
    padding:0 7px!important;
    border-radius:7px!important;
    font-size:12px!important;
    box-shadow:none!important;
  }
  body[data-role="employee"] .employee-compact-submit .employee-send-warning{
    grid-column:1 / -1!important;
    grid-row:2!important;
    width:100%!important;
    min-height:0!important;
    padding:5px 7px!important;
    margin:0!important;
    border-width:1px!important;
    border-radius:6px!important;
    font-size:9px!important;
    line-height:1.25!important;
    white-space:normal!important;
    overflow:visible!important;
    box-shadow:none!important;
    letter-spacing:0!important;
  }

  /* 桌面完整表隐藏，手机使用图二风格三列表。 */
  body[data-role="employee"] .employee-desktop-records{display:none!important}
  body[data-role="employee"] .employee-mobile-records{
    display:block!important;
    margin:0!important;
    overflow:hidden!important;
    background:#fff!important;
    border:1px solid #e1e4e8!important;
    border-radius:8px!important;
    box-shadow:none!important;
  }
  .employee-mobile-list-head{
    height:41px;
    padding:0 9px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:8px;
    border-bottom:1px solid #e5e7eb;
    background:#fbfbfc;
  }
  .employee-mobile-list-head strong{font-size:13px;color:#30343b}
  .employee-mobile-list-head span{font-size:10px;color:#6b7280;white-space:nowrap}

  table.employee-mobile-table{
    display:table!important;
    width:100%!important;
    min-width:0!important;
    table-layout:fixed!important;
    border-collapse:collapse!important;
    background:#fff!important;
  }
  .employee-mobile-table thead{display:table-header-group!important}
  .employee-mobile-table tbody{display:table-row-group!important}
  .employee-mobile-table tr{display:table-row!important;background:#fff!important}
  .employee-mobile-table th,
  .employee-mobile-table td{
    display:table-cell!important;
    border:0!important;
    border-bottom:1px solid #eceef1!important;
    padding:8px 7px!important;
    vertical-align:middle!important;
    text-align:left!important;
    min-width:0!important;
    white-space:normal!important;
    word-break:break-word!important;
  }
  .employee-mobile-table thead th{
    height:34px!important;
    padding-top:6px!important;
    padding-bottom:6px!important;
    background:#f7f8fa!important;
    color:#707782!important;
    font-size:10px!important;
    font-weight:700!important;
    position:static!important;
  }
  .employee-mobile-table th:nth-child(1),.employee-mobile-table td:nth-child(1){width:31%}
  .employee-mobile-table th:nth-child(2),.employee-mobile-table td:nth-child(2){width:48%}
  .employee-mobile-table th:nth-child(3),.employee-mobile-table td:nth-child(3){width:21%;text-align:center!important}
  .employee-mobile-table tbody tr:last-child td{border-bottom:0!important}
  .employee-mobile-table tbody tr.employee-mobile-highlight{background:#fffdf5!important}

  .employee-mobile-phone strong{
    display:block;
    color:#1f2328;
    font-size:12px;
    font-weight:600;
    letter-spacing:0;
    white-space:nowrap;
  }
  .employee-mobile-type{
    display:inline-flex;
    margin-top:3px;
    padding:1px 5px;
    border-radius:999px;
    font-size:8px;
    line-height:1.45;
    font-weight:700;
  }
  .employee-mobile-type.is-send{background:#e7f0ff;color:#2363c7}
  .employee-mobile-type.is-receive{background:#e3f7f2;color:#16806b}

  .employee-mobile-info{font-size:11px!important;color:#30343b!important}
  .employee-mobile-info-text{display:grid;gap:2px;min-width:0}
  .employee-mobile-info-text strong{font-size:11px;font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .employee-mobile-info-text span{font-size:10px;color:#555d68;line-height:1.35}

  .employee-mobile-feedback{
    width:100%;
    min-width:0;
    display:grid;
    grid-template-columns:minmax(0,1fr) 43px;
    gap:4px;
    align-items:center;
  }
  .employee-mobile-feedback input{
    width:100%;
    min-width:0;
    height:32px;
    min-height:32px!important;
    padding:4px 6px!important;
    border:1px solid #cfd5dc;
    border-radius:5px;
    outline:none;
    background:#fff;
    font-size:16px!important;
    line-height:1;
  }
  .employee-mobile-feedback input:focus{border-color:#6aa9ea;box-shadow:0 0 0 2px rgba(37,99,235,.10)}
  .mobile-submit-btn{
    width:43px;
    height:32px;
    padding:0;
    border:0;
    border-radius:5px;
    background:#2d9fe8;
    color:#fff;
    font-size:10px;
    font-weight:700;
    cursor:pointer;
  }

  .employee-mobile-status-pill{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:50px;
    max-width:100%;
    min-height:27px;
    padding:4px 6px;
    border-radius:999px;
    font-size:10px;
    line-height:1.1;
    font-weight:700;
    white-space:nowrap;
  }
  .mobile-status-code{background:#62a8ee;color:#fff}
  .mobile-status-review{background:#f4c84c;color:#6c5300}
  .mobile-status-pending{background:#e9eef5;color:#556070}
  .employee-mobile-empty{
    text-align:center!important;
    color:#8a929d!important;
    padding:20px 8px!important;
    font-size:11px!important;
  }

  body[data-role="employee"] .employee-stop-card{
    margin:0 0 7px!important;
    padding:12px!important;
    border-radius:8px!important;
    box-shadow:none!important;
  }
  body[data-role="employee"] .employee-stop-card h2{font-size:14px!important;margin-bottom:5px!important}
  body[data-role="employee"] .employee-stop-card p{font-size:10px!important;margin-bottom:8px!important}
}

@media (max-width:390px){
  body[data-role="employee"] .employee-top-stat{min-width:64px!important;padding:5px 7px!important}
  body[data-role="employee"] .employee-topbar .top-actions .btn{min-width:38px!important;padding:5px 6px!important;font-size:10px!important}
  body[data-role="employee"] .employee-compact-submit .employee-transfer-form{grid-template-columns:72px minmax(0,1fr) 54px!important;gap:5px!important}
  body[data-role="employee"] .employee-compact-submit .employee-type-toggle{width:72px!important}
  body[data-role="employee"] .employee-compact-submit>.employee-transfer-form>.btn[type="submit"]{width:54px!important;min-width:54px!important}
  .employee-mobile-table th,.employee-mobile-table td{padding-left:5px!important;padding-right:5px!important}
  .employee-mobile-phone strong{font-size:11px}
  .employee-mobile-feedback{grid-template-columns:minmax(0,1fr) 40px;gap:3px}
  .mobile-submit-btn{width:40px;font-size:9px}
  .employee-mobile-status-pill{min-width:46px;font-size:9px;padding:4px 5px}
}

/* hotfix10：管理端失败原因单选弹窗 + 自定义失败原因设置 */
.admin-setting-form-textarea{align-items:stretch}
.admin-setting-form-textarea textarea{width:100%;min-height:138px;border:1px solid var(--line);background:#fff;border-radius:12px;padding:11px 13px;outline:none;font-size:15px;font-weight:700;color:var(--text);font-family:inherit;line-height:1.55;resize:vertical}
.admin-setting-form-textarea textarea:focus{border-color:#93c5fd;box-shadow:0 0 0 4px rgba(37,99,235,.12)}
.failure-modal{display:none;position:fixed;inset:0;z-index:9999;align-items:center;justify-content:center;padding:20px}
.failure-modal.show{display:flex}
.failure-modal-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.52);backdrop-filter:blur(2px)}
.failure-modal-panel{position:relative;z-index:1;width:min(520px,calc(100vw - 30px));max-height:calc(100vh - 40px);overflow:auto;background:#fff;border:1px solid var(--line);border-radius:20px;box-shadow:0 28px 80px rgba(15,23,42,.28);padding:20px}
.failure-modal-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:14px}
.failure-modal-head h2{margin:0 0 6px;font-size:21px}
.failure-modal-head p{margin:0}
.failure-modal-x{width:36px;height:36px;border:1px solid var(--line);border-radius:10px;background:#fff;color:#475569;font-size:26px;line-height:1;cursor:pointer;flex:0 0 auto}
.failure-reason-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:14px 0 18px}
.failure-reason-option{position:relative;display:block;cursor:pointer}
.failure-reason-option input{position:absolute;opacity:0;pointer-events:none}
.failure-reason-option span{display:flex;min-height:48px;align-items:center;justify-content:center;padding:10px 12px;border:1px solid #dbe3ee;border-radius:12px;background:#f8fafc;font-weight:800;color:#334155;text-align:center;transition:.15s}
.failure-reason-option input:checked+span{border-color:#ef4444;background:#fff1f2;color:#be123c;box-shadow:0 0 0 3px rgba(239,68,68,.10)}
.failure-reason-option input:focus-visible+span{outline:3px solid rgba(37,99,235,.2);outline-offset:2px}
.failure-modal-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.failure-modal-actions .btn{width:100%}
body.failure-modal-open{overflow:hidden}
@media (max-width:760px){
  .admin-setting-form-textarea textarea{font-size:16px;min-height:160px}
  .failure-modal{padding:12px;align-items:flex-end}
  .failure-modal-panel{width:100%;max-height:82vh;border-radius:20px 20px 12px 12px;padding:16px}
  .failure-reason-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .failure-reason-option span{min-height:46px;padding:9px 8px;font-size:14px}
}
