/* Hestia V2.3.0 RC: responsive-first refinements; scoped after legacy styles. */
@media(max-width:900px){
 .topbar{height:62px!important;min-height:62px!important;padding:0 16px!important;flex-wrap:nowrap!important;justify-content:space-between!important}
 .topbar-title{flex:1;display:flex;align-items:center;min-width:0}
 .topbar-title:before{content:'HESTIA';color:#16796e;font-weight:840;font-size:17px;letter-spacing:.16em}
 .topbar-title h1,.topbar-breadcrumb{display:none!important}
 .topbar-tools{width:auto!important;justify-content:flex-end!important;gap:10px}
 .topbar-tools .search-container,.topbar-tools .period-select{display:none!important}
 .account-button{min-width:40px}
 .main-content{padding-top:17px}
}

.dashboard-kpis-wrap{display:grid;gap:9px}
.dashboard-secondary-kpi{width:fit-content;display:inline-flex;align-items:center;gap:6px;border:1px solid #cfe5df;border-radius:10px;background:#f4faf7;padding:9px 12px;color:#177067;font-size:12px;font-weight:730}
.dashboard-table-search{padding:0 17px 10px}
.dashboard-local-search{display:block;width:100%;max-width:400px;min-height:43px;border:1px solid #d9e5e3;border-radius:10px;padding:10px 13px;background:#fff;font-size:14px;color:#294448}
.dashboard-local-search:focus{outline:2px solid #8dcbc0;outline-offset:2px}
.priority-more>summary{padding:12px 18px;color:#137568;font-weight:700;cursor:pointer;font-size:12px}
@media(max-width:900px){
 .dashboard-stats{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px}
 .metric-card{min-height:98px!important;padding:12px!important;gap:6px!important}
 .metric-card strong{font-size:26px}
 .dashboard-secondary-kpi{font-size:12px;min-height:42px}
 .priority-row{padding:11px 14px}
 .priority-buttons .hs-button{min-height:42px}
 .priority-more>summary{min-height:44px}
 .dashboard-table-search{padding:0 13px 10px}
}

.mobile-week-calendar{display:none}
@media(max-width:900px){
 .desktop-month-table{display:none!important}
 .mobile-week-calendar{display:grid;gap:13px;border:1px solid #e2ebe9;background:#fff;border-radius:14px;padding:15px}
 .week-controls{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:7px}
 .week-controls .hs-button{min-height:44px;white-space:normal;padding:6px 7px;font-size:12px}
 .week-range{font-size:11px;font-weight:760;color:#557570;text-align:center;white-space:nowrap}
 .week-day-list{display:grid;gap:7px}
 .week-day-card{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:68px;border:1px solid #e5eeeb;border-radius:11px;padding:10px 12px}
 .week-day-card.is-outside{background:#f7f9f8;opacity:.55}
 .week-day-copy{display:grid;gap:3px;min-width:0}
 .week-day-copy strong{font-size:13px;color:#2c4a46}
 .week-day-copy small{font-size:11px;color:#6d8580}
 .week-day-card>.hs-button{min-width:90px;min-height:44px;flex-shrink:0}
}
@media(max-width:360px){
 .week-controls{grid-template-columns:1fr 1fr}
 .week-range{grid-column:1/-1;grid-row:1}
}

.mobile-staff-list,.mobile-attendance-list,.mobile-leave-list{display:none}
@media(max-width:900px){
 #staff-table,.desktop-attendance-table,.desktop-leave-table{display:none!important}
 .mobile-staff-list,.mobile-attendance-list,.mobile-leave-list{display:grid;gap:10px}
 .mobile-record-card,.mobile-staff-card{display:grid;gap:11px;background:#fff;border:1px solid #e1eae7;border-radius:14px;padding:15px}
 .mobile-record-top,.mobile-staff-top{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}
 .mobile-record-top>strong,.mobile-staff-name strong{font-size:14px;color:#24453f}
 .mobile-staff-name{display:grid;gap:3px}
 .mobile-staff-name small{font-size:11px;color:#7b908d}
 .mobile-staff-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px 11px}
 .mobile-staff-facts span{font-size:12px;line-height:1.45;overflow-wrap:anywhere;color:#5d7671}
 .mobile-record-actions{display:flex;gap:9px;flex-wrap:wrap}
 .mobile-record-actions .hs-button{min-height:44px}
 .mobile-empty{border:1px solid #e4ece8;border-radius:12px;padding:16px;background:#fff;font-size:13px;color:#607d76}
 .miss-person .table-action,.miss-person .hs-button{min-height:44px}
 .hs-tabs{overflow-x:auto;scrollbar-width:thin}
 .hs-tab{white-space:nowrap;min-height:44px}
 .filter-chip,.table-action,.hs-actions .hs-button{min-height:40px}
}
@media(max-width:360px){
 .mobile-staff-facts{grid-template-columns:1fr}
}

.payroll-more-exports{position:relative;min-width:170px}
.payroll-more-exports>summary{border:1px solid #d8e4e2;border-radius:10px;background:#fff;color:#31685f;padding:10px 12px;min-height:42px;cursor:pointer;text-align:center;font-size:12px;font-weight:700}
.payroll-extra-buttons{display:flex;gap:8px;padding:10px;border-radius:11px;border:1px solid #e0e9e6;background:#fff}
.payroll-mobile-card{gap:7px!important;padding:13px 14px!important}
.payroll-mobile-card .payroll-mobile-card-stats{gap:5px!important;font-size:10px}
.payroll-mobile-card .payroll-mobile-card-actions{margin-top:0}
.settings-group{padding:14px;border:1px solid #e1eae7;border-radius:15px;background:#fff;display:grid;gap:11px}
.settings-group-head{display:flex;align-items:center;justify-content:space-between;gap:10px}
.settings-group-head h3{font-size:15px;font-weight:770;color:#2f554e;margin:0}
.settings-group-head>.hs-button{min-height:42px}
.settings-group .settings-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
@media(max-width:900px){
 .settings-group .settings-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .settings-group{padding:12px}
 .settings-group .settings-tile{padding:11px}
 .payroll-more-exports{width:100%}
 .payroll-extra-buttons{flex-wrap:wrap}
 .payroll-extra-buttons>.hs-button{min-height:44px;flex:1}
 .payroll-toolbar-actions{display:grid;grid-template-columns:1fr 1fr}
 .payroll-toolbar-actions>.payroll-more-exports{grid-column:1/-1}
}

.dashboard-mobile-period{display:none}
@media(max-width:900px){
 .dashboard-mobile-period{display:block;width:100%;margin-top:11px;min-height:44px;border:1px solid #d2e4e0;border-radius:10px;background:#fff;padding:10px 12px;font-size:13px;color:#2b5e57}
}
