
html{
  scroll-behavior:smooth;
}

body{
  overflow-x:hidden;
  -webkit-overflow-scrolling:touch;
}

.table-wrap,
.users-table-wrap,
.settings-table-wrap,
.analytics-table-wrap,
.plan-table-wrap,
.plan-sheet-table-wrap,
.excel-wrap,
.schedule-board,
.plan-inline-form,
.catalog-products-grid,
.catalog-grid,
.products-grid{
  max-width:100%;
  overflow:auto;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
}

.table-wrap table,
.users-table-wrap table,
.settings-table-wrap table,
.analytics-table-wrap table,
.plan-table-wrap table,
.plan-sheet-table-wrap table,
.excel-wrap table{
  min-width:760px;
}

.admin-section-dashboard:not(.admin-frame) .map-column,
.admin-section-dashboard:not(.admin-frame) .dashboard-map,
.consultant-dashboard-nav,
.manager-dashboard-shell .consultant-dashboard-nav{
  scrollbar-gutter:stable;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
}

.admin-section-dashboard:not(.admin-frame) .map-column{
  max-height:calc(100dvh - 132px);
  overflow:auto!important;
  padding-right:8px;
}

.admin-section-dashboard:not(.admin-frame) .dashboard-map{
  align-items:start;
}

.admin-section-dashboard:not(.admin-frame) .map-card:hover{
  transform:none!important;
}

.consultant-my-shifts-card{
  padding:16px!important;
  overflow:auto;
}

.consultant-my-shifts-head{
  align-items:center!important;
  margin-bottom:14px!important;
}

.consultant-my-shifts-head h2{
  font-size:28px!important;
}

.consultant-my-shifts-stats{
  display:flex;
  gap:8px;
  margin-left:auto;
}

.consultant-my-shifts-stats b{
  min-width:74px;
  min-height:54px;
  display:grid;
  place-items:center;
  padding:8px 10px;
  border:1px solid #d9e4f1;
  border-radius:12px;
  background:#f8fafc;
  font-size:24px;
  line-height:1;
}

.consultant-my-shifts-stats small{
  display:block;
  color:#667085;
  font-size:11px;
  font-weight:1000;
  text-transform:uppercase;
}

.consultant-my-shifts-grid{
  gap:12px!important;
}

.consultant-my-shifts-grid>section{
  min-width:0;
  padding:12px;
  border:1px solid #d9e4f1;
  border-radius:16px;
  background:#fff;
}

.consultant-my-shifts-grid>section>h3{
  margin:0 0 10px!important;
  font-size:18px!important;
}

.consultant-my-shifts-list{
  gap:8px!important;
}

.consultant-my-shift-row{
  min-height:66px!important;
  grid-template-columns:58px minmax(0,1fr) auto!important;
  gap:10px!important;
  padding:10px!important;
  border-radius:14px!important;
  background:#fff!important;
  box-shadow:none!important;
}

.consultant-my-shift-row.night{
  box-shadow:inset 4px 0 0 #0b1220!important;
}

.consultant-my-shift-row.day{
  box-shadow:inset 4px 0 0 #ff1b1b!important;
}

.consultant-my-shift-row.past{
  opacity:.78;
}

.consultant-my-shift-date{
  width:58px!important;
  min-height:48px!important;
  padding:6px 4px!important;
  border-radius:12px!important;
}

.consultant-my-shift-date b{
  font-size:18px!important;
}

.consultant-my-shift-row h3{
  font-size:16px!important;
  line-height:1.1!important;
}

.consultant-my-shift-row p{
  margin-top:2px!important;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.consultant-my-shift-row strong{
  min-width:92px;
  padding:8px 10px!important;
  border-radius:12px!important;
  text-align:center;
  font-size:14px;
}

.consultant-my-shift-row small{
  grid-column:2 / -1;
  padding:7px 9px;
  border-radius:10px;
  background:#f8fafc;
}

.admin-modal.active,
.section-modal.active,
.consultant-section-modal.active,
.manager-section-modal.active{
  overflow:hidden;
}

.modal-box,
.section-modal-box,
.consultant-section-box,
.manager-section-box{
  max-width:100%;
}

.modal-body,
.section-modal-frame,
.section-modal-box,
.consultant-section-modal-body,
.manager-section-body{
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
}

.modal-head,
.consultant-section-modal-head,
.manager-section-head{
  color:#fff!important;
  background:#0b1220!important;
  background-image:none!important;
}

.modal-head :where(h1,h2,h3,p,b),
.consultant-section-modal-head :where(h1,h2,h3,p,b),
.manager-section-head :where(h1,h2,h3,p,b){
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  opacity:1!important;
}

.modal-head :where(span,small),
.consultant-section-modal-head :where(span,small),
.manager-section-head :where(span,small){
  color:#ff6868!important;
  -webkit-text-fill-color:#ff6868!important;
  opacity:1!important;
}

@media (max-width:1100px){
  .shell{
    width:min(100% - 24px,960px);
  }

  .topbar-grid{
    grid-template-columns:auto 1fr auto;
    grid-template-areas:
      "logo city account"
      "catalog search search";
    gap:10px;
    padding:10px 0;
  }

  .logo img{
    width:118px;
    height:46px;
  }

  .catalog-trigger,
  .search-form,
  .account-link{
    min-width:0;
  }

  .dashboard-map,
  .catalog-layout,
  .catalog-page,
  .site-grid,
  .home-grid,
  .points-grid,
  .products-layout,
  .consultant-dashboard-layout{
    grid-template-columns:1fr!important;
  }

  .consultant-dashboard-nav{
    position:static!important;
    max-height:none!important;
    overflow:visible!important;
  }

  .consultant-menu-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}

@media (max-width:760px){
  body{
    font-size:16px;
  }

  .shell,
  .admin-wrap,
  .consultant-dashboard-shell{
    width:100%!important;
    padding-left:10px!important;
    padding-right:10px!important;
  }

  .topbar{
    position:sticky;
  }

  .topbar-grid{
    grid-template-columns:1fr auto;
    grid-template-areas:
      "logo account"
      "city city"
      "catalog catalog"
      "search search";
    min-height:0;
  }

  .city-chip,
  .catalog-trigger,
  .search-form,
  .account-link{
    width:100%;
  }

  .catalog-trigger,
  .account-link,
  .btn,
  .consultant-primary-btn,
  .consultant-soft-btn,
  .consultant-logout,
  .manager-danger-btn{
    min-height:48px;
    border-radius:14px;
    padding-left:14px;
    padding-right:14px;
    font-size:16px;
    white-space:normal;
    text-align:center;
  }

  .head,
  body.admin-frame .work-hero,
  body.admin-frame .subsection-hero,
  body.admin-frame .site-settings-hero,
  body.admin-frame .points-clean-hero,
  body.admin-frame .catalog-hero,
  body.admin-frame .stats-hero,
  body.admin-frame .plan-sheet-hero,
  body.admin-frame .chat-hero,
  body.admin-frame .user-hero{
    min-height:0!important;
    padding:18px!important;
    border-radius:18px!important;
    display:grid!important;
    gap:14px!important;
  }

  .head h1,
  body.admin-frame .work-hero h1,
  body.admin-frame .subsection-hero h1,
  body.admin-frame .site-settings-hero h1,
  body.admin-frame .points-clean-hero h1,
  body.admin-frame .catalog-hero h1,
  body.admin-frame .stats-hero h1,
  body.admin-frame .plan-sheet-hero h1,
  body.admin-frame .chat-hero h1,
  body.admin-frame .user-hero h1{
    font-size:34px!important;
    line-height:1!important;
    letter-spacing:0!important;
  }

  .top-buttons,
  .head > div:last-child{
    position:static!important;
    display:grid!important;
    grid-template-columns:1fr!important;
    width:100%!important;
    gap:10px!important;
  }

  .dashboard-map,
  .cards,
  .stats-grid,
  .brand-settings-grid,
  .settings-grid,
  .points-actions,
  .plan-card-head,
  .task-grid,
  .task-board,
  .users-modern-list,
  .catalog-products,
  .product-grid,
  .consultant-menu-grid,
  .consultant-stats-grid,
  .consultant-overview-grid,
  .consultant-my-shifts-grid,
  .consultant-plan-home-stats{
    grid-template-columns:1fr!important;
  }

  .admin-section-dashboard:not(.admin-frame) .map-column{
    max-height:none;
    overflow:visible!important;
    padding-right:0;
  }

  .consultant-my-shifts-head{
    display:grid!important;
    grid-template-columns:1fr!important;
  }

  .consultant-my-shifts-stats{
    margin-left:0;
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .consultant-my-shifts-head a{
    justify-content:center;
    width:100%;
  }

  .consultant-my-shifts-grid>section{
    padding:10px;
  }

  .consultant-my-shift-row{
    grid-template-columns:54px minmax(0,1fr)!important;
  }

  .consultant-my-shift-row strong{
    grid-column:2;
    justify-self:start;
    min-width:0;
  }

  .map-card,
  .panel,
  .card,
  .task-card,
  .plan-card,
  .brand-setting-card,
  .consultant-menu-card,
  .consultant-hero-panel,
  .consultant-overview-card,
  .consultant-profile-panel{
    border-radius:16px!important;
  }

  .consultant-topbar{
    height:auto!important;
    min-height:68px;
    padding:10px!important;
  }

  .consultant-top-actions{
    gap:8px!important;
  }

  .consultant-mini-logo{
    width:48px!important;
    height:48px!important;
  }

  .consultant-dashboard-layout{
    gap:12px!important;
  }

  .consultant-menu-card{
    min-height:92px;
    padding:16px!important;
  }

  .consultant-menu-icon{
    width:58px!important;
    height:58px!important;
    flex:0 0 58px!important;
  }

  .consultant-menu-copy b{
    font-size:24px!important;
    line-height:1!important;
  }

  .consultant-menu-copy small{
    font-size:15px!important;
    line-height:1.25!important;
  }

  .admin-modal{
    padding:0!important;
    align-items:stretch!important;
    justify-content:stretch!important;
  }

  .admin-modal.active{
    display:flex!important;
  }

  .modal-box,
  .section-modal-box,
  .consultant-section-box{
    width:100vw!important;
    max-width:100vw!important;
    max-height:100dvh!important;
    border-radius:0!important;
  }

  .modal-head,
  .consultant-section-modal-head{
    min-height:84px!important;
    padding:16px 74px 16px 16px!important;
    border-radius:0!important;
  }

  .modal-head h2,
  .modal-head h3,
  .consultant-section-modal-head h1{
    font-size:30px!important;
    line-height:1!important;
  }

  .modal-x,
  .consultant-section-close{
    position:absolute!important;
    right:14px!important;
    top:14px!important;
    width:52px!important;
    height:52px!important;
    min-width:52px!important;
    border-radius:16px!important;
    font-size:28px!important;
  }

  .modal-body,
  .consultant-section-modal-body{
    max-height:calc(100dvh - 84px)!important;
    overflow:auto!important;
    padding:14px!important;
  }

  .form.grid,
  .settings-form,
  .plan-form-pro,
  .task-form,
  .schedule-add-form,
  .schedule-tools,
  .consultant-schedule-form,
  .consultant-plan-form,
  .consultant-password-fields{
    grid-template-columns:1fr!important;
  }

  .form label,
  .form input,
  .form select,
  .form textarea,
  .consultant-plan-form input,
  .consultant-plan-form select,
  .consultant-plan-form textarea{
    min-width:0!important;
  }

  .schedule-pro-box,
  .schedule-modal-box{
    width:100vw!important;
  }

  .schedule-board,
  .manager-schedule-scroll{
    max-height:64dvh!important;
  }

  .schedule-board table,
  .manager-schedule-board{
    min-width:900px!important;
  }

  .lk-menu-box,
  .consultant-lk-box{
    width:min(100vw - 20px,430px)!important;
    right:10px!important;
    left:auto!important;
    max-height:calc(100dvh - 96px)!important;
    overflow:auto!important;
  }

  .consultant-lk-popover.active{
    align-items:flex-start!important;
    justify-content:flex-end!important;
    padding:82px 10px 10px!important;
  }

  .product-modal,
  .catalog-panel,
  .city-modal{
    width:100vw!important;
    max-width:100vw!important;
  }
}

@media (max-width:440px){
  .head h1,
  body.admin-frame .work-hero h1,
  body.admin-frame .subsection-hero h1,
  body.admin-frame .site-settings-hero h1,
  body.admin-frame .points-clean-hero h1,
  body.admin-frame .catalog-hero h1,
  body.admin-frame .stats-hero h1,
  body.admin-frame .plan-sheet-hero h1,
  body.admin-frame .chat-hero h1,
  body.admin-frame .user-hero h1,
  .consultant-section-modal-head h1{
    font-size:28px!important;
  }

  .consultant-menu-card{
    grid-template-columns:52px minmax(0,1fr)!important;
  }

  .consultant-menu-icon{
    width:52px!important;
    height:52px!important;
    flex-basis:52px!important;
  }

  .btn,
  .consultant-primary-btn,
  .consultant-soft-btn{
    width:100%;
  }
}

@media (max-width:1100px){
  .topbar .shell{width:calc(100% - 24px)!important;padding-left:0!important;padding-right:0!important}
  .topbar-grid{grid-template-columns:minmax(150px,220px) minmax(105px,140px) minmax(150px,185px) minmax(220px,1fr) 70px!important;grid-template-areas:"logo city catalog search account"!important;gap:12px!important;min-height:76px!important;padding:0!important}
  .logo img{width:170px!important;height:58px!important}
  .city-chip span{font-size:14px!important}
  .city-chip b{font-size:16px!important}
  .catalog-trigger{width:100%!important;height:54px!important;min-height:54px!important;border-radius:9px!important;font-size:20px!important;white-space:nowrap!important}
  .search-row{width:100%!important;height:54px!important;grid-template-columns:minmax(0,1fr) 66px!important;gap:10px!important}
  .search-submit{height:54px!important}
  .search-submit:before{left:20px!important;top:16px!important}
  .search-submit:after{left:39px!important;top:36px!important}
  .account-trigger{width:70px!important;height:54px!important;font-size:13px!important}
}

@media (max-width:760px){
  .topbar .shell{width:calc(100% - 20px)!important}
  .topbar-grid{grid-template-columns:minmax(120px,1fr) 62px!important;grid-template-areas:"logo account" "city city" "catalog catalog" "search search"!important;gap:8px!important;padding:8px 0!important}
  .logo img{width:142px!important;height:50px!important}
  .city-chip{width:100%!important}
  .catalog-trigger{height:48px!important;min-height:48px!important}
  .search-row{height:48px!important;grid-template-columns:minmax(0,1fr) 58px!important}
  .search-submit{height:48px!important}
  .search-submit:before{left:17px!important;top:13px!important}
  .search-submit:after{left:35px!important;top:32px!important}
  .account-trigger{width:62px!important;height:50px!important}
}

#loginModal .auth-modal,
#registerModal .auth-modal{padding:0!important;max-height:calc(100dvh - 24px)!important;display:grid!important;grid-template-rows:auto minmax(0,1fr) auto!important;overflow:hidden!important}
#loginModal .auth-modal .modal-head,
#registerModal .auth-modal .modal-head{position:relative!important;min-height:96px!important;padding:22px 104px 22px 26px!important;display:flex!important;align-items:center!important;justify-content:flex-start!important}
#loginModal .auth-modal .modal-close,
#registerModal .auth-modal .modal-close{position:absolute!important;right:24px!important;top:50%!important;transform:translateY(-50%)!important;width:56px!important;height:56px!important;min-width:56px!important;border-radius:16px!important;display:grid!important;place-items:center!important}
#loginModal .auth-modal .form,
#registerModal .auth-modal .form{min-height:0!important;overflow-y:auto!important;overscroll-behavior:contain!important;-webkit-overflow-scrolling:touch!important}

@media (max-width:560px){
  #loginModal.modal,#registerModal.modal{align-items:center!important;padding:8px!important;overflow-y:auto!important}
  #loginModal .auth-modal,#registerModal .auth-modal{width:calc(100vw - 16px)!important;max-width:calc(100vw - 16px)!important;max-height:calc(100dvh - 16px)!important}
  #loginModal .auth-modal .modal-head,#registerModal .auth-modal .modal-head{min-height:84px!important;padding:18px 92px 18px 24px!important}
  #loginModal .auth-modal .modal-head h3,#registerModal .auth-modal .modal-head h3{font-size:34px!important}
  #loginModal .auth-modal .modal-close,#registerModal .auth-modal .modal-close{right:22px!important;width:54px!important;height:54px!important;min-width:54px!important}
  #loginModal .auth-modal .red-pill,#registerModal .auth-modal .red-pill,.auth-box .red-pill{width:100%!important;min-height:52px!important;height:52px!important;padding:0 18px!important;border-radius:14px!important;font-size:19px!important;line-height:1!important}
}
