/* Раскладка телефона 390 (UI-VAC-POLISH-1): шапка 56, нижние вкладки 68 — макеты HomeEmployeePhone / VacationsPhone.
   Переключение — только media-query; определения устройства нет. Подключается последним. */
@media (max-width: 600px) {
  .layout {
    flex-direction: column;
  }

  .sidebar {
    display: none;
  }

  .topbar {
    height: 56px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    background: var(--color-sidebar-bg);
    color: var(--color-sidebar-white);
    position: relative;
  }

  .topbar__brand {
    font-size: 18px;
    font-weight: 700;
  }

  .topbar__tag {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    background: var(--color-sidebar-active);
    color: var(--color-sidebar-text);
    list-style: none;
    cursor: pointer;
  }

  span.topbar__tag {
    cursor: default;
  }

  .topbar__tag::-webkit-details-marker {
    display: none;
  }

  .topbar__org {
    position: static;
  }

  .topbar__list {
    position: absolute;
    top: 56px;
    right: 8px;
    z-index: 20;
    min-width: 200px;
    margin: 0;
    padding: 6px;
    list-style: none;
    background: #fff;
    border: 1px solid var(--color-line);
    border-radius: 14px;
  }

  .topbar__list a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0 12px;
    border-radius: 8px;
    color: var(--color-text);
    text-decoration: none;
    font-size: 15px;
  }

  .topbar__list a[aria-current="true"] {
    background: var(--color-bg);
    font-weight: 600;
  }

  .content {
    padding: 20px 16px 88px;
  }

  .tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    height: 68px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    background: #fff;
    border-top: 1px solid var(--color-line);
  }

  .tabbar__tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 100%;
    text-decoration: none;
    font-size: 13px;
    color: var(--color-text-secondary);
    list-style: none;
    cursor: pointer;
  }

  .tabbar__tab::-webkit-details-marker {
    display: none;
  }

  .tabbar__tab.is-current {
    color: var(--color-primary);
    font-weight: 700;
  }

  .tabbar__tab.is-disabled {
    opacity: 0.55;
    cursor: default;
  }

  .tabbar__bar {
    width: 24px;
    height: 4px;
    border-radius: 2px;
    background: transparent;
  }

  .tabbar__tab.is-current .tabbar__bar {
    background: var(--color-primary);
  }

  .tabbar__more {
    height: 100%;
  }

  .tabbar__sheet {
    position: fixed;
    right: 8px;
    bottom: 76px;
    min-width: 220px;
    padding: 6px;
    background: #fff;
    border: 1px solid var(--color-line);
    border-radius: 14px;
    display: flex;
    flex-direction: column;
  }

  .tabbar__link {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 44px;
    padding: 0 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--color-text);
    font: inherit;
    font-size: 15px;
    text-align: left;
    text-decoration: none;
  }

  .tabbar__link[aria-current="page"] {
    background: var(--color-bg);
    font-weight: 600;
  }
}

/* Главная (UI-HOME-PILOT): на 390 — одна колонка; порядок как в HomeEmployeePhone —
   сначала «Мой отпуск». Колонки «растворяются», блоки расставляются по `order`. */
@media (max-width: 600px) {
  .home {
    gap: 16px;
  }

  .home__title {
    font-size: 26px;
  }

  .home__head {
    flex-direction: column;
    align-items: stretch;
  }

  .home__cta {
    height: 52px;
    justify-content: center;
    border-radius: 12px;
    font-size: 16px;
  }

  .home__banner {
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
  }

  .home__banner-btn {
    justify-content: center;
  }

  .home__cols,
  .home__main,
  .home__side {
    display: contents;
  }

  .home-block--approvals { order: 1; }
  .home-block--my_balance { order: 2; }
  .home-block--mine { order: 3; }
  .home-block--two_weeks { order: 4; }
  .home-block--who_today { order: 5; }
  .home-block--next { order: 6; }

  .home {
    display: flex;
  }

  .home__head,
  .home__banner {
    order: 0;
  }

  .home-card__head {
    padding: 14px 16px;
  }

  .home-card__head h2,
  .home-side-card h2 {
    font-size: 17px;
  }

  .home-card__head a {
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .home-row {
    flex-wrap: wrap;
    padding: 12px 16px;
  }

  .home-row__btn {
    height: 44px;
    flex-basis: 100%;
    justify-content: center;
  }

  .home-away {
    flex-wrap: wrap;
    gap: 4px 12px;
    padding: 12px 16px;
  }

  .home-away__name {
    width: auto;
  }

  .home-card__note {
    padding: 12px 16px;
  }

  .home-side-card {
    padding: 16px;
  }

  .home-balance__num {
    font-size: 40px;
    line-height: 1;
  }

  .home-btn {
    height: 52px;
    border: 0;
    border-radius: 12px;
    background: var(--color-primary);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
  }

  .home-btn:hover {
    color: #fff;
  }

  .home-chips {
    gap: 8px;
  }

  .home-chip {
    padding: 8px 12px;
    font-size: 14px;
  }

  .home-next {
    padding: 16px;
  }
}
