@media(min-width:951px){
 .clients-layout-sidebar{grid-template-columns:minmax(0,1fr) min(630px,50%)}
}
.pane-services{margin-top:20px}
.pane-services h3{display:flex;justify-content:space-between;gap:12px;font-size:inherit;font-weight:650;margin:16px 0 8px}
.pane-services table{width:100%;font-size:inherit}
.pane-services th,.pane-services td{padding:8px;text-align:left}
.pane-services td:first-child{white-space:normal;overflow-wrap:anywhere}
.pane-services th:not(:first-child),.pane-services td:not(:first-child){text-align:right;white-space:nowrap}
.pane-services h3 span:last-child{white-space:nowrap}

.pane-services h3{
 margin:14px 0 0;padding:10px 12px;background:#f4f5f7;
 border:1px solid var(--line);border-radius:6px 6px 0 0;
}
.pane-services table{table-layout:fixed;border:1px solid var(--line);font-variant-numeric:tabular-nums}
.pane-services th,.pane-services td{padding:9px 12px}
.pane-services th:nth-child(2){width:60px}
.pane-services th:nth-child(3){width:106px}
.pane-services tbody tr:nth-child(even){background:#f8f9fa}
.client-pane [data-pane-totals]{
 margin:16px 0 0;padding:12px;gap:8px 12px;
 background:#f4f5f7;border:1px solid var(--line);border-radius:6px;
 font-variant-numeric:tabular-nums;
}
.client-pane [data-pane-totals] > :nth-child(-n+2){font-weight:700}
@media(max-width:480px){
 .pane-services th,.pane-services td{padding:8px 6px}
 .pane-services th:nth-child(2){width:42px}
 .pane-services th:nth-child(3){width:84px}
}

.firm-meta{flex-wrap:wrap}
.client-status-badge{
 display:inline-flex;align-items:center;gap:4px;white-space:nowrap;
 padding:2px 7px;border-radius:999px;font-size:11px;font-weight:600;line-height:1.25;
}
.client-status-archived{background:#e8ebef;color:#3d4654}
.client-status-suspended{background:#fff1d8;color:#754800}

dialog button[data-close] {
 display:inline-grid;
 place-items:center;
 flex-shrink:0;
 min-width:40px;
 min-height:40px;
 padding:0;
 border:1px solid #e3bdc7;
 border-radius:7px;
 background:#f8eef1;
 color:#84243b;
 font-size:24px;
 font-weight:650;
 line-height:1;
 cursor:pointer;
}
dialog button[data-close]:hover { background:#f0dae1; }
dialog button[data-close]:focus-visible { outline:2px solid #84243b; outline-offset:2px; }

.staff-identity { display:flex; align-items:center; gap:9px; padding:5px 10px 5px 5px; border-radius:8px; background:#faf3f5; min-width:0; }
.staff-identity strong { display:block; color:#672037; font-weight:700; overflow-wrap:anywhere; }
.staff-avatar { display:grid; place-items:center; width:32px; height:32px; flex:none; border-radius:50%; color:#84243b; background:#f1dce3; font-weight:700; }

@media (min-width: 860px) and (max-height: 1080px) {
 dialog:is(#new-service,#new-payment,#new-client) {
  max-height:calc(100dvh - 32px);
  padding:18px;
 }
 #new-service .record-head, #new-payment .record-head { padding-bottom:10px; }
 #new-service .record-client, #new-payment .record-client { margin:12px 0; }
 #new-service .modal-period, #new-payment .modal-period { margin:10px 0; }
 #new-service .reference-service-grid, #new-payment .reference-payment-grid { gap:12px; }
 #new-service .modal-section, #new-payment .modal-section { padding:12px; }
 dialog:is(#new-service,#new-payment,#new-client) form label { margin:8px 0; }
 dialog:is(#new-service,#new-payment,#new-client) form { gap:8px; }
 dialog:is(#new-service,#new-payment,#new-client) .form-grid { gap:10px; }
 #new-service .modal-section td, #new-payment .modal-section td { padding:7px 9px; }
}

@media (min-width: 1000px) and (max-height: 930px) {
 dialog:is(#new-service,#new-payment,#new-client) {
  zoom:.92;
  max-height:calc((100dvh - 32px) / .92);
 }
}

#new-service .reference-service-grid {
 grid-template-columns:repeat(2,minmax(0,1fr));
}
#new-service .reference-service-grid > section {
 min-width:0;
}
#new-service .price-combobox .combo-options {
 position:absolute;
 inset-inline:0;
 top:calc(100% + 4px);
 max-height:min(160px,22dvh);
 box-shadow:0 8px 20px rgb(30 32 38 / 14%);
}
#new-service .combo-options button {
 white-space:normal;
 overflow-wrap:anywhere;
}
@media (max-width: 760px) {
 #new-service .reference-service-grid { grid-template-columns:minmax(0,1fr); }
}

.staff-mail { display:inline-flex; align-items:center; gap:6px; white-space:nowrap; }
.staff-mail span { font-size:17px; }
.staff-announcements { display:grid; gap:5px; padding:6px clamp(12px,3vw,44px); background:#fff9eb; }
.staff-announcement { color:#493000; background:#fff1bd; border:1px solid #ebce72; border-radius:6px; }
.staff-announcement summary { display:flex; align-items:center; gap:10px; cursor:pointer; padding:7px 12px; font-weight:700; overflow-wrap:anywhere; list-style:none; }
.staff-announcement summary::-webkit-details-marker { display:none; }
.staff-announcement summary::before { content:''; width:7px; height:7px; flex:none; border:solid currentColor; border-width:0 2px 2px 0; transform:rotate(45deg); }
.staff-announcement[open] summary::before { transform:rotate(225deg); }
.staff-announcement p { padding:0 12px 8px 31px; margin:0; white-space:pre-wrap; overflow-wrap:anywhere; }
.announcement-admin-row { display:flex; justify-content:space-between; gap:12px; align-items:center; padding:8px 0; }
