.detail-page { max-width:1440px; margin:0 auto; }
.detail-page .page-heading { align-items:flex-start; margin-bottom:24px; }
.detail-page .page-heading h1 { font-size:30px; letter-spacing:-.8px; margin:6px 0 10px; }
.detail-subtitle { color:#7a898f; font-size:13px; margin:0; }
.detail-page .panel { padding:24px; border-color:#e0e7e8; box-shadow:0 2px 5px #183c3503; }
.detail-page .panel-heading { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:20px; }
.detail-page .panel-heading h2 { margin:0; }
.panel-heading .muted { font-size:12px; }
.status-label { display:inline-flex; align-items:center; gap:6px; font-size:11px; font-weight:600; line-height:1.4; border:1px solid transparent; border-radius:5px; padding:4px 8px; white-space:nowrap; vertical-align:middle; }
.status-label::before { content:""; width:5px; height:5px; border-radius:50%; background:currentColor; flex:none; }
.status-positive { color:#2b7854; background:#eaf5ee; border-color:#d5e9dd; }
.status-negative { color:#a34d4d; background:#fbefee; border-color:#f1d9d7; }
.status-warning { color:#936c27; background:#fcf5e8; border-color:#efe2c4; }
.status-info { color:#477b9b; background:#edf5fa; border-color:#dbe8f1; }
.status-neutral { color:#728089; background:#f3f5f6; border-color:#e3e8ea; }
.week-summary { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; margin-bottom:24px; }
.summary-item { background:#fff; border:1px solid #e0e7e8; border-radius:9px; padding:16px 20px; display:flex; align-items:center; justify-content:space-between; gap:10px; }
.summary-item .summary-number { font-size:25px; font-weight:650; letter-spacing:-.8px; color:#344a50; }
.summary-caption { font-size:12px; color:#7a898f; }
.week-detail-columns { display:grid; grid-template-columns:minmax(0,1fr) 310px; gap:24px; align-items:start; }
.detail-page .table-scroll { overflow-x:auto; }
.detail-page .assignments-table th { background:#f7f9fa; font-size:10px; text-transform:uppercase; letter-spacing:.7px; padding:12px 10px; white-space:nowrap; }
.detail-page .assignments-table td { padding:15px 10px; vertical-align:middle; border-bottom:1px solid #edf1f2; }
.detail-page .assignments-table tbody tr:hover { background:#fbfdfc; }
.assignment-task-link { font-weight:600; line-height:1.5; display:inline-block; }
.assignment-task-link::after { content:" ↗"; color:#9fb4af; font-weight:400; }
.assignment-person-link { color:#63787d; font-size:13px; }
.detail-page .row-action { padding:6px 11px; font-size:11px; background:#fff; }
.detail-page .assignments-table form { margin:0; }
.assignment-table-actions { display:flex; gap:10px; align-items:center; flex-wrap:wrap; padding-top:20px; }
.assignment-table-actions button { font-size:11px; padding:9px 12px; }
.week-notes-card { position:sticky; top:20px; }
.week-notes-card h2 { margin-bottom:20px; }
.week-notes-card label { color:#566d73; font-size:12px; }
.week-notes-card input:not([type=submit]):not([type=checkbox]),.week-notes-card textarea { background:#fcfdfd; border-color:#dbe3e5; }
.week-notes-card textarea { resize:vertical; min-height:170px; }
.week-notes-card .no-service-option { display:flex; align-items:flex-start; gap:8px; margin:20px 0; padding:12px; border-radius:6px; background:#f6f8f8; }
.week-notes-card .no-service-option input { margin:3px 0 0; }
.no-service-option label { margin:0; line-height:1.5; font-weight:500; }
.no-service-option span { display:block; font-size:11px; font-weight:400; color:#879398; margin-top:2px; }
.week-notes-card input[type=submit] { width:100%; }
.detail-page .response-panel { border-radius:10px; margin-top:0; }
.response-panel>summary { display:flex; align-items:center; justify-content:space-between; gap:12px; font-size:14px; font-weight:600; color:#48655f; }
.response-panel>summary::after { content:"+"; font-size:20px; font-weight:400; }
.response-panel[open]>summary::after { content:"−"; }
.response-panel .response-help { font-size:12px; color:#879398; }
.response-entry { display:flex; align-items:center; gap:12px; padding:13px 0; border-top:1px solid #edf1f2; }
.response-entry .response-person { flex:1; min-width:0; }
.response-person strong { display:block; font-size:12px; }
.response-person span { font-size:12px; color:#8b979c; }
.response-entry select { width:140px; min-height:32px; padding:5px 8px; font-size:12px; }
.response-entry input[type=submit] { margin:0; font-size:11px; padding:7px 10px; }
.assignment-heading-meta { display:flex; flex-wrap:wrap; align-items:center; gap:12px; color:#879398; font-size:13px; }
.assignment-detail-columns { display:grid; grid-template-columns:minmax(0,1fr) 290px; gap:24px; align-items:start; }
.person-summary { display:flex; gap:12px; align-items:center; margin-bottom:22px; }
.person-initials { display:grid; place-items:center; width:42px; height:42px; flex:none; border-radius:10px; background:#eaf2ef; color:#4f7b6c; font-size:14px; font-weight:700; }
.person-summary strong { display:block; font-size:14px; }
.person-summary span { display:block; font-size:11px; color:#95a0a4; margin-top:4px; }
.assignment-facts { margin:0; }
.assignment-facts>div { padding:14px 0; border-top:1px solid #edf1f2; }
.assignment-facts dt { color:#95a0a4; font-size:10px; text-transform:uppercase; letter-spacing:.8px; margin-bottom:8px; }
.assignment-facts dd { margin:0; font-size:13px; line-height:1.6; overflow-wrap:anywhere; }
.message-thread { display:flex; flex-direction:column; gap:22px; }
.thread-entry { display:grid; grid-template-columns:30px minmax(0,1fr); gap:12px; }
.thread-direction { width:28px; height:28px; display:grid; place-items:center; border-radius:50%; background:#edf4f1; color:#739589; font-size:15px; }
.thread-entry.incoming .thread-direction { background:#edf4fa; color:#6b94b0; }
.thread-meta { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin-bottom:9px; }
.thread-meta strong { font-size:12px; color:#60767b; }
.thread-meta time { color:#9aa5aa; font-size:11px; }
.thread-meta .status-label { margin-left:auto; padding:2px 6px; font-size:10px; }
.message-bubble { border:1px solid #e6ecea; background:#f8fbf9; padding:15px 17px; border-radius:0 9px 9px 9px; }
.thread-entry.incoming .message-bubble { background:#f5f9fc; border-color:#e0eaf0; }
.message-bubble p { margin:0; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.8; font-size:13px; color:#516b72; }
.history-empty { text-align:center; padding:42px 20px; color:#95a1a6; font-size:13px; border:1px dashed #dce5e5; border-radius:8px; }
.delivery-entry { padding:15px 0; border-top:1px solid #edf1f2; }
.delivery-entry:first-of-type { border-top:0; }
.delivery-entry p { font-size:12px; color:#71858a; white-space:pre-wrap; overflow-wrap:anywhere; }
.activity-entries p { padding:12px 0; margin:0; border-bottom:1px solid #edf1f2; color:#6e8288; font-size:12px; }
@media(max-width:1050px) { .week-detail-columns { grid-template-columns:minmax(0,1fr) 280px; gap:16px; } .detail-page .panel { padding:18px; } .assignment-detail-columns { grid-template-columns:minmax(0,1fr) 260px; gap:16px; } }
@media(max-width:800px) { .week-detail-columns,.assignment-detail-columns { grid-template-columns:1fr; } .week-notes-card { position:static; } .week-summary { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; } .summary-item { padding:12px; } .detail-page .page-heading { flex-direction:row; flex-wrap:wrap; } .detail-page .page-heading h1 { font-size:25px; } .response-entry { flex-wrap:wrap; } .response-person { flex-basis:100%; } }

.assignment-receipt { width:calc(100% - 32px); max-width:560px; min-width:0; }
.assignment-receipt h1 { font-size:28px; line-height:1.2; }
.assignment-receipt .response-saved { color:#266d65; }
.assignment-response-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-top:24px; }
.assignment-response-actions button { width:100%; min-height:44px; white-space:normal; }
.assignment-receipt .response-notes { margin-top:24px; padding:16px; background:#f4f7f6; border:1px solid #dde4e5; border-radius:6px; white-space:pre-wrap; overflow-wrap:anywhere; word-break:break-word; line-height:1.7; }
.assignment-receipt .response-notes a { text-decoration:underline; overflow-wrap:anywhere; }

.assignment-receipt .change-response { margin-top:24px; border-top:1px solid #dde4e5; padding-top:16px; }
.assignment-receipt .change-response p { font-size:13px; color:#71848a; line-height:1.6; }

.week-navigation { display:flex; flex-wrap:wrap; gap:8px; }
.assignment-response-count { font-variant-numeric:tabular-nums; }
.assignment-response-count a { display:inline-block; min-width:24px; }

/* Full-width assignment content in the shared application style. */
.assignment-title-row { display:flex; align-items:flex-start; gap:18px; margin-bottom:24px; }
.assignment-title-row h1 { margin:6px 0 10px; font-size:30px; line-height:1.35; font-weight:650; letter-spacing:-.8px; }
.assignment-title-row h1 a { color:#5e827b; }
.assignment-back-link { margin-left:auto; flex:none; white-space:nowrap; font-size:12px; }
.assignment-stats h2 { margin:0 0 16px; font-size:18px; }
.assignment-stats-content { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:24px; align-items:start; }
.stats-person { font-size:16px; font-weight:600; }
.stats-outgoing,.stats-information { font-size:13px; line-height:1.8; margin:10px 0 0; color:#71858a; overflow-wrap:anywhere; }
.stats-outgoing span { color:#4e686e; font-weight:600; }
.stats-information { white-space:pre-wrap; }
.detail-page .assignment-chat { padding:0; overflow:hidden; border-radius:10px; }
.assignment-chat > summary { display:flex; align-items:center; gap:9px; list-style:none; padding:20px 24px; color:#48655f; font-size:17px; font-weight:600; }
.assignment-chat[open] > summary { border-bottom:1px solid #e6ecea; }
.assignment-chat > summary::-webkit-details-marker { display:none; }
.assignment-chat > summary::after { content:'−'; margin-left:auto; font-size:22px; font-weight:400; color:#879c96; }
.assignment-chat:not([open]) > summary::after { content:'+'; }
.chat-message-count { font-size:12px; font-weight:400; color:#95a0a4; margin-left:6px; }
.chat-content { padding:24px; }
.assignment-timeline { position:relative; margin-left:4px; }
.assignment-timeline::before { content:''; position:absolute; left:8px; top:8px; bottom:8px; width:1px; background:#dfe9e4; }
.timeline-entry { position:relative; padding:0 0 22px 35px; }
.timeline-entry:last-child { padding-bottom:0; }
.timeline-dot { position:absolute; width:10px; height:10px; border-radius:50%; background:#b8ccc4; border:4px solid white; box-sizing:content-box; left:0; top:10px; }
.timeline-entry:first-child .timeline-dot { background:#5c9583; }
.timeline-bubble { background:#f8fbf9; border:1px solid #e6ecea; border-radius:0 9px 9px 9px; padding:15px 17px; min-width:0; }
.timeline-entry.incoming .timeline-bubble { background:#f5f9fc; border-color:#e0eaf0; }
.timeline-entry.incoming .timeline-dot { background:#8caec2; }
.timeline-meta { display:flex; align-items:center; flex-wrap:wrap; gap:9px; margin-bottom:10px; }
.timeline-sender { color:#60767b; font-size:12px; font-weight:600; }
.timeline-meta .status-label { font-size:10px; padding:2px 6px; }
.timeline-meta time { margin-left:auto; color:#9aa5aa; font-size:11px; }
.timeline-bubble p { margin:0; font-size:13px; line-height:1.8; color:#516b72; white-space:pre-wrap; overflow-wrap:anywhere; }
.timeline-bubble a { text-decoration:underline; }
.chat-actions { display:flex; justify-content:flex-end; padding:16px 24px; border-top:1px solid #edf1f2; }
.assignment-resend { font-size:12px; padding:9px 14px; }
.chat-actions form { margin:0; }
.assignment-deliveries > summary { color:#48655f; font-size:14px; font-weight:600; }
@media(max-width:700px) {
  .assignment-title-row { flex-wrap:wrap; }
  .assignment-title-row h1 { font-size:25px; }
  .assignment-back-link { margin-left:0; }
  .assignment-stats-content { grid-template-columns:minmax(0,1fr); gap:12px; }
  .chat-content { padding:16px 12px; }
  .assignment-chat > summary { padding:16px; }
  .timeline-entry { padding-left:26px; }
  .timeline-meta time { margin-left:0; flex-basis:100%; }
}

.week-detail .request-action { background:#2b7854; border-color:#2b7854; color:#fff; }
.week-detail .request-action:hover { background:#236346; border-color:#236346; }

.calendar-toggle { display:flex; align-items:center; gap:12px; font-weight:600; }
.calendar-toggle input[role="switch"] { appearance:none; width:42px; height:24px; padding:0; margin:0; border-radius:20px; background:#c6d2cf; border:1px solid #a8bbb5; position:relative; cursor:pointer; flex-shrink:0; }
.calendar-toggle input[role="switch"]::after { content:""; position:absolute; width:18px; height:18px; top:2px; left:2px; border-radius:50%; background:white; transition:transform .15s; }
.calendar-toggle input[role="switch"]:checked { background:#266d65; border-color:#266d65; }
.calendar-toggle input[role="switch"]:checked::after { transform:translateX(18px); }
.calendar-toggle input[role="switch"]:focus-visible { outline:3px solid #8ab9b0; outline-offset:3px; }
.calendar-times { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.calendar-task-fields { margin:24px 0; }
.calendar-preview-link { display:inline-block; margin:8px 0; font-weight:600; }

.manual-response-controls { display:flex; flex-wrap:wrap; align-items:center; gap:6px; }
.manual-response-controls form { margin:0; }
.manual-response-controls .manual-response-button { font-size:12px; line-height:1.3; padding:7px 10px; border-radius:6px; white-space:nowrap; }
.manual-response-controls .manual-accept { color:#fff; background:#2b7854; border:1px solid #2b7854; }
.manual-response-controls .manual-accept:hover { background:#236346; }
.manual-response-controls .manual-decline { color:#a64242; background:#fff6f5; border:1px solid #e6bebe; }
.manual-response-controls .manual-decline:hover { background:#fae9e7; }
.manual-response-controls button:disabled { opacity:.45; cursor:default; }
.assignment-stats .stats-status { display:flex; flex-direction:column; align-items:flex-start; gap:12px; max-width:260px; }
.manual-response-help { font-size:12px; line-height:1.6; color:#71858a; margin:0; }

.calendar-address-picker { margin:18px 0; }
.calendar-address-picker [hidden] { display:none!important; }
.company-address-preview { background:#f4f8f6; padding:12px 16px; border:1px solid #dce7e1; border-radius:6px; font-size:13px; line-height:1.65; }
.company-address-preview p { margin:0; }

.calendar-history-entry { padding:18px 0; border-top:1px solid #e6ecea; }
.calendar-history-entry:first-of-type { border-top:0; padding-top:4px; }
.calendar-history-entry:last-child { padding-bottom:0; }
.calendar-history-fields { margin:12px 0 0; font-size:13px; line-height:1.7; }
.calendar-history-fields > div { display:grid; grid-template-columns:110px minmax(0,1fr); gap:14px; margin:5px 0; }
.calendar-history-fields dt { color:#80938c; }
.calendar-history-fields dd { margin:0; overflow-wrap:anywhere; color:#47625b; }
.calendar-history-error { font-size:12px; color:#a45941; margin:12px 0 0; overflow-wrap:anywhere; }
@media(max-width:600px) { .calendar-history-fields > div { grid-template-columns:85px minmax(0,1fr); gap:8px; } }

.poll-share-controls { display:flex; align-items:center; flex-wrap:wrap; gap:10px; }
.poll-share-controls input { flex:1; min-width:220px; margin:0; }
.poll-share-controls .button,.poll-share-controls button { white-space:nowrap; }
.poll-share-panel [role="status"] { font-size:13px; margin:8px 0 0; color:#266d65; }
