/* V36.36: responsive delivery and gallery review workspaces. */
.reference-shell .main, .reference-shell .content, .reference-shell .stat > div { min-width: 0; }
.reference-shell .section-head { flex-wrap: wrap; }
.reference-shell .welcome { align-items: center; flex-wrap: wrap; }
.reference-shell .stat .value { white-space: normal; overflow-wrap: anywhere; }
.reference-shell .ref-search { min-width: 0; }
.reference-shell .ref-header-controls { flex-shrink: 0; }
.reference-shell .ref-panel, .reference-shell .ref-grid, .reference-shell .card { max-width: 100%; }
.reference-shell button:focus-visible, .reference-shell input:focus-visible, .reference-shell select:focus-visible {
  outline: 3px solid #bfa5f1; outline-offset: 3px;
}

.delivery-workspace-shell .content { max-width: 1480px; margin-inline: auto; padding: 28px 28px 42px; }
.reference-shell .delivery-workspace-heading { margin-bottom: 22px; gap: 14px; }
.reference-shell .delivery-workspace-heading h1 { font-size: 29px; letter-spacing: -.8px; margin: 4px 0 8px; }
.reference-shell .delivery-workspace-heading p { font-size: 13px; line-height: 1.5; color: #746b86; }
.delivery-workspace-heading .eyebrow { color: #8b7b9f; letter-spacing: 1.8px; font-size: 10px; font-weight: 700; }
.delivery-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.reference-shell .delivery-summary-item { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; text-align: left; padding: 18px; background: #fff; border: 1px solid #e2ddea; border-radius: 8px; color: #24163d; min-width: 0; }
.delivery-summary-item .delivery-summary-label { font-size: 13px; font-weight: 600; align-self: center; line-height: 1.4; }
.delivery-summary-item strong { grid-row: 1 / 3; grid-column: 2; align-self: center; font-size: 29px; letter-spacing: -.7px; line-height: 1.1; }
.delivery-summary-item small { font-size: 11px; color: #72647f; line-height: 1.4; }
.reference-shell .delivery-summary-item:hover { border-color: #ab8dda; background: #fdfbff; }
.delivery-summary-item.overdue strong { color: #be4a53; }
.delivery-summary-item.today strong { color: #98611a; }
.delivery-summary-item.review strong { color: #7540c8; }
.delivery-summary-item.released strong { color: #298361; }
.reference-shell .delivery-workspace { padding: 0; overflow: hidden; border-color: #ded7e8 !important; }
.delivery-toolbar { display: grid; grid-template-columns: minmax(230px, 1fr) minmax(190px, 230px); gap: 18px; padding: 22px 22px 17px; }
.delivery-toolbar label { display: grid; gap: 7px; margin: 0; }
.delivery-toolbar label > span { font-size: 12px; font-weight: 650; color: #72647f; letter-spacing: .25px; }
.delivery-toolbar input, .delivery-toolbar select { width: 100%; min-width: 0; min-height: 44px; border: 1px solid #ded7e8; border-radius: 6px; padding: 10px 12px; background: #fff; color: #291c3c; font-size: 14px; }
.delivery-toolbar input::placeholder { color: #92889e; }
.delivery-filter-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid #e9e3f0; padding: 0 22px 17px; }
.delivery-filter-tabs { display: flex; gap: 5px; flex-wrap: wrap; min-width: 0; }
.reference-shell .delivery-filter-tabs button { border: 1px solid transparent; background: transparent; padding: 10px 12px; color: #72647f; font-size: 12px; white-space: nowrap; }
.reference-shell .delivery-filter-tabs button.active { background: #ede4fb; border-color: #e3d5f5; color: #6732b4; font-weight: 650; }
.delivery-results-count { font-size: 12px; white-space: nowrap; color: #72647f; }
.delivery-table-wrap { width: 100%; overflow: auto; }
.reference-shell .delivery-workspace-table { min-width: 0; table-layout: fixed; }
.reference-shell .delivery-workspace-table th { background: #faf8fd; font-size: 11px; font-weight: 600; color: #72647f; padding: 14px 18px; white-space: normal; }
.delivery-workspace-table th:first-child { width: 26%; }
.delivery-workspace-table th:nth-child(2) { width: 15%; }
.delivery-workspace-table th:nth-child(3) { width: 23%; }
.delivery-workspace-table th:nth-child(4) { width: 15%; }
.delivery-workspace-table th:nth-child(5) { width: 21%; }
.reference-shell .delivery-workspace-table td { vertical-align: middle; padding: 19px 18px; font-size: 13px; border-bottom: 1px solid #eee8f4; overflow-wrap: anywhere; }
.reference-shell .delivery-workspace-table tbody tr:hover { background: #fdfbff; }
.reference-shell .delivery-workspace-table td:first-child button.delivery-client-name { font-size: 14px; color: #30213f; font-weight: 650; line-height: 1.5; }
.delivery-client-name:hover { text-decoration: underline; text-underline-offset: 3px; }
.delivery-client-caption { display: block; color: #72647f; font-size: 12px; line-height: 1.5; margin-top: 5px; }
.delivery-date { display: block; font-size: 13px; font-weight: 500; color: #534260; }
.delivery-due-caption { display: block; font-size: 12px; line-height: 1.5; margin-top: 5px; color: #72647f; }
.delivery-due-caption.overdue { color: #ad414b; }
.delivery-due-caption.today { color: #926019; }
.delivery-gallery-badge { display: inline-block; padding: 6px 9px; border: 1px solid transparent; border-radius: 5px; font-size: 11px; font-weight: 600; line-height: 1.4; }
.delivery-gallery-badge.upload { background: #f2edf8; border-color: #e7e0ef; color: #705685; }
.delivery-gallery-badge.review { background: #f2e9fd; border-color: #e7d5f8; color: #723d9f; }
.delivery-gallery-badge.released { background: #eaf6ef; border-color: #d8ecdf; color: #347252; }
.reference-shell .delivery-workspace-table .delivery-status { width: 100%; min-width: 0; max-width: 145px; min-height: 38px; height: auto; font-size: 12px; padding: 8px; border-radius: 5px; }
.delivery-row-actions { display: flex; align-items: flex-start; justify-content: center; flex-direction: column; gap: 8px; }
.reference-shell .delivery-row-actions button { margin: 0; line-height: 1.45; white-space: normal; }
.reference-shell .delivery-row-actions .primary { box-shadow: none; background: #7040bc; font-size: 12px; padding: 9px 12px; min-height: 38px; }
.reference-shell .delivery-row-actions .delivery-detail-button { background: transparent; border: 0; color: #71578b; padding: 4px 0; font-size: 12px; }
.delivery-empty { text-align: center; padding: 42px 24px; color: #8b7c9b; }
.delivery-empty h3 { margin-bottom: 8px !important; }
.delivery-empty p { font-size: 12px; line-height: 1.6; }

.gallery-workflow-status { display: inline-flex; align-items: center; margin: 4px 6px 4px 0; padding: 5px 8px; border: 1px solid #e5dced; border-radius: 5px; background: #f6f2fa; color: #83718e; font-size: 10px; line-height: 1.4; white-space: normal; }
.gallery-workflow-status.waiting-review { background: #f3eafc; border-color: #e5d3f7; color: #7b43a6; }
.gallery-workflow-status.released { background: #eaf7ef; border-color: #d6eadd; color: #33734f; }
.gallery-review-dashboard { margin-bottom: 16px; }
.gallery-review-tabs { display: flex; flex-wrap: wrap; gap: 7px; margin: 12px 0; }
.reference-shell .gallery-review-tabs button { background: #f9f6fc; border: 1px solid #e7dfef; color: #846e9d; }
.reference-shell .gallery-review-tabs button.active, .reference-shell .gallery-review-tabs [aria-selected=true] { background: #eee4fb; border-color: #d7c3f1; color: #6c32b1; }
.gallery-workflow-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 0; border-bottom: 1px solid #eee8f4; }
.gallery-workflow-row:last-child { border-bottom: 0; }
.gallery-workflow-row > div { min-width: 0; }
.gallery-workflow-row b { font-size: 12px; overflow-wrap: anywhere; }
.gallery-workflow-row small { display: block; margin-top: 4px; color: #8c7b9d; font-size: 10px; line-height: 1.5; }
.gallery-workflow-row button { flex-shrink: 0; }
.staff-upload-card { max-width: 100%; }
.staff-upload-picker { display: grid; gap: 9px; border: 1px dashed #bba1db; border-radius: 7px; background: #faf7ff; padding: 18px; margin: 14px 0; }
.staff-upload-picker input { max-width: 100%; min-width: 0; }
.staff-upload-card select { width: 100%; min-width: 0; }
.reference-shell .gallery-message-copy { white-space: normal; font-size: 10px; margin-top: 5px; }
.released-gallery-messages { margin: 0 0 15px; }
.released-gallery-messages .section-head p { margin: 5px 0 0; font-size: 11px; line-height: 1.5; color: #8d7c9d; }
.released-gallery-search { display: grid; gap: 6px; max-width: 380px; margin: 15px 0; font-size: 10px; color: #8b799c; }
.released-gallery-search input { width: 100%; min-height: 37px; min-width: 0; padding: 8px 11px; border: 1px solid #e2d9eb; border-radius: 6px; font-size: 12px; }
.released-gallery-messages [data-released-list] { max-height: 380px; overflow-y: auto; }
.released-gallery-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; border-top: 1px solid #eee7f5; padding: 12px 0; }
.released-gallery-row > div { min-width: 0; }
.released-gallery-row b { font-size: 12px; overflow-wrap: anywhere; }
.released-gallery-row small { display: block; font-size: 10px; color: #8d7a9c; margin-top: 4px; }
.gallery-message-text { width: 100%; resize: vertical; font: inherit; font-size: 14px; line-height: 1.65; padding: 13px; border: 1px solid #ddd3e9; border-radius: 6px; }
.gallery-message-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

@media (max-width: 1180px) {
  .delivery-workspace-shell .content { padding: 22px 18px 32px; }
  .delivery-summary { gap: 10px; }
  .reference-shell .delivery-summary-item { grid-template-columns: 1fr; gap: 6px; padding: 15px; }
  .delivery-summary-item strong { grid-column: auto; grid-row: auto; }
  .reference-shell .delivery-workspace-table td, .reference-shell .delivery-workspace-table th { padding-inline: 12px; }
}
@media (max-width: 950px) {
  .delivery-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .reference-shell .delivery-summary-item { grid-template-columns: 1fr auto; }
  .delivery-summary-item strong { grid-row: 1 / 3; grid-column: 2; }
  .delivery-toolbar { grid-template-columns: minmax(0, 1fr) minmax(160px, .65fr); padding: 18px; gap: 12px; }
  .delivery-filter-bar { padding: 0 18px 16px; align-items: flex-start; flex-direction: column; gap: 9px; }
  .delivery-table-wrap { overflow: visible; }
  .reference-shell .delivery-workspace-table { display: block; }
  .delivery-workspace-table thead { display: none; }
  .delivery-workspace-table tbody { display: grid; gap: 12px; padding: 14px; background: #f8f5fc; }
  .reference-shell .delivery-workspace-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 15px; padding: 17px; border: 1px solid #e5ddec; border-radius: 7px; background: #fff; }
  .reference-shell .delivery-workspace-table td { border: 0; display: block; padding: 0; min-width: 0; }
  .delivery-workspace-table td::before { content: attr(data-label); display: block; margin-bottom: 6px; font-size: 11px; font-weight: 600; color: #72647f; letter-spacing: .25px; }
  .delivery-workspace-table td:first-child { grid-column: 1 / -1; padding-bottom: 12px; border-bottom: 1px solid #f0eaf6; }
  .delivery-workspace-table td:first-child::before, .delivery-workspace-table td:last-child::before { display: none; }
  .delivery-workspace-table td:last-child { grid-column: 1 / -1; padding-top: 12px; border-top: 1px solid #f0eaf6; }
  .delivery-row-actions { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 14px; }
  .reference-shell .delivery-row-actions .primary { padding: 11px 14px; min-height: 44px; font-size: 12px; }
  .reference-shell .delivery-row-actions .delivery-detail-button { min-height: 44px; }
  .reference-shell .delivery-workspace-table .delivery-status { max-width: 180px; min-height: 44px; font-size: 16px; }
  .reference-shell .delivery-workspace-table td:first-child button.delivery-client-name { font-size: 15px; }
}
@media (max-width: 760px) {
  .reference-shell .topbar { min-height: 58px; height: auto; }
  .reference-shell .ref-search input { width: 100%; min-width: 0; font-size: 12px; }
  .reference-shell .ref-header-controls { gap: 7px; }
  .reference-shell .content { padding-inline: 13px; }
  .reference-shell .stat .value { font-size: 19px; }
  .reference-shell .stat { padding: 12px 10px; gap: 8px; }
  .reference-shell .ref-metric-icon { width: 25px; flex-basis: 25px; }
  .reference-shell .delivery-workspace-heading { margin-bottom: 18px; align-items: flex-start; }
  .reference-shell .delivery-workspace-heading h1 { font-size: 26px; }
  .reference-shell .delivery-workspace-heading > button { font-size: 12px; min-height: 42px; }
  .delivery-summary { margin-bottom: 17px; }
  .delivery-toolbar { grid-template-columns: 1fr; gap: 13px; padding: 17px; }
  .delivery-toolbar input, .delivery-toolbar select { font-size: 16px; min-height: 43px; }
  .reference-shell .delivery-filter-tabs button { padding: 10px; min-height: 42px; }
  .gallery-workflow-row { align-items: flex-start; flex-wrap: wrap; }
  .released-gallery-row { align-items: flex-start; flex-direction: column; gap: 7px; }
  .released-gallery-messages [data-released-list] { max-height: 450px; }
}
@media (max-width: 380px) {
  .reference-shell .delivery-summary-item { padding: 12px; gap: 5px 7px; }
  .delivery-summary-item .delivery-summary-label { font-size: 12px; }
  .delivery-summary-item strong { font-size: 25px; }
  .delivery-summary-item small { font-size: 11px; }
  .reference-shell .delivery-workspace-row { padding: 14px; gap: 12px; }
  .reference-shell .stats, .reference-shell .stats.ref-secretary-stats { gap: 7px; }
}

/* V36.39 connection state is descriptive, not a promise of background push. */
.echo-live-alert-status{display:inline-flex;align-items:center;min-height:36px;padding:5px 10px;font-size:12px;line-height:1.4;color:#625577;overflow-wrap:anywhere}
