/* Shared work surfaces. Calendar geometry and Pack & Go stay independent. */
.operations-ui { --radius: 6px; }
.operations-ui :is(.card,.side-card,.filter-card,.table-container,.catalog-panel,.stat-box,.quick-stat,.modal-section,.hint-box,.empty-state,.calendar-grid,.queue-item,.toast) { border-radius: 6px; box-shadow: none; }
.operations-ui :is(button,input,select,textarea,.btn-primary,.btn-secondary,.btn-ghost,.field-input,.field-select,.field-textarea) { border-radius: 4px; }
.operations-ui :is(.status-chip,.prod-sku,.sales-badge,.need-badge,.week-nav) { border-radius: 4px; }
.operations-ui :is(.modal-card,#productDialog) { border-radius: 6px; }
.operations-ui .card-head,.operations-ui .modal-section-head { border-radius: 6px 6px 0 0; }
.operations-ui button:focus-visible,.operations-ui input:focus-visible,.operations-ui select:focus-visible,.operations-ui textarea:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }
.operations-ui button:disabled { opacity: .55; cursor: wait; }
.approval-count { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; padding: 2px 5px; margin-left: 5px; border-radius: 4px; background: #dbeafe; color: #12364e; font-size: 11px; font-weight: 800; line-height: 18px; }
.approval-count[hidden] { display: none; }
.approval-count.is-stale { background: #fff1cf; color: #80520b; }
.stock-adjust-button { width: 30px; height: 34px; padding: 0; flex: 0 0 30px; font-size: 20px; font-weight: 600; border: 1px solid #ccdbe5; color: #12364e; background: #fff; cursor: pointer; }
.operations-ui .input-group { gap: 6px; }
.stock-adjust-dialog { width: min(390px,94vw); max-height: 92vh; overflow-y: auto; box-sizing: border-box; border: 1px solid #ccdbe5; border-radius: 6px; padding: 22px; color: #12364e; }
.stock-adjust-dialog::backdrop { background: #102e4666; }
.adjust-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.adjust-heading h2 { margin: 0; font-size: 20px; }
.adjust-heading button { width: 30px; height: 30px; border: 0; background: #f3f6f8; color: #12364e; font-size: 22px; cursor: pointer; }
.adjust-product { font-weight: 700; margin: 15px 0 4px; }
.adjust-help { color: #63798b; font-size: 12px; line-height: 1.5; margin: 4px 0 12px; }
.stock-adjust-dialog label { display: block; font-size: 13px; font-weight: 700; margin: 12px 0 6px; }
.stock-adjust-dialog input { box-sizing: border-box; width: 100%; min-height: 38px; border: 1px solid #ccdbe5; padding: 8px 10px; color: #12364e; }
.stock-adjust-dialog #stockDelta { font-size: 20px; font-weight: 700; }
.adjust-summary { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 12px 0; margin-top: 8px; border-top: 1px solid #e1e9ef; font-size: 13px; }
.adjust-error { color: #b42318; font-size: 13px; line-height: 1.5; }
.stock-adjust-dialog .btn-primary { background: #12364e; color: #fff; border: 0; padding: 10px 14px; cursor: pointer; }
/* Preserve the existing 44 px/hour calendar, column widths and event heights. */
.operations-ui .week-nav { border-radius: 4px; }
.operations-ui .scheduled-name { padding-right: 25px; flex-shrink: 0; }
.operations-ui .scheduled-meta { flex-shrink: 0; }
.plan-note-button { position: absolute; top: 5px; right: 5px; width: 22px; height: 22px; border: 1px solid #102e4622; background: #ffffffcc; color: #12364e; padding: 2px; cursor: pointer; line-height: 16px; }
.scheduled-note { margin: 2px 0 0; font-size: 11px; line-height: 15px; color: #203e53; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; white-space: pre-wrap; overflow-wrap: anywhere; flex-shrink: 0; }
.scheduled-note.one-line { -webkit-line-clamp: 1; }
.queue-note { margin: 6px 0 0; font-size: 12px; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }
.plan-state-dot { display: inline-block; width: 6px; height: 6px; vertical-align: middle; margin-right: 4px; border-radius: 1px; background: #64748b; }
.plan-state-dot.working { background: #b86a00; }
.plan-state-dot.done { background: #16803d; }
.day-load { margin: 4px 0 0; font-size: 10px; line-height: 1.4; color: #63798b; }
.day-load.overloaded { color: #b42318; font-weight: 700; }
.operations-ui #planModal .modal-card { width: min(680px,96vw); }
.operations-ui #planModal .modal-body { display: block; padding: 16px; }
.operations-ui #planModal .modal-section-head { padding: 10px 12px; }
.operations-ui #planModal .modal-section-body { padding: 12px; }
.operations-ui #planModal .field-textarea { min-height: 74px; }
.plan-product-note { margin: 0 0 12px; padding: 8px 10px; background: #f2f6f9; border-left: 3px solid #829bad; color: #324f64; font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.plan-product-note[hidden] { display: none; }
.operations-ui #planModal .plan-actions { position: sticky; bottom: -12px; z-index: 2; background: #fff; padding: 12px 0 0; border-top: 1px solid #e1e9ef; margin-top: 12px; }
.plan-actions .remove-plan { margin-left: auto; color: #ac3029; }
.operations-ui #planModal .label-section { margin-top: 10px; background: #f8fafc; }
.operations-ui #planModal .label-section .modal-section-head { display: none; }
.operations-ui #planModal .label-section .hint-box { padding: 0; border: 0; background: none; margin-bottom: 8px; }
.operations-ui #planModal .label-section .quick-actions { margin-top: 8px; }
.approval-workspace { overflow: hidden; flex-shrink: 0; }
.approval-tabs { display: flex; flex-wrap: wrap; border-bottom: 1px solid #dce5ec; padding: 0 14px; gap: 8px; }
.approval-tabs button { padding: 14px 10px 12px; border: 0; border-bottom: 3px solid transparent; background: none; color: #63798b; font-weight: 700; cursor: pointer; }
.approval-tabs button[aria-selected="true"] { color: #12364e; border-bottom-color: #12364e; }
.approval-tabs span { font-size: 11px; padding: 2px 6px; margin-left: 5px; background: #edf2f6; border-radius: 4px; }
.approval-filters { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; padding: 14px 18px; background: #fafcfd; border-bottom: 1px solid #dce5ec; }
.approval-filters label { display: flex; flex-direction: column; gap: 5px; color: #63798b; font-size: 11px; font-weight: 700; }
.approval-filters input,.approval-filters select { border: 1px solid #d0dde6; color: #12364e; background: white; padding: 8px 10px; height: 36px; font: inherit; font-size: 12px; }
.approval-search { flex: 1; min-width: 200px; }
.approval-table-wrap { overflow-x: auto; }
.approval-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.approval-table th { text-align: left; font-size: 10px; color: #63798b; text-transform: uppercase; letter-spacing: .04em; background: #f7f9fb; padding: 12px 16px; }
.approval-table td { border-top: 1px solid #e1e9ef; padding: 10px 16px; vertical-align: middle; }
.approval-table tbody tr:not(.approval-detail):hover { background: #fafcfd; }
.approval-product { display: flex; align-items: center; gap: 10px; min-width: 180px; }
.approval-product img { object-fit: contain; flex-shrink: 0; border: 1px solid #e1e9ef; border-radius: 4px; }
.approval-product strong { font-size: 13px; }
.approval-secondary { display: block; margin-top: 3px; color: #63798b; font-size: 11px; }
.approval-quantity { white-space: nowrap; }
.approval-row-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 6px; }
.approval-table th:last-child { text-align: right; }
.approval-note-link { display: block; max-width: 360px; text-align: left; border: 0; padding: 0; margin-top: 5px; color: #306079; background: none; font-size: 11px; cursor: pointer; overflow-wrap: anywhere; }
.approval-note-link:hover { text-decoration: underline; }
.approval-detail { background: #f4f8fb; }
.approval-detail-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; padding: 4px 0; }
.approval-detail-grid p { margin: 6px 0 12px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.approval-detail-grid dl { display: grid; grid-template-columns: auto 1fr; align-content: start; gap: 8px 14px; line-height: 1.5; }
.approval-detail-grid dt { color: #63798b; }.approval-detail-grid dd { margin: 0; overflow-wrap: anywhere; }
.approval-empty { text-align: center; color: #63798b; height: 100px; }
.approval-pagination { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid #dce5ec; padding: 12px 18px; font-size: 12px; color: #63798b; }
.approval-error,.approval-row-error { color: #ae2921; font-size: 12px; line-height: 1.5; }
.approval-error { padding: 12px; background: #fff1f0; border: 1px solid #f5c9c5; border-radius: 4px; margin: 0; }
.approval-row-error { margin: 8px 0 0; max-width: 330px; }
.approval-error[hidden] { display: none; }
@media(max-width:640px) {
  .operations-ui :is(.btn-primary,.btn-secondary,.btn-ghost) { min-height: 42px; }
  .operations-ui #planModal .modal-body { padding: 10px; }
  .operations-ui #planModal .plan-actions { position: static; }
  .plan-actions .remove-plan { margin-left: 0; }
  .stock-adjust-button { height: 40px; width: 34px; flex-basis: 34px; }
  .approval-detail-grid { grid-template-columns: 1fr; gap: 0; }
  .approval-table,.approval-table tbody,.approval-table tr,.approval-table td { display: block; width: 100%; }
  .approval-table thead { display: none; }
  .approval-table tr[data-log] { padding: 12px; border-top: 1px solid #dce5ec; }
  .approval-table td { padding: 4px 0; border: 0; }
  .approval-table td:nth-child(2),.approval-table td:nth-child(3) { display: inline-block; width: 50%; }
  .approval-table td:nth-child(4)::before { content: 'Erstellt: '; color: #63798b; }
  .approval-table .approval-detail td { padding: 10px 16px; }
  .approval-row-actions { justify-content: flex-start; margin-top: 6px; }
  .approval-empty { height: auto; padding: 24px 12px !important; }
}
