.proposal-heading{display:flex;justify-content:space-between;gap:12px;align-items:center}.proposal-heading h2{margin:0}.proposal-heading p,.proposal-card p{font-size:13px;line-height:1.5}.proposal-card{background:white;border:1px solid #dce5e0;border-radius:12px;padding:16px;margin:14px 0}.proposal-card header{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap}.proposal-card header span{font-size:12px;color:#64748b}.proposal-items section{padding:12px 0;border-top:1px solid #e5e7eb}.proposal-items p{margin:5px 0}.proposal-counter{color:#9a3412;background:#fff7ed;padding:8px;border-radius:6px}.proposal-card footer{display:flex;gap:10px;flex-wrap:wrap}.proposal-dialog{border:0;border-radius:14px;padding:20px;width:min(780px,94vw);max-height:90vh;overflow:auto;color:#1c3530}.proposal-dialog::backdrop{background:#0008}.proposal-dialog header{display:flex;align-items:center;justify-content:space-between;gap:10px}.proposal-dialog h2{font-size:20px}.proposal-dialog label{display:grid;gap:6px;font-size:13px;margin:10px 0}.proposal-dialog input,.proposal-dialog select,.proposal-dialog textarea{width:100%;min-width:0;min-height:42px;padding:9px;border:1px solid #ccd8d1;border-radius:7px;font:inherit}.proposal-dialog fieldset{border:1px solid #dce5e0;border-radius:10px;margin:14px 0;padding:12px}.proposal-dialog legend{font-weight:700}.proposal-dialog footer,.proposal-dates,.proposal-buy-get{display:flex;gap:12px;flex-wrap:wrap}.proposal-dates label,.proposal-buy-get label{flex:1;min-width:110px}.proposal-error{color:#b91c1c;white-space:pre-wrap}.proposal-dialog button{min-height:44px}.proposal-select{grid-column:1/-1;display:flex;align-items:center;gap:8px;font-size:13px;border-top:1px solid #eee;padding-top:8px}.proposal-select input{width:18px;height:18px}#supplier-proposal-toolbar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:12px 0}#supplier-proposal-toolbar span{font-size:12px;color:#64748b}#headquarters-proposals-panel{margin-bottom:24px;border-bottom:2px solid #dce5e0;padding-bottom:20px}.proposal-status{font-size:13px;color:#9a3412}@media(max-width:600px){.proposal-heading{align-items:flex-start;flex-direction:column}.proposal-dialog{padding:14px}.proposal-dialog footer button{width:100%}}

/* Keep intrinsic date controls and long item codes inside the mobile dialog. */
.proposal-dialog,
.proposal-dialog * { box-sizing: border-box; }
.proposal-dialog {
  width: min(780px, calc(100vw - 24px));
  max-width: calc(100vw - 24px - env(safe-area-inset-left) - env(safe-area-inset-right));
  max-height: calc(100vh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  max-height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  overflow-wrap: anywhere;
}
.proposal-dialog form,
.proposal-dialog fieldset,
.proposal-dialog label { min-width: 0; min-inline-size: 0; max-width: 100%; }
.proposal-dialog fieldset { width: 100%; }
.proposal-dialog legend { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.proposal-dialog label { grid-template-columns: minmax(0, 1fr); }
.proposal-dialog h2 { flex: 1; min-width: 0; }
.proposal-dialog [data-close] { flex-shrink: 0; }
.proposal-dialog input,
.proposal-dialog select,
.proposal-dialog textarea { max-width: 100%; font-size: 16px; }
.proposal-dialog input::-webkit-date-and-time-value { min-width: 0; text-align: left; }
.proposal-dates,
.proposal-buy-get { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.proposal-dates label,
.proposal-buy-get label { min-width: 0; }
@media (max-width: 600px) {
  .proposal-dates { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .proposal-dialog { padding: 14px; }
  .proposal-dialog header { gap: 8px; }
  .proposal-dialog h2 { font-size: 20px; }
}
