: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}}
