/* ─────────────────────────────────────────────────────────────────────────
   hr-shell.css — company_manager / jimu_tantousha 用の左サイドメニュー構造
   dashboard.html・company.html・requests.html ほか、サイドメニューから
   遷移する各ページで共通して使う「枠」のレイアウト。
   ページ固有のコンテンツ（ヒーロー・KPI・テーブル等）はここに含めない。
   theme.css の色トークンに依存するため、theme.css より後に読み込むこと。
   ───────────────────────────────────────────────────────────────────────── */

.hr-shell {
  display: flex;
  min-height: 100vh;
  background: var(--c-page-bg);
}

body.hr-layout-pending {
  background: var(--c-page-bg);
}
body.hr-layout-pending #legacy-header,
body.hr-layout-pending #legacy-main,
body.hr-layout-pending #hr-shell {
  visibility: hidden;
}
body.hr-layout-pending::before {
  content: "読み込み中…";
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  color: #6b7280;
  font-size: .9rem;
}

/* ─── サイドメニュー ─────────────────────────── */
.hr-sidebar {
  width: 230px;
  flex-shrink: 0;
  background: #fffaf3;
  border-right: 1px solid #f3e6d4;
  padding: 1.2rem .9rem;
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
.hr-logo {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--c-primary);
  padding: .3rem .6rem 1rem;
  display: flex;
  align-items: center;
  gap: .4rem;
}
.hr-nav-item {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .55rem .7rem;
  border-radius: 8px;
  font-size: .88rem;
  font-weight: 600;
  color: #57534e;
  text-decoration: none;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}
.hr-nav-item:hover { background: #fdecd9; color: var(--c-primary); }
.hr-nav-item.active { background: var(--c-primary); color: #fff; }
.hr-nav-icon { font-size: 1.05rem; flex-shrink: 0; width: 1.3rem; text-align: center; }
.hr-nav-logout { margin-top: auto; color: #9ca3af; }
.hr-nav-logout:hover { background: #f3f4f6; color: #57534e; }

/* ─── コンテンツ全体（各ページの内容はこの中に入れる） ──────── */
.hr-employee-menu {
  border-left: 2px solid #f3e6d4;
  margin: .25rem 0 .45rem 1.05rem;
  padding: .25rem 0 .25rem .35rem;
}
.hr-employee-menu summary {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .5rem .7rem;
  border-radius: 8px;
  cursor: pointer;
  color: #57534e;
  list-style: none;
}
.hr-employee-menu summary::-webkit-details-marker { display: none; }
.hr-employee-menu summary::after {
  content: "v";
  margin-left: auto;
  color: #a8a29e;
  font-size: .85rem;
}
.hr-employee-menu:not([open]) summary::after { content: ">"; }
.hr-employee-menu summary:hover { background: #fdecd9; color: var(--c-primary); }
.hr-employee-menu-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}
.hr-employee-menu-label {
  font-size: .74rem;
  font-weight: 700;
  color: #a8a29e;
}
.hr-employee-menu-name {
  font-size: .86rem;
  font-weight: 700;
  color: #292524;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 135px;
}
.hr-employee-subnav {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  margin-top: .25rem;
  padding-left: .25rem;
}
.hr-employee-subitem {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .48rem .6rem;
  border-radius: 8px;
  color: #57534e;
  text-decoration: none;
  font-size: .83rem;
  font-weight: 600;
}
.hr-employee-subitem:hover { background: #fdecd9; color: var(--c-primary); }
.hr-employee-subitem.active { background: var(--c-primary); color: #fff; }

.hr-content {
  flex: 1;
  min-width: 0;
  padding: 1.5rem 1.8rem 2.5rem;
  max-width: 1100px;
}
.hr-topbar {
  display: none;
  align-items: center;
  gap: .7rem;
  margin-bottom: 1rem;
}
.hr-menu-toggle {
  background: #fff; border: 1.5px solid #f3e6d4; border-radius: 8px;
  width: 2.4rem; height: 2.4rem; font-size: 1.1rem; cursor: pointer;
  color: var(--c-primary);
}
.hr-topbar-title { font-size: 1rem; font-weight: 700; color: #57534e; }

.hr-support-access-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: .75rem .9rem;
  border: 1px solid #e2bd66;
  border-radius: 9px;
  background: #fff8e6;
  color: #714f09;
  font-size: .82rem;
}
.hr-support-access-banner[hidden] { display: none; }
.hr-support-access-banner strong { display: block; margin-bottom: .1rem; color: #674405; }
.hr-support-access-banner span { color: #82671d; }
.hr-support-access-banner a {
  flex: 0 0 auto;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: .35rem .7rem;
  border: 1px solid #cf9d31;
  border-radius: 7px;
  background: #fff;
  color: #714f09;
  font-weight: 700;
  text-decoration: none;
}

/* 既存ページ（ヒーローを持たないページ）用の見出し。ヘッダーが隠れる代わりに
   この見出しでページ名を表示する。dashboard.html はヒーローがあるため使わない */
.hr-page-title {
  font-size: 1.1rem; font-weight: 700; color: #292524;
  margin-bottom: 1.1rem;
  display: flex; align-items: center; gap: .5rem;
}
.hr-drawer-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.35);
  z-index: 90;
}

/* ─── セクション共通（各ページのコンテンツでも使えるよう共通化） ──── */
.hr-section {
  background: #fff;
  border: 1px solid #f3e6d4;
  border-radius: 12px;
  padding: 1.1rem 1.3rem;
  margin-bottom: 1.2rem;
}
.hr-section-title {
  font-size: .92rem; font-weight: 700; color: #292524;
  margin-bottom: .8rem;
  display: flex; align-items: center; justify-content: space-between;
}
.hr-section-title a { font-size: .78rem; font-weight: 600; color: var(--c-primary); text-decoration: none; }
.hr-empty { font-size: .85rem; color: #9ca3af; padding: .6rem 0; }

/* ─── レスポンシブ（サイドメニュー・ドロワーの開閉） ─────────── */
@media (max-width: 720px) {
  .hr-shell {
    display: block;
    min-width: 0;
    width: 100%;
    overflow-x: hidden;
  }
  .hr-sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 100;
    transform: translateX(-100%);
    transition: transform .2s;
    box-shadow: 4px 0 16px rgba(0,0,0,.12);
  }
  .hr-sidebar.open { transform: translateX(0); }
  .hr-topbar { display: flex; min-width: 0; }
  .hr-topbar-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .hr-content {
    width: 100%;
    max-width: none;
    min-width: 0;
    padding: 1rem 1rem 2rem;
    overflow-x: hidden;
  }
  .hr-section {
    min-width: 0;
    padding: 1rem;
    border-radius: 10px;
  }
  .hr-section-title {
    align-items: flex-start;
    gap: .5rem;
    flex-wrap: wrap;
  }
  .hr-section-title > * { min-width: 0; }
  .hr-content input,
  .hr-content select,
  .hr-content textarea,
  .hr-content button {
    max-width: 100%;
  }
  .hr-support-access-banner { align-items: flex-start; flex-direction: column; }
  .hr-support-access-banner a { width: 100%; justify-content: center; }
}
