/* 組織マップ (public/orgMap.js) — the company as cards, a dot per person, a panel that slides in over it. */

.om-toolbar { display: flex; flex-wrap: wrap; gap: var(--ui-sp-3); align-items: center; margin-bottom: var(--ui-sp-2); }
.om-seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--ui-sunken); border: 1px solid var(--ui-border); border-radius: var(--ui-r); }
.om-seg button { height: 30px; padding: 0 14px; border: 0; border-radius: var(--ui-r-sm); background: transparent; font: inherit; font-size: var(--ui-fs-sm); font-weight: 500; color: var(--ui-text-3); cursor: pointer; white-space: nowrap; }
.om-seg button.is-on { background: var(--ui-surface); color: var(--ui-text); font-weight: 600; box-shadow: 0 1px 2px rgba(16, 24, 40, .08); }
.om-search { flex: 0 1 240px; min-width: 160px; height: 36px; border-radius: var(--ui-r-pill); }
.om-counts { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; align-items: center; }
.om-count { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 1px solid var(--ui-border); border-radius: var(--ui-r-pill); background: var(--ui-surface); font: inherit; font-size: var(--ui-fs-sm); color: var(--ui-text-2); cursor: pointer; }
.om-count b { font-size: 15px; color: var(--ui-late, #c62828); font-variant-numeric: tabular-nums; }
.om-count.is-zero b { color: var(--ui-text-4); }
.om-count.is-on { border-color: var(--ui-accent); background: var(--ui-accent-soft); }

.om-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; margin: 0 0 var(--ui-sp-3); font-size: var(--ui-fs-xs); color: var(--ui-text-3); }
.om-leg { display: inline-flex; align-items: center; gap: 6px; }
.om-dot.om-leg-dot { width: 14px; height: 14px; min-width: 14px; font-size: 0; pointer-events: none; transform: none; }
.om-dot.om-leg-dot.is-me { box-shadow: 0 0 0 2px #fff, 0 0 0 3px #9cc2ff; }
.om-dot.om-leg-dot.is-seenby { box-shadow: 0 0 0 2px #8250df; }
.om-pick { color: var(--ui-text-2); }

.om-map { position: relative; max-height: calc(100vh - 250px); min-height: 360px; overflow: auto; padding: 2px 2px var(--ui-sp-6); }
.om-banner { margin-bottom: var(--ui-sp-3); padding: 8px 12px; border-radius: var(--ui-r); background: #fff1e5; color: #953800; font-size: var(--ui-fs-sm); font-weight: 600; }
.om-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; align-items: start; }

.om-card { background: var(--ui-surface); border: 1px solid var(--ui-border); border-radius: var(--ui-r-lg); box-shadow: var(--ui-shadow-card); padding: 10px 10px 4px; }
.om-card.is-top { border-color: var(--ui-accent-line); }
.om-card.is-unassigned { border-color: #ffb3ad; background: #fffafa; }
.om-card.is-unassigned .om-card-head span:first-child { color: #c62828; }
.om-card.is-meetings { background: #fff1e5; border-color: #ffc591; }
.om-card-head { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font-weight: 700; font-size: var(--ui-fs-sm); color: var(--ui-text); }
.om-card-head .om-n { margin-left: auto; font-weight: 500; color: var(--ui-text-3); font-size: 11.5px; }
.om-fold { width: 22px; height: 22px; border: 0; background: none; color: var(--ui-text-3); cursor: pointer; font-size: 12px; padding: 0; }
.om-mlist { margin: 0; padding: 0 0 6px 4px; list-style: none; font-size: var(--ui-fs-sm); line-height: 1.8; }

.om-box { border: 1px dashed #d4dae1; border-radius: 10px; padding: 6px 7px 7px; margin-bottom: 7px; transition: background .12s, border-color .12s; }
.om-box.is-top, .om-box.is-unassigned { border: 0; padding: 0; }
.om-box.is-drop { border: 2px solid var(--ui-accent); background: var(--ui-accent-soft); }
.om-box-title { font-size: 10.5px; color: var(--ui-text-3); margin-bottom: 5px; line-height: 1.3; }
.om-dots { display: flex; flex-wrap: wrap; gap: 6px; }

.om-dot { position: relative; width: 30px; height: 30px; min-width: 30px; border-radius: 50%; border: 0; background: #e9edf1; color: #4b5563; display: inline-flex; align-items: center; justify-content: center; font: inherit; font-size: 11.5px; font-weight: 700; cursor: pointer; padding: 0; transition: transform .1s, opacity .12s, box-shadow .12s; }
.om-dot:hover { transform: scale(1.12); }
.om-dot:focus-visible { outline: none; box-shadow: var(--ui-focus); }
.om-dot.is-lead { box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px #57606a; }
.om-dot.is-me { background: var(--ui-accent); color: #fff; box-shadow: 0 0 0 3px #fff, 0 0 0 5px #9cc2ff; }
.om-dot.is-see { background: #2da44e; color: #fff; }
.om-dot.is-grant { background: #e16f24; color: #fff; }
.om-dot.is-seenby { background: #f3eefe; color: #6639ba; box-shadow: 0 0 0 3px #8250df; }
.om-dot.is-hit { box-shadow: 0 0 0 3px #ffd33d; }
.om-dot.is-dim { opacity: .22; }
.om-dot.is-sel { transform: scale(1.15); }
.om-link { position: absolute; left: -5px; bottom: -5px; font-size: 10px; line-height: 1; }
.om-warn { position: absolute; right: -2px; top: -2px; width: 9px; height: 9px; border-radius: 50%; background: #cf222e; border: 1.5px solid #fff; }

/* ── the person panel: slides in from the right, OVER the map ─────────── */
.om-sheet { position: fixed; top: 0; right: 0; bottom: 0; z-index: 960; width: min(460px, 100vw); display: flex; flex-direction: column; background: var(--ui-surface, #fff); border-left: 1px solid var(--ui-border); box-shadow: -12px 0 32px -12px rgba(16, 24, 40, .28); }
.om-sheet.is-enter { animation: om-slide .18s ease-out; }
@keyframes om-slide { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .om-sheet.is-enter { animation: none; } }
.om-sheet-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px 12px; border-bottom: 1px solid var(--ui-border); }
.om-avatar { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--ui-accent); color: #fff; font-size: 18px; font-weight: 700; }
.om-sheet-title { min-width: 0; flex: 1; }
.om-sheet-title h3 { margin: 0; font-size: 17px; }
.om-crumb { margin-top: 2px; font-size: 11.5px; color: var(--ui-text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.om-x { width: 32px; height: 32px; border: 1px solid var(--ui-border); border-radius: 50%; background: var(--ui-surface); cursor: pointer; color: var(--ui-text-3); }
.om-sheet-body { flex: 1; overflow: auto; padding: 12px 18px 28px; }
.om-links { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.om-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.om-nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 6px; }
.om-nums div { background: var(--ui-sunken); border-radius: 10px; padding: 9px 6px; text-align: center; }
.om-nums b { display: block; font-size: 21px; font-variant-numeric: tabular-nums; }
.om-nums span { font-size: 10.5px; color: var(--ui-text-3); }
.om-sec { margin-top: 16px; }
.om-sec h4 { margin: 0 0 6px; font-size: 13px; }
.om-note { margin: 0 0 6px; font-size: 11.5px; color: var(--ui-text-3); }
.om-suggest { background: #f6fbff; border: 1px solid #cfe3ff; border-radius: 12px; padding: 10px 12px; }
.om-row { display: flex; align-items: center; gap: 6px; padding: 5px 0; border-bottom: 1px solid var(--ui-border); font-size: var(--ui-fs-sm); }
.om-row:last-of-type { border-bottom: 0; }
.om-row-main { flex: 1; min-width: 0; }
.om-small { height: 28px !important; padding: 0 10px !important; font-size: 12px !important; }
.om-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.om-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 6px 4px 10px; border-radius: var(--ui-r-pill); background: #fff1e5; color: #953800; font-size: 12px; border: 0; font-family: inherit; }
.om-chip.is-all, .om-chip.is-branch { background: #fde8e8; color: #9a1c1c; }
.om-chip.is-link { background: var(--ui-sunken); color: var(--ui-text-2); padding-right: 10px; }
.om-chip.is-seen { background: #f3eefe; color: #6639ba; cursor: pointer; padding-right: 6px; }
.om-why { background: #fff; border-radius: 8px; padding: 0 6px; font-size: 10.5px; color: #57606a; }
.om-chip-x { width: 18px; height: 18px; border-radius: 50%; border: 0; background: #fff; color: #57606a; font-size: 10px; cursor: pointer; padding: 0; }
.om-plus { display: flex; gap: 6px; margin-top: 8px; }
.om-plus-btn { flex: 1; height: 34px; border: 1.5px dashed #b6c0cb; border-radius: 10px; background: transparent; color: var(--ui-accent); font: inherit; font-size: 12.5px; cursor: pointer; }
.om-plus-btn:hover { border-color: var(--ui-accent); background: var(--ui-accent-soft); }
.om-tile-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.om-tile { display: flex; flex-direction: column; gap: 2px; padding: 8px 6px; border: 1px solid var(--ui-border); border-radius: 10px; background: var(--ui-surface); font: inherit; cursor: pointer; text-align: center; }
.om-tile-name { font-size: 11.5px; font-weight: 600; color: var(--ui-text-2); }
.om-tile-level { font-size: 11px; color: var(--ui-text-4); }
.om-tile.is-view { border-color: #9cc2ff; background: #eaf2ff; }
.om-tile.is-view .om-tile-level { color: var(--ui-accent); }
.om-tile.is-edit { border-color: var(--ui-accent); background: var(--ui-accent); }
.om-tile.is-edit .om-tile-name, .om-tile.is-edit .om-tile-level { color: #fff; }
.om-tile.is-locked { cursor: not-allowed; opacity: .85; }

/* ── dialogs + toast ─────────────────────────────────────────────────── */
.om-backdrop { position: fixed; inset: 0; z-index: 970; background: rgba(15, 23, 42, .32); display: flex; align-items: center; justify-content: center; padding: 16px; }
.om-dialog { width: min(440px, 100%); max-height: 80vh; display: flex; flex-direction: column; gap: 10px; background: var(--ui-surface); border-radius: 14px; padding: 18px; box-shadow: 0 20px 48px rgba(15, 23, 42, .25); }
.om-dialog h4 { margin: 0; font-size: 14px; }
.om-dialog p { margin: 0; line-height: 1.6; }
.om-dialog-foot { display: flex; justify-content: flex-end; gap: 8px; }
.om-pick-list { list-style: none; margin: 0; padding: 0; overflow: auto; flex: 1; border: 1px solid var(--ui-border); border-radius: 10px; }
.om-pick-list li { border-bottom: 1px solid var(--ui-border); }
.om-pick-list li:last-child { border-bottom: 0; }
.om-pick-list label { display: flex; gap: 10px; align-items: center; padding: 8px 10px; cursor: pointer; }
.om-pick-main { display: flex; flex-direction: column; }
.om-pick-main small { color: var(--ui-text-3); font-size: 11px; }
.om-pick-list .om-note { padding: 10px; }
.om-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 1100; display: flex; gap: 12px; align-items: center; padding: 10px 16px; border-radius: 10px; background: #1f2328; color: #fff; font-size: var(--ui-fs-sm); box-shadow: 0 8px 24px rgba(0, 0, 0, .25); }
.om-toast.is-bad { background: #9a1c1c; }
.om-toast-btn { border: 0; background: transparent; color: #9cc2ff; font: inherit; font-weight: 700; cursor: pointer; }
.om-leftgrants { margin-bottom: var(--ui-sp-3); padding: 8px 12px; }

@media (max-width: 700px) {
  .om-counts { margin-left: 0; }
  .om-grid { grid-template-columns: 1fr; }
}

/* 「見える会議」 — every meeting the person opens, coloured by the rule that opens it */
.om-num-btn { background: var(--ui-sunken); border: 0; border-radius: 10px; padding: 9px 6px; text-align: center; font: inherit; cursor: pointer; color: inherit; }
.om-num-btn:hover { background: var(--ui-accent-soft); }
.om-num-btn b { display: block; font-size: 21px; font-variant-numeric: tabular-nums; }
.om-num-btn span { font-size: 10.5px; color: var(--ui-text-3); }
.om-pm-total { margin-left: 6px; padding: 0 7px; border-radius: var(--ui-r-pill); background: var(--ui-sunken); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.om-pm-bar { display: flex; height: 10px; border-radius: 6px; overflow: hidden; gap: 2px; margin: 4px 0 8px; }
.om-pm-bar span { min-width: 4px; cursor: pointer; }
.om-pm-filters { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.om-pm-f { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px; border: 1px solid var(--ui-border); border-radius: var(--ui-r-pill); background: var(--ui-surface); font: inherit; font-size: 11.5px; color: var(--ui-text-2); cursor: pointer; }
.om-pm-f b { font-variant-numeric: tabular-nums; color: var(--ui-text-1, inherit); }
.om-pm-f i { width: 8px; height: 8px; border-radius: 50%; }
.om-pm-f.is-on { border-color: var(--ui-accent); background: var(--ui-accent-soft); color: var(--ui-accent); }
.om-pm-search { width: 100%; box-sizing: border-box; margin-bottom: 6px; }
.om-pm-list { list-style: none; margin: 0; padding: 0; max-height: 340px; overflow-y: auto; }
.om-pm-list li { display: grid; grid-template-columns: 78px 1fr auto; gap: 8px; align-items: center; padding: 6px 2px; border-bottom: 1px solid var(--ui-border); font-size: 12px; }
.om-pm-list li.om-note { display: block; border: 0; }
.om-pm-date { color: var(--ui-text-3); font-variant-numeric: tabular-nums; }
.om-pm-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.om-pm-why { padding: 2px 8px; border-radius: var(--ui-r-pill); font-size: 10.5px; white-space: nowrap; max-width: 170px; overflow: hidden; text-overflow: ellipsis; }
.om-pm-more { margin-top: 6px; }
.om-pm-bar .is-own, .om-pm-f.is-own i { background: #1f883d; }   .om-pm-why.is-own { background: #dafbe1; color: #116329; }
.om-pm-bar .is-invited, .om-pm-f.is-invited i { background: #54aeff; } .om-pm-why.is-invited { background: #ddf4ff; color: #0550ae; }
.om-pm-bar .is-shared, .om-pm-f.is-shared i { background: #bf8700; } .om-pm-why.is-shared { background: #fff8c5; color: #7d4e00; }
.om-pm-bar .is-people, .om-pm-f.is-people i { background: #fb8f44; } .om-pm-why.is-people { background: #fff1e5; color: #953800; }
.om-pm-bar .is-wide, .om-pm-f.is-wide i { background: #cf222e; }   .om-pm-why.is-wide { background: #ffebe9; color: #a40e26; }
.om-pm-bar .is-hr, .om-pm-f.is-hr i { background: #8250df; }       .om-pm-why.is-hr { background: #fbefff; color: #6639ba; }
.om-pm-bar .is-other, .om-pm-f.is-other i { background: #8c959f; } .om-pm-why.is-other { background: var(--ui-sunken); color: var(--ui-text-3); }
.om-tile-views { font-size: 10px; color: #9a6700; }
.om-tile.is-edit .om-tile-views { color: #fff8c5; }
@media (max-width: 520px) { .om-pm-list li { grid-template-columns: 1fr; gap: 3px; } .om-pm-why { max-width: none; white-space: normal; justify-self: start; } }
/* 「見るとよさそうな会議」 */
.om-msuggest { margin-top: 12px; }
.om-ms-title { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.om-ms-why { display: block; font-size: 11px; color: var(--ui-text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
