@charset "UTF-8";
/* ============================================================
   Screen — Entry Point
   @use のみ。スタイル定義はここに書かない。
   読み込み順: Foundation → Layout → Components → Pages
============================================================ */
/* ============================================================
   Design Tokens — 唯一の真実（Single Source of Truth）
   すべての色・スペース・影はここで定義する。
   SCSSファイル内での色計算・$変数は一切使用しない。
============================================================ */
:root {
  /* =====================
     Brand Colors
  ===================== */
  --color-primary: #4f6f52;
  --color-primary-dark: #3d5740;
  --color-primary-light: #739072;
  --color-primary-verylight: rgba(79, 111, 82, 0.08);
  /* =====================
     Neutral Colors
  ===================== */
  --color-background: #f8fafc;
  --color-surface: #ffffff;
  --color-surface-muted: #f4f7f5;
  --color-border: #e5e7eb;
  --color-border-dark: #d1d5db;
  --color-text: #1f2937;
  --color-text-muted: #6b7280;
  --color-text-light: #9ca3af;
  /* =====================
     State: Success
  ===================== */
  --color-success-bg: #e6f4ea;
  --color-success-border: #b7e4c7;
  --color-success-strong: #2f855a;
  /* =====================
     State: Warning
  ===================== */
  --color-warning-bg: #fff8e6;
  --color-warning-border: #f6c453;
  --color-warning-strong: #b7791f;
  /* =====================
     State: Danger
  ===================== */
  --color-danger-bg: #fcebea;
  --color-danger-border: #f5c2c7;
  --color-danger-strong: #b91c1c;
  /* =====================
     State: Info
  ===================== */
  --color-info-bg: #eef6f2;
  --color-info-border: #a8d8c2;
  --color-info-strong: #2563eb;
  /* =====================
     State: Selected
  ===================== */
  --color-selected-bg: #e8f2ee;
  --color-selected-border: #4f6f52;
  /* =====================
     Spacing (8px grid)
  ===================== */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 40px;
  /* =====================
     Typography
  ===================== */
  --text-xs: 12px;
  --text-sm: 13px;
  --text-base: 14px;
  --text-md: 16px;
  --text-lg: 18px;
  --text-xl: 22px;
  --font-sans:
    -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Hiragino Sans", "Yu Gothic UI", "Meiryo", sans-serif;
  --font-serif:
    "Hiragino Mincho ProN", "Yu Mincho", "MS Mincho", serif;
  /* =====================
     Radius
  ===================== */
  --radius-sm: 4px;
  --radius-md: 6px;
  /* =====================
     Shadows
  ===================== */
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.10);
  --shadow-input-inset: inset 0 1px 2px rgba(0, 0, 0, 0.04);
  /* =====================
     Transitions
  ===================== */
  --transition-fast: 0.15s ease;
  --transition-btn: transform 0.1s ease, box-shadow 0.1s ease,
                      background 0.15s ease, border-color 0.15s ease;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Yu Gothic UI", "Meiryo", sans-serif;
  font-size: var(--text-base);
  line-height: 1.6;
  background: var(--color-background);
  color: var(--color-text);
}

h1 {
  font-size: var(--text-xl);
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "MS Mincho", serif;
  font-weight: 600;
}

h2 {
  font-size: var(--text-lg);
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "MS Mincho", serif;
  font-weight: 600;
}

/* ============================================================
   Layout — App Skeleton
   責務: アプリ全体の骨格グリッドのみ。
   ヘッダー内部・サイドバーメニューUIはそれぞれのファイルへ。
============================================================ */
.l-app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.l-body {
  display: flex;
  flex: 1;
}

.l-main {
  flex: 1;
  background: var(--color-background);
  min-width: 0; /* flex子要素のはみ出し防止 */
}

.l-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-4) var(--space-3);
}

/* ============================================================
   Layout — Header
   責務: ヘッダー枠 + 内部レイアウト + ヘッダー内UIコンポーネント
============================================================ */
/* --- 枠 --- */
.l-header {
  height: 64px;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-primary-light);
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* --- 内部レイアウト --- */
.l-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 64px;
  padding: 0 var(--space-3);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.l-header-left,
.l-header-center,
.l-header-right {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* --- Brand --- */
.brand-link {
  text-decoration: none;
}

.brand-name {
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--color-text);
}

/* --- Search --- */
.search-form {
  display: flex;
  align-items: center;
  padding: 6px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-background);
  transition: border-color var(--transition-fast);
}

.search-form:focus-within {
  border-color: var(--color-primary);
}

.search-input {
  border: none;
  background: transparent;
  outline: none;
  font-size: var(--text-sm);
  color: var(--color-text);
}

/* --- User Menu --- */
.user-menu-wrap {
  position: relative;
}

.user-menu-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: transparent;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.user-menu-trigger:hover {
  background: rgba(0, 0, 0, 0.04);
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-background);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  font-weight: 600;
}

.user-menu-dropdown {
  display: none; /* デフォルト非表示。.is-open で表示 */
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 200px;
  padding: 6px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  z-index: 1000;
}

.user-menu-dropdown.is-open {
  display: block;
}

.user-menu-facility {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 4px;
}

.user-menu-divider {
  height: 1px;
  background: var(--color-border);
  margin: 4px 0;
}

.user-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--color-text);
  transition: background var(--transition-fast);
}

.user-menu-item:hover {
  background: rgba(0, 0, 0, 0.04);
}

.user-menu-item-danger {
  color: var(--color-danger-strong);
}

.user-menu-item-danger:hover {
  background: var(--color-danger-bg);
}

/* ============================================================
   Component — Sidebar Menu UI
   責務: メニューリンク・トグル・サブメニュー等のUI。
   枠・寸法は layout/_sidebar.scss へ。
============================================================ */
/* --- Padding (l-sidebar内部の余白) --- */
.l-sidebar {
  padding: var(--space-3) var(--space-2);
}

/* --- Menu --- */
.sidebar-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-item {
  margin-bottom: 4px;
}

/* --- Links / Toggle / Sublink --- */
.sidebar-link,
.sidebar-toggle,
.sidebar-sublink {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--color-text);
  background: transparent;
  border: none;
  width: 100%;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
}

/* hover */
.sidebar-link:hover,
.sidebar-toggle:hover,
.sidebar-sublink:hover {
  background: rgba(0, 0, 0, 0.04);
}

/* active */
.sidebar-link.is-active,
.sidebar-toggle.is-active,
.is-active > .sidebar-link {
  background: var(--color-primary-verylight);
  font-weight: 500;
}

/* --- Icon / Label --- */
.sidebar-icon {
  width: 1.25rem;
  text-align: center;
  flex-shrink: 0;
  color: var(--color-text-muted);
}

.sidebar-label {
  flex: 1;
  font-size: var(--text-sm);
  text-align: left;
}

/* --- Submenu --- */
.sidebar-submenu {
  list-style: none;
  margin: 4px 0 4px 16px;
  padding: 0;
}

/* --- Separator --- */
.sidebar-separator {
  margin: var(--space-2) 0 6px;
  padding: 0 12px;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--color-text-light);
  text-transform: uppercase;
}

:root {
  --color-primary: #4f6f52;
  --color-background: #f8fafc;
  --color-surface: #ffffff;
  --color-border: #e5e7eb;
  --color-text: #1f2937;
  --color-text-muted: #6b7280;
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --radius-md: 6px;
  --shadow-sm: 2px 2px 2px 0px rgba(113, 113, 113, 0.1);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* =========================================================
   Footer
========================================================= */
.l-footer {
  margin-top: 32px;
  background: #ffffff;
  border-top: 1px solid #e5e7eb;
}

.l-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

.l-footer-top {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.l-footer-bottom {
  margin-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: #6b7280;
}

.l-footer-social {
  display: flex;
  gap: 10px;
}

.c-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  color: #1f2937;
  text-decoration: none;
  transition: background 0.15s ease;
}

.c-social-link:hover {
  background: rgba(0, 0, 0, 0.04);
}

.l-detail {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 32px;
}

.l-detail-main {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.l-detail-actions {
  position: sticky;
  top: 80px;
  height: fit-content;
}

/* ============================================================
   Component — Button
============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: var(--text-base);
  font-family: var(--font-sans);
  font-weight: 500;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-btn);
}

.btn:hover {
  transform: translate(1px, 1px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.btn:disabled,
.btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
  pointer-events: none;
}

/* --- Variants --- */
.btn-primary {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
}

.btn-secondary {
  background: var(--color-surface-muted);
  border-color: var(--color-border);
  color: var(--color-text);
}

.btn-secondary:hover {
  background: var(--color-border);
}

.btn-danger-outline {
  background: transparent;
  color: var(--color-danger-strong);
  border-color: var(--color-danger-strong);
}

.btn-danger-outline:hover {
  background: var(--color-danger-bg);
}

/* --- Sizes --- */
.btn-sm {
  padding: 4px 10px;
  font-size: var(--text-sm);
}

/* ============================================================
   Component — Forms
============================================================ */
.form-group {
  margin-bottom: var(--space-2);
}

label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  font-size: var(--text-sm);
  color: var(--color-text);
}

/* 共通入力スタイル */
.input,
.form-control,
select,
textarea {
  width: 100%;
  padding: 8px 12px;
  font-size: var(--text-base);
  font-family: var(--font-sans);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: var(--shadow-input-inset);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

/* フォーカス */
.input:focus,
.form-control:focus,
select:focus,
textarea:focus {
  border-color: var(--color-primary);
  outline: none;
  box-shadow: var(--shadow-input-inset), 0 0 0 3px var(--color-primary-verylight);
}

/* disabled */
.input:disabled,
.form-control:disabled,
select:disabled,
textarea:disabled {
  background: var(--color-surface-muted);
  color: var(--color-text-muted);
  cursor: not-allowed;
  box-shadow: none;
}

/* ヘルプテキスト */
.form-help {
  margin-top: 4px;
  font-size: var(--text-xs);
  color: var(--color-text-light);
}

/* ============================================
   Table
============================================ */
.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 2px;
  font-size: 13px;
}

/* header */
.table th {
  background: rgba(79, 111, 82, 0.1);
  font-weight: 600;
  text-align: center;
  padding: 10px 12px;
}

/* cell */
.table th,
.table td {
  background: #ffffff;
  padding: 10px 12px;
  border-top: 1px solid #fff;
  border-left: 1px solid #fff;
  border-right: 1px solid #d1d5db;
  border-bottom: 1px solid #d1d5db;
}

/* zebra */
.table tbody tr:nth-child(even) td {
  background: #f7f9fa;
}

/* hover */
.table tbody tr:hover td {
  background: rgba(79, 111, 82, 0.06);
}

.table-container {
  width: 100%;
  overflow-x: auto;
}

/* ---- Table Cell Utilities ---- */
.name-cell strong {
  color: #1f2937;
}

.email-link,
.phone-link {
  color: #4f6f52;
  text-decoration: none;
}

.email-link:hover,
.phone-link:hover {
  text-decoration: underline;
}

.action-buttons {
  display: flex;
  gap: 4px;
  align-items: center;
}

/* =========================================================
   Card
========================================================= */
.c-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  box-shadow: 2px 2px 2px 0px rgba(113, 113, 113, 0.1);
  overflow: hidden;
  transition: box-shadow 0.15s ease;
}

.c-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.c-card--muted {
  background: #f8fafc;
}

.c-card--gray {
  background: #f8fafc;
  box-shadow: none;
}
.c-card--gray:hover {
  box-shadow: none;
}

.bg-muted {
  background: #f8fafc;
  padding: 4px 8px;
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
}

.text-light {
  color: #6b7280;
}

.c-card__header {
  padding: 16px 24px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.c-card__title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.c-card__body {
  padding: 24px;
}

.c-card__footer {
  padding: 16px 24px;
  border-top: 1px solid #e5e7eb;
  background: #fafafa;
}

.c-section {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  box-shadow: 2px 2px 2px 0px rgba(113, 113, 113, 0.1);
}

.c-section__header {
  padding: 16px 24px;
  background: rgba(79, 111, 82, 0.08);
  border-left: 4px solid #4f6f52;
}

.c-section__title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.c-section__body {
  padding: 24px;
}

/* =========================================================
   Badge
========================================================= */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  border-radius: 6px;
  border: 1px solid transparent;
  background: #f3f4f6;
  color: #1f2937;
}

/* Success */
.badge-success {
  background: rgb(156.3157894737, 218.6842105263, 159.4736842105);
  color: #2e7d32;
  border-color: rgb(119.0350877193, 204.9649122807, 123.3859649123);
}

/* Danger */
.badge-danger {
  background: rgb(245.2857142857, 206.9142857143, 206.9142857143);
  color: #c62828;
  border-color: #eb9c9c;
}

/* Warning */
.badge-warning {
  background: rgb(254.4393305439, 218.2761506276, 188.5606694561);
  color: #ed6c02;
  border-color: rgb(254.0125523013, 190.3221757322, 137.9874476987);
}

/* Info */
.badge-info {
  background: rgb(160.9004739336, 221.2322274882, 254.0995260664);
  color: #0288d1;
  border-color: rgb(110.3838862559, 203.1042654028, 253.6161137441);
}

/* ============================================================
   Layout — Sidebar Frame
   責務: サイドバーの枠・寸法のみ。
   メニューUIは components/_sidebar.scss へ。
============================================================ */
.l-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--color-surface);
  border-right: 1px solid var(--color-border);
  height: calc(100vh - 64px);
  overflow-y: auto;
  position: sticky;
  top: 64px;
}

.c-page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5e7eb;
}

.c-page-header__title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.c-page-header__title-text {
  font-size: 22px;
  font-weight: 700;
  margin: 0;
}

.c-page-header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.c-action-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.c-action-panel .btn {
  width: 100%;
}

/* ============================================
   Detail Card — 詳細表示コンポーネント
   トークン: foundation/_tokens.scss の CSS変数を使用
============================================ */
/* ---- Card Container ---- */
.detail-card {
  background: var(--color-surface, #ffffff);
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: var(--radius-md, 6px);
  padding: var(--space-4, 32px);
  margin-bottom: var(--space-3, 24px);
}

/* ---- Header (facilities/show, staffs/show) ---- */
.detail-card .detail-header {
  padding: var(--space-3, 24px);
  border-bottom: 1px solid var(--color-border, #e5e7eb);
  background: var(--color-background, #f8fafc);
}

.detail-card .detail-header h2 {
  margin: 0 0 12px 0;
  font-size: var(--text-xl, 22px);
  font-weight: 600;
  color: var(--color-text, #1f2937);
}

.detail-card .detail-header .detail-meta {
  display: flex;
  gap: var(--space-1, 8px);
  flex-wrap: wrap;
}

.detail-card .detail-content {
  padding: var(--space-3, 24px);
}

/* ---- Detail Group: セクション囲み ---- */
.detail-group {
  margin-bottom: var(--space-4, 32px);
}
.detail-group:last-child {
  margin-bottom: 0;
}
.detail-group h3 {
  font-size: var(--text-md, 16px);
  font-weight: 600;
  color: var(--color-text, #1f2937);
  margin: 0 0 var(--space-2, 16px) 0;
  padding-bottom: var(--space-1, 8px);
  border-bottom: 2px solid var(--color-border, #e5e7eb);
  display: flex;
  align-items: center;
  gap: var(--space-1, 8px);
}

/* ---- Detail Grid: 2カラムグリッド ---- */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-2, 16px) var(--space-4, 32px);
}

/* ---- Detail Items (facilities/staffs legacy: label+span横並び) ---- */
.detail-items {
  display: grid;
  gap: var(--space-2, 16px);
}

.detail-items .detail-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  align-items: start;
}

.detail-items .detail-item label {
  font-weight: 500;
  color: var(--color-text-muted, #6b7280);
  font-size: var(--text-base, 14px);
}

.detail-items .detail-item span {
  color: var(--color-text, #1f2937);
  word-break: break-word;
}

.detail-items .detail-item.full-width {
  grid-template-columns: 1fr;
}

/* ---- Detail Item (standalone: ラベル+値 縦並び) ---- */
.detail-grid > .detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

/* ---- Detail Label / Value ---- */
.detail-label {
  font-size: var(--text-sm, 13px);
  color: var(--color-text-muted, #6b7280);
  font-weight: 500;
  white-space: nowrap;
}

.detail-value {
  font-size: var(--text-base, 14px);
  color: var(--color-text, #1f2937);
  word-break: break-word;
}
.detail-value:empty::after {
  content: "−";
  color: var(--color-text-muted, #6b7280);
}

/* ---- Responsive ---- */
@media (max-width: 640px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .detail-items .detail-item {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .detail-items .detail-item label {
    font-size: var(--text-xs, 12px);
    font-weight: 600;
  }
}
/* ============================================
   Sub Resource Cards
============================================ */
.sub-resource-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3, 24px);
}
@media (max-width: 640px) {
  .sub-resource-grid {
    grid-template-columns: 1fr;
  }
}

.sub-resource-card {
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: var(--radius-md, 6px);
  padding: var(--space-2, 16px);
  display: flex;
  flex-direction: column;
  gap: var(--space-1, 8px);
}
.sub-resource-card__header {
  display: flex;
  align-items: center;
  gap: var(--space-1, 8px);
  font-weight: 600;
  font-size: var(--text-base, 14px);
  color: var(--color-text, #1f2937);
}
.sub-resource-card__count {
  margin-left: auto;
  background: var(--color-primary, #4f6f52);
  color: #fff;
  border-radius: 9999px;
  padding: 0 var(--space-1, 8px);
  font-size: var(--text-xs, 12px);
  font-weight: 700;
  line-height: 1.6;
}
.sub-resource-card__body {
  font-size: var(--text-sm, 13px);
  color: var(--color-text, #1f2937);
  min-height: 2rem;
}
.sub-resource-card__body p {
  margin: 0;
}
.sub-resource-card__status {
  text-transform: capitalize;
}
.sub-resource-card__empty {
  color: var(--color-text-muted, #6b7280);
  font-style: italic;
}
.sub-resource-card__actions {
  display: flex;
  gap: var(--space-1, 8px);
  margin-top: auto;
}

/* ============================================
   Detail Page Utilities
============================================ */
.contact-link {
  color: var(--color-primary, #4f6f52);
  text-decoration: none;
}

.contact-link:hover {
  text-decoration: underline;
}

.notes-content {
  background: var(--color-background, #f8fafc);
  padding: 12px;
  border-radius: var(--radius-md, 6px);
  border: 1px solid var(--color-border, #e5e7eb);
  white-space: pre-wrap;
  line-height: 1.6;
}

.dashboard {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.dashboard-group {
  width: 100%;
  background: var(--color-primary-verylight);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-3);
}

.dashboard-card {
  display: block;
  width: 100%;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  text-decoration: none;
}

.dashboard-group__title {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: var(--space-3);
}

.dashboard-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary-light);
}

.dashboard-card:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.dashboard-card__title {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 6px;
}

.dashboard-card__description {
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-text-muted);
}

.dashboard-card__meta {
  margin-top: var(--space-2);
  font-size: 12px;
  color: var(--color-text-muted);
}

@media (max-width: 900px) {
  .dashboard-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }
}
@media (max-width: 600px) {
  .dashboard {
    padding: var(--space-3);
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}
/* ==========================================
   Beneficiary Settings Detail
   show.php の全スタイルを SCSS に統合
========================================== */
/* --- ボタンエリア（タブ切り替え） --- */
.bsetting-buttons-area {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: var(--space-2);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}

.bsetting-item-btn {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text);
  background: var(--color-surface-muted);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.bsetting-item-btn:hover {
  background: var(--color-border);
  border-color: var(--color-text-muted);
}
.bsetting-item-btn.active {
  background: var(--color-primary);
  color: var(--color-surface);
  border-color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

/* --- 詳細エリア --- */
.bsetting-detail-area {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  min-height: 400px;
}

.bsetting-detail-panel {
  display: none;
  padding: 0;
}

.bsetting-detail-content {
  display: flex;
  gap: 0;
}

.bsetting-detail-left {
  flex: 1;
  min-width: 0;
}

.bsetting-detail-right {
  width: 120px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: var(--space-2) 12px;
  border-left: 1px solid var(--color-border);
  background: var(--color-surface-muted);
}
.bsetting-detail-right .btn {
  width: 100%;
}

/* --- 選択ボタン --- */
.bsetting-sel-btn {
  display: inline-block;
  min-width: 56px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 4px;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.bsetting-sel-btn--current {
  background: var(--color-success-bg);
  color: var(--color-success-strong);
  border: 1px solid var(--color-success-border);
}
.bsetting-sel-btn--current:hover {
  background: var(--color-success-border);
  border-color: var(--color-success-strong);
}
.bsetting-sel-btn--past {
  background: var(--color-surface-muted);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}
.bsetting-sel-btn--past:hover {
  background: var(--color-border);
  border-color: var(--color-text-muted);
}

/* --- 履歴行 --- */
.bsetting-history-row {
  cursor: pointer;
  transition: background 0.1s ease;
}
.bsetting-history-row input[type=radio] {
  display: none;
}
.bsetting-history-row:hover {
  background: var(--color-primary-verylight);
}
.bsetting-history-row.selected {
  background: var(--color-selected-bg) !important;
}
.bsetting-history-row.selected .bsetting-sel-btn {
  background: var(--color-primary);
  color: var(--color-surface);
  border-color: var(--color-selected-border);
  box-shadow: var(--shadow-sm);
}

.bsetting-row--current {
  background: var(--color-success-bg);
}

.bsetting-row--past:hover {
  background: var(--color-selected-bg);
  cursor: pointer;
}

.bsetting-row--separator td {
  padding: 4px 10px;
  font-size: 11px;
  color: var(--color-text-muted);
  background: var(--color-surface-muted);
  font-weight: 600;
  letter-spacing: 0.05em;
}

/* --- 統合テーブル --- */
.bsetting-unified-table {
  border-top: 2px solid var(--color-text);
}
.bsetting-unified-table th:nth-child(1) {
  width: 80px;
  text-align: center;
}
.bsetting-unified-table th:nth-child(3),
.bsetting-unified-table th:nth-child(4) {
  width: 120px;
}
.bsetting-unified-table th:nth-child(5) {
  width: 220px;
}
.bsetting-unified-table td:first-child {
  text-align: center;
}

/* --- 空状態セル --- */
.bsetting-empty-cell {
  text-align: center;
  padding: 20px;
  color: var(--color-text-muted);
  font-size: 13px;
}

/* --- インラインフォーム --- */
.bsetting-inline-form {
  display: none;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-warning-bg);
}
.bsetting-inline-form__header {
  background: var(--color-warning-strong);
  color: var(--color-surface);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
}

.bsetting-inline-actions {
  text-align: center;
  white-space: nowrap;
}

/* --- ユーティリティ --- */
.bsetting-muted {
  color: var(--color-text-muted);
  font-size: 12px;
}

.bsetting-desc {
  font-size: 12px;
  color: var(--color-text-muted);
}

/* --- スクロール（将来用） --- */
.bsetting-history__scroll {
  max-height: 320px;
  overflow-y: auto;
}

/* ============================================================
   Page — Onboarding
   責務: オンボーディングフロー全ページのスタイル。
   Bootstrap依存を排除し、トークンベースで再実装。
   PHPテンプレートのクラス名は変更しない。
============================================================ */
/* =====================
   Bootstrap互換グリッド（onboarding用最小実装）
===================== */
.container {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 var(--space-2);
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 calc(-1 * var(--space-2) / 2);
}

[class^=col] {
  padding: 0 calc(var(--space-2) / 2);
  box-sizing: border-box;
}

.col {
  flex: 1 0 0%;
}

.col-12 {
  width: 100%;
}

@media (min-width: 768px) {
  .col-md-3 {
    width: 25%;
  }
  .col-md-4 {
    width: 33.333%;
  }
  .col-md-5 {
    width: 41.666%;
  }
  .col-md-6 {
    width: 50%;
  }
  .col-md-8 {
    width: 66.666%;
  }
}
@media (min-width: 992px) {
  .col-lg-6 {
    width: 50%;
  }
}
.row-cols-1 > * {
  width: 100%;
}

@media (min-width: 768px) {
  .row-cols-md-2 > * {
    width: 50%;
  }
}
/* gap utilities for grid */
.g-2 {
  gap: var(--space-2);
}

.g-3 {
  gap: var(--space-3);
}

.g-4 {
  gap: var(--space-4);
}

.gap-2 {
  gap: var(--space-2);
}

/* =====================
   Display utilities
===================== */
.d-flex {
  display: flex !important;
}

.d-inline-flex {
  display: inline-flex !important;
}

.d-grid {
  display: grid !important;
}

.d-block {
  display: block !important;
}

.align-items-center {
  align-items: center !important;
}

.justify-content-center {
  justify-content: center !important;
}

.justify-content-between {
  justify-content: space-between !important;
}

.w-100 {
  width: 100% !important;
}

/* =====================
   Spacing utilities
===================== */
.mb-0 {
  margin-bottom: 0 !important;
}

.mb-2 {
  margin-bottom: var(--space-2) !important;
}

.mb-3 {
  margin-bottom: var(--space-3) !important;
}

.mb-4 {
  margin-bottom: var(--space-4) !important;
}

.mb-5 {
  margin-bottom: var(--space-5) !important;
}

.mt-1 {
  margin-top: var(--space-1) !important;
}

.mt-2 {
  margin-top: var(--space-2) !important;
}

.mt-3 {
  margin-top: var(--space-3) !important;
}

.mt-4 {
  margin-top: var(--space-4) !important;
}

.mt-5 {
  margin-top: var(--space-5) !important;
}

.me-1 {
  margin-right: var(--space-1) !important;
}

.me-2 {
  margin-right: var(--space-2) !important;
}

.me-3 {
  margin-right: var(--space-3) !important;
}

.p-3 {
  padding: var(--space-3) !important;
}

.px-5 {
  padding-left: var(--space-5) !important;
  padding-right: var(--space-5) !important;
}

.pt-4 {
  padding-top: var(--space-4) !important;
}

/* =====================
   Text utilities
===================== */
.text-center {
  text-align: center !important;
}

.text-decoration-none {
  text-decoration: none !important;
}

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

.text-primary {
  color: var(--color-primary) !important;
}

.text-success {
  color: var(--color-success-strong) !important;
}

.text-warning {
  color: var(--color-warning-strong) !important;
}

.text-danger {
  color: var(--color-danger-strong) !important;
}

.text-info {
  color: var(--color-info-strong) !important;
}

.text-white {
  color: #fff !important;
}

/* =====================
   Background utilities
===================== */
.bg-light {
  background: var(--color-surface-muted) !important;
}

.bg-primary {
  background: var(--color-primary) !important;
}

/* =====================
   Border & Shape utilities
===================== */
.border-0 {
  border: none !important;
}

.border-top {
  border-top: 1px solid var(--color-border) !important;
}

.rounded {
  border-radius: var(--radius-md) !important;
}

.rounded-circle {
  border-radius: 50% !important;
}

.shadow-lg {
  box-shadow: var(--shadow-md) !important;
}

/* =====================
   Typography utilities
===================== */
.lead {
  font-size: var(--text-md);
  color: var(--color-text-muted);
}

.small {
  font-size: var(--text-sm);
}

.list-unstyled {
  list-style: none;
  padding: 0;
  margin: 0;
}

.h3 {
  font-size: var(--text-lg);
  font-weight: 700;
}

.h6 {
  font-size: var(--text-sm);
  font-weight: 600;
}

/* =====================
   Card（Bootstrap互換）
===================== */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card-header {
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface-muted);
  text-align: center;
}

.card-header h1,
.card-header h2,
.card-header h3 {
  margin: 0 0 4px;
  font-size: var(--text-lg);
  font-family: var(--font-sans);
}

.card-body {
  padding: var(--space-3);
}

.card-footer {
  padding: var(--space-2) var(--space-3);
  border-top: 1px solid var(--color-border);
  background: var(--color-surface-muted);
}

/* =====================
   Alert
===================== */
.alert {
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  font-size: var(--text-sm);
  line-height: 1.6;
  margin-bottom: var(--space-2);
}

.alert-success {
  background: var(--color-success-bg);
  border-color: var(--color-success-border);
  color: var(--color-success-strong);
}

.alert-danger {
  background: var(--color-danger-bg);
  border-color: var(--color-danger-border);
  color: var(--color-danger-strong);
}

.alert-warning {
  background: var(--color-warning-bg);
  border-color: var(--color-warning-border);
  color: var(--color-warning-strong);
}

.alert-info {
  background: var(--color-info-bg);
  border-color: var(--color-info-border);
  color: var(--color-info-strong);
}

/* =====================
   Form拡張
   （_forms.scss にない Bootstrap互換クラス）
===================== */
.form-label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  font-size: var(--text-sm);
  color: var(--color-text);
}

.form-text {
  margin-top: 4px;
  font-size: var(--text-xs);
  color: var(--color-text-light);
}

.form-control-plaintext {
  padding: 8px 12px;
  font-size: var(--text-base);
  color: var(--color-text);
  background: var(--color-surface-muted);
  border-radius: var(--radius-md);
}

/* バリデーション */
.is-invalid {
  border-color: var(--color-danger-strong) !important;
}

.is-invalid:focus {
  box-shadow: 0 0 0 3px var(--color-danger-bg) !important;
}

.invalid-feedback {
  display: block;
  margin-top: 4px;
  font-size: var(--text-xs);
  color: var(--color-danger-strong);
}

/* チェックボックス・ラジオ */
.form-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-height: 1.5rem;
}

.form-check-input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  flex-shrink: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  cursor: pointer;
  accent-color: var(--color-primary);
}

.form-check-label {
  font-size: var(--text-sm);
  color: var(--color-text);
  cursor: pointer;
}

/* Badge拡張 */
.badge.bg-primary {
  background: var(--color-primary) !important;
  color: #fff;
  border-color: var(--color-primary);
}

/* =====================
   Onboarding レイアウト
===================== */
.login-page {
  min-height: 100vh;
  background: var(--color-background);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3);
}

.login-container {
  width: 100%;
  max-width: 480px;
}

.login-card {
  width: 100%;
}

.login-title {
  font-size: var(--text-xl);
  font-family: var(--font-sans);
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 var(--space-1);
}

/* setup系（法人・施設登録） */
.welcome-page,
.organization-setup-page,
.facility-setup-page {
  min-height: 100vh;
  background: var(--color-background);
  padding: var(--space-4) var(--space-3);
}

.welcome-container,
.setup-container {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
}

/* onboarding-complete */
.onboarding-complete {
  min-height: 100vh;
  background: var(--color-background);
  padding: var(--space-4) var(--space-3);
}

/* その他のページラッパー（login-page を継承） */
.onboarding-password-setup,
.onboarding-password-setup-success,
.onboarding-verify-success,
.onboarding-verify-failed {
  /* login-page と同じレイアウト（組み合わせて使用される） */
}

/* =====================
   Onboarding アイコンサイズ
===================== */
.onboarding-icon-sm {
  font-size: 1rem;
}

.onboarding-icon-md {
  font-size: 1.5rem;
}

.onboarding-icon-lg {
  font-size: 2rem;
}

.onboarding-icon-xl {
  font-size: 3rem;
}

/* =====================
   Onboarding ステップブロック（welcome.php）
===================== */
.step-block {
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.step-block.clickable {
  cursor: pointer;
}

.step-block.clickable:hover {
  border-color: var(--color-primary-light);
  box-shadow: var(--shadow-md);
}

.step-block.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ステップアイコン丸 */
.step-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.step-icon.completed {
  background: var(--color-success-strong);
}

.step-icon.enabled {
  background: var(--color-primary);
}

.step-icon.disabled {
  background: var(--color-border);
}

/*# sourceMappingURL=screen.css.map */
