/* AccessLab ワークスペース 共通スタイル（2026-08-26 UI刷新）
   配色・寸法は hanbai-web v3（static/style.css）と共通：地と面の層／アプリバー／線画SVGアイコン／モジュール色分け。
   スマホ（≤780px）は左ナビをドロワー＋下部タブに、表(.data-table)はカード表示に切り替える
   （static/js/app.js が thead の見出しを各セルの data-label に写す）。 */
:root {
  --bg: #fff; --surface: #fafbfc; --fg: #1c1c1e; --mut: #6b7280; --mut2: #8a93a3;
  --ln: #e3e8f0; --acc: #2f6bd8; --acc-dk: #0f3373; --side: #17418f; --side-2: #0f3373;
  --ok: #0a7d32; --ng: #b3261e; --warn: #b7791f;
  --radius: 10px; --shadow: 0 1px 2px rgba(16,24,40,.05);
  /* モジュール色（伝える／時間／進める／台帳） */
  --c-tsutaeru: #2f6bd8; --c-jikan: #0a8767; --c-susumeru: #b7791f; --c-daicho: #7c5cc4;
  /* 旧変数名（テンプレート内の互換） */
  --panel: #fff; --line: #e3e8f0; --ink: #1c1c1e; --muted: #6b7280; --brand: #2f6bd8; --brand-dark: #0f3373; --danger: #b3261e;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 14px/1.7 "BIZ UDPGothic", "Yu Gothic UI", "Segoe UI", system-ui, sans-serif;
  color: var(--fg); background: var(--surface);
}
a { color: var(--acc); text-decoration: none; }
a:hover { color: var(--acc-dk); }
button, input, select, textarea { font: inherit; }
.ic { flex: 0 0 auto; vertical-align: -3px; }
h2 { font-size: 18px; margin: 0 0 8px; }
h3 { font-size: 15px; }

/* ---------- レイアウト（サイドバー／アプリバー／本文） ---------- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 218px; flex: 0 0 218px; background: var(--side); color: #fff;
  display: flex; flex-direction: column; gap: 12px; padding: 16px 10px 18px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.s-brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; }
.s-mark { width: 32px; height: 32px; border-radius: 8px; background: rgba(255,255,255,.16); display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.s-name { font-weight: 700; font-size: 15px; line-height: 1.25; letter-spacing: .02em; display: flex; flex-direction: column; }
.s-sub { font-size: 10px; color: rgba(255,255,255,.62); font-weight: 500; }
.s-close { display: none; margin-left: auto; width: 44px; height: 44px; border: 0; background: transparent; color: rgba(255,255,255,.85); cursor: pointer; align-items: center; justify-content: center; }
.modules { display: flex; flex-direction: column; gap: 2px; }
.s-cap { display: flex; align-items: center; gap: 6px; font-size: 10.5px; letter-spacing: .06em; color: rgba(255,255,255,.55); padding: 10px 11px 3px; }
.s-cap i { width: 7px; height: 7px; border-radius: 99px; display: inline-block; }
.mod { display: flex; align-items: center; gap: 9px; padding: 8px 11px; border-radius: 8px; color: rgba(255,255,255,.85); font-size: 13px; line-height: 1.5; }
.mod .ic { opacity: .9; }
.mod:hover { background: rgba(255,255,255,.10); color: #fff; }
.mod.is-active { background: #fff; color: var(--side); font-weight: 700; }
.mod.is-active .ic { opacity: 1; color: var(--mc, var(--side)); }
.s-search { display: none; align-items: center; gap: 9px; color: rgba(255,255,255,.85); font-size: 14px; padding: 8px 12px; border-radius: 8px; min-height: 44px; margin-top: 4px; }
.suite { margin-top: auto; padding: 12px 8px 0; border-top: 1px solid rgba(255,255,255,.14); display: flex; flex-direction: column; gap: 6px; }
.suite-title { font-size: 10.5px; letter-spacing: .06em; color: rgba(255,255,255,.55); }
.suite-link { display: flex; align-items: center; gap: 8px; color: rgba(255,255,255,.85); font-size: 13px; padding: 5px 0; }
.suite-link:hover { color: #fff; }
.suite-link .ext { margin-left: auto; opacity: .7; }
.s-user { display: none; align-items: center; gap: 8px; padding: 10px 8px 0; border-top: 1px solid rgba(255,255,255,.14); font-size: 13px; font-weight: 700; min-height: 44px; }
.s-user .avatar { background: rgba(255,255,255,.18); }
.s-user .badge { background: rgba(255,255,255,.16); color: #fff; }
.s-user .logout { margin-left: auto; color: rgba(255,255,255,.75); }
.scrim { display: none; position: fixed; inset: 0; background: rgba(16,24,40,.42); z-index: 20; }
.scrim.show { display: block; }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 10; height: 54px; background: var(--bg); border-bottom: 1px solid var(--ln);
  display: flex; align-items: center; gap: 12px; padding: 0 24px;
}
.nav-toggle { display: none; width: 44px; height: 44px; border: 0; background: transparent; color: var(--fg); cursor: pointer; align-items: center; justify-content: center; }
.mod-chip { width: 30px; height: 30px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.page-title { font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topsearch { display: flex; align-items: center; gap: 8px; margin-left: 14px; width: 320px; height: 34px; padding: 0 12px; border-radius: 8px; background: rgba(127,127,127,.07); color: var(--mut2); }
.topsearch input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 0; font-size: 13px; color: var(--fg); }
.topsearch input:focus { outline: none; }
.topsearch:focus-within { background: var(--bg); box-shadow: 0 0 0 1px var(--acc) inset; }
.userbox { display: flex; align-items: center; gap: 10px; margin-left: auto; font-size: 13px; }
.bell { position: relative; display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; color: var(--mut); border-radius: 8px; }
.bell:hover { background: rgba(127,127,127,.08); color: var(--fg); }
.bell-badge { position: absolute; top: 2px; right: 1px; background: var(--ng); color: #fff; font-size: 10px; font-weight: 700; min-width: 17px; height: 17px; line-height: 17px; text-align: center; border-radius: 99px; padding: 0 5px; }
.uchip { display: flex; align-items: center; gap: 8px; padding: 3px 10px 3px 4px; border: 1px solid var(--ln); border-radius: 99px; }
.avatar { width: 26px; height: 26px; border-radius: 99px; background: var(--side); color: #fff; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.m-avatar { display: none; }
.uname { font-weight: 700; }
.badge { display: inline-block; background: rgba(47,107,216,.10); color: var(--side); font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 99px; line-height: 1.6; }
.logout { display: inline-flex; align-items: center; gap: 5px; color: var(--mut2); font-size: 12.5px; }
.logout:hover { color: var(--fg); }
.content { padding: 22px 24px 64px; max-width: 760px; width: 100%; margin: 0 auto; }
.content.wide { max-width: 1220px; }
.tabbar { display: none; }

/* ---------- ボタン・共通小物 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--ln); background: var(--bg); color: var(--acc);
  padding: 7px 16px; border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 700; line-height: 1.5; white-space: nowrap;
}
.btn:hover { border-color: var(--acc); background: rgba(47,107,216,.06); }
.btn.primary { background: var(--acc); border-color: var(--acc); color: #fff; }
.btn.primary:hover { background: var(--acc); opacity: .88; }
.btn.small { padding: 4px 12px; font-size: 12.5px; }
.btn.danger { background: var(--ng); border-color: var(--ng); color: #fff; }
.btn:disabled { opacity: .45; cursor: default; }
.linkbtn { border: none; background: none; color: var(--acc); cursor: pointer; font-size: 12.5px; padding: 0; font-weight: 700; }
.empty { color: var(--mut2); text-align: center; padding: 28px 10px; border: 1px dashed var(--ln); border-radius: 10px; font-size: 13px; }
td.empty { border: 0; border-radius: 0; }
.hint { font-size: 13px; color: var(--mut); margin-top: 10px; }

/* ---------- 認証 ---------- */
.auth-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: var(--surface); }
.auth-card { background: var(--bg); border: 1px solid var(--ln); border-radius: 14px; padding: 32px; width: 360px; max-width: calc(100% - 32px); box-shadow: 0 8px 30px rgba(17,36,63,.08); }
.auth-card .brand { color: var(--fg); font-weight: 700; font-size: 18px; text-align: center; padding: 0 0 16px; line-height: 1.2; }
.auth-card .brand span { color: var(--mut); font-size: 12px; font-weight: 500; }
.auth-error { background: rgba(179,38,30,.06); color: var(--ng); border: 1px solid rgba(179,38,30,.3); border-radius: 8px; padding: 10px; font-size: 13px; margin-bottom: 14px; }
.fld { display: block; margin-bottom: 14px; }
.fld span { display: block; font-size: 12.5px; color: var(--mut); margin-bottom: 5px; }
.fld input, .fld select, .fld textarea { width: 100%; border: 1px solid var(--ln); border-radius: 8px; padding: 9px 11px; background: var(--bg); color: var(--fg); }
.fld input:focus, .fld select:focus, .fld textarea:focus { outline: none; border-color: var(--acc); box-shadow: 0 0 0 3px rgba(47,107,216,.15); }
.fld input[type=checkbox] { width: auto; }
.auth-card .btn { width: 100%; padding: 10px; }
.auth-switch { text-align: center; margin-top: 16px; font-size: 13px; }

/* ---------- サブナビ（ピル）・KPI・入力フォーム ---------- */
.crm-subnav { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.crm-subnav a { display: inline-flex; align-items: center; gap: 6px; padding: 5px 14px; border-radius: 99px; border: 1px solid var(--ln); background: var(--bg); color: var(--mut); font-size: 12.5px; font-weight: 700; line-height: 1.5; }
.crm-subnav a:hover { border-color: var(--acc); color: var(--acc); }
.crm-subnav a.active { background: var(--acc); border-color: var(--acc); color: #fff; }

.kpi-row { display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.kpi { background: var(--bg); border: 1px solid var(--ln); border-radius: 12px; padding: 12px 16px 10px; flex: 1; min-width: 130px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 2px; }
.kpi-label { display: block; font-size: 12px; color: var(--mut); }
.kpi-val { font-size: 22px; font-weight: 700; line-height: 1.3; font-variant-numeric: tabular-nums; }

.new-deal { margin-bottom: 18px; }
.new-deal > summary { display: inline-flex; list-style: none; cursor: pointer; }
.new-deal > summary::-webkit-details-marker { display: none; }
.grid-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; background: var(--bg); border: 1px solid var(--ln); border-radius: 12px; padding: 16px; margin-top: 10px; box-shadow: var(--shadow); }
.grid-form .fld { margin-bottom: 0; }
.grid-form .fld.wide { grid-column: 1 / -1; }
.grid-form .fld input, .grid-form .fld select, .grid-form .fld textarea { width: 100%; border: 1px solid var(--ln); border-radius: 8px; padding: 8px 10px; resize: vertical; }
.grid-form .fld input[type=checkbox] { width: auto; }
.form-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; }

/* ---------- カンバン ---------- */
.kanban { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.kcol { background: rgba(127,127,127,.07); border-radius: 12px; width: 220px; flex-shrink: 0; display: flex; flex-direction: column; }
.kcol.is-won { background: rgba(10,125,50,.08); }
.kcol.is-lost { background: rgba(179,38,30,.07); }
.kcol-head { padding: 10px 12px; border-bottom: 1px solid rgba(0,0,0,.06); }
.kcol-title { font-weight: 700; font-size: 14px; }
.kcol-meta { display: block; font-size: 11px; color: var(--mut); margin-top: 2px; }
.kcol-body { padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 40px; }
.dcard { background: var(--bg); border: 1px solid var(--ln); border-radius: 10px; padding: 10px; box-shadow: var(--shadow); }
.dcard-title { font-weight: 700; font-size: 14px; display: block; color: var(--fg); }
.dcard-amount { color: var(--acc-dk); font-weight: 700; font-size: 13px; margin: 4px 0; }
.dcard-sub { font-size: 12px; color: var(--mut); display: flex; align-items: center; gap: 4px; }
.stage-select, .task-status { width: 100%; margin-top: 8px; border: 1px solid var(--ln); border-radius: 8px; padding: 4px; font-size: 12px; background: var(--bg); }

/* ---------- 詳細・カード・活動履歴 ---------- */
.detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.detail-head h2 { margin: 0 0 4px; font-size: 20px; }
.detail-meta { font-size: 12.5px; color: var(--mut); }
.detail-amount { font-size: 22px; font-weight: 700; color: var(--acc-dk); }
.card { background: var(--bg); border: 1px solid var(--ln); border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; display: flex; align-items: center; gap: 16px; justify-content: space-between; flex-wrap: wrap; box-shadow: var(--shadow); }
.inline-stage { display: flex; align-items: center; gap: 12px; }
.inline-stage select { border: 1px solid var(--ln); border-radius: 8px; padding: 6px; }
.saved-hint { color: var(--ok); font-size: 13px; }
.del-deal { margin-left: auto; }
.sec-title { font-size: 15px; margin: 18px 0 8px; font-weight: 700; }
.activity-form { display: flex; gap: 8px; width: 100%; flex-wrap: wrap; }
.activity-form select, .activity-form input[type=text], .activity-form input[type=date] { border: 1px solid var(--ln); border-radius: 8px; padding: 8px 10px; }
.activity-form input[type=text] { flex: 1; min-width: 160px; }
.activity-list { list-style: none; padding: 0; margin: 0; }
.act { display: flex; gap: 12px; align-items: flex-start; background: var(--bg); border: 1px solid var(--ln); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; }
.act.is-done { opacity: .55; }
.act.is-done .act-body { text-decoration: line-through; }
.act-kind { background: rgba(47,107,216,.10); color: var(--side); font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; flex-shrink: 0; }
.act-main { flex: 1; }
.act-body { font-size: 14px; }
.act-meta { font-size: 12px; color: var(--mut); margin-top: 2px; }
.act-done { border: 1px solid var(--ln); background: var(--bg); border-radius: 8px; padding: 4px 10px; font-size: 12px; cursor: pointer; }

/* ---------- テーブル / ミニリスト ---------- */
.data-table { width: 100%; border-collapse: collapse; background: var(--bg); border: 1px solid var(--ln); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); }
.data-table th, .data-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--ln); font-size: 13.5px; vertical-align: middle; }
.data-table th { background: rgba(127,127,127,.08); color: var(--mut); font-weight: 600; font-size: 11.5px; white-space: nowrap; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: rgba(47,107,216,.03); }
.mini-list { list-style: none; padding: 0; margin: 0 0 8px; }
.mini-list li { padding: 8px 0; border-bottom: 1px solid var(--ln); font-size: 14px; }

/* ---------- プロジェクト ---------- */
.proj-toolbar { margin-bottom: 14px; }
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.proj-card { background: var(--bg); border: 1px solid var(--ln); border-radius: 12px; padding: 16px; box-shadow: var(--shadow); }
.proj-card.is-archived { opacity: .6; }
.proj-name { font-weight: 700; font-size: 16px; display: block; }
.proj-desc { font-size: 13px; color: var(--mut); margin: 6px 0; }
.proj-progress { margin: 10px 0; }
.bar { height: 8px; background: rgba(127,127,127,.14); border-radius: 99px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--c-susumeru); }
.proj-meta { font-size: 12px; color: var(--mut); }
.proj-foot { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--mut); margin-top: 8px; }

/* タスクカード・タグ */
.tcard-tags { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0; }
.tag { display: inline-flex; align-items: center; gap: 3px; background: rgba(127,127,127,.10); color: var(--mut); font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 99px; line-height: 1.6; white-space: nowrap; }
.dep-tag { background: rgba(183,121,31,.12); color: var(--warn); }
.prio-tag-high { background: rgba(179,38,30,.10); color: var(--ng); }
.prio-tag-normal { background: rgba(47,107,216,.10); color: var(--side); }
.prio-tag-low { background: rgba(127,127,127,.10); color: var(--mut); }
.dcard.prio-high { border-left: 3px solid var(--ng); }

/* ガント */
.gantt-range { font-size: 13px; color: var(--mut); margin-bottom: 12px; }
.gantt { background: var(--bg); border: 1px solid var(--ln); border-radius: 12px; padding: 12px; box-shadow: var(--shadow); }
.gantt-row { display: flex; align-items: center; gap: 12px; padding: 6px 0; }
.gantt-label { width: 180px; flex-shrink: 0; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gantt-track { position: relative; flex: 1; height: 24px; background: rgba(127,127,127,.08); border-radius: 6px; }
.gantt-bar { position: absolute; top: 3px; height: 18px; background: var(--acc); border-radius: 4px; color: #fff; font-size: 10px; line-height: 18px; padding: 0 6px; overflow: hidden; white-space: nowrap; min-width: 14px; }
.gantt-bar.status-done { background: var(--ok); }
.gantt-bar.status-doing { background: var(--warn); }

/* タスク詳細 2カラム */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.inline-add { display: flex; gap: 8px; margin-top: 8px; }
.inline-add input, .inline-add select { flex: 1; border: 1px solid var(--ln); border-radius: 8px; padding: 7px 10px; }
.inline-del { display: inline; }

/* ---------- ドライブ ---------- */
.crumbs { font-size: 14px; margin-bottom: 14px; }
.crumbs .sep { color: var(--mut); margin: 0 6px; }
.drive-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.drive-actions .inline-add { margin-top: 0; background: var(--bg); border: 1px solid var(--ln); border-radius: 10px; padding: 8px 10px; }
.folder-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-bottom: 18px; }
.folder-card { background: var(--bg); border: 1px solid var(--ln); border-radius: 10px; padding: 12px; box-shadow: var(--shadow); }
.folder-link { font-weight: 700; display: flex; align-items: center; gap: 6px; }
.folder-meta { font-size: 12px; color: var(--mut); margin: 4px 0; }
.folder-del { display: inline; }

/* ---------- カレンダー（月） ---------- */
.cal-header { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.cal-header h2 { margin: 0; min-width: 150px; text-align: center; font-size: 20px; }
.cal-grid { width: 100%; border-collapse: collapse; table-layout: fixed; background: var(--bg); border: 1px solid var(--ln); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); }
.cal-grid th { background: rgba(127,127,127,.06); color: var(--mut); font-weight: 700; font-size: 12.5px; padding: 8px; border: 1px solid var(--ln); }
.cal-grid th:first-child { color: var(--ng); }
.cal-grid th:last-child { color: var(--acc); }
.cal-cell { border: 1px solid var(--ln); vertical-align: top; height: 100px; padding: 5px 6px; }
.cal-cell.out { background: rgba(127,127,127,.035); }
.cal-cell.out .cal-day { color: #c3ccd8; }
.cal-cell.today { background: rgba(10,135,103,.05); }
.cal-cell.today .cal-day { background: var(--c-jikan); color: #fff; border-radius: 50%; width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.cal-day { font-size: 12px; color: var(--fg); margin-bottom: 3px; }
.cal-day a { color: inherit; text-decoration: none; }
.cal-day a:hover { text-decoration: underline; }
.cal-event { display: block; font-size: 11.5px; background: rgba(47,107,216,.10); color: var(--fg); border-radius: 5px; padding: 2px 6px; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-event::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 99px; background: var(--acc); margin-right: 5px; vertical-align: 1px; }
.cal-event.has-res { background: rgba(183,121,31,.12); }
.cal-event.has-res::before { background: var(--warn); }
.cal-time { font-weight: 700; margin-right: 3px; }
.rsvp-form { display: flex; gap: 8px; }
.cal-header .cal-filter { margin-left: auto; }
.cal-header .cal-filter select { border: 1px solid var(--ln); border-radius: 8px; padding: 6px 10px; background: var(--bg); }
.check-list { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 4px; }
.check-item { font-size: 13px; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }

/* ---------- グループ週/日表示 ---------- */
.table-scroll { overflow-x: auto; }
.group-grid { width: 100%; border-collapse: collapse; table-layout: fixed; background: var(--bg); border: 1px solid var(--ln); min-width: 720px; }
.group-grid th, .group-grid td { border: 1px solid var(--ln); vertical-align: top; padding: 4px; font-size: 12px; }
.group-grid thead th { background: rgba(127,127,127,.06); color: var(--mut); font-weight: 700; text-align: center; padding: 8px 4px; }
.group-grid thead th a { color: inherit; }
.group-grid thead th.sun { color: var(--ng); }
.group-grid thead th.sat { color: var(--acc); }
.group-grid th.gg-name { width: 120px; text-align: left; background: rgba(127,127,127,.06); color: var(--fg); font-weight: 700; padding: 8px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.group-grid td { height: 56px; }
.group-grid td.today, .group-grid thead th.today { background: rgba(10,135,103,.06); }
.group-grid tr.me th.gg-name { background: rgba(47,107,216,.10); }
.group-grid.day { min-width: 0; }
.group-grid.day .gg-day-cell { height: auto; padding: 8px; }
.group-grid.day .cal-event { display: inline-block; margin: 2px 6px 2px 0; }
.cal-header h2.sun { color: var(--ng); }
.cal-header h2.sat { color: var(--acc); }
.gg-dept { display: block; font-size: 10px; color: var(--mut); font-weight: 400; margin-top: 2px; }

/* ---------- 掲示板・回覧板 ---------- */
.board-ack-box { background: rgba(127,127,127,.06); border: 1px solid var(--ln); border-radius: 10px; padding: 10px 12px; }
.board-ack-opts { margin-top: 8px; display: grid; gap: 10px; }
.board-toolbar { display: flex; justify-content: flex-end; margin: 6px 0 8px; }
.board-marks { white-space: nowrap; width: 60px; color: var(--mut2); }
.board-marks .ic { margin-right: 4px; }
.board-marks .mk-pin, .mk-pin { color: var(--acc); }
.data-table tr.is-expired td { color: var(--mut); }
.board-body { white-space: pre-wrap; word-break: break-word; line-height: 1.7; }
.board-comment { white-space: pre-wrap; margin-top: 2px; }

/* ---------- 個人ToDo ---------- */
.todo-add { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.todo-add input[type="text"] { flex: 1; min-width: 200px; border: 1px solid var(--ln); border-radius: 10px; padding: 9px 12px; background: var(--bg); }
.todo-add input[type="date"], .todo-add select { border: 1px solid var(--ln); border-radius: 10px; padding: 8px 10px; background: var(--bg); }
.todo-add input:focus, .todo-add select:focus { outline: none; border-color: var(--acc); box-shadow: 0 0 0 3px rgba(47,107,216,.15); }
.todo-list { list-style: none; padding: 0; margin: 0; }
.todo-item { display: flex; align-items: center; gap: 8px; background: var(--bg); border: 1px solid var(--ln); border-radius: 12px; padding: 8px 12px 8px 6px; margin-bottom: 8px; flex-wrap: wrap; box-shadow: var(--shadow); }
.todo-item.done { opacity: .55; }
.todo-item.done .todo-title { text-decoration: line-through; }
.todo-item.overdue { border-left: 4px solid var(--ng); }
.todo-toggle { margin: 0; }
.todo-check { border: none; background: none; cursor: pointer; line-height: 1; color: var(--acc); padding: 0; width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; }
.todo-main { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 2px; }
.todo-title { font-size: 14.5px; font-weight: 700; }
.todo-meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.todo-edit summary { list-style: none; cursor: pointer; }
.todo-edit summary::-webkit-details-marker { display: none; }
.todo-edit[open] { flex-basis: 100%; }
.todo-edit .todo-add { margin-top: 6px; }
.tag.pr-high { background: rgba(179,38,30,.10); color: var(--ng); }
.tag.pr-low { background: rgba(127,127,127,.10); color: var(--mut); }
.tag.due-over { background: rgba(179,38,30,.10); color: var(--ng); }
.tag.due-today { background: rgba(183,121,31,.12); color: var(--warn); }

/* ---------- 電話メモ / 在席 / タイムカード ---------- */
.data-table tr.is-unread td { background: rgba(183,121,31,.06); }
.data-table tr.me td { background: rgba(47,107,216,.05); }
.presence-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.presence-form form { margin: 0; }
.presence-form input[type="text"] { flex: 1; min-width: 200px; border: 1px solid var(--ln); border-radius: 8px; padding: 7px 10px; background: var(--bg); }
.pres { display: inline-block; font-size: 12px; padding: 2px 10px; border-radius: 99px; font-weight: 700; line-height: 1.6; }
.pres-in { background: rgba(10,135,103,.11); color: var(--c-jikan); }
.pres-away { background: rgba(183,121,31,.12); color: var(--warn); }
.pres-out { background: rgba(47,107,216,.10); color: var(--side); }
.pres-off { background: rgba(127,127,127,.10); color: var(--mut); }
.timecard-table tr.sun td:first-child { color: var(--ng); }
.timecard-table tr.sat td:first-child { color: var(--acc); }
.timecard-table tr.today td { background: rgba(10,135,103,.06); }
.timecard-table .todo-add input[type="time"] { border: 1px solid var(--ln); border-radius: 8px; padding: 5px 6px; }

/* ---------- 組織・メンバー ---------- */
.org-move { white-space: nowrap; }
.org-move form { display: inline; }
.org-move .linkbtn { padding: 0 4px; }
.org-group { margin-bottom: 14px; }
.org-group-title { font-weight: 700; font-size: 14px; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }

/* ---------- 横断検索 ---------- */
.search-big { display: flex; gap: 8px; margin-bottom: 18px; }
.search-big input { flex: 1; border: 1px solid var(--ln); border-radius: 10px; padding: 10px 14px; background: var(--bg); }
.search-big input:focus { outline: none; border-color: var(--acc); box-shadow: 0 0 0 3px rgba(47,107,216,.15); }
.search-summary { color: var(--mut); font-size: 14px; margin-bottom: 12px; }
.search-group { margin-bottom: 10px; }
.search-group .sec-title { display: flex; align-items: center; gap: 6px; }
.search-sub { color: var(--mut); font-size: 12px; margin-left: 8px; }

/* ---------- 通知 ---------- */
.notif-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.notif-head h2 { margin: 0; }
.notif-list { list-style: none; padding: 0; margin: 0; }
.notif { background: var(--bg); border: 1px solid var(--ln); border-radius: 10px; margin-bottom: 8px; box-shadow: var(--shadow); }
.notif.is-unread { border-left: 3px solid var(--acc); background: rgba(47,107,216,.04); }
.notif-link { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; }
.notif-text { color: var(--fg); }
.notif-time { color: var(--mut); font-size: 12px; white-space: nowrap; }

/* ---------- スマホ（≤780px）：ドロワー＋下部タブ、表→カード ---------- */
@media (max-width: 780px) {
  .layout { display: block; }
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; width: 302px; max-width: 86vw; height: 100vh; z-index: 30;
    transform: translateX(-100%); transition: transform .2s ease; box-shadow: 0 18px 48px rgba(16,24,40,.30); padding: 10px 10px 14px;
  }
  .sidebar.open { transform: none; }
  body.nav-open { overflow: hidden; }
  .s-close { display: inline-flex; }
  .s-user, .s-search { display: flex; }
  .mod { min-height: 44px; font-size: 14px; padding: 8px 12px; }
  .s-cap { padding: 6px 12px 0; }
  .main { min-height: 100vh; }
  .topbar { height: 56px; padding: 0 8px 0 6px; gap: 6px; }
  .nav-toggle { display: inline-flex; }
  .mod-chip { width: 28px; height: 28px; }
  .topsearch, .uchip, .logout { display: none; }
  .m-avatar { display: inline-flex; width: 32px; height: 32px; font-size: 13px; }
  .bell { width: 44px; height: 44px; }
  .content, .content.wide { padding: 14px 14px 90px; max-width: none; }
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; height: 64px; background: var(--bg); border-top: 1px solid var(--ln); z-index: 15; }
  .tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--mut2); font-size: 10.5px; font-weight: 700; border: 0; background: transparent; padding: 0; cursor: pointer; line-height: 1.3; }
  .tab .ti { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 28px; border-radius: 99px; }
  .tab.is-active { color: var(--mc, var(--acc)); }
  .tab.is-active .ti { background: var(--mt, rgba(47,107,216,.10)); }
  .kpi { min-width: 0; padding: 9px 12px 8px; border-radius: 10px; }
  .kpi-val { font-size: 18px; }
  .kpi-label { font-size: 11px; }
  .grid-form { grid-template-columns: 1fr; padding: 12px; }
  .two-col { grid-template-columns: 1fr; }
  .crm-subnav a { min-height: 40px; }
  .btn { min-height: 40px; }
  .btn.small { min-height: 36px; }
  .todo-check { width: 44px; height: 44px; }
  .todo-main { min-width: 0; }
  /* 表→カード（thead の見出しは data-label に写してある） */
  .data-table { display: block; border: 0; background: transparent; box-shadow: none; border-radius: 0; }
  .data-table thead { display: none; }
  .data-table tbody { display: block; }
  .data-table tr { display: block; background: var(--bg); border: 1px solid var(--ln); border-radius: 12px; box-shadow: var(--shadow); margin-bottom: 8px; padding: 6px 0; }
  .data-table td { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 5px 12px; border: 0; font-size: 13.5px; text-align: right; }
  .data-table td::before { content: attr(data-label); color: var(--mut); font-size: 11.5px; flex: 0 0 auto; text-align: left; padding-top: 2px; }
  .data-table td[data-label=""]::before { display: none; }
  .data-table td[data-label=""] { justify-content: flex-start; text-align: left; }
  .data-table td.empty { display: block; text-align: center; }
  .data-table tbody tr:hover td { background: transparent; }
  .data-table tr.is-unread td, .data-table tr.me td { background: transparent; }
  .data-table tr.is-unread { background: rgba(183,121,31,.06); }
  .data-table tr.me { background: rgba(47,107,216,.05); }
  .board-marks { width: auto; }
  .cal-header h2 { min-width: 0; font-size: 16px; }
  .cal-cell { height: 64px; padding: 2px 3px; }
  .cal-event { font-size: 9.5px; padding: 1px 3px; }
  .cal-event::before, .cal-time { display: none; }
  .kanban .kcol { width: 200px; }
  .gantt-label { width: 100px; }
  .search-big { flex-direction: column; }
  .detail-head h2 { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) { .sidebar { transition: none; } }
