/* Shared modal presentation; content-heavy dialogs retain their wider sizes. */
:is(.client-master-dialog,.client-registration-dialog,.client-detail-panel,.create-modal,.document-review-dialog) {
  border: 1px solid #eadbd1; border-top: 6px solid #ff7416; border-radius: 12px;
  background: #fff; color: #25364d; box-shadow: 0 24px 80px #14253640;
}
.client-master-dialog { width: min(540px,calc(100vw - 32px)); }
:is(.client-master-dialog-head,.client-registration-head,.client-detail-head,.create-modal-header,.document-review-header) {
  display: grid; grid-template-columns: 46px minmax(0,1fr) 32px; gap: 16px; align-items: center;
  padding: 24px 26px; background: linear-gradient(110deg,#fffcf9,#fff); border-bottom: 1px solid #edf0f3; flex-shrink: 0;
}
:is(.client-master-dialog-head,.client-registration-head,.client-detail-head,.create-modal-header,.document-review-header)::before {
  content: '◇'; display: grid; place-items: center; width: 46px; height: 46px;
  border-radius: 50%; background: #fff0e5; color: #ff7015; font-size: 26px; font-weight: 500;
}
:is(.client-master-dialog-head,.client-registration-head,.client-detail-head,.create-modal-header,.document-review-header) :is(h2,h3) {
  margin: 0; font: 600 19px/1.35 Poppins,sans-serif; color: #20334d; overflow-wrap: anywhere;
}
:is(.client-master-dialog-head,.client-registration-head,.client-detail-head,.create-modal-header,.document-review-header) p {
  margin: 4px 0 0; font: 400 12px/1.5 Poppins,sans-serif; color: #65758e;
}
:is(.client-master-dialog-head,.client-registration-head,.client-detail-head,.create-modal-header,.document-review-header) > button {
  align-self: start; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 5px;
  background: transparent; color: #65758e; font: 400 24px/1 sans-serif; cursor: pointer;
}
:is(.client-master-dialog-head,.client-registration-head,.client-detail-head,.create-modal-header,.document-review-header) > button:hover { background: #fff0e5; color: #bf4e00; }
.client-master-dialog-body { padding: 22px 26px; gap: 18px; }
.client-master-dialog-body .client-master-help { margin: 0; color: #65758e; font-size: 12px; font-weight: 400; }
:is(.client-master-dialog-actions,.client-detail-actions,.create-modal-actions,.document-review-actions), .client-registration-dialog .client-form-actions {
  padding: 16px 26px; border-top: 1px solid #eee5de; background: #fffdfb; gap: 12px; flex-shrink: 0;
}
:is(.client-master-dialog-actions,.client-detail-actions,.create-modal-actions,.document-review-actions,.client-registration-dialog .client-form-actions) :is(button,a) {
  display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 10px 20px; border-radius: 6px; font: 500 13px/1.4 Poppins,sans-serif;
}
:is(.client-master-save,.create-primary-button,.client-registration-dialog .client-save) { background: #ff7416; color: #fff; border-color: #ff7416; }
:is(.client-master-dialog-actions,.client-detail-actions,.create-modal-actions,.document-review-actions,.client-registration-dialog .client-form-actions) button:focus-visible { outline: 2px solid #ff7416; outline-offset: 3px; }
:is(.client-registration-backdrop,.client-detail-backdrop,.create-modal-backdrop,.document-review-backdrop), .client-master-dialog::backdrop { background: #26354899; backdrop-filter: blur(3px); }
.pms-modal-opening:not(dialog) { animation: pms-overlay-in 180ms ease-out both; }
.pms-modal-closing:not(dialog) { animation: pms-overlay-out 180ms ease-in both; }
.pms-modal-opening > [role='dialog'], dialog.pms-modal-opening { animation: pms-panel-in 180ms ease-out both; }
.pms-modal-closing > [role='dialog'], dialog.pms-modal-closing { animation: pms-panel-out 180ms ease-in both; }
dialog.pms-modal-opening::backdrop { animation: pms-overlay-in 180ms ease-out both; }
dialog.pms-modal-closing::backdrop { animation: pms-overlay-out 180ms ease-in both; }
@keyframes pms-overlay-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes pms-overlay-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes pms-panel-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes pms-panel-out { from { opacity: 1; transform: translateY(0) scale(1); } to { opacity: 0; transform: translateY(8px) scale(.98); } }
@media (prefers-reduced-motion: reduce) { .pms-modal-opening,.pms-modal-closing,.pms-modal-opening > [role='dialog'],.pms-modal-closing > [role='dialog'],dialog::backdrop { animation: none !important; } }
@media(max-width:600px) {
  :is(.client-master-dialog-head,.client-registration-head,.client-detail-head,.create-modal-header,.document-review-header) { padding: 18px; grid-template-columns: 36px minmax(0,1fr) 28px; gap: 10px; }
  :is(.client-master-dialog-head,.client-registration-head,.client-detail-head,.create-modal-header,.document-review-header)::before { width: 36px; height: 36px; }
  .client-master-dialog-body { padding: 18px; }
}

.client-master-dialog-head::before { content: ''; background: #fff0e5 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23ff7015' stroke-width='2'%3E%3Cpath d='M19 10c0 5-7 11-7 11S5 15 5 10a7 7 0 1 1 14 0Z'/%3E%3Ccircle cx='12' cy='10' r='2.5'/%3E%3C/svg%3E") center/24px no-repeat; }
.client-master-dialog .client-master-control > button { border: 0; background: transparent; }
