/* Spark Agency HR — tidy layout (v47) */
@media screen {
  .workspace-nav .nv-old {
    display: none !important;
  }
  .workspace-nav {
    display: block;
  }
  .workspace-nav .nv-group {
    display: block;
    margin: 0 0 6px;
  }
  .workspace-nav .nv-group[data-nv="home"] {
    margin-bottom: 10px;
  }
  .nv-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 4px 2px;
    padding: 7px 8px;
    border-radius: 8px;
    color: #7fa3ab;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    user-select: none;
    transition: color 0.15s, background-color 0.15s;
  }
  .nv-head:hover {
    color: #d7e7ea;
    background: #ffffff0a;
  }
  .nv-head:focus-visible {
    outline: 2px solid #5fe0dc;
    outline-offset: 1px;
  }
  .nv-label {
    flex: 1;
  }
  .nv-chev {
    width: 14px;
    height: 14px;
    flex: none;
    transition: transform 0.25s cubic-bezier(.22,.8,.3,1);
  }
  .nv-closed .nv-chev {
    transform: rotate(-90deg);
  }
  .nv-sum {
    display: inline-grid;
    place-items: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #0a9a9c;
    color: #fff;
    font-size: 10.5px;
    font-weight: 800;
    animation: nv-pop 0.25s cubic-bezier(.22,.8,.3,1);
  }
  .nv-sum[hidden] {
    display: none;
  }
  .nv-sum.hot {
    background: #ef4444;
  }
  .nv-body {
    display: grid;
    grid-template-rows: 1fr;
    transition: grid-template-rows 0.28s cubic-bezier(.22,.8,.3,1), opacity 0.2s;
  }
  .nv-closed .nv-body {
    grid-template-rows: 0fr;
    opacity: 0;
  }
  .nv-inner {
    min-height: 0;
    overflow: hidden;
  }
  .nv-group .dk-nav-label {
    flex: 1;
    text-align: left;
  }
  .nv-closed .nv-inner button {
    visibility: hidden;
    transition: visibility 0s 0.28s;
  }
  @keyframes nv-pop {
    from { transform: scale(0.4); opacity: 0; }
  }

  /* Overview: fixed order, payroll details folded */
  #dashboard.dash-tidy {
    display: flex;
    flex-direction: column;
  }
  #dashboard.dash-tidy > * {
    min-width: 0;
  }
  #dashboard.dash-tidy > .dash-more {
    display: none;
  }
  #dashboard.dash-tidy.dash-show-more > .dash-more {
    display: block;
    animation: hub-sub-in 0.25s cubic-bezier(.22,.8,.3,1);
  }
  #dashboard .dash-more-toggle {
    align-self: center;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 4px 0 18px;
  }
  #dashboard .dash-more-toggle .nv-chev {
    transition: transform 0.25s;
  }
  #dashboard .dash-more-toggle[aria-expanded="true"] .nv-chev {
    transform: rotate(180deg);
  }
  @media (prefers-reduced-motion: reduce) {
    .nv-body, .nv-chev, .nv-sum { transition: none; animation: none; }
  }
}

/* Phone header: everything fits on one line */
@media screen and (max-width: 480px) {
  body > main > header {
    gap: 8px;
  }
  body > main > header > div:not(.me-chip) {
    flex: 1 1 auto;
    min-width: 0;
  }
  body > main > header #heading {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  body > main > header #xmas-toggle {
    display: none;
  }
  body > main > header #logout {
    padding: 8px 11px;
    font-size: 12.5px;
    flex: none;
  }
  body > main > header .mr-bell,
  body > main > header .me-chip {
    flex: none;
  }
}

/* Inside the iOS / Android app: keep clear of the notch and the home bar */
@media screen {
  html.native-app body > main {
    padding-top: calc(env(safe-area-inset-top, 0px) + 12px);
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 24px);
  }
  html.native-app body > aside {
    padding-top: calc(env(safe-area-inset-top, 0px) + 16px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  html.native-app .fun-mic {
    bottom: calc(env(safe-area-inset-bottom, 0px) + 20px);
  }
}
