/*
 * H-AI 워크 테마 — 역할 class(hai_*) 모양. 값은 app/theme/hai/tokens.css 의 토큰.
 * 틀: 남색 상단바(56) · 왼쪽 흰 메뉴(232, Sidebar) · 연회색 바탕 위 흰 제목줄과 둥근 판.
 */

/* ── 단추 ── */
.hai_btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-control);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.hai_btn:hover {
  background: #f3f5f8;
}

.hai_btn_primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.hai_btn_primary:hover {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
}

.hai_btn:disabled {
  opacity: 0.5;
  cursor: default;
}

/* ── 상단바 ── */
.hai_header {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 16px;
  height: var(--header-h);
  padding: 0 20px 0 24px;
  background: var(--header-bg);
  color: var(--header-text);
}

.hai_logo {
  flex: none;
  width: calc(var(--sidebar-w) - 40px);
}

.hai_logo h1 {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.hai_logo a {
  color: #fff;
  text-decoration: none;
}

/* 검색이 가운데를 넓게 차지하고, 회사·사용자는 오른쪽 끝 */
.hai_gnb {
  flex: 1;
  min-width: 0;
  order: 2;
}

.hai_gnb_section {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hai_gnb_item {
  position: relative;
}

.hai_gnb_section > .hai_gnb_item:first-child {
  flex: 1;
  min-width: 0;
}

.hai_search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 40px;
  padding: 0 14px 0 40px;
  border-radius: 8px;
  background: var(--header-field) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%23c4cbdb' stroke-width='2' stroke-linecap='round' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 14px center;
}

.hai_search input {
  width: 100% !important;
  height: 40px !important;
  color: #fff;
  font-size: 14px !important;
}

.hai_search input::placeholder {
  color: var(--header-field-text);
}

.hai_search > span,
.hai_search > span > div {
  display: block;
  flex: 1;
  height: auto !important;
}

/* 회사 고르기 — 오른쪽 */
.hai_pop_root {
  order: 3;
  position: relative;
}

.hai_header > .hai_pop_root .hai_btn {
  height: 34px;
  border-color: transparent;
  background: transparent;
  color: var(--header-text);
  font-size: 14px;
}

.hai_header > .hai_pop_root .hai_btn:hover,
.hai_gnb .hai_btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.hai_gnb .hai_btn {
  height: 34px;
  border-color: transparent;
  background: transparent;
  color: var(--header-text);
}

.hai_pill_wrap {
  order: 1;
  display: inline-flex;
  margin: 0 !important;
}

.hai_pill {
  height: 26px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  color: var(--header-field-text);
  font-size: 12px;
}

.hai_pop_scale {
  display: none;
}

.hai_pop {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 130;
  min-width: 220px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-panel);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-pop);
}

.hai_pop_top {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}

.hai_pop_label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
}

.hai_pop dl {
  margin: 0;
}

.hai_pop dd {
  margin: 2px 0 0;
  font-weight: 600;
}

.hai_pop ul {
  margin: 0;
  padding: 4px;
  list-style: none;
}

.hai_item_btn {
  display: block;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: var(--radius-control);
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.hai_item_btn:hover {
  background: var(--surface-sunken);
}

.hai_item_active .hai_item_btn {
  color: var(--accent-strong);
  font-weight: 700;
}

.hai_dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
}

.hai_menu_scroll {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-panel);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-pop);
}

.hai_menu_scroll ul {
  margin: 0;
  padding: 4px;
  list-style: none;
}

.hai_menu_scroll a {
  display: block;
  padding: 8px 10px;
  border-radius: var(--radius-control);
  color: inherit;
  text-decoration: none;
}

.hai_menu_scroll a:hover {
  background: var(--accent-soft);
}

.hai_blind {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.hai_hide {
  display: none !important;
}

/* ── 화면 제목줄 — 흰 띠, 굵은 제목 + 회색 고정폭 코드 ── */
.hai_titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
  margin-bottom: 14px;
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

.hai_titlebar h1 {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.4px;
}

.hai_titlebar h1 > span:nth-child(2) {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.hai_titlebar h1 > span:last-child:not(:first-child) {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  color: #98a1b3;
  letter-spacing: 0.3px;
}

/* 메뉴는 왼쪽에 늘 펼쳐져 있으므로 ☰ 단추는 쓰지 않는다 */
.hai_titlebar button[aria-label="전체 메뉴 열기"] {
  display: none;
}

.hai_head_menu {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hai_head_menu .hai_btn {
  height: 30px;
  padding: 0 10px;
  font-size: 12px;
  color: var(--text-muted);
}

.hai_split {
  width: 1px;
  height: 18px;
  background: var(--border);
}

/* ── 조회조건 ── */
.hai_inquiry {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-panel);
  background: var(--surface);
}

.hai_inquiry_top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hai_inquiry_box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
}

.hai_inquiry_btn {
  display: flex;
  gap: 6px;
}

.hai_inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  vertical-align: middle;
}

.hai_label {
  margin-right: 4px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
}

.hai_dash {
  margin: 0 4px;
  color: var(--text-muted);
}

.hai_field {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--field-border);
  border-radius: var(--radius-control);
  background: var(--surface);
}

.hai_field:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.hai_field_disabled {
  background: var(--surface-sunken);
}

.hai_input {
  width: 100%;
  height: 30px;
  padding: 0 10px;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 13px;
}

.hai_required {
  color: var(--danger);
}

/* ── 대화상자·안내 ── */
.hai_dialog {
  min-width: 320px;
  padding: 24px 28px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-pop);
}

.hai_dialog_alert {
  text-align: center;
}

.hai_dialog_btns {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}

.hai_notice {
  margin: 0 20px 10px;
  padding: 10px 14px;
  border: 1px solid var(--warn-border);
  border-radius: var(--radius-panel);
  background: var(--warn-bg);
  color: var(--warn-text);
  font-size: 13px;
}

.hai_notice_tag {
  margin-right: 8px;
  font-weight: 700;
}

.hai_side {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-panel);
  background: var(--surface);
}

.hai_grid_wrap {
  width: 100%;
}

.hai_empty {
  color: var(--text-muted);
}

.hai_grid_title,
.hai_grid_content {
  display: block;
}
