/* 직원 헤더 상단 컨트롤 통일 — 입력/결과/고객문의 · 새현장/최근작업 · 이용역할 */

.hero-topbar,
body[data-role="staff"] .hero-topbar {
  justify-content: space-between;
}

.hero-controls,
body[data-role="staff"] .hero-controls {
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
  width: auto;
  max-width: none;
  margin-left: auto;
  gap: 0.4rem;
}

body[data-role="staff"] .hero-controls .hero-page-switch,
body[data-role="staff"] .hero-controls .hero-actions-row,
body[data-role="staff"] .hero-controls .hero-nav-drawer-open {
  flex: 0 0 auto;
}

body[data-role="staff"] .hero-controls .hero-page-switch {
  margin-left: 0.15rem;
  order: 3;
}

body[data-role="staff"] .hero-controls .hero-actions-row {
  order: 2;
}

body[data-role="staff"] .hero-controls .hero-nav-drawer-open {
  order: 1;
}

body[data-role="staff"] .hero-actions-row {
  align-items: center;
  gap: 0.4rem;
}

body[data-role="staff"] .hero-staff-session-actions {
  align-items: center;
  gap: 0.4rem;
}

/* 페이지 전환: 고객 문의 기준 동일 폭 3칩 */
body[data-role="staff"] .hero-controls .hero-page-switch.page-switch {
  --staff-page-chip-w: 4.85rem;
  display: inline-grid;
  grid-template-columns: repeat(3, var(--staff-page-chip-w));
  gap: 0.35rem;
  flex: 0 0 auto;
  width: auto;
  max-width: none;
  min-width: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  align-self: center;
}

body[data-role="staff"] .hero-page-switch .page-btn,
body[data-role="staff"] .staff-recent-open-btn,
body[data-role="staff"] .role-open-btn {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 2.4rem;
  height: 2.4rem;
  margin: 0;
  padding: 0 0.85rem;
  border: 1px solid #d0d7e2;
  border-radius: 11px;
  background: #fff;
  color: #334155;
  font-size: 0.8rem;
  font-weight: 750;
  letter-spacing: -0.01em;
  line-height: 1.1;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease;
  cursor: pointer;
}

/* 메뉴 버튼은 display는 hero-nav-drawer.css 미디어쿼리 유지, 외형만 맞춤 */
body[data-role="staff"] .hero-nav-drawer-open {
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 2.4rem;
  height: 2.4rem;
  margin: 0;
  padding: 0 0.75rem 0 0.65rem;
  border: 1px solid #d0d7e2;
  border-radius: 11px;
  background: #fff;
  color: #334155;
  font-size: 0.8rem;
  font-weight: 750;
  letter-spacing: -0.01em;
  line-height: 1.1;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease;
  cursor: pointer;
}

body[data-role="staff"] .hero-page-switch .page-btn {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 750;
  gap: 0.2rem;
}

body[data-role="staff"] .hero-page-switch .staff-customer-leads-page-btn {
  padding: 0 0.28rem;
}

body[data-role="staff"] .hero-page-switch .staff-customer-leads-page-btn > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
}

body[data-role="staff"] .hero-page-switch .staff-customer-leads-open-btn__badge {
  min-width: 0.95rem;
  height: 0.95rem;
  padding: 0 0.22rem;
  font-size: 0.6rem;
}

body[data-role="staff"] .hero-page-switch .page-btn:hover,
body[data-role="staff"] .staff-recent-open-btn:hover,
body[data-role="staff"] .role-open-btn:hover,
body[data-role="staff"] .hero-nav-drawer-open:hover,
body[data-role="staff"] .hero-nav-drawer-open[aria-expanded="true"] {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.1);
}

body[data-role="staff"] .hero-page-switch .page-btn.active,
body[data-role="staff"] .hero-page-switch .page-btn.active:hover {
  border-color: #60a5fa;
  background: #eff6ff;
  color: #1d4ed8;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.14);
  font-weight: 800;
}

body[data-role="staff"] .hero-page-switch .page-btn:focus-visible,
body[data-role="staff"] .staff-recent-open-btn:focus-visible,
body[data-role="staff"] .role-open-btn:focus-visible,
body[data-role="staff"] .hero-nav-drawer-open:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.45);
  outline-offset: 2px;
}

/* 이용 역할: 같은 높이의 단일 칩 */
body[data-role="staff"] .role-open-btn {
  flex: 0 0 auto;
  align-self: center;
  padding: 0 0.7rem 0 0.65rem;
  gap: 0.4rem;
  text-align: left;
}

body[data-role="staff"] .role-open-btn__kicker,
body[data-role="staff"] .role-open-btn__desc {
  display: none;
}

body[data-role="staff"] .role-open-btn__icon {
  font-size: 1rem;
  line-height: 1;
}

body[data-role="staff"] .role-open-btn__text {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0;
  min-width: 0;
}

body[data-role="staff"] .role-open-btn__title {
  font-size: 0.8rem;
  font-weight: 750;
  letter-spacing: -0.01em;
  color: inherit;
}

body[data-role="staff"] .role-open-btn__chevron {
  margin-left: 0.1rem;
  font-size: 0.7rem;
  color: inherit;
  opacity: 0.7;
}

body[data-role="staff"] .hero-nav-drawer-open__kicker {
  display: none;
}

body[data-role="staff"] .hero-nav-drawer-open__text {
  display: flex;
  align-items: center;
}

body[data-role="staff"] .hero-nav-drawer-open__title {
  font-size: 0.8rem;
  font-weight: 750;
  color: inherit;
}

body[data-role="staff"] .hero-nav-drawer-open__icon {
  font-size: 1rem;
  line-height: 1;
  color: inherit;
}

@media (max-width: 1100px) {
  body[data-role="staff"] .hero-controls .hero-page-switch.page-switch {
    --staff-page-chip-w: 4.45rem;
    max-width: none;
  }

  body[data-role="staff"] .hero-page-switch .page-btn {
    padding: 0 0.28rem;
    font-size: 0.68rem;
  }

  body[data-role="staff"] .staff-recent-open-btn,
  body[data-role="staff"] .role-open-btn {
    padding: 0 0.65rem;
    font-size: 0.76rem;
    min-width: 0;
  }
}
