/* Tuncay Yemek & Catering — screen-height and mobile usability corrections, 12 Nov 2026.
   Intentionally loaded AFTER all existing CSS to avoid cascading regressions.
   Every compact list keeps the original semantic HTML and server-side permissions. */

/* Everyday lists should use the available viewport, not extend behind the footer.
   Lists own their scroll position. This is different from truncating the entire page. */
body:is(.contacts-view,.staff-view,.users-view){height:100dvh;overflow:hidden}
body:is(.contacts-view,.staff-view,.users-view) #root,
body:is(.contacts-view,.staff-view,.users-view) .app-shell{height:100dvh;min-height:0;overflow:hidden}
body:is(.contacts-view,.staff-view,.users-view) .main-wrap{min-height:0;display:flex;flex-direction:column;overflow:hidden}
body:is(.contacts-view,.staff-view,.users-view) .content-wrap{min-height:0;flex:1 1 auto;display:flex;flex-direction:column;overflow:hidden;padding-top:12px;padding-bottom:8px}
body:is(.contacts-view,.staff-view,.users-view) .content-head{min-width:0;flex:0 0 auto;margin-bottom:10px}
body:is(.contacts-view,.staff-view,.users-view) #page-content{min-height:0;min-width:0;flex:1 1 auto;overflow:hidden;display:flex;flex-direction:column}
body:is(.contacts-view,.staff-view,.users-view) .management-panel{min-height:0;min-width:0;display:flex;flex-direction:column;overflow:hidden;flex:1 1 auto}
body:is(.contacts-view,.staff-view,.users-view) .management-panel .mgmt-paged-scroll,
body.contacts-view .contact-grid-scroll{min-height:0;flex:1 1 auto;max-height:none!important;overflow-y:auto!important;overflow-x:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
body:is(.contacts-view,.staff-view,.users-view) .management-panel .mgmt-toolbar,
body:is(.contacts-view,.staff-view,.users-view) .management-panel .panel-hd,
body:is(.contacts-view,.staff-view,.users-view) .management-panel .mgmt-pager{flex-shrink:0;position:relative;z-index:3;background:#fff}
body:is(.contacts-view,.staff-view,.users-view) .management-panel .mgmt-pager{box-shadow:0 -4px 12px #1b32440a}
body:is(.contacts-view,.staff-view,.users-view) .footer{flex-shrink:0;padding-block:7px}

/* Staff summary cards must never clip their actual amounts. The old fixed 49/55/78px
   heights combined with overflow:hidden and decorative icons cut off text. */
body.staff-view #page-content{display:grid;grid-template-rows:auto minmax(0,1fr);gap:9px;overflow:hidden}
body.staff-view #page-content>.summary-grid{margin:0!important;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;min-width:0;min-height:0;align-self:stretch;overflow:visible}
body.staff-view #page-content>.summary-grid .summary-card{height:auto!important;min-height:98px!important;max-height:none;padding:13px 15px;border-radius:12px;justify-content:center;gap:5px;overflow:hidden}
body.staff-view #page-content>.summary-grid .summary-card>div:first-child{display:flex;align-items:center;justify-content:space-between;gap:7px;min-width:0;max-width:100%;font-size:.75rem;line-height:1.3}
body.staff-view #page-content>.summary-grid .summary-card .value{font-size:clamp(1.12rem,1.8vw,1.55rem);line-height:1.2;margin:0!important;letter-spacing:-.03em;overflow-wrap:normal;word-break:normal;white-space:nowrap;font-variant-numeric:tabular-nums}
body.staff-view #page-content>.summary-grid .summary-card .tag{font-size:.68rem;line-height:1.25;min-height:0}
body.staff-view #page-content>.summary-grid .summary-card .miniico{height:30px;width:30px;flex:0 0 30px;opacity:.65}
body.staff-view .staff-list-panel{height:100%;min-height:0}

/* Compact mobile headers and cards, without hiding the required amounts. */
@media(max-width:900px){
 body.staff-view #page-content>.summary-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
 body.staff-view #page-content>.summary-grid .summary-card{height:auto!important;min-height:79px!important;padding:10px 12px;gap:5px}
 body.staff-view #page-content>.summary-grid .summary-card .value{font-size:clamp(1.02rem,2.3vw,1.36rem);line-height:1.2}
 body.staff-view #page-content>.summary-grid .summary-card .tag{display:none}
 body.staff-view #page-content>.summary-grid .summary-card .miniico{display:none}
}
@media(max-width:600px){
 body:is(.contacts-view,.staff-view,.users-view) .content-wrap{padding:7px 9px 4px}
 body:is(.contacts-view,.staff-view,.users-view) .content-head{margin-bottom:7px;gap:5px}
 body:is(.contacts-view,.staff-view,.users-view) .content-head h1{font-size:1.18rem;line-height:1.15;margin:2px 0}
 body:is(.contacts-view,.staff-view,.users-view) .content-head p{font-size:.69rem}
 body:is(.contacts-view,.staff-view,.users-view) .content-head .eyebrow{font-size:.58rem}
 body:is(.contacts-view,.staff-view,.users-view) .content-actions{max-width:100%}
 body:is(.contacts-view,.staff-view,.users-view) .content-actions .btn{min-height:36px;padding:6px 10px;font-size:.7rem}
 body:is(.contacts-view,.staff-view,.users-view) .management-panel .mgmt-paged-scroll,
 body.contacts-view .contact-grid-scroll{scrollbar-gutter:auto;overflow-x:hidden!important;max-height:none!important}
 body:is(.contacts-view,.staff-view,.users-view) .management-panel .mgmt-toolbar{padding:8px 10px}
 body:is(.contacts-view,.staff-view,.users-view) .management-panel .mgmt-pager{padding:9px 11px;gap:7px}
 body:is(.contacts-view,.staff-view,.users-view) .mgmt-pager-actions{display:flex;flex-wrap:nowrap;justify-content:space-between;align-items:center;gap:5px;width:100%;min-width:0}
 body:is(.contacts-view,.staff-view,.users-view) .mgmt-pager-actions .btn{flex:0 0 auto;min-width:0;padding:7px 9px;font-size:.72rem}
 body:is(.contacts-view,.staff-view,.users-view) .mgmt-pager-actions select{width:70px;min-width:70px;height:37px;padding:6px 7px}
 body:is(.contacts-view,.staff-view,.users-view) .mgmt-pager>span{font-size:.7rem;line-height:1.2}
 body:is(.contacts-view,.staff-view,.users-view) .footer{display:none}
 body.staff-view #page-content{gap:6px}
 body.staff-view #page-content>.summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-auto-flow:row!important;grid-auto-columns:auto!important;overflow:visible!important;gap:6px}
 body.staff-view #page-content>.summary-grid .summary-card{height:auto!important;min-height:68px!important;padding:8px 10px!important;gap:3px}
 body.staff-view #page-content>.summary-grid .summary-card>div:first-child{font-size:.69rem;line-height:1.15}
 body.staff-view #page-content>.summary-grid .summary-card .value{font-size:clamp(.99rem,4.1vw,1.2rem);line-height:1.18;white-space:nowrap}
 body.staff-view .staff-list-panel .panel-hd{padding:9px 11px 6px}
 body.staff-view .staff-list-panel .panel-hd p{display:none}
 body.staff-view .staff-list-panel .mgmt-search-wrap{min-height:36px}
 body.staff-view .staff-list-panel .mgmt-search-wrap .input{height:34px}
}
@media(max-width:350px){
 body.staff-view #page-content>.summary-grid .summary-card .value{font-size:.92rem;letter-spacing:-.04em}
 body:is(.contacts-view,.staff-view,.users-view) .mgmt-pager-actions .btn{font-size:.66rem;padding:7px 6px}
}

/* Mobile management cards: 1 identity band + compact numeric grid + action bar.
   No one-column stack of seven full-width table cells. */
@media(max-width:600px){
 .management-panel .mgmt-paged-scroll .staff-table.responsive-list tbody,
 .management-panel .mgmt-paged-scroll .user-management-table.responsive-list tbody{display:grid;gap:7px;padding:8px}
 .management-panel .mgmt-paged-scroll .staff-table.responsive-list tbody tr[data-filter-text],
 .management-panel .mgmt-paged-scroll .user-management-table.responsive-list tbody tr[data-filter-text]{position:relative;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0;min-height:0;border:1px solid #e3eaf1;border-radius:11px;overflow:hidden;box-shadow:none}
 .management-panel .mgmt-paged-scroll .staff-table.responsive-list tbody tr[data-filter-text]>td,
 .management-panel .mgmt-paged-scroll .user-management-table.responsive-list tbody tr[data-filter-text]>td{height:auto!important;max-width:100%;min-width:0;margin:0;border-bottom:1px solid #edf1f5;padding:7px 10px!important;display:flex;align-items:flex-start;justify-content:center;flex-direction:column;gap:2px;white-space:normal;text-align:left!important;line-height:1.22;font-size:.74rem}
 .management-panel .mgmt-paged-scroll .staff-table.responsive-list tbody tr[data-filter-text]>td:before,
 .management-panel .mgmt-paged-scroll .user-management-table.responsive-list tbody tr[data-filter-text]>td:before{display:block;font-size:.64rem;line-height:1.2;color:#8191a3;font-weight:700;max-width:100%;margin-bottom:1px}
 .management-panel .mgmt-paged-scroll .staff-table.responsive-list tbody tr[data-filter-text]>td:first-child,
 .management-panel .mgmt-paged-scroll .user-management-table.responsive-list tbody tr[data-filter-text]>td:first-child{grid-column:1/-1;background:#f6f9fc!important;min-height:38px;padding:7px 9px!important;justify-content:flex-start;flex-direction:row;align-items:center}
 .management-panel .mgmt-paged-scroll .staff-table.responsive-list tbody tr[data-filter-text]>td:first-child:before,
 .management-panel .mgmt-paged-scroll .user-management-table.responsive-list tbody tr[data-filter-text]>td:first-child:before{display:none}
 .management-panel .mgmt-paged-scroll .staff-table.responsive-list tbody tr[data-filter-text] .mgmt-avatar,
 .management-panel .mgmt-paged-scroll .user-management-table.responsive-list tbody tr[data-filter-text] .mgmt-avatar{height:25px;width:25px;flex:0 0 25px;border-radius:7px}
 .management-panel .mgmt-paged-scroll .staff-table.responsive-list tbody tr[data-filter-text] .mgmt-entity,
 .management-panel .mgmt-paged-scroll .user-management-table.responsive-list tbody tr[data-filter-text] .mgmt-entity{min-width:0;gap:8px;width:100%}
 .management-panel .mgmt-paged-scroll .staff-table.responsive-list .mgmt-money,
 .management-panel .mgmt-paged-scroll .staff-table.responsive-list td.num{font-size:.79rem;white-space:nowrap!important;font-weight:800}
 .management-panel .mgmt-paged-scroll .staff-table.responsive-list td.staff-cell-status{grid-column:1/-1;flex-direction:row!important;justify-content:space-between!important;align-items:center!important;padding:5px 10px!important;min-height:29px}
 .management-panel .mgmt-paged-scroll .staff-table.responsive-list .pill,
 .management-panel .mgmt-paged-scroll .user-management-table.responsive-list .pill{font-size:.67rem;padding:4px 8px}
 .management-panel .mgmt-paged-scroll .staff-table.responsive-list td.mgmt-actions-cell,
 .management-panel .mgmt-paged-scroll .user-management-table.responsive-list td.mgmt-actions-cell{grid-column:1/-1;display:block!important;padding:6px 8px!important;min-height:39px;background:#fff!important;border-bottom:0}
 .management-panel .mgmt-paged-scroll .staff-table.responsive-list td.mgmt-actions-cell:before,
 .management-panel .mgmt-paged-scroll .user-management-table.responsive-list td.mgmt-actions-cell:before{display:none}
 .management-panel .mgmt-paged-scroll .staff-table.responsive-list .mgmt-row-actions{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,.85fr) minmax(47px,.52fr);gap:5px;width:100%;align-items:center}
 .management-panel .mgmt-paged-scroll .staff-table.responsive-list .mgmt-row-actions .mgmt-action{width:100%;min-width:0;min-height:34px;max-height:36px;display:flex;white-space:nowrap;padding:6px 3px!important;font-size:.68rem;gap:3px}
 .management-panel .mgmt-paged-scroll .staff-table.responsive-list .mgmt-row-actions .mgmt-action .icon{width:13px;height:13px}
 .management-panel .mgmt-paged-scroll .user-management-table.responsive-list td.user-role-cell,
 .management-panel .mgmt-paged-scroll .user-management-table.responsive-list td.user-status-cell{grid-column:auto;min-height:35px}
 .management-panel .mgmt-paged-scroll .user-management-table.responsive-list td.mgmt-permissions{grid-column:1/-1;min-height:31px;display:flex;flex-direction:row;align-items:center;justify-content:space-between}
 .management-panel .mgmt-paged-scroll .user-management-table.responsive-list td.mgmt-actions-cell .mgmt-row-actions{display:flex;justify-content:flex-end;flex-wrap:nowrap;gap:6px}
 .management-panel .mgmt-paged-scroll .user-management-table.responsive-list td.mgmt-actions-cell .mgmt-action{min-height:35px!important;width:auto!important;flex:1 1 0;max-width:50%;padding:7px 9px!important;font-size:.74rem}
 /* Manage card footer pagination instead of allowing it to overlap the last row. */
 .management-panel .mgmt-paged-scroll .responsive-list tbody tr:last-child{margin-bottom:3px}
}
@media(max-width:350px){
 .management-panel .mgmt-paged-scroll .staff-table.responsive-list .mgmt-row-actions .mgmt-action{font-size:.63rem}
 .management-panel .mgmt-paged-scroll .staff-table.responsive-list .mgmt-row-actions{grid-template-columns:minmax(0,1.3fr) minmax(0,.75fr) minmax(42px,.5fr)}
}

/* Contact details: eliminate a clipped final tab on phones. Make all five tabs visible,
   and compress the 3 numerical cards into one row before the scrollable pane. */
@media(max-width:600px){
 .modal-card.detail-dialog[data-detail-kind="contact"] .detail-fixed{padding:8px 10px 0}
 .modal-card.detail-dialog[data-detail-kind="contact"] .detail-fixed .detail-strip{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin-bottom:8px}
 .modal-card.detail-dialog[data-detail-kind="contact"] .detail-fixed .detail-stat{min-width:0;min-height:58px;padding:7px 6px;border-radius:9px}
 .modal-card.detail-dialog[data-detail-kind="contact"] .detail-fixed .detail-stat .label{font-size:.60rem;line-height:1.2}
 .modal-card.detail-dialog[data-detail-kind="contact"] .detail-fixed .detail-stat strong{font-size:clamp(.79rem,3.1vw,.98rem);line-height:1.2;white-space:normal;overflow-wrap:anywhere}
 .modal-card.detail-dialog[data-detail-kind="contact"] .detail-fixed>.btn-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}
 .modal-card.detail-dialog[data-detail-kind="contact"] .detail-fixed>.btn-row .btn{width:100%;min-width:0;min-height:34px;padding:6px 5px;font-size:.68rem;line-height:1.2}
 .modal-card.detail-dialog[data-detail-kind="contact"] .detail-fixed .tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;margin:8px 0!important;padding:4px!important;overflow:visible;white-space:normal}
 .modal-card.detail-dialog[data-detail-kind="contact"] .detail-fixed .tab{min-width:0;width:100%;min-height:38px;padding:6px 4px;font-size:.65rem;line-height:1.15;white-space:normal;overflow-wrap:anywhere;border-radius:7px;text-align:center;justify-content:center}
 .modal-card.detail-dialog[data-detail-kind="contact"] .detail-tab-pane{padding:10px 11px calc(12px + env(safe-area-inset-bottom,0px))}
 .modal-card.detail-dialog .modal-body{min-height:0}
}

/* Better compact dialog sizing on very short screens and mobile landscape. */
@media(max-width:600px){
 .modal-screen{max-width:100vw;overflow:hidden}
 .modal-card{max-width:100vw!important;max-height:calc(100dvh - 6px)!important;min-height:0}
 .modal-card .modal-top{flex-shrink:0}
 .modal-card .modal-body{min-height:0;overscroll-behavior:contain}
 .modal-card .modal-form>.modal-actions{flex-shrink:0;position:static;bottom:auto;margin:0!important;background:#fff;box-shadow:0 -1px 0 #e7ebf1}
 .modal-card.detail-dialog{height:calc(100dvh - 6px);max-height:calc(100dvh - 6px)!important}
 .modal-card.detail-dialog .detail-dialog-layout{min-height:0}
 .modal-card.detail-dialog .detail-tab-pane{overscroll-behavior:contain}
}
@media(max-height:590px) and (max-width:900px){
 body:is(.contacts-view,.staff-view,.users-view) .content-head .eyebrow,
 body:is(.contacts-view,.staff-view,.users-view) .content-head p{display:none}
 body.staff-view #page-content>.summary-grid .summary-card{min-height:54px!important;padding:6px 9px!important}
 body.staff-view #page-content>.summary-grid .summary-card .value{font-size:.98rem}
 .modal-card.detail-dialog[data-detail-kind="contact"] .detail-fixed .detail-strip{display:none}
}
/* Explicit grid areas are essential: without them the 5th permission cell
   creates a blank column and stretches every user card by an extra row. */
@media(max-width:600px){
 .management-panel .staff-table.responsive-list tbody tr[data-filter-text]{
   grid-template-areas:"who who" "salary advance" "paid remaining" "status status" "actions actions";
 }
 .management-panel .staff-table.responsive-list tbody tr[data-filter-text]>td:nth-child(1){grid-area:who}
 .management-panel .staff-table.responsive-list tbody tr[data-filter-text]>td:nth-child(2){grid-area:salary}
 .management-panel .staff-table.responsive-list tbody tr[data-filter-text]>td:nth-child(3){grid-area:advance}
 .management-panel .staff-table.responsive-list tbody tr[data-filter-text]>td:nth-child(4){grid-area:paid}
 .management-panel .staff-table.responsive-list tbody tr[data-filter-text]>td:nth-child(5){grid-area:remaining}
 .management-panel .staff-table.responsive-list tbody tr[data-filter-text]>td:nth-child(6){grid-area:status}
 .management-panel .staff-table.responsive-list tbody tr[data-filter-text]>td:nth-child(7){grid-area:actions}
 .management-panel .user-management-table.responsive-list tbody tr[data-filter-text]{
   grid-template-areas:"who who" "role status" "rights rights" "actions actions";
 }
 .management-panel .user-management-table.responsive-list tbody tr[data-filter-text]>td:nth-child(1){grid-area:who}
 .management-panel .user-management-table.responsive-list tbody tr[data-filter-text]>td:nth-child(2){grid-area:role}
 .management-panel .user-management-table.responsive-list tbody tr[data-filter-text]>td:nth-child(3){grid-area:rights}
 .management-panel .user-management-table.responsive-list tbody tr[data-filter-text]>td:nth-child(4){grid-area:status}
 .management-panel .user-management-table.responsive-list tbody tr[data-filter-text]>td:nth-child(5){grid-area:actions}
 .management-panel .user-management-table.responsive-list tbody tr[data-filter-text]>td.user-role-cell,
 .management-panel .user-management-table.responsive-list tbody tr[data-filter-text]>td.user-status-cell{grid-column:auto;min-height:36px;padding:5px 10px!important}
 .management-panel .user-management-table.responsive-list tbody tr[data-filter-text]>td.mgmt-permissions{grid-column:auto;min-height:26px;padding:5px 10px!important}
 .management-panel .user-management-table.responsive-list tbody tr[data-filter-text]>td.mgmt-actions-cell{grid-column:auto;padding:5px 8px!important}
 .management-panel .user-management-table.responsive-list tbody tr[data-filter-text]>td.mgmt-actions-cell .mgmt-action{min-height:32px!important}
 .management-panel .staff-table.responsive-list tbody tr[data-filter-text]>td.mgmt-actions-cell{grid-column:auto;padding:5px 7px!important}
 .management-panel .staff-table.responsive-list tbody tr[data-filter-text]>td.staff-cell-status{grid-column:auto;min-height:28px}
}
@media(max-width:360px){
 .management-panel .staff-table.responsive-list .mgmt-row-actions .mgmt-danger{grid-column:auto!important}
 .management-panel .staff-table.responsive-list .mgmt-row-actions .mgmt-action{min-width:0!important}
}
/* Explicit placement after inherited grid-column rules; do not let action cells
   shrink to half a card. This fixes overlapping buttons at 320–390px. */
@media(max-width:600px){
 .management-panel .staff-table.responsive-list tbody tr[data-filter-text]>td:nth-child(1){grid-column:1/-1;grid-row:1}
 .management-panel .staff-table.responsive-list tbody tr[data-filter-text]>td:nth-child(2){grid-column:1;grid-row:2}
 .management-panel .staff-table.responsive-list tbody tr[data-filter-text]>td:nth-child(3){grid-column:2;grid-row:2}
 .management-panel .staff-table.responsive-list tbody tr[data-filter-text]>td:nth-child(4){grid-column:1;grid-row:3}
 .management-panel .staff-table.responsive-list tbody tr[data-filter-text]>td:nth-child(5){grid-column:2;grid-row:3}
 .management-panel .staff-table.responsive-list tbody tr[data-filter-text]>td:nth-child(6){grid-column:1/-1;grid-row:4}
 .management-panel .staff-table.responsive-list tbody tr[data-filter-text]>td:nth-child(7){grid-column:1/-1;grid-row:5}
 .management-panel .user-management-table.responsive-list tbody tr[data-filter-text]>td:nth-child(1){grid-column:1/-1;grid-row:1}
 .management-panel .user-management-table.responsive-list tbody tr[data-filter-text]>td:nth-child(2){grid-column:1;grid-row:2}
 .management-panel .user-management-table.responsive-list tbody tr[data-filter-text]>td:nth-child(3){grid-column:1/-1;grid-row:3}
 .management-panel .user-management-table.responsive-list tbody tr[data-filter-text]>td:nth-child(4){grid-column:2;grid-row:2}
 .management-panel .user-management-table.responsive-list tbody tr[data-filter-text]>td:nth-child(5){grid-column:1/-1;grid-row:4}
 .management-panel .staff-table.responsive-list tbody tr[data-filter-text]>td:nth-child(n+2):nth-child(-n+5){min-height:31px;padding:4px 9px!important}
 .management-panel .staff-table.responsive-list tbody tr[data-filter-text]>td:nth-child(n+2):nth-child(-n+5):before{font-size:.60rem;line-height:1.1;margin-bottom:0}
 .management-panel .staff-table.responsive-list tbody tr[data-filter-text]>td:nth-child(n+2):nth-child(-n+5).num{font-size:.76rem;line-height:1.17}
 .management-panel .staff-table.responsive-list .mgmt-row-actions{width:100%;min-width:0;grid-template-columns:minmax(0,1.3fr) minmax(0,.83fr) minmax(0,.52fr)}
 .management-panel .staff-table.responsive-list .mgmt-row-actions .mgmt-action{min-height:33px!important;max-height:none;width:100%;min-width:0;white-space:nowrap;font-size:.68rem;padding:6px 4px!important}
 .management-panel .user-management-table.responsive-list tbody tr[data-filter-text]>td.user-role-cell,
 .management-panel .user-management-table.responsive-list tbody tr[data-filter-text]>td.user-status-cell{min-height:32px;padding:4px 9px!important}
 .management-panel .user-management-table.responsive-list tbody tr[data-filter-text]>td.mgmt-permissions{min-height:29px;padding:5px 9px!important}
 .management-panel .user-management-table.responsive-list tbody tr[data-filter-text]>td.mgmt-actions-cell{padding:5px 9px!important}
}
@media(max-width:360px){
 .management-panel .staff-table.responsive-list .mgmt-row-actions .mgmt-action{font-size:.61rem;padding:6px 2px!important;letter-spacing:-.01em}
 .management-panel .staff-table.responsive-list .mgmt-row-actions .mgmt-action .icon{width:12px;height:12px}
}
/* A mobile list already reports record counts in its persistent pagination bar.
   Repeating a badge in the search toolbar consumes an entire line on phones. */
@media(max-width:600px){
 .management-panel .mgmt-toolbar .mgmt-count{display:none}
 .contact-list-panel .contact-toolbar{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px;padding:9px 10px}
 .contact-list-panel .contact-toolbar .mgmt-search-wrap{grid-column:1/-1;grid-row:1;min-width:0;width:100%;max-width:none;margin:0}
 .contact-list-panel .contact-toolbar .contact-filter{grid-column:1;grid-row:2;min-width:0;width:100%;max-width:none;margin:0;flex:none}
 .contact-list-panel .contact-toolbar .contact-filter select{min-width:0;width:100%;min-height:38px;height:38px}
 .contact-list-panel .contact-toolbar .mgmt-check{grid-column:2;grid-row:2;margin:0;width:auto;min-height:38px;white-space:nowrap;padding:7px 9px;font-size:.69rem;line-height:1}
 .staff-list-panel .mgmt-small-toolbar,.user-list-panel .mgmt-small-toolbar{display:flex;align-items:stretch;gap:0}
 .staff-list-panel .mgmt-small-toolbar .mgmt-search-wrap,.user-list-panel .mgmt-small-toolbar .mgmt-search-wrap{flex:1 1 100%;width:100%;max-width:none;min-width:0}
}
/* A legacy odd-last-child rule spans the cheque count across the whole row.
   Override it in the five-tab contact detail so all three KPIs fit one row. */
@media(max-width:600px){
 .modal-card.detail-dialog[data-detail-kind="contact"] .detail-fixed .detail-strip>.detail-stat:nth-child(3){grid-column:auto!important}
}
/* Desktop/tablet personnel: reserve enough width for three action buttons.
   Previously actions visually covered the adjacent status column. */
@media(min-width:601px){
 .management-panel .mgmt-paged-scroll .staff-table{min-width:1160px}
 .management-panel .mgmt-paged-scroll .staff-table .staff-col-person{width:21%}
 .management-panel .mgmt-paged-scroll .staff-table .staff-col-money{width:10.75%}
 .management-panel .mgmt-paged-scroll .staff-table .staff-col-status{width:10%}
 .management-panel .mgmt-paged-scroll .staff-table .staff-col-actions{width:26%}
 .management-panel .mgmt-paged-scroll .staff-table .staff-cell-status{min-width:0;white-space:nowrap}
 .management-panel .mgmt-paged-scroll .staff-table .mgmt-row-actions{width:100%;gap:4px;flex-wrap:nowrap}
 .management-panel .mgmt-paged-scroll .staff-table .mgmt-row-actions .mgmt-action{padding:6px 6px!important;min-width:0;flex:0 1 auto;font-size:.70rem}
 .management-panel .mgmt-paged-scroll .staff-table .mgmt-row-actions .mgmt-action:first-child{flex:1 1 auto}
}
