/* Работнички v18 — mobile workbench */
.mobile-side-tools{display:none}

@media(max-width:800px){
  html{scroll-padding-top:72px}
  body.nav-open{overflow:hidden;touch-action:none}
  .top{height:60px!important;min-height:60px!important;padding:0 12px!important;padding-top:env(safe-area-inset-top)!important}
  .shell{min-height:calc(100vh - 60px)!important}
  .brand{font-size:17px!important;gap:7px!important}.brand-mark{width:30px!important;height:30px!important}
  .menu-toggle{width:40px!important;height:40px!important;min-height:40px!important;flex:0 0 40px}
  .top-center{display:none!important}.user-name,.user-menu{display:none!important}.userbar{gap:8px!important}.user-profile-head .avatar{display:none!important}.top-icon{width:40px!important;height:40px!important}

  .side{top:60px!important;height:calc(100dvh - 60px)!important;width:min(92vw,370px)!important;padding:0 12px calc(28px + env(safe-area-inset-bottom))!important;border-radius:0 18px 18px 0;overscroll-behavior:contain;transform:translateX(-108%)!important}
  .side.open{transform:translateX(0)!important}
  .side-overlay{inset:60px 0 0!important;backdrop-filter:blur(2px)}
  .mobile-side-tools{display:block;position:sticky;top:0;z-index:3;background:var(--surface);padding:13px 2px 12px;border-bottom:1px solid var(--border);margin-bottom:5px}
  .mobile-side-user{display:grid;grid-template-columns:auto minmax(0,1fr) 40px;align-items:center;gap:10px;margin-bottom:11px}.mobile-side-user b,.mobile-side-user small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mobile-side-user small{color:var(--muted);font-size:11px;margin-top:2px}.mobile-side-user .avatar{width:38px!important;height:38px!important;flex-basis:38px!important}.mobile-side-close{border:0;background:var(--olive-soft);color:var(--text);border-radius:10px;width:40px;height:40px;font-size:24px;line-height:1;cursor:pointer}
  .mobile-side-search input{min-height:44px!important;background:color-mix(in srgb,var(--text) 3%,var(--surface));border-radius:12px!important}.mobile-side-quick{display:flex!important;width:100%;min-height:44px!important;margin-top:8px!important}
  .nav-section summary{min-height:42px;padding:10px 8px 6px!important}.side a{min-height:44px!important;padding:10px 11px!important;font-size:14px!important}

  .content{padding:16px 14px calc(94px + env(safe-area-inset-bottom))!important;overflow-x:hidden}
  .hero,.v7-page-head{margin-bottom:16px!important}.hero h1,.v7-page-head h1,h1{font-size:25px!important;line-height:1.12}.hero .muted,.v7-page-head .muted{line-height:1.45}
  .card{padding:15px!important;border-radius:15px!important}.card h2{font-size:19px}.card h3{font-size:16px}
  .btn{min-height:44px!important;padding:10px 14px!important}.btn.small{min-height:40px!important;padding:8px 11px!important}
  input,select,textarea{font-size:16px!important;min-height:44px!important}textarea{min-height:96px!important}
  .form-actions{display:grid!important;grid-template-columns:1fr!important;gap:8px!important}.form-actions>.btn,.form-actions>a.btn{width:100%!important}
  .toolbar{max-width:100%;overflow-x:auto;flex-wrap:nowrap!important;padding-bottom:3px}.toolbar>*{flex:0 0 auto}.hero .toolbar{margin-left:0!important}
  .pill{max-width:100%;white-space:normal;line-height:1.3}
  .team-row{align-items:flex-start!important;gap:10px!important}.team-row .right{max-width:48%;font-size:12px}.person-meta{overflow:hidden}.person-meta b,.person-meta .subtle{overflow:hidden;text-overflow:ellipsis}

  .bottom-nav{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr));position:fixed;left:0;right:0;bottom:0;z-index:70;background:color-mix(in srgb,var(--surface) 96%,transparent);backdrop-filter:blur(18px);padding:6px max(5px,env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(5px,env(safe-area-inset-left));min-height:64px;border-top:1px solid var(--border)}
  .bottom-nav a,.bottom-nav button{border:0;background:transparent;color:var(--muted);font:inherit;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-width:0;min-height:50px;border-radius:11px;padding:4px 2px;font-size:10px;font-weight:800;cursor:pointer}.bottom-nav .ni{height:21px}.bottom-nav a.active,.bottom-nav button.active{color:var(--pine);background:color-mix(in srgb,var(--olive) 11%,var(--surface))}
  .bottom-nav .top-badge{display:none}

  /* Employee card: tabs and actions remain usable with one thumb. */
  .page-employee .v7-profile-main{width:100%}.page-employee .v7-profile-main>div{min-width:0}.page-employee .v7-profile-main h1{font-size:24px!important;overflow-wrap:anywhere}.page-employee .v7-profile-badges{flex-wrap:wrap}.page-employee .v7-tabs{scrollbar-width:none;box-shadow:0 5px 16px color-mix(in srgb,var(--pine) 5%,transparent)}.page-employee .v7-tabs::-webkit-scrollbar{display:none}.page-employee .v7-tabs a{min-height:42px;display:flex;align-items:center}.page-employee .v7-head-actions{display:grid!important;grid-template-columns:1fr 1fr;overflow:visible!important}.page-employee .v7-head-actions .btn{width:100%!important;min-width:0}.page-employee .v17-attention-grid,.page-employee .v17-timeline-grid{grid-template-columns:1fr!important}

  /* Attention center is an action queue, not a desktop dashboard squeezed into a phone. */
  .page-control .control-grid{grid-template-columns:1fr 1fr!important;gap:8px!important}.page-control .control-grid>.card{min-height:0!important;padding:13px!important}.page-control .control-grid .metric{font-size:25px!important}.page-control .split{gap:12px!important}.page-control .mini-item{align-items:flex-start!important}.page-control .mini-item .right{max-width:none;margin-left:auto}

  /* Approvals/request decisions: actions become thumb-size and full width. */
  .page-approvals .card.hover,.page-request .card{overflow:hidden}.page-approvals .form-actions,.page-request .form-actions{grid-template-columns:1fr 1fr!important}.page-approvals .form-actions>*:only-child,.page-request .form-actions>*:only-child{grid-column:1/-1}.page-request .split,.page-hr_support .split{gap:12px!important}

  /* Long operational tables remain readable: sticky headers and a controlled horizontal area. */
  .table-wrap{overflow:auto!important;-webkit-overflow-scrolling:touch;max-width:calc(100vw - 28px)!important;scrollbar-width:thin}.table-wrap table{min-width:680px}.table-wrap th{position:sticky;top:0;z-index:1}.page-employees .table-wrap table{min-width:760px}.page-all_requests .table-wrap table,.page-audit .table-wrap table,.page-notification_settings .table-wrap table{min-width:850px}
  .calendar-grid{min-width:720px!important}.schedule-grid{min-width:1040px!important}.page-calendar .table-wrap,.page-production .table-wrap,.page-work_schedule .table-wrap{overscroll-behavior-x:contain}

  /* Search and lists */
  .page-search .grid.cards{grid-template-columns:1fr!important}.page-search .card{min-height:0!important}.page-employees .hero .btn,.page-employee_edit .hero .btn{width:100%}
  .page-notifications .notification{align-items:flex-start}.page-notifications .notification>div:last-child{min-width:0;overflow-wrap:anywhere}

  /* Settings/admin pages on phone */
  .rule-card{padding:12px!important;border:1px solid var(--border)!important;border-radius:13px!important;margin-bottom:10px!important}.page-theme .preview-body{grid-template-columns:88px 1fr!important}.page-theme .preview-main{padding:12px!important}.page-theme .theme-presets,.page-theme .theme-fields{grid-template-columns:1fr!important}.page-integrations .grid.cards,.page-automation .grid.cards{grid-template-columns:1fr!important}.page-notification_settings .kv{grid-template-columns:1fr!important}.page-employee_import .import-summary{grid-template-columns:1fr 1fr!important}
}

@media(max-width:390px){
  .content{padding-left:11px!important;padding-right:11px!important}.table-wrap{max-width:calc(100vw - 22px)!important;margin-left:-11px!important;margin-right:-11px!important}.page-control .control-grid{grid-template-columns:1fr!important}.page-employee .v7-head-actions{grid-template-columns:1fr}.page-approvals .form-actions,.page-request .form-actions{grid-template-columns:1fr!important}.page-employee_import .import-summary{grid-template-columns:1fr!important}.bottom-nav a,.bottom-nav button{font-size:9px}
}
