/* Shared small-screen layout. Desktop styles remain owned by their pages. */
.crm-mobile-header,.crm-mobile-backdrop { display:none; }
.rz-responsive-table { max-width:100%; min-width:0; overflow-x:auto; overscroll-behavior-x:contain; -webkit-overflow-scrolling:touch; }
.rz-responsive-table:focus-visible { outline:2px solid var(--accent2); outline-offset:2px; }
@media(max-width:1200px) {
 html body.crm-sidebar-layout #topnav.crm-sidebar #topnavLinks { position:static!important; inset:auto!important; transform:none!important; height:auto!important; max-height:none!important; min-height:0!important; flex:1 1 0!important; padding:0!important; border:0!important; background:transparent!important; }
 html body.crm-sidebar-layout.crm-sidebar-mini #topnav.crm-sidebar { padding:5px 4px 16px!important; }
 html body.crm-sidebar-layout.crm-sidebar-mini #topnav.crm-sidebar #topnavLinks a,html body.crm-sidebar-layout.crm-sidebar-mini #topnav.crm-sidebar summary { padding:9px 4px!important; min-height:42px; }
 html body.crm-sidebar-layout :is(.container,.subscription-page,.card,.page-wrap,.packages-wrap,.grid2,.field-wrap) { min-width:0; box-sizing:border-box; }
 html body.crm-sidebar-layout .page-wrap { grid-template-columns:minmax(0,1fr)!important; }
 html body.crm-sidebar-layout .bk-grid { grid-template-columns:minmax(0,1fr)!important; }
 html body.crm-sidebar-layout :is(.bk-card,.bk-row,.bk-row > div) { min-width:0; max-width:100%; box-sizing:border-box; }
 html body.crm-sidebar-layout #svcList > div { width:auto!important; max-width:100%; }
 html body.crm-sidebar-layout #svcList .warning { width:auto!important; max-width:100%; box-sizing:border-box; overflow-wrap:anywhere; }
 html body.crm-sidebar-layout #svcTitle { width:100%!important; }
 html body.crm-sidebar-layout[data-rz-page="calendar"] .container > form { display:flex; flex-wrap:wrap; gap:12px; }
 html body.crm-sidebar-layout[data-rz-page="calendar"] .container > form > div { min-width:0; max-width:100%; box-sizing:border-box; }
 html body.crm-sidebar-layout[data-rz-page="calendar"] .container > form select { max-width:100%; width:100%; }
 html body.crm-sidebar-layout .packages-wrap { flex-direction:column; }
 html body.crm-sidebar-layout .packages-wrap > .card { width:100%!important; max-width:100%; }
 html body.crm-sidebar-layout .card.grid:not(.kit-navigation-card) {
    grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
    width: auto !important;
    gap: 0 !important;
 }
 html body.crm-sidebar-layout .kit-navigation-card { display:flex!important; flex-wrap:wrap; min-width:0; }
 html body.crm-sidebar-layout .group.open .group-content { grid-template-columns:repeat(1,minmax(0,1fr))!important; gap:0px!important; }
 html body.crm-sidebar-layout #packagesBlock > .group.open > #pkgContent.group-content { display:grid!important; grid-template-columns:repeat(1,minmax(0,1fr))!important; }
 html body.crm-sidebar-layout #pkgContent > div { min-width:0; }
 html body.crm-sidebar-layout :is(.grid-charts,.kpi-grid) { grid-template-columns:repeat(2,minmax(0,1fr))!important; }
 html body.crm-sidebar-layout .accounting-filter-row--search > .accounting-live-search { flex:1 1 180px; }
 html body.crm-sidebar-layout .salary-filters { grid-template-columns:repeat(2,minmax(0,1fr))!important; max-width:100%; }
 html body.crm-sidebar-layout #openColumnsModal { position:static!important; margin:8px 0; max-width:100%; }
 html body.crm-sidebar-layout .sa-grid { grid-template-columns:repeat(2,minmax(0,1fr))!important; gap:20px 12px; }
 html body.crm-sidebar-layout :is(input,select,textarea) { max-width:100%; box-sizing:border-box; }
 html body.crm-sidebar-layout :is(.btn-row,.bk-actions,.page-actions,.account-form-actions) { flex-wrap:wrap; max-width:100%; }
 html body.crm-sidebar-layout #groups .srv { grid-template-columns:minmax(0,1fr) 150px!important; gap:12px; }
 html body.crm-sidebar-layout :is(.modal-box,.modal-dialog,.modal-content,.rz-modal__dialog,.rz-index-modal__dialog) { box-sizing:border-box; max-width:calc(100vw - 24px)!important; }
 html body.crm-sidebar-layout .sub-workspace-bar .workspace-selectbox { min-width:0!important; max-width:100%!important; }
 html body.crm-sidebar-layout .sub-workspace-bar { box-sizing:border-box; }
 .legal-document p,.legal-document li { width:auto!important; max-width:100%; overflow-wrap:anywhere; }
}
@media(max-width:760px) {
 html { scroll-padding-top:72px; }
 html body.crm-sidebar-layout,html body.crm-sidebar-layout:not(.crm-sidebar-mini) { padding-left:0!important; padding-top:60px!important; min-width:0!important; width:100%!important; }
 html body.crm-sidebar-layout { padding-bottom:calc(var(--rz-bottom-space,0px) + 0px + env(safe-area-inset-bottom))!important; }
 html body.crm-sidebar-layout.crm-mobile-menu-open { overflow:hidden; }
 .crm-mobile-header { position:fixed; z-index:1001; top:0; left:0; right:0; height:56px; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:6px 12px; box-sizing:border-box; background:var(--card); border-bottom:1px solid var(--border); }
 .crm-mobile-header > a { display:flex; align-items:center; padding:0!important; min-width:0; }
 .crm-mobile-header img { width:auto!important; max-width:150px!important; max-height:34px!important; height:auto!important; margin:0!important; }
 .crm-mobile-header button { display:flex; align-items:center; justify-content:center; width:42px; height:42px; border:1px solid var(--border); border-radius:8px; background:var(--border); color:var(--text); font-size:25px; cursor:pointer; }
 .crm-mobile-backdrop:not([hidden]) { display:block; position:fixed; inset:56px 0 0; background:#0008; z-index:998; border:0; padding:0; width:100%; height:calc(100dvh - 56px); cursor:pointer; }
 html body.crm-sidebar-layout #topnav.crm-sidebar { inset:56px auto 0 0!important; height:calc(100dvh - 56px)!important; width:min(290px,calc(100vw - 40px))!important; max-width:100%; padding:10px 10px 20px!important; z-index:9999!important; transform:translateX(-105%); visibility:hidden; pointer-events:none; background:var(--card)!important; transition:transform .2s ease,visibility .2s ease; }
 html body.crm-sidebar-layout.crm-mobile-menu-open #topnav.crm-sidebar { transform:translateX(0); visibility:visible; pointer-events:auto; }
 html body.crm-sidebar-layout #topnav.crm-sidebar .topnav-left { min-height:38px; }
 html body.crm-sidebar-layout #topnav.crm-sidebar #topnavLinks { display:flex!important; position:static!important; inset:auto!important; transform:none!important; max-height:none!important; height:auto!important; min-height:0!important; padding:0!important; margin:0!important; border:0!important; box-shadow:none!important; background:transparent!important; overflow-y:auto!important; }
 html body.crm-sidebar-layout #topnav.crm-sidebar #topnavLinks a,html body.crm-sidebar-layout #topnav.crm-sidebar summary { min-height:42px; padding:9px 12px!important; }
 html body.crm-sidebar-layout #topnav.crm-sidebar .topnav-account-menu { top:0; padding-top:10px; }
 html body.crm-sidebar-layout #topnav.crm-sidebar .topnav-account-flex { min-height:48px; }
 html body.crm-sidebar-layout .crm-menu-tooltip { display:none!important; }
 html body.crm-sidebar-layout > :is(.container,.subscription-page,.history-page,.inc-page) { width:calc(100% - 24px)!important; max-width:calc(100% - 24px)!important; margin:0 12px 20px!important; padding:12px 0!important; box-sizing:border-box; }
 html body.crm-sidebar-layout > .sub-workspace-bar,html body.crm-sidebar-layout:has(>.storage-page)>.sub-workspace-bar { width:calc(100% - 24px)!important; max-width:calc(100% - 24px)!important; margin:8px 12px 0!important; padding:0!important; gap:8px; }
 html body.crm-sidebar-layout .sub-workspace-bar .workspace-selectbox { flex:1 1 100%; width:100%!important; }
 html body.crm-sidebar-layout .sub-workspace-bar .selector-wrapper { width:100%; }
 html body.crm-sidebar-layout .sub-workspace-bar .selector-wrapper .selected { white-space:normal; overflow-wrap:anywhere; }
 html body.crm-sidebar-layout :is(.section-title,h1) { font-size:20px!important; overflow-wrap:anywhere; }
 html body.crm-sidebar-layout .topbar { width:100%; gap:12px; }
 html body.crm-sidebar-layout .card { padding:12px!important; max-width:100%; margin-left:0!important; margin-right:0!important; }
 html body.crm-sidebar-layout :is(.grid2,.grid3,.form-grid,.users-filters,.clients-filter-row,.account-form-grid,.legal-owner-grid,.yb-grid,.bk-grid,.grid-charts,.kpi-grid,.salary-filters) { grid-template-columns:minmax(0,1fr)!important; width:100%!important; min-width:0!important; }
 html body.crm-sidebar-layout .sa-grid { grid-template-columns:minmax(0,1fr)!important; }
 html body.crm-sidebar-layout .sa-type { flex-wrap:wrap; gap:10px; }
 html body.crm-sidebar-layout :is(.field-wrap,.rz-field,.sub-field) { min-width:0!important; max-width:100%; box-sizing:border-box; }
 html body.crm-sidebar-layout :is(input:not([type=checkbox]):not([type=radio]):not([type=color]),select,textarea) { min-width:0!important; font-size:16px!important; }
 html body.crm-sidebar-layout :is(input:not([type=checkbox]):not([type=radio]):not([type=color]),select) { min-height:40px; }
 html body.crm-sidebar-layout .select-box.rz-selectbox .selector-wrapper .selected { min-height:40px; box-sizing:border-box; }
 html body.crm-sidebar-layout .check.ios-switch { min-height:38px; box-sizing:border-box; }
 html body.crm-sidebar-layout .check.ios-switch > span:last-child { overflow-wrap:anywhere; min-width:0; }
 html body.crm-sidebar-layout .check.ios-switch .additional-qty-button { width:30px; height:30px; min-height:30px; padding:0; }
 html body.crm-sidebar-layout .check.ios-switch .additional-qty-control { height:30px; }
 html body.crm-sidebar-layout :is(.custom-submit,.custom-reset,.custom-columns,.custom-excel,.save-btn,.reset-btn,.btn) { min-height:38px; box-sizing:border-box; justify-content:center; white-space:normal; }
 html body.crm-sidebar-layout :is(.btn-row,.bk-actions,.page-actions,.account-form-actions,.history-filter-actions) { display:flex; width:auto!important; flex-wrap:wrap; gap:8px; }
 html body.crm-sidebar-layout .accounting-filter .accounting-filter-row { align-items:stretch; gap:18px 10px; }
 html body.crm-sidebar-layout .accounting-filter :is(.accounting-filter-row--primary,.accounting-filter-row--search) > .field-wrap { flex:1 1 100%!important; min-width:0!important; }
 html body.crm-sidebar-layout .accounting-filter :is(input,select) { width:100%!important; }
 html body.crm-sidebar-layout .accounting-table-controls { margin-left:0!important; flex-wrap:wrap; width:100%; gap:12px; }
 html body.crm-sidebar-layout .accounting-per-page { flex:1 1 160px; margin-top:12px!important; }
 html body.crm-sidebar-layout :is(.filter,.analytics-mode,.page-head) { flex-wrap:wrap; gap:16px 10px; }
 html body.crm-sidebar-layout .filter > .field-wrap { flex:1 1 100%; }
 html body.crm-sidebar-layout .rz-responsive-table { width:100%; margin-top:10px; }
 html body.crm-sidebar-layout .rz-responsive-table > table { width:max-content; min-width:100%; }
 html body.crm-sidebar-layout .rz-responsive-table :is(th,td) { max-width:300px; }
 html body.crm-sidebar-layout :is(.pagination-bar,.history-tabs,.storage-tabs,#clientBonusTabs) { max-width:100%; flex-wrap:wrap; gap:6px; }
 html body.crm-sidebar-layout :is(.history-tab,.storage-tabs a) { min-height:36px; box-sizing:border-box; }
 html body.crm-sidebar-layout .page-wrap { display:grid; grid-template-columns:minmax(0,1fr)!important; gap:14px; }
 html body.crm-sidebar-layout #groups .srv { grid-template-columns:minmax(0,1fr)!important; padding:12px; }
 html body.crm-sidebar-layout #groups .srv > * { min-width:0; max-width:100%; }
 html body.crm-sidebar-layout :is(#groups .srv .btn-row,#itemsList .btn-row) { justify-content:flex-start; }
 html body.crm-sidebar-layout .pkg,html body.crm-sidebar-layout #itemsList > * { min-width:0; max-width:100%; box-sizing:border-box; }
 html body.crm-sidebar-layout .package-controls { flex-wrap:wrap; }
 html body.crm-sidebar-layout .package-discount-field { max-width:100%; }
 html body.crm-sidebar-layout .total { left:0!important; bottom:-1px; width:100%!important; padding:10px 12px calc(10px + env(safe-area-inset-bottom)); gap:10px; flex-wrap:wrap; }
 html body.crm-sidebar-layout .total_left { display:flex; width:auto!important; min-width:0; flex:1 1 80px; justify-content:center; }
 html body.crm-sidebar-layout .total strong { font-size:25px!important; white-space:nowrap; }
 html body.crm-sidebar-layout .total_right { min-width:0; flex-wrap:wrap; gap:8px; }
 html body.crm-sidebar-layout .total_right button { font-size:12px; max-width:170px; }
 html body.crm-sidebar-layout .sa-total { left:0; right:0; width:100%; max-width:100%; padding:12px; border-radius:8px 8px 0 0; box-sizing:border-box; flex-wrap:wrap; align-items:center; gap:10px; }
 html body.crm-sidebar-layout .sa-total .card-title { flex-wrap:wrap; }
 html body.crm-sidebar-layout .sa-total .sa-actions { margin-left:auto; }
 html body.crm-sidebar-layout[data-rz-page="storage_prices"] .card[style*="fixed"] { position:static!important; width:100%!important; margin:16px 0!important; }
 html body.crm-sidebar-layout[data-rz-page="storage_prices"] :is(#savePriceBtn,#cancelEditBtn) { bottom:0!important; }
 html body.crm-sidebar-layout :is(#iconPath,#faviconPath,code,.sub-note,.bk-muted) { max-width:100%; overflow-wrap:anywhere; }
 html body.crm-sidebar-layout :is(.modal,.rz-index-modal) { padding:12px!important; box-sizing:border-box; }
 html body.crm-sidebar-layout :is(.modal-box,.modal-dialog,.rz-index-modal__dialog) { width:calc(100vw - 24px)!important; min-width:0!important; margin:0!important; max-height:calc(100dvh - 24px)!important; overflow-y:auto; overscroll-behavior:contain; padding:16px!important; }
 html body.crm-sidebar-layout .rz-modal__dialog { width:min(640px,calc(100vw - 24px))!important; max-height:calc(100dvh - 24px)!important; overflow-y:auto; top:50%!important; left:50%!important; right:auto!important; bottom:auto!important; transform:translate(-50%,-50%)!important; }
 html body.crm-sidebar-layout .own-price-keypad-modal .rz-modal__dialog { width:min(290px,calc(100vw - 24px))!important; }
 html body.crm-sidebar-layout :is(.modal-head,.modal-header,.rz-modal__head,.rz-index-modal__head) { position:relative; min-width:0; padding-right:36px!important; flex-wrap:wrap; }
 html body.crm-sidebar-layout :is(.modal-title,.rz-modal__title) { overflow-wrap:anywhere; }
 html body.crm-sidebar-layout :is(#executorModal,#columnsModal) .rz-modal-close,html body.crm-sidebar-layout .modal .rz-modal-close { position:absolute!important; top:-10px!important; right:-8px!important; left:auto!important; bottom:auto!important; margin:0!important; z-index:2; width:32px; height:32px; }
 html body.crm-sidebar-layout #modalDate { margin:0 36px 12px 0!important; }
 html body.crm-sidebar-layout .status-options { flex-wrap:wrap; gap:8px; }
 html body.crm-sidebar-layout .status-option { width:calc(50% - 4px); box-sizing:border-box; }
 html body.crm-sidebar-layout[data-rz-page="calendar"] .container > form > div { flex:1 1 100%; width:100%; }
 html body.crm-sidebar-layout[data-rz-page="calendar"] .container > form .rz-month-nav { flex:0 1 auto; width:fit-content; }
 html body.crm-sidebar-layout[data-rz-page="calendar"] .calendar-grid,html body.crm-sidebar-layout[data-rz-page="calendar"] .weekdays { grid-template-columns:repeat(7,minmax(0,1fr)); gap:4px; padding-left:4px; padding-right:4px; box-sizing:border-box; }
 html body.crm-sidebar-layout[data-rz-page="calendar"] .day { min-width:0; min-height:64px; height:auto; padding:6px 2px; box-sizing:border-box; overflow:hidden; overflow-wrap:anywhere; font-size:11px; }
 html body.crm-sidebar-layout[data-rz-page="calendar"] .day :is(span,small,div) { max-width:100%; overflow-wrap:anywhere; white-space:normal; font-size:10px; }
 html body.crm-sidebar-layout :is(.modal .grid2,.modal .service-entry-grid,.modal .service-extra-row .service-entry-grid,.users-role-access-grid,#srvModal .grid2,#srvModal .service-entry-grid) { grid-template-columns:minmax(0,1fr)!important; }
 html body.crm-sidebar-layout #srvModal .warning { width:auto!important; max-width:100%; box-sizing:border-box; }
 html body.crm-sidebar-layout :is(.modal-footer,.rz-modal__footer,.rz-index-modal__footer) { flex-wrap:wrap; gap:8px; }
 html body.crm-sidebar-layout .site-legal-footer { position:static!important; width:auto!important; max-width:100%; padding:12px 0!important; box-sizing:border-box; }
 html body.crm-sidebar-layout .site-legal-footer nav { width:auto!important; flex-wrap:wrap; gap:10px; }
 .auth-card { width:calc(100vw - 24px)!important; max-width:370px!important; box-sizing:border-box; padding:20px!important; }
 .auth-card :is(input,button,.auth-links a) { min-height:42px; box-sizing:border-box; }
 .auth-card :is(button,.auth-links a) { display:flex; align-items:center; }
 body:has(.auth-card) { padding-bottom:64px; box-sizing:border-box; }
 body:not(.crm-sidebar-layout) .subscription-page { width:100%; max-width:100%; box-sizing:border-box; padding:0 16px; margin:24px auto 70px; }
 .subscription-page :is(.sub-grid.two,.sub-grid.three,.legal-owner-grid) { grid-template-columns:minmax(0,1fr)!important; }
 .subscription-page .sub-table-wrap { max-width:100%; overflow-x:auto; }
 .subscription-page input,.auth-card input { font-size:16px!important; }
 .subscription-page input:not([type=checkbox]):not([type=radio]):not([type=color]) { min-height:40px; }
 .subscription-page .custom-submit { min-height:40px; }
 .site-legal-footer { box-sizing:border-box; max-width:100%; background:var(--card); }
 .site-legal-footer nav { max-width:100%; flex-wrap:wrap; gap:8px 12px!important; }
 .site-legal-footer a { display:inline-flex; align-items:center; min-height:30px; }
 body:has(.registration-page) .site-legal-footer { position:static!important; padding:12px 16px; }
 .home-page .home-footer { position:relative; gap:16px; padding:20px 16px; }
 .home-page .home-footer > div { position:static!important; width:100%; }
 .home-page .home-legal-links { width:auto; justify-content:flex-start; gap:12px; }
 .home-page .home-legal-links a { padding-left:0; }
 .home-page .home-footer > span { order:0; }
 .home-page .home-header { gap:10px; flex-wrap:wrap; }
 .home-page .home-header .brand img { max-width:135px!important; }
 .home-page .home-header-actions { margin-left:auto; }
 .home-page .home-header nav { flex-basis:100%; overflow-x:auto; flex-wrap:nowrap; }
 .home-page .home-price-table-wrap { max-width:100%; overflow-x:auto; }
 .legal-document-page .legal-document { width:auto!important; max-width:100%; box-sizing:border-box; }
}
@media(max-width:440px) {
 html body.crm-sidebar-layout .card.grid:not(.kit-navigation-card) { grid-template-columns:minmax(0,1fr)!important; }
 html body.crm-sidebar-layout .group.open .group-content,html body.crm-sidebar-layout #pkgContent.group-content { grid-template-columns:minmax(0,1fr)!important; }
 html body.crm-sidebar-layout .check.ios-switch { margin-left:0!important; margin-right:0!important; }
 html body.crm-sidebar-layout .total_right { flex:1 1 100%; }
 html body.crm-sidebar-layout .total_right button { flex:1; max-width:none; }
}
@media(prefers-reduced-motion:reduce) {
 html body.crm-sidebar-layout #topnav.crm-sidebar { transition:none; }
}

@media(max-width:1200px){html body.crm-sidebar-layout #packagesBlock > .group:not(.open) > #pkgContent.group-content{display:none!important}}
