/* Service progress: compact single-card layout */
.sp-page{width:100%;height:100%;min-height:0;display:flex;flex-direction:column;background:#fff;color:var(--csc-text,#273142);overflow:hidden}
.sp-scroll{flex:1 1 auto;min-height:0;overflow:auto;background:#fff;padding:22px 18px 30px;scrollbar-width:none;-webkit-overflow-scrolling:touch}.sp-scroll::-webkit-scrollbar{display:none}
.sp-wrap{width:min(760px,100%);margin:0 auto;display:flex;flex-direction:column;align-items:stretch;gap:14px}.sp-title{margin:0;text-align:center;font-size:22px;line-height:30px;font-weight:700;color:#151927}.sp-card{background:#fff;border:1px solid #e6eaf2;border-radius:8px;box-shadow:0 16px 34px rgba(31,42,68,.06);overflow:hidden}.sp-table{width:100%;display:flex;flex-direction:column}.sp-row{display:grid;grid-template-columns:150px minmax(0,1fr);min-height:54px;border-top:1px solid #eef1f5}.sp-row:first-child{border-top:0}.sp-label{padding:16px 20px;font-size:14px;line-height:20px;font-weight:700;color:#697386;background:#fbfcff}.sp-value{min-width:0;padding:16px 20px;font-size:15px;line-height:22px;font-weight:600;color:#111827;word-break:break-word}.sp-text{white-space:pre-wrap;font-weight:500;color:#273142}.sp-muted,.sp-empty{color:#98999e;font-weight:500;line-height:22px}.sp-status-pill{display:inline-flex;align-items:center;justify-content:center;min-height:28px;padding:3px 10px;border-radius:999px;font-size:13px;line-height:18px;font-weight:700}.sp-status-pill.processing{background:#eff5ff;color:#3e72ed}.sp-status-pill.closed{background:#f2f3f5;color:#70727c}.sp-attachments{display:flex;flex-wrap:wrap;gap:8px}.sp-attachments.reply{margin-top:10px}.sp-thumb{width:64px;height:64px;border:0;border-radius:8px;background:#f6f6f6;padding:0;overflow:hidden;cursor:pointer}.sp-thumb img{width:100%;height:100%;object-fit:cover;display:block}.sp-reply-box{padding:12px 14px;border:1px solid #e8edf5;border-radius:8px;background:#fbfcff}.sp-reply-text{font-size:14px;line-height:22px;color:#273142;white-space:pre-wrap;word-break:break-word;font-weight:500}.sp-system{margin:10px 0 0}.sp-system-bubble{display:inline-block;max-width:100%;padding:9px 12px;border-radius:8px;background:#f1f5fb;color:#505968;font-size:13px;line-height:20px;font-weight:500}.sp-system-link{border:0;background:transparent;color:#3e72ed;cursor:pointer;padding:0;font:inherit;font-weight:700}.sp-actions{display:flex;justify-content:center;gap:12px}.sp-btn-secondary{min-width:116px;height:42px;border:1px solid #3e72ed;border-radius:6px;background:#fff;color:#3e72ed;font-size:15px;font-weight:700;cursor:pointer}.sp-btn-secondary:hover{background:#f3f7ff}.sp-loading,.sp-error{margin:auto;padding:36px;text-align:center;color:#70727c}.sp-error{color:#ff5454;background:#fff;border:1px solid #ffd5d5;border-radius:8px}
.sp-staff-panel{display:none}.sp-staff-panel.show{display:block}.sp-staff-card{background:#fff;border:1px solid #e6eaf2;border-radius:8px;padding:18px;box-shadow:0 16px 34px rgba(31,42,68,.06)}.sp-staff-card-title{font-size:16px;line-height:24px;font-weight:700;color:#151927;margin-bottom:14px}.sp-status-box{padding:12px;border:1px solid #edf0f5;border-radius:8px;background:#fbfcff;margin-bottom:14px}.sp-mini-label{display:block;font-size:13px;line-height:18px;color:#697386;font-weight:700;margin-bottom:8px}.sp-status-row{display:flex;align-items:center;gap:8px}.sp-status-row select{flex:1;min-width:0;height:38px;border:1px solid #dfe3ea;border-radius:6px;background:#fff;color:#273142;padding:0 10px}.sp-status-row button{height:38px;padding:0 16px;border:0;border-radius:6px;background:#3e72ed;color:#fff;font-weight:700;cursor:pointer}.sp-status-row button:disabled,.sp-status-row select:disabled{opacity:.55;cursor:not-allowed}.sp-status-note{margin-top:8px;font-size:12px;line-height:18px;color:#b7791f}.sp-status-note.closed{color:#98999e}.sp-compose-box textarea{width:100%;height:108px;min-height:108px;max-height:108px;resize:none;border:1px solid #dfe3ea;border-radius:8px;padding:10px 12px;color:#273142;background:#fff;outline:none;line-height:20px}.sp-compose-box textarea:focus{border-color:#3e72ed;box-shadow:0 0 0 3px rgba(62,114,237,.12)}.sp-compose-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:9px}.sp-compose-left,.sp-compose-right{display:flex;align-items:center;gap:12px;min-width:0}.sp-file-btn{position:relative;display:inline-flex;align-items:center;justify-content:center;height:36px;padding:0 12px;border:1px solid #cacdd3;border-radius:6px;background:#fff;color:#273142;font-weight:700;cursor:pointer;white-space:nowrap}.sp-file-btn input{position:absolute;inset:0;opacity:0;cursor:pointer}.sp-compose-note{color:#70727c;font-size:13px;line-height:18px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sp-char-count{font-size:12px;color:#98999e}.sp-char-count.near-limit{color:#ff5454}.sp-send{height:38px;padding:0 18px;border:0;border-radius:6px;background:#3e72ed;color:#fff;font-weight:700;cursor:pointer;white-space:nowrap}.sp-send:hover{background:#5585ff}.sp-compose-preview{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0}.sp-compose-file{position:relative;width:56px;height:56px;border-radius:8px;background:#f6f6f6;overflow:hidden}.sp-compose-file img{width:100%;height:100%;object-fit:cover}.sp-compose-file span{display:none}.sp-compose-file button{position:absolute;right:4px;top:4px;width:20px;height:20px;border:0;border-radius:50%;background:rgba(0,0,0,.55);color:#fff;cursor:pointer}.sp-readonly-note{padding:14px 16px;color:#70727c;background:#fbfcff;font-size:13px;line-height:20px;border:1px solid #edf0f5;border-radius:8px}.sp-readonly-note.closed{color:#98999e}
@media(max-width:900px){.sp-scroll{padding:18px 14px 24px}.sp-wrap{width:100%;gap:12px}.sp-title{font-size:20px;line-height:28px}.sp-row{grid-template-columns:132px minmax(0,1fr);min-height:50px}.sp-label,.sp-value{padding:14px 16px}.sp-compose-actions{align-items:flex-end}.sp-compose-note{display:none}}
@media(max-width:560px){.sp-scroll{background:#fff;padding:10px 12px 18px}.sp-title{font-size:18px;line-height:26px}.sp-card,.sp-staff-card{border-radius:8px;box-shadow:none}.sp-row{display:block;min-height:0}.sp-label{padding:13px 12px 4px;background:#fff;font-size:13px;color:#697386}.sp-value{padding:0 12px 13px;font-size:14px;line-height:21px}.sp-thumb{width:58px;height:58px}.sp-actions{margin-top:2px}.sp-btn-secondary{height:40px}.sp-staff-card{padding:14px}.sp-status-row{align-items:stretch}.sp-status-row button{padding:0 12px}.sp-compose-actions{gap:8px;align-items:flex-end}.sp-compose-left{gap:8px}.sp-file-btn{height:34px;padding:0 10px}.sp-send{height:34px;padding:0 14px}.sp-char-count{display:none}.sp-compose-box textarea{height:92px;min-height:92px;max-height:92px}}

/* Inline staff controls: status and reply are edited directly inside the main card. */
.sp-staff-panel,.sp-staff-panel.show{display:none!important}
.sp-inline-status{display:flex;align-items:center;gap:8px;max-width:420px}.sp-inline-status select{flex:1;min-width:0;height:38px;border:1px solid #dfe3ea;border-radius:6px;background:#fff;color:#273142;padding:0 10px}.sp-inline-status button{height:38px;padding:0 16px;border:0;border-radius:6px;background:#3e72ed;color:#fff;font-weight:700;cursor:pointer}.sp-inline-status button:disabled,.sp-inline-status select:disabled{opacity:.55;cursor:not-allowed}.sp-inline-reply{width:100%;display:flex;flex-direction:column;gap:9px}.sp-inline-reply textarea{width:100%;height:112px;min-height:112px;max-height:112px;resize:none;border:1px solid #dfe3ea;border-radius:8px;padding:10px 12px;color:#273142;background:#fff;outline:none;line-height:20px}.sp-inline-reply textarea:focus{border-color:#3e72ed;box-shadow:0 0 0 3px rgba(62,114,237,.12)}.sp-inline-reply-actions{display:flex;align-items:center;justify-content:flex-end;gap:12px}.sp-inline-reply .sp-send{height:38px;padding:0 18px;border:0;border-radius:6px;background:#3e72ed;color:#fff;font-weight:700;cursor:pointer;white-space:nowrap}.sp-inline-reply .sp-send:hover{background:#5585ff}
@media(max-width:560px){.sp-inline-status{max-width:none;align-items:stretch}.sp-inline-status button{padding:0 12px}.sp-inline-reply textarea{height:96px;min-height:96px;max-height:96px}.sp-inline-reply-actions{justify-content:space-between}.sp-inline-reply .sp-char-count{display:inline-block}.sp-inline-reply .sp-send{height:34px;padding:0 14px}}

/* Optimized not-found / unavailable state */
.sp-error-card{width:min(420px,100%);margin:72px auto 0;padding:34px 28px;border:1px solid #e6eaf2;border-radius:12px;background:#fff;box-shadow:0 16px 34px rgba(31,42,68,.06);display:flex;flex-direction:column;align-items:center;text-align:center;gap:14px}.sp-state-icon{width:64px;height:64px;object-fit:contain;display:block}.sp-error-card h1{margin:0;color:#151927;font-size:20px;line-height:28px;font-weight:700}.sp-error-card p{margin:0;color:#70727c;font-size:14px;line-height:22px;white-space:pre-line}.sp-error-card .sp-btn-secondary{margin-top:4px}
@media(max-width:560px){.sp-error-card{margin:26px auto 0;padding:28px 22px;box-shadow:none}.sp-state-icon{width:56px;height:56px}}

/* Unified state-card alignment with serviceEvaluation. */
.sp-state-wrap{min-height:100%;justify-content:center;align-items:center}.sp-error-card{margin:0 auto;width:min(420px,100%);min-height:192px;padding:34px 28px;border-radius:12px;gap:14px}.sp-state-icon{width:64px;height:64px}
@media(max-width:560px){.sp-state-wrap{min-height:100%;padding:16px 12px}.sp-error-card{max-width:360px;margin:0 auto;padding:28px 22px;box-shadow:none}.sp-state-icon{width:56px;height:56px}}


/* Final polish: match the compact card rhythm used across progress/evaluation pages. */
.sp-wrap{width:min(720px,100%);gap:16px}.sp-title{font-size:20px;line-height:28px}.sp-card{border-radius:12px;box-shadow:0 18px 38px rgba(31,42,68,.055)}.sp-row{grid-template-columns:142px minmax(0,1fr);min-height:52px}.sp-label{background:#fbfcff;color:#596579;font-weight:700}.sp-value{font-weight:500;color:#273142}.sp-row:first-child .sp-value{font-weight:700;color:#111827}.sp-text{font-weight:500}.sp-attachments{gap:10px}.sp-thumb{border:1px solid #eef1f5;transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease}.sp-thumb:hover{transform:translateY(-1px);border-color:#c9d7ff;box-shadow:0 8px 18px rgba(62,114,237,.12)}.sp-thumb:focus-visible{outline:0;border-color:#3e72ed;box-shadow:0 0 0 3px rgba(62,114,237,.16)}.sp-reply-box{border-color:#edf1f6;background:#fbfcff}.sp-inline-status{max-width:100%}.sp-inline-status select,.sp-inline-reply textarea{border-color:#dfe5ee;border-radius:8px}.sp-status-note{padding:7px 10px;border-radius:8px;background:#fff8ec;color:#9a6700}.sp-status-note.closed{background:#f6f7f9;color:#70727c}.sp-btn-secondary,.sp-inline-status button,.sp-inline-reply .sp-send{border-radius:8px}.sp-error-card,.evaluation-state-card{box-shadow:0 18px 38px rgba(31,42,68,.055)}
@media(max-width:560px){.sp-wrap{gap:12px}.sp-title{font-size:18px;line-height:26px}.sp-card{border-radius:12px;border-left:0;border-right:0;box-shadow:none}.sp-row{border-top:1px solid #eef1f5}.sp-label{padding:12px 14px 3px;background:#fff}.sp-value{padding:0 14px 12px}.sp-status-note{font-size:12px;line-height:18px}.sp-thumb:hover{transform:none;box-shadow:none}}

/* Reply actions: Enter inserts a new line; actions are button-only. */
.sp-inline-reply-buttons{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}
.sp-inline-reply .sp-save-close{height:38px;padding:0 18px;border:1px solid #c8d4ea;border-radius:8px;background:#fff;color:#315ea8;font-weight:700;cursor:pointer;white-space:nowrap}
.sp-inline-reply .sp-save-close:hover{background:#f5f8ff;border-color:#9fb6df}
.sp-inline-reply .sp-send:disabled,.sp-inline-reply .sp-save-close:disabled{opacity:.55;cursor:not-allowed}
@media(max-width:560px){.sp-inline-reply-actions{align-items:flex-end}.sp-inline-reply-buttons{gap:6px}.sp-inline-reply .sp-save-close{height:34px;padding:0 12px}}

/* Reply mailbox variable and resolved mail link. */
.sp-inline-reply-tools{display:flex;align-items:center;justify-content:flex-start}
.sp-insert-variable{height:32px;padding:0 12px;border:1px solid #d7deea;border-radius:7px;background:#fff;color:#315ea8;font-size:13px;font-weight:700;cursor:pointer}
.sp-insert-variable:hover{background:#f5f8ff;border-color:#aebfdd}
.sp-insert-variable:disabled{opacity:.5;cursor:not-allowed}
.sp-reply-mailbox{display:inline-flex;align-items:center;gap:5px;margin:0;padding:0;border:0;background:transparent;color:#315ea8;text-decoration:none;font:inherit;font-weight:700;line-height:inherit;text-align:left;word-break:break-all;cursor:pointer}
.sp-reply-mailbox:hover{text-decoration:underline}
.sp-reply-mailbox img{width:14px;height:14px;flex:0 0 14px;object-fit:contain;display:inline-block}
@media(max-width:560px){.sp-insert-variable{height:30px;padding:0 10px}.sp-reply-mailbox img{width:13px;height:13px;flex-basis:13px}}
