.shortage-notices { min-width: 0; }
.shortage-tools { display: flex; gap: 10px; margin: 12px 0; }
.shortage-tools .task-search-field { flex: 1; min-width: 0; }
.shortage-tools .secondary-button { flex-shrink: 0; }
.shortage-summary { display: flex; justify-content: space-between; gap: 12px; color: var(--todo-muted, #697386); font-size: 12px; margin: 12px 0; }
.shortage-status { padding: 16px; margin-bottom: 14px; color: #626b78; text-align: center; background: #f5f7fa; border-radius: 10px; }
.shortage-status[data-tone="error"] { color: #a53d2b; background: #fff4ef; }
.shortage-notice-list { display: grid; gap: 20px; }
.shortage-notice { border: 1px solid #e2e6ec; border-radius: 14px; background: #fff; padding: 22px; min-width: 0; }
.shortage-customers { margin-top: 14px; padding-top: 10px; border-top: 1px solid #edf0f3; min-width: 0; font-size: 13px; line-height: 1.6; }
.shortage-customers-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; margin-bottom: 6px; }
.shortage-customers-heading h4 { margin: 0; font-size: 13px; }
.shortage-customers-period { color: var(--todo-muted, #697386); font-size: 11px; }
.shortage-customers-copy { margin-left: auto; padding: 3px 8px; min-height: 28px; border: 1px solid #dce2e9; border-radius: 6px; background: #fff; color: #48566b; font: inherit; font-size: 12px; cursor: pointer; }
.shortage-customers-copy:disabled { opacity: .6; }
.shortage-customer-product + .shortage-customer-product { margin-top: 10px; }
.shortage-customer-product h5 { margin: 0 0 3px; font-size: 13px; overflow-wrap: anywhere; }
.shortage-customer-group { display: grid; grid-template-columns: minmax(70px, 110px) minmax(0, 1fr); gap: 4px 10px; margin-top: 3px; }
.shortage-customer-company { color: var(--todo-muted, #697386); overflow-wrap: anywhere; }
.shortage-customer-list { display: flex; flex-wrap: wrap; gap: 2px 10px; list-style: none; margin: 0; padding: 0; min-width: 0; }
.shortage-customer-list li { overflow-wrap: anywhere; max-width: 100%; }
.shortage-customers-empty { margin: 0; color: var(--todo-muted, #697386); }
.shortage-customers-copy-status { color: var(--todo-muted, #697386); font-size: 12px; }
.shortage-customers-copy-text { display: block; box-sizing: border-box; width: 100%; min-height: 100px; margin-top: 6px; padding: 8px; resize: vertical; font: inherit; border: 1px solid #dce2e9; border-radius: 6px; }
.shortage-notice-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.shortage-notice-heading { display: flex; gap: 9px; align-items: flex-start; min-width: 0; }
.shortage-notice-header h3 { margin: 0; font-size: 17px; line-height: 1.5; overflow-wrap: anywhere; }
.shortage-event-badge { flex-shrink: 0; margin-top: 2px; padding: 3px 7px; border: 1px solid; border-radius: 5px; font-size: 12px; line-height: 1.5; font-weight: 700; white-space: nowrap; }
.shortage-event-badge[data-event-type="shortage"] { color: #b42318; background: #fff0ed; border-color: #f1c3bb; }
.shortage-event-badge[data-event-type="resolved"] { color: #17674d; background: #e8f5ed; border-color: #b6dfc8; }
.shortage-notice-meta { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px 12px; flex-shrink: 0; color: #758090; font-size: 12px; }
.shortage-source-badge { padding: 3px 8px; border-radius: 5px; color: #586577; background: #f0f3f7; font-weight: 600; }
.shortage-notice a { color: #586577; text-underline-offset: 3px; }
.shortage-notice-body { white-space: pre-wrap; overflow-wrap: anywhere; margin: 16px 0 0; font-size: 14px; line-height: 1.8; color: #384356; }
.shortage-attachments { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 16px; margin-top: 18px; }
.shortage-attachment { min-width: 0; border: 1px solid #e1e5eb; border-radius: 10px; overflow: hidden; }
.shortage-attachment-preview { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; height: 350px; padding: 10px; overflow: hidden; border: 0; background: #f2f4f7; }
button.shortage-attachment-preview { cursor: zoom-in; }
.shortage-attachment-preview img { display: block; width: 100%; height: 100%; object-fit: contain; }
.shortage-expand-label { position: absolute; right: 12px; bottom: 12px; background: #273448d9; color: #fff; border-radius: 20px; padding: 6px 12px; font-size: 12px; }
.shortage-file-face { display: flex; flex-direction: column; gap: 14px; align-items: center; text-align: center; overflow-wrap: anywhere; padding: 20px; color: #677588; }
.shortage-file-face strong { color: #8795a8; font-size: 30px; font-weight: 750; }
.shortage-attachment-caption { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 12px; font-size: 12px; }
.shortage-attachment-caption > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shortage-attachment-caption a, .shortage-file-unavailable { flex-shrink: 0; }
.shortage-file-unavailable { color: #8d929b; }
.shortage-file-warning { display: block; margin-top: 4px; color: #a66a20; font-size: 11px; }
.shortage-more { display: block; margin: 22px auto 6px; min-width: 180px; }
.shortage-preview-dialog { width: min(1280px, calc(100vw - 32px)); height: min(1000px, calc(100dvh - 32px)); max-width: none; max-height: none; padding: 0; border: 0; border-radius: 12px; color: #243146; background: #e8ecf1; }
.shortage-preview-dialog::backdrop { background: #101b31b8; }
.shortage-preview-shell { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.shortage-preview-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 16px; background: #fff; border-bottom: 1px solid #dbe1e8; }
.shortage-preview-header h2 { min-width: 0; margin: 0; font-size: 15px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.shortage-preview-actions { display: flex; flex-shrink: 0; gap: 8px; align-items: center; }
.shortage-preview-actions a { text-decoration: none; }
.shortage-preview-content { flex: 1; min-height: 0; overflow: auto; padding: 16px; }
.shortage-preview-content img { display: block; max-width: none; height: 100%; object-fit: contain; margin: 0 auto; }
.shortage-preview-content img.is-zoomed { height: auto; object-fit: initial; margin: 0; }
.shortage-preview-content.is-pdf { padding: 0; overflow: hidden; }
.shortage-preview-content iframe { width: 100%; height: 100%; display: block; border: 0; background: #fff; }
@media (max-width: 700px) {
  .shortage-customer-group { grid-template-columns: minmax(0, 1fr); gap: 1px; margin-top: 6px; }
  .shortage-notice { padding: 16px 12px; border-radius: 10px; }
  .shortage-notice-header { display: block; }
  .shortage-notice-header h3 { font-size: 16px; }
  .shortage-notice-meta { margin-top: 8px; justify-content: flex-start; }
  .shortage-attachment-preview { height: 290px; }
  .shortage-preview-dialog { width: 100vw; height: 100dvh; border-radius: 0; }
  .shortage-preview-header { flex-wrap: wrap; padding: 10px; gap: 8px; }
  .shortage-preview-header h2 { width: 100%; }
  .shortage-preview-actions { margin-left: auto; }
  .shortage-preview-content { padding: 8px; }
}
