:root {
  --blue:#185FA5;
  --blue-dark:#0f3d6b;
  --blue-light:#dbeafe;
  --border:#d8dde4;
  --text:#1f2937;
  --muted:#6b7280;
  --bg:#f5f7fa;
  --white:#fff;
  --red:#dc2626;
  --green:#166534;
  --amber:#b45309;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: "Hiragino Sans", "Meiryo", "Yu Gothic", "Noto Sans JP", sans-serif;
  font-size: 14px; color: var(--text); background: var(--bg); line-height: 1.55;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── ヘッダー ── */
.top-bar { background: var(--blue); color: #fff; border-bottom: 1px solid var(--blue-dark); position: sticky; top: 0; z-index: 20; }
.top-inner { display: flex; align-items: center; gap: 14px; padding: 8px 16px; flex-wrap: wrap; }
.brand { color: #fff; font-weight: bold; font-size: 16px; }
.brand:hover { text-decoration: none; opacity: 0.9; }
.portal-back { color: #fff; font-size: 13px; padding: 5px 10px; border: 1px solid rgba(255,255,255,0.55); border-radius: 4px; background: rgba(255,255,255,0.08); white-space: nowrap; }
.portal-back:hover { background: #fff; color: var(--blue); text-decoration: none; }
.top-nav { display: flex; gap: 2px; flex: 1; flex-wrap: wrap; }
.nav-link { color: rgba(255,255,255,0.85); padding: 6px 12px; border-radius: 4px; font-size: 13px; }
.nav-link:hover { background: rgba(255,255,255,0.12); text-decoration: none; color: #fff; }
.nav-link.on { background: rgba(255,255,255,0.22); color: #fff; font-weight: bold; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.sort-toggle { display: inline-flex; border: 1px solid rgba(255,255,255,0.35); border-radius: 4px; overflow: hidden; }
.sort-btn { background: transparent; color: rgba(255,255,255,0.8); border: none; padding: 5px 10px; font-size: 12px; cursor: pointer; border-right: 1px solid rgba(255,255,255,0.25); }
.sort-btn:last-child { border-right: none; }
.sort-btn:hover { background: rgba(255,255,255,0.12); }
.sort-btn.on { background: rgba(255,255,255,0.22); color: #fff; font-weight: bold; }
.btn { padding: 6px 14px; border-radius: 4px; font-size: 13px; font-weight: bold; border: 1px solid transparent; cursor: pointer; display: inline-block; }
.btn-primary { background: #fff; color: var(--blue); }
.btn-primary:hover { background: #e5efff; text-decoration: none; }
.btn-secondary { background: transparent; color: var(--muted); border-color: var(--border); }
.btn-ghost { background: #fff; color: var(--muted); border-color: var(--border); }
.btn-danger { background: var(--red); color: #fff; }
.link-button { background: none; border: none; color: inherit; font: inherit; cursor: pointer; padding: 0; }

.user-menu { position: relative; }
.user-menu .user-name { color: #fff; padding: 6px 10px; border: 1px solid rgba(255,255,255,0.3); border-radius: 4px; cursor: pointer; font-size: 13px; }
.user-dropdown { position: absolute; right: 0; top: 100%; margin-top: 4px; background: #fff; border: 1px solid var(--border); border-radius: 4px; min-width: 150px; display: none; box-shadow: 0 4px 12px rgba(0,0,0,0.1); z-index: 25; }
.user-menu:hover .user-dropdown, .user-menu:focus-within .user-dropdown { display: block; }
.user-dropdown a, .user-dropdown button { display: block; padding: 8px 14px; color: var(--text); font-size: 13px; width: 100%; text-align: left; border: none; background: #fff; }
.user-dropdown a:hover, .user-dropdown button:hover { background: var(--bg); text-decoration: none; }

/* ── メッセージ ── */
.messages-box { max-width: 1400px; margin: 8px auto 0; padding: 0 16px; }
.msg { padding: 8px 14px; border-radius: 4px; margin-bottom: 6px; font-size: 13px; }
.msg-success { background: #dcfce7; color: #14532d; }
.msg-error   { background: #fee2e2; color: #7f1d1d; }
.msg-info, .msg-warning { background: #fef3c7; color: #78350f; }

.main-wrap { max-width: 1400px; margin: 0 auto; padding: 16px; }
.foot { text-align: center; font-size: 11px; color: var(--muted); padding: 14px; }

/* ── ツールバー ── */
.toolbar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: #fff; border: 1px solid var(--border); border-radius: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.toolbar .title { font-weight: bold; font-size: 15px; color: var(--text); }
.toolbar .sp { flex: 1; }
.toolbar .btn { font-size: 12px; padding: 5px 10px; }

/* ── グループビュー ── */
.group-view { background: #fff; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.gv-dept-head {
  background: #f1f5f9; color: var(--blue-dark); font-weight: bold; font-size: 13px;
  padding: 6px 12px; border-top: 1px solid var(--border);
}
.gv-dept-head:first-child { border-top: none; }
.gv-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 12px; }
.gv-table th, .gv-table td { border: 1px solid var(--border); padding: 3px 4px; vertical-align: top; }
.gv-table thead th { background: #f8fafc; color: var(--muted); font-weight: bold; font-size: 11px; text-align: center; padding: 5px 2px; }
.gv-table thead th.today { background: var(--blue-light); color: var(--blue-dark); }
.gv-table thead th.sat   { color: var(--blue); }
.gv-table thead th.sun   { color: var(--red); }
.gv-table th.member-col { width: 130px; background: #f8fafc; text-align: left; padding: 4px 6px; }
.gv-table td.member-cell { background: #fafbfc; padding: 5px 8px; font-size: 12px; }
.gv-table td.today { background: #f0f7ff; }
.gv-table td.sat, .gv-table td.sun { background: #f8fafc; }
.member { display: flex; align-items: center; gap: 6px; }
.avatar { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: bold; color: #1f2937; flex-shrink: 0; }
.member-name { font-size: 12px; font-weight: bold; }
.member-position { font-size: 10px; color: var(--muted); }
.ev-chip {
  display: block; padding: 2px 5px; border-radius: 3px;
  font-size: 11px; font-weight: bold;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 2px; cursor: pointer; border: 1px solid transparent;
}
.ev-chip:hover { text-decoration: none; filter: brightness(0.95); }
.ev-time { font-size: 9px; font-weight: normal; opacity: 0.7; margin-right: 3px; }
.gv-table td:hover { outline: 1px solid var(--blue-light); }
.cell-link { display: block; min-height: 44px; color: inherit; }
.cell-link:hover { text-decoration: none; background: #eff6ff; }

/* ── グループビュー サイドバー＋メイン ── */
.gv-wrap { display: flex; gap: 10px; align-items: flex-start; }
.gv-wrap .gv-main { flex: 1 1 0%; min-width: 0; }
.gv-side { flex: 0 0 260px; background: #fff; border: 1px solid var(--border); border-radius: 6px; padding: 12px; font-size: 12px; max-height: calc(100vh - 160px); overflow-y: auto; position: sticky; top: 70px; }
.gvs-block { border-bottom: 1px solid #f1f5f9; padding: 8px 0; }
.gvs-block:last-of-type { border-bottom: none; }
.gvs-title { font-weight: bold; color: var(--muted); font-size: 11px; margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
.gvs-hint { color: var(--muted); font-weight: normal; font-size: 10px; }
.gvs-smalllink { background: none; border: none; color: var(--blue); font-size: 11px; cursor: pointer; padding: 0; }
.gvs-smalllink:hover { text-decoration: underline; }
.gvs-checkbox-list { max-height: 200px; overflow-y: auto; border: 1px solid var(--border); border-radius: 4px; padding: 6px; background: #fafbfc; display: flex; flex-direction: column; gap: 2px; }
.gvs-checkbox-list .checkbox-item { padding: 2px 4px; font-size: 12px; display: flex; align-items: center; gap: 6px; }
.gvs-sub { color: var(--muted); font-size: 10px; }
.gvs-foot { display: flex; gap: 6px; justify-content: flex-end; margin-top: 10px; }
.gv-side .form-select { width: 100%; padding: 6px 8px; font-size: 12px; }

/* 施設バッジ */
.room-badge { display: inline-block; width: 10px; height: 10px; border-radius: 3px; vertical-align: middle; margin-right: 4px; }

/* 完了済み予定 */
.ev-chip.ev-done, .gm-ev.ev-done { opacity: 0.55; text-decoration: line-through; }

/* ── 日ビュー 横並び 7人レイアウト ── */
.day-horizontal { background: transparent; border: none; padding: 0; }
.dh-wrap { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 12px; }
.dh-col { flex: 0 0 calc((100% - 36px) / 7); min-width: 160px; background: #fff; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.dh-head { padding: 8px 10px; background: #f8fafc; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 8px; }
.dh-head .avatar { width: 28px; height: 28px; font-size: 12px; }
.dh-name { font-size: 13px; font-weight: bold; }
.dh-role { font-size: 11px; color: var(--muted); }
.dh-allday { padding: 4px 6px; background: #fef9e7; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 2px; }
.dh-slots { display: flex; flex-direction: column; }
.dh-slot { display: grid; grid-template-columns: 44px 1fr; border-bottom: 1px solid #f1f5f9; min-height: 40px; }
.dh-slot a.dh-slot-link { display: block; height: 100%; width: 100%; color: inherit; }
.dh-slot a.dh-slot-link:hover { background: #eff6ff; text-decoration: none; }
.dh-slot:last-child { border-bottom: none; }
.dh-slot.now { background: #f0f7ff; }
.dh-hour { padding: 4px 6px; font-size: 11px; color: var(--muted); background: #fafbfc; border-right: 1px solid #f1f5f9; text-align: right; }
.dh-events { padding: 3px 4px; display: flex; flex-direction: column; gap: 2px; }

/* ── 表示切替（月/週/日 タブ） ── */
.view-switch { display: inline-flex; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.vs-btn { font-size: 12px; padding: 5px 12px; color: var(--muted); background: #fff; border-right: 1px solid var(--border); }
.vs-btn:last-child { border-right: none; }
.vs-btn.on { background: var(--blue-light); color: var(--blue-dark); font-weight: bold; }
.vs-btn:hover { text-decoration: none; background: var(--bg); }
.vs-btn.on:hover { background: var(--blue-light); }

/* ── 月ビュー（グループ） ── */
.group-month { padding: 0; }
.gm-head { display: grid; grid-template-columns: repeat(7, 1fr); background: #f8fafc; border-bottom: 1px solid var(--border); }
.gm-hd { padding: 6px; text-align: center; font-size: 12px; font-weight: bold; color: var(--muted); border-right: 1px solid var(--border); }
.gm-hd:last-child { border-right: none; }
.gm-hd.sat { color: var(--blue); }
.gm-hd.sun { color: var(--red); }
.gm-week { display: grid; grid-template-columns: repeat(7, 1fr); border-bottom: 1px solid var(--border); min-height: 110px; }
.gm-week:last-child { border-bottom: none; }
.gm-day { border-right: 1px solid var(--border); padding: 4px 5px; min-height: 110px; background: #fff; display: flex; flex-direction: column; gap: 2px; }
.gm-day:last-child { border-right: none; }
.gm-day.today { background: #f0f7ff; }
.gm-day.sat { background: #f8fafc; }
.gm-day.sun { background: #fef8f8; }
.gm-daynum { font-size: 12px; font-weight: bold; color: var(--muted); }
.gm-daynum a { color: inherit; }
.gm-day.today .gm-daynum { color: var(--blue-dark); }
.gm-day.sun .gm-daynum { color: var(--red); }
.gm-events { display: flex; flex-direction: column; gap: 2px; overflow: hidden; }
.gm-ev { font-size: 11px; padding: 1px 5px; border-radius: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gm-ev-name { font-weight: bold; margin-right: 4px; opacity: 0.85; }
.gm-more { font-size: 10px; color: var(--muted); margin-top: 1px; }

/* ── 日ビュー（グループ） ── */
.group-day { overflow-x: auto; }
.gd-table { width: 100%; min-width: 960px; border-collapse: collapse; table-layout: fixed; font-size: 11px; }
.gd-table th, .gd-table td { border: 1px solid var(--border); padding: 3px 4px; vertical-align: top; }
.gd-table thead th { background: #f8fafc; color: var(--muted); font-weight: bold; font-size: 11px; text-align: center; padding: 5px 2px; white-space: nowrap; height: 34px; }
.gd-table th.member-col { width: 160px; background: #f8fafc; text-align: left; padding: 4px 6px; }
.gd-table tbody tr { height: 56px; }
.gd-table tbody td { height: 56px; }
.gd-table td.member-cell { background: #fafbfc; padding: 5px 8px; font-size: 12px; vertical-align: middle; }
.gd-table td.slot-cell { padding: 0; }
.gd-slot-link { display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 3px 4px; color: inherit; }
.gd-slot-link:hover { text-decoration: none; background: #eff6ff; }
.gd-allday { margin-top: 6px; display: flex; flex-direction: column; gap: 2px; }

/* ── 個人ビュー ── */
.uv-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.uv-table th, .uv-table td { border-bottom: 1px solid var(--border); padding: 10px 12px; font-size: 13px; text-align: left; }
.uv-table th.dh { width: 120px; background: #f8fafc; color: var(--muted); vertical-align: top; }
.uv-ev { padding: 6px 10px; border-radius: 4px; margin-bottom: 5px; }
.uv-ev .time { font-size: 11px; color: var(--muted); margin-right: 8px; }

/* ── 予定フォーム ── */
.form-wrap { max-width: 860px; margin: 0 auto; background: #fff; border: 1px solid var(--border); border-radius: 6px; padding: 20px; }
.form-wrap h1 { font-size: 18px; margin-bottom: 16px; color: var(--blue-dark); }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 12px; font-weight: bold; color: var(--muted); margin-bottom: 4px; }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 4px;
  font-size: 14px; font-family: inherit; background: #fff;
}
.form-textarea { resize: vertical; }
.form-row { display: flex; gap: 14px; }
.form-row .form-group { flex: 1; }
.form-help { font-size: 11px; color: var(--muted); margin-top: 2px; }
.form-error { font-size: 12px; color: var(--red); margin-top: 2px; }
.form-foot { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; border-top: 1px solid var(--border); padding-top: 14px; }

/* ── フィールドセット（繰り返し等） ── */
.form-fieldset { border: 1px solid var(--border); border-radius: 6px; padding: 10px 14px; margin-bottom: 14px; }
.form-fieldset legend { padding: 0 6px; font-size: 12px; font-weight: bold; color: var(--blue-dark); }
.weekday-row { display: flex; gap: 4px; flex-wrap: wrap; }
.weekday-item { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border: 1px solid var(--border); border-radius: 14px; cursor: pointer; background: #fff; font-size: 12px; }
.weekday-item input { accent-color: var(--blue); }
.weekday-item:has(input:checked) { background: var(--blue-light); border-color: #93c5fd; color: var(--blue-dark); font-weight: bold; }
.checkbox-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 4px; padding: 8px; border: 1px solid var(--border); border-radius: 4px; max-height: 280px; overflow-y: auto; background: #fafbfc; }
.checkbox-item { display: inline-flex; align-items: center; gap: 5px; padding: 3px 4px; font-size: 12px; cursor: pointer; border-radius: 3px; }
.checkbox-item:hover { background: #eff6ff; }
.checkbox-item input { accent-color: var(--blue); }

/* ── 予定詳細 ── */
.detail-wrap { max-width: 760px; margin: 0 auto; background: #fff; border: 1px solid var(--border); border-radius: 6px; padding: 20px; }
.detail-title { font-size: 20px; font-weight: bold; margin-bottom: 10px; }
.detail-chip { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 11px; font-weight: bold; margin-right: 6px; }
.detail-row { display: flex; gap: 14px; padding: 8px 0; border-bottom: 1px solid #f1f5f9; font-size: 14px; }
.detail-row .label { width: 110px; color: var(--muted); font-size: 12px; }
.detail-row .value { flex: 1; }
.participants-list { list-style: none; padding: 0; }
.participants-list li { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid #f1f5f9; font-size: 13px; }
.st-pill { font-size: 11px; padding: 2px 8px; border-radius: 10px; font-weight: bold; }
.st-pending { background: #fef3c7; color: #78350f; }
.st-accepted { background: #dcfce7; color: #14532d; }
.st-declined { background: #fee2e2; color: #7f1d1d; }
.st-tentative { background: #e0e7ff; color: #3730a3; }
.rsvp-group { display: flex; gap: 6px; margin-top: 12px; }

/* ── 行動予定表 ── */
.board-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: #fff; border: 1px solid var(--border); border-radius: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.board-date { font-size: 15px; font-weight: bold; }
.dept-pill { display: inline-block; padding: 4px 12px; border-radius: 16px; font-size: 12px; border: 1px solid var(--border); color: var(--muted); background: #fff; }
.dept-pill.on { background: var(--blue-light); color: var(--blue-dark); border-color: #93c5fd; font-weight: bold; }
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 12px; }
.kpi-card { background: #fff; border: 1px solid var(--border); border-radius: 6px; padding: 10px 14px; }
.kpi-label { font-size: 11px; color: var(--muted); }
.kpi-value { font-size: 24px; font-weight: bold; margin-top: 2px; }
.kpi-unit  { font-size: 12px; color: var(--muted); font-weight: normal; margin-left: 3px; }
.board-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.board-table th, .board-table td { border-bottom: 1px solid var(--border); padding: 10px 14px; text-align: left; font-size: 13px; }
.board-table th { background: #f1f5f9; color: var(--muted); font-weight: bold; font-size: 12px; }
.status-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: bold; padding: 3px 10px; border-radius: 12px; white-space: nowrap; }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.s-office { background: #dcfce7; color: #14532d; } .s-office .dot { background: #16a34a; }
.s-remote { background: #dbeafe; color: #1e40af; } .s-remote .dot { background: #2563eb; }
.s-out { background: #fef3c7; color: #78350f; } .s-out .dot { background: #d97706; }
.s-trip { background: #ede9fe; color: #4c1d95; } .s-trip .dot { background: #7c3aed; }
.s-meeting { background: #fce7f3; color: #831843; } .s-meeting .dot { background: #db2777; }
.s-half_leave { background: #ffedd5; color: #9a3412; } .s-half_leave .dot { background: #dc2626; }
.s-leave { background: #f1f5f9; color: #475569; } .s-leave .dot { background: #64748b; }

/* ── 行動予定表: カンバン ── */
.kanban-board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.kcol { background: #fff; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; display: flex; flex-direction: column; min-height: 100px; }
.kcol-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; border-bottom: 1px solid var(--border); }
.kcol-title { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: bold; }
.kcol-dot { width: 8px; height: 8px; border-radius: 50%; }
.kcol-count { font-size: 11px; padding: 2px 8px; border-radius: 10px; font-weight: bold; }
.kcol-body { padding: 8px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.member-card { background: #fff; border: 1px solid var(--border); border-left: 3px solid var(--border); border-radius: 4px; padding: 8px 10px; }
.mc-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.mc-top .avatar { width: 28px; height: 28px; font-size: 12px; }
.mc-name { font-size: 13px; font-weight: bold; }
.mc-role { font-size: 11px; color: var(--muted); }
.mc-dest { font-size: 12px; color: var(--text); line-height: 1.45; margin-bottom: 3px; }
.mc-sub { font-size: 11px; color: var(--muted); line-height: 1.4; }
.mc-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; padding-top: 6px; border-top: 1px solid #f1f5f9; }
.mc-ret { font-size: 11px; color: var(--muted); }
.mc-ret b { color: var(--text); font-weight: bold; }
.mc-tag { font-size: 10px; padding: 2px 6px; border-radius: 4px; background: #f8fafc; color: var(--muted); border: 1px solid var(--border); }
.mc-empty { padding: 14px 0; text-align: center; color: var(--muted); font-size: 11px; }

/* ── 行動予定表: タイル ── */
.tile-wrap { margin-bottom: 14px; }
.tile-section-head { display: flex; align-items: center; gap: 8px; padding: 12px 0 6px; font-size: 12px; }
.ts-dot { width: 8px; height: 8px; border-radius: 50%; }
.ts-line { flex: 1; height: 1px; background: var(--border); }
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.tile { background: #fff; border: 1px solid var(--border); border-top: 3px solid var(--border); border-radius: 6px; padding: 12px 10px 10px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.tile:hover { background: #f8fafc; }
.tile-name { font-size: 13px; font-weight: bold; margin-bottom: 2px; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-role { font-size: 11px; color: var(--muted); margin-bottom: 8px; }
.tile-dest { font-size: 11px; color: var(--muted); line-height: 1.4; margin-bottom: 4px; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-ret-label { font-size: 10px; color: var(--muted); }
.tile-ret { font-size: 12px; font-weight: bold; color: var(--text); }
.tile-empty { grid-column: 1 / -1; padding: 16px; text-align: center; color: var(--muted); font-size: 12px; }

/* 会議中用のステータス色（既存.s-meetingを流用） */

/* ── 空き時間 ── */
.fb-body { display: grid; grid-template-columns: 220px 1fr; gap: 10px; }
.fb-side { background: #fff; border: 1px solid var(--border); border-radius: 6px; padding: 10px; font-size: 12px; max-height: 650px; overflow-y: auto; }
.fb-side .fl { font-weight: bold; color: var(--muted); margin-top: 10px; margin-bottom: 4px; font-size: 11px; }
.fb-side label { display: flex; align-items: center; gap: 5px; padding: 2px 0; font-size: 12px; }
.fb-main { background: #fff; border: 1px solid var(--border); border-radius: 6px; padding: 10px; }
.fb-grid { display: grid; font-size: 11px; }
.fb-h { text-align: center; font-weight: bold; padding: 4px; background: #f1f5f9; border: 1px solid var(--border); color: var(--muted); font-size: 11px; }
.fb-h.today { background: var(--blue-light); color: var(--blue-dark); }
.fb-t { padding: 4px; text-align: right; font-size: 10px; color: var(--muted); background: #f8fafc; border: 1px solid var(--border); }
.fb-c { height: 24px; border: 1px solid var(--border); }
.fb-c.free { background: #dcfce7; }
.fb-c.busy_full { background: #fecaca; }
.fb-c.busy_partial { background: #fef3c7; }
.fb-legend { display: flex; gap: 14px; margin-top: 8px; font-size: 11px; color: var(--muted); }
.fb-legend .box { width: 12px; height: 12px; border-radius: 2px; margin-right: 4px; display: inline-block; vertical-align: middle; }
.fb-sugg { margin-top: 12px; display: flex; gap: 6px; flex-wrap: wrap; }
.fb-sugg a { padding: 4px 10px; background: #dcfce7; color: #14532d; border-radius: 4px; border: 1px solid #86efac; font-size: 12px; font-weight: bold; }

/* ── 検索 ── */
.search-form { background: #fff; border: 1px solid var(--border); border-radius: 6px; padding: 14px; margin-bottom: 10px; }
.search-summary { background: #fff; border: 1px solid var(--border); border-radius: 6px; padding: 10px 14px; font-size: 13px; color: var(--text); margin-bottom: 10px; }
.stats-bar { background: #fff; border: 1px solid var(--border); border-radius: 6px; padding: 10px 14px; margin-bottom: 10px; }
.stats-row { display: flex; flex-wrap: wrap; gap: 8px; }
.stats-item { background: #f8fafc; padding: 6px 10px; border-radius: 4px; min-width: 140px; }

/* ── 休暇申請 ── */
.leave-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.leave-table th, .leave-table td { border-bottom: 1px solid var(--border); padding: 10px 12px; font-size: 13px; text-align: left; }
.leave-table th { background: #f1f5f9; color: var(--muted); font-weight: bold; font-size: 12px; }
.st-leave { display: inline-block; padding: 2px 10px; border-radius: 10px; font-size: 11px; font-weight: bold; }
.sl-submitted { background: #fef3c7; color: #78350f; }
.sl-approved_1 { background: #e0e7ff; color: #3730a3; }
.sl-approved { background: #dcfce7; color: #14532d; }
.sl-rejected { background: #fee2e2; color: #7f1d1d; }
.sl-canceled { background: #f1f5f9; color: #475569; }
.sl-draft { background: #f1f5f9; color: #475569; }

/* ── ログイン ── */
.login-wrap { max-width: 360px; margin: 60px auto; background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 28px 24px; box-shadow: 0 2px 12px rgba(0,0,0,0.04); }
.login-wrap h1 { font-size: 20px; text-align: center; color: var(--blue-dark); margin-bottom: 20px; }
.login-wrap .btn { width: 100%; padding: 10px; font-size: 14px; }
.btn-login { background: var(--blue); color: #fff; }
.btn-login:hover { background: var(--blue-dark); text-decoration: none; }

/* ── 常時表示モード ── */
.screen-mode .top-bar, .screen-mode .foot { display: none; }
.screen-mode .main-wrap { max-width: 100%; padding: 10px; }
.screen-mode .kpi-value { font-size: 36px; }
.screen-mode .board-table th, .screen-mode .board-table td { padding: 14px 18px; font-size: 16px; }
.screen-mode .status-pill { font-size: 14px; }

/* ── レスポンシブ ── */
@media (max-width: 1100px) {
  .gv-wrap { flex-direction: column; }
  .gv-side { position: static; max-height: none; flex-basis: auto; width: 100%; }
}
@media (max-width: 900px) {
  .top-inner { flex-wrap: wrap; gap: 8px; }
  .top-nav { width: 100%; order: 3; overflow-x: auto; flex-wrap: nowrap; }
  .nav-link { white-space: nowrap; }
  .fb-body { grid-template-columns: 1fr; }
  .gv-table th.member-col { width: 100px; }
  .gv-table { font-size: 11px; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .form-row { flex-direction: column; }
  .detail-row { flex-direction: column; gap: 4px; }
  .detail-row .label { width: auto; }
}
@media (max-width: 600px) {
  .top-inner { padding: 6px 10px; }
  .main-wrap { padding: 8px; }
  .brand { font-size: 14px; }
  .btn { padding: 5px 10px; font-size: 12px; }
  .nav-link { padding: 5px 8px; font-size: 12px; }
  .user-name { font-size: 12px; padding: 5px 8px; }
  .ev-chip { font-size: 10px; padding: 1px 3px; }
  .gv-table { font-size: 10px; }
}
