/* org-v2.css — Organization page, professional layout (release 2026-09-26) */
/* 20261108n: the Chart view (.oc2-*) is at the end of this file */
body { overflow: auto !important; background: var(--bf-ground, #F5F7F6); }
.og-main { margin-top: var(--topbar-h, 58px); padding: 24px 28px 40px; max-width: 1680px; margin-left: auto; margin-right: auto; color: var(--bf-ink, #15201A); font-size: 14px; }
.og-main * { box-sizing: border-box; }
.og-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.og-title h1 { margin: 0; font-size: 24px; font-weight: 600; letter-spacing: -.01em; }
.og-title p { margin: 4px 0 0; font-size: 13px; color: var(--bf-muted, #56655D); }
.og-title p b { color: var(--bf-ink, #15201A); font-weight: 600; }
.og-actions { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; }
.og-mgr-actions { display: flex; gap: 8px; }
.og-mgr-actions.d-none { display: none !important; }
.og-ctl { display: flex; flex-direction: column; gap: 4px; margin: 0; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--bf-muted, #56655D); }
.og-ctl select { height: 36px; min-width: 230px; border: 1px solid var(--bf-line, #DCE3DF); border-radius: 8px; padding: 0 30px 0 10px; font-size: 13px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--bf-ink, #15201A); background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 16 16'%3E%3Cpath fill='%2356655D' d='M1.6 5.1 8 11.5l6.4-6.4-1.1-1.1L8 9.3 2.7 4z'/%3E%3C/svg%3E") no-repeat right 10px center; appearance: none; outline: 0; }
.og-ctl select:focus { border-color: var(--bf-green, #007A3D); box-shadow: 0 0 0 3px rgba(0,122,61,.12); }
.og-btn { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--bf-line, #DCE3DF); background: #fff; color: var(--bf-ink, #15201A); font-size: 13px; font-weight: 600; cursor: pointer; margin: 0; white-space: nowrap; }
.og-btn-primary { background: var(--bf-green, #007A3D); border-color: var(--bf-green, #007A3D); color: #fff; }
.og-btn-primary:hover { background: var(--bf-green-dark, #005C2E); }
.og-btn-danger { color: #b3261e; padding: 0 11px; }
.og-btn-danger:hover { background: #FDECEC; border-color: #F3B8B5; }
.og-btn.d-none { display: none !important; }
.og-upload-status { font-size: 12px; align-self: center; }

.og-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--bf-line, #DCE3DF); margin-bottom: 16px; overflow-x: auto; }
.og-tab { display: inline-flex; align-items: center; gap: 7px; height: 42px; padding: 0 16px; border: 0; border-bottom: 2px solid transparent; background: transparent; font-size: 14px; font-weight: 500; color: var(--bf-muted, #56655D); margin-bottom: -1px; white-space: nowrap; }
.og-tab:hover { color: var(--bf-ink, #15201A); }
.og-tab.on { color: var(--bf-green-dark, #005C2E); border-bottom-color: var(--bf-green, #007A3D); font-weight: 600; }
.og-panel[hidden] { display: none !important; }
#org-assignment-section { height: auto !important; overflow: visible !important; display: block; }

.og-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
@media (max-width: 1300px) { .og-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .og-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.og-kpi { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 12px 14px; background: #fff; border: 1px solid var(--bf-line, #DCE3DF); border-radius: 10px; text-align: left; min-width: 0; color: inherit; font: inherit; }
button.og-kpi:not(:disabled) { cursor: pointer; transition: border-color .12s, box-shadow .12s; }
button.og-kpi:not(:disabled):hover { border-color: var(--bf-green, #007A3D); box-shadow: 0 2px 8px rgba(21,32,26,.08); }
.og-kpi:disabled { opacity: 1; }
.og-kpi span { font-size: 12px; font-weight: 500; color: var(--bf-muted, #56655D); }
.og-kpi b { font-size: 24px; font-weight: 600; line-height: 1.15; font-variant-numeric: tabular-nums; }
.og-kpi i { font-style: normal; font-size: 12px; color: var(--bf-muted, #56655D); }
.og-kpi-good b { color: var(--bf-green-dark, #005C2E); }
.og-kpi-muted b { color: #56655D; }
.og-kpi-warn { border-color: #F1D29A; background: #FFFBF1; } .og-kpi-warn b { color: #8a5a00; }
.og-kpi-info { border-color: #B7D3F6; background: #F4F8FE; } .og-kpi-info b { color: #184f95; }

.og-struct { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1000px) { .og-struct { grid-template-columns: 1fr; } }
.og-rail { background: #fff; border: 1px solid var(--bf-line, #DCE3DF); border-radius: 10px; padding: 10px; position: sticky; top: calc(var(--topbar-h, 58px) + 12px); max-height: calc(100vh - var(--topbar-h, 58px) - 24px); display: flex; flex-direction: column; }
.og-rail-list { overflow-y: auto; margin-top: 8px; display: flex; flex-direction: column; gap: 2px; }
.og-rail-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; align-items: center; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; text-align: left; color: inherit; }
.og-rail-item:hover { background: #F3F5F4; }
.og-rail-item.on { background: var(--bf-green-soft, #E6F2EC); box-shadow: inset 3px 0 0 var(--bf-green, #007A3D); }
.og-rail-t { display: flex; flex-direction: column; min-width: 0; }
.og-rail-t b { font-size: 13px; font-weight: 600; }
.og-rail-t small { font-size: 12px; color: var(--bf-muted, #56655D); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.og-rail-n { font-size: 12px; font-weight: 600; color: var(--bf-muted, #56655D); font-variant-numeric: tabular-nums; }
.og-rail-bar { grid-column: 1 / -1; height: 3px; border-radius: 2px; background: #D6D5CF; overflow: hidden; }
.og-rail-bar span { display: block; height: 100%; background: var(--bf-green, #007A3D); }

.og-search { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px; border: 1px solid var(--bf-line, #DCE3DF); border-radius: 8px; background: #fff; color: var(--bf-muted, #56655D); margin: 0; min-width: 240px; }
.og-search:focus-within { border-color: var(--bf-green, #007A3D); box-shadow: 0 0 0 3px rgba(0,122,61,.12); }
.og-search input { border: 0; outline: 0; flex: 1; min-width: 0; font-size: 13px; background: transparent; }
.og-search-rail { min-width: 0; }

.og-stage { min-width: 0; }
.og-stage-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.og-crumb { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.og-crumb button { border: 0; background: transparent; padding: 0; color: var(--bf-green-dark, #005C2E); font-weight: 600; }
.og-crumb button:hover { text-decoration: underline; }
.og-crumb .bi { font-size: 11px; color: var(--bf-muted, #56655D); }
.og-stage-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.og-switch { display: inline-flex; align-items: center; gap: 7px; margin: 0; font-size: 13px; color: var(--bf-ink, #15201A); cursor: pointer; }
.og-switch input { accent-color: var(--bf-green, #007A3D); width: 16px; height: 16px; }
.og-seg { display: inline-flex; background: #EEF2EF; border-radius: 8px; padding: 3px; gap: 2px; }
.og-seg button { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border: 0; border-radius: 6px; background: transparent; font-size: 13px; font-weight: 500; color: var(--bf-ink, #15201A); }
.og-seg button b { font-weight: 600; color: var(--bf-muted, #56655D); }
.og-seg button.on { background: #fff; box-shadow: 0 1px 3px rgba(21,32,26,.15); font-weight: 600; }

.og-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.og-dcard { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; background: #fff; border: 1px solid var(--bf-line, #DCE3DF); border-radius: 10px; text-align: left; color: inherit; transition: border-color .12s, box-shadow .12s; }
.og-dcard:hover { border-color: var(--bf-green, #007A3D); box-shadow: 0 4px 14px rgba(21,32,26,.08); }
.og-dcard-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.og-dcard-h b { font-size: 16px; font-weight: 700; color: var(--bf-green-dark, #005C2E); }
.og-dcard-h span { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.og-dcard-n { font-size: 13px; color: var(--bf-muted, #56655D); line-height: 1.35; min-height: 35px; }
.og-dcard-dir { display: flex; align-items: center; gap: 6px; font-size: 13px; flex-wrap: wrap; }
.og-dcard-dir .bi { color: var(--bf-muted, #56655D); }
.og-meter { height: 6px; border-radius: 3px; background: #D6D5CF; overflow: hidden; }
.og-meter span { display: block; height: 100%; background: var(--bf-green, #007A3D); }
.og-dcard-f { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--bf-muted, #56655D); }
.og-dcard-f span { display: inline-flex; align-items: center; gap: 5px; }
.og-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.og-dot-active { background: var(--bf-green, #007A3D); }
.og-dot-demob { background: #A3A29A; }
.og-warn { color: #8a5a00; font-weight: 600; }
.og-acting { display: inline-block; font-size: 11px; font-weight: 600; font-style: normal; color: #8a5a00; background: #FFF1CC; border-radius: 10px; padding: 1px 7px; vertical-align: 1px; }

.og-dhead { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 380px); gap: 16px; padding: 18px 20px; background: #fff; border: 1px solid var(--bf-line, #DCE3DF); border-radius: 10px; margin-bottom: 14px; }
@media (max-width: 900px) { .og-dhead { grid-template-columns: 1fr; } }
.og-code { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .04em; color: var(--bf-green-dark, #005C2E); background: var(--bf-green-soft, #E6F2EC); border-radius: 6px; padding: 2px 8px; }
.og-dhead h2 { margin: 8px 0 10px; font-size: 20px; font-weight: 600; }
.og-dstats { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--bf-muted, #56655D); }
.og-dstats span { display: inline-flex; align-items: center; gap: 6px; }
.og-dstats b { color: var(--bf-ink, #15201A); font-weight: 600; }
.og-dir, .og-mgr { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.og-dir { padding: 12px 14px; border-radius: 8px; background: #F7F9F8; }
.og-role { font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--bf-muted, #56655D); }
.og-dir b, .og-mgr b { font-size: 14px; font-weight: 600; }
.og-contact { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; margin-top: 2px; }
.og-contact a, .og-contact > span { display: inline-flex; align-items: center; gap: 5px; color: var(--bf-muted, #56655D); text-decoration: none; max-width: 100%; }
.og-contact a:hover { color: var(--bf-green-dark, #005C2E); }
.og-contact a span, .og-contact > span span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.og-div { background: #fff; border: 1px solid var(--bf-line, #DCE3DF); border-radius: 10px; padding: 14px 16px; margin-bottom: 12px; }
.og-div-h { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 380px); gap: 12px; align-items: start; }
@media (max-width: 900px) { .og-div-h { grid-template-columns: 1fr; } }
.og-div-h h3 { margin: 0; font-size: 15px; font-weight: 600; }
.og-div-h p { margin: 3px 0 0; font-size: 12px; color: var(--bf-muted, #56655D); }
.og-people { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.og-person { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; padding: 3px 10px 3px 3px; border: 1px solid #EEF2EF; border-radius: 16px; }
.og-person em { font-style: normal; font-size: 11px; font-weight: 600; border-radius: 12px; padding: 2px 8px; }
.og-r-eng { background: #E3EEFC; color: #184f95; } .og-r-for { background: #FFF1CC; color: #6b4700; } .og-r-crd { background: #EDE8FB; color: #4a3aa7; } .og-r-oth { background: #EEF2EF; color: #15201A; }
.og-rigs { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; margin-top: 12px; }
.og-rig { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: auto auto; gap: 0 8px; align-items: center; padding: 8px 10px; border: 1px solid var(--bf-line, #DCE3DF); border-radius: 8px; background: #fff; }
.og-rig-dot { width: 8px; height: 8px; border-radius: 50%; grid-row: 1 / 3; }
.og-rig-active .og-rig-dot { background: var(--bf-green, #007A3D); }
.og-rig-demob { background: #FAFAF8; }
.og-rig-demob .og-rig-dot { background: #A3A29A; }
.og-rig-n { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.og-rig-n b { font-size: 13px; font-weight: 600; white-space: nowrap; }
.og-rig-n small { font-size: 11px; color: var(--bf-muted, #56655D); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.og-rig-st { grid-column: 2; font-size: 11px; color: var(--bf-muted, #56655D); }
.og-rig-active .og-rig-st { color: var(--bf-green-dark, #005C2E); }
.og-rig-act { grid-column: 3; grid-row: 1 / 3; display: flex; gap: 2px; }
.og-rig-act button, .og-rig-act a, .og-row-act button, .og-row-act a { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 6px; background: transparent; color: var(--bf-muted, #56655D); text-decoration: none; font-size: 13px; }
.og-rig-act button:hover, .og-rig-act a:hover, .og-row-act button:hover, .og-row-act a:hover { background: #EEF2EF; color: var(--bf-green-dark, #005C2E); }

.og-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 48px 16px; text-align: center; background: #fff; border: 1px dashed var(--bf-line, #DCE3DF); border-radius: 10px; color: var(--bf-muted, #56655D); }
.og-empty .bi { font-size: 32px; opacity: .5; }
.og-empty b { color: var(--bf-ink, #15201A); font-size: 15px; }
.og-empty-s { padding: 14px; font-size: 13px; color: var(--bf-muted, #56655D); text-align: center; }

.og-chart-box { position: relative; height: calc(100vh - var(--topbar-h, 58px) - 150px); min-height: 520px; border: 1px solid var(--bf-line, #DCE3DF); border-radius: 10px; overflow: hidden; background: #F7F9F8; }
.og-chart-box .oc-stage { position: absolute; inset: 0; }

.og-card { background: #fff; border: 1px solid var(--bf-line, #DCE3DF); border-radius: 10px; padding: 16px; }
.og-card-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.og-card-h h3 { margin: 0; font-size: 16px; font-weight: 600; }
.og-card-h p { margin: 3px 0 0; font-size: 13px; color: var(--bf-muted, #56655D); max-width: 760px; }
.og-tw { max-height: calc(100vh - 260px); min-height: 200px; overflow: auto; border: 1px solid #EEF2EF; border-radius: 8px; }
.og-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.og-table th { position: sticky; top: 0; z-index: 1; background: #F3F5F4; color: var(--bf-ink, #15201A); font-size: 12px; font-weight: 600; text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--bf-line, #DCE3DF); white-space: nowrap; }
.og-table td { padding: 8px 10px; border-bottom: 1px solid #EEF2EF; white-space: nowrap; }
.og-table tbody tr:hover td { background: #F7F9F8; }
.og-table a { color: var(--bf-green-dark, #005C2E); text-decoration: none; }
.og-table a:hover { text-decoration: underline; }
.og-row-act { display: flex; gap: 2px; }
.og-pill { display: inline-block; font-size: 11px; font-weight: 600; border-radius: 10px; padding: 2px 8px; background: #EEF2EF; color: #15201A; }
.og-pill-active, .og-pill-added, .og-pill-reactivated { background: var(--bf-green-soft, #E6F2EC); color: #005C2E; }
.og-pill-demob, .og-pill-demobilized { background: #EEEDE8; color: #56655D; }
.og-pill-removed { background: #FDECEC; color: #9B1C1C; }
.og-pill-moved { background: #E3EEFC; color: #184f95; }
.og-pill-manager, .og-pill-director { background: #FFF1CC; color: #6b4700; }
.og-chg-tiles { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
@media (max-width: 1100px) { .og-chg-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.og-chg { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 8px; background: #F7F9F8; }
.og-chg b { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.og-chg span { font-size: 12px; color: var(--bf-muted, #56655D); }
/* bf-table-tools styles th.bf-th for tables marked .bf-tt: keep our header look */
table.og-table.bf-tt th.bf-th { background: #F3F5F4; color: var(--bf-ink, #15201A); }

/* ── Contacts: same shell as the rest of the page ─────────────────────── */
#org-contacts-section { height: calc(100vh - var(--topbar-h, 58px) - 150px) !important; min-height: 560px; border: 1px solid var(--bf-line, #DCE3DF); border-radius: 10px; background: #fff; overflow: hidden; }
#org-contacts-section .ct-bar { padding: 10px 14px; gap: 10px; }
#org-contacts-section .ct-bar-search { height: 36px; min-width: 260px; max-width: 360px; border-width: 1px; border-radius: 8px; }
#org-contacts-section .ct-bar-search input { font-size: 13px; }
#org-contacts-section .ct-src-btn, #org-contacts-section .ct-toolbar-btn { font-size: 13px !important; }
#org-contacts-section .ct-dept-pills { flex-wrap: nowrap !important; overflow-x: auto; padding: 8px 14px; scrollbar-width: thin; }
#org-contacts-section .ct-dept-pill { font-size: 12px !important; white-space: nowrap; flex-shrink: 0; }
#org-contacts-section .ct-list-panel { width: 340px; }
#org-contacts-section .ct-list-hdr, #org-contacts-section .ct-list-hdr-count { font-size: 12px !important; }
#org-contacts-section .ct-list-item { padding: 11px 14px; gap: 12px; }
#org-contacts-section .ct-list-name { font-size: 14px; }
#org-contacts-section .ct-list-sub { font-size: 12px; }
#org-contacts-section .ct-list-badge { font-size: 11px; border-radius: 10px; padding: 1px 7px; }
#org-contacts-section .ct-list-hdr-count { font-size: 12px; }
#org-contacts-section .ct-detail-panel { background: #F7F9F8; }
#org-contacts-section .ct-detail-name { font-size: 20px !important; }
#org-contacts-section .ct-detail-role, #org-contacts-section .ct-dept-fullname { font-size: 13px !important; }
#org-contacts-section .ct-section-label, #org-contacts-section .ct-field-label, #org-contacts-section .ct-history-title { font-size: 11px !important; letter-spacing: .05em; }
#org-contacts-section .ct-field-value { font-size: 14px !important; }
#org-contacts-section .ct-import-card-title { font-size: 14px !important; }
#org-contacts-section .ct-import-card-desc { font-size: 12px !important; }
.og-dcard-h span { white-space: nowrap; }
#org-contacts-section .ct-detail-card { max-width: 760px; border-radius: 12px; box-shadow: 0 2px 10px rgba(21,32,26,.06); }
#org-contacts-section .ct-detail-hdr { background: #fff; border-bottom: 1px solid var(--bf-line, #DCE3DF); box-shadow: inset 0 4px 0 var(--bf-green, #007A3D); padding: 22px 22px 18px; }
#org-contacts-section .ct-detail-avatar { width: 64px; height: 64px; font-size: 20px; border: 0; box-shadow: none; }
#org-contacts-section .ct-detail-name { color: var(--bf-ink, #15201A); text-shadow: none; font-weight: 600; }
#org-contacts-section .ct-detail-role { color: var(--bf-green-dark, #005C2E); background: var(--bf-green-soft, #E6F2EC); text-transform: none; letter-spacing: 0; font-size: 12px !important; font-weight: 600; border-radius: 10px; padding: 2px 10px; }
#org-contacts-section .ct-badge-src-org { background: var(--bf-green-soft, #E6F2EC); color: var(--bf-green-dark, #005C2E); border: 0; font-size: 11px; border-radius: 10px; }
#org-contacts-section .ct-badge-src-field { background: #E3EEFC; color: #184f95; border: 0; font-size: 11px; border-radius: 10px; }
#org-contacts-section .ct-detail-hdr .ct-fav-btn { color: #A3A29A; }
#org-contacts-section .ct-detail-hdr .ct-fav-btn.active { color: #f5a623; }

/* ── Chart view, release 20261108n: readable org chart, drill-down by department ───────────────────── */
.oc2 { --oc-line: #B9C7BF; --oc-green: var(--bf-green, #007A3D); --oc-ink: var(--bf-ink, #15201A); --oc-muted: var(--bf-muted, #56655D); padding: 4px 0 8px; }
.oc2-col { display: flex; flex-direction: column; align-items: center; }
.oc2-stem { width: 2px; height: 22px; background: var(--oc-line); }
.oc2-node { background: #fff; border: 1px solid var(--bf-line, #DCE3DF); border-radius: 12px; box-shadow: 0 1px 2px rgba(21,32,26,.05); padding: 12px 14px; text-align: left; min-width: 0; }
.oc2-node b { display: block; font-size: 15px; font-weight: 600; line-height: 1.3; color: var(--oc-ink); }
.oc2-node small { display: block; margin-top: 4px; font-size: 12px; color: var(--oc-muted); }
.oc2-node small .og-dot { vertical-align: 0; margin-right: 2px; }
.oc2-k { display: block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--oc-green); margin-bottom: 2px; }
.oc2-role { display: block; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--oc-muted); margin-bottom: 2px; }
.oc2-root, .oc2-dept { min-width: 340px; max-width: 560px; text-align: center; border-top: 4px solid var(--oc-green); }
.oc2-dir { min-width: 300px; max-width: 460px; text-align: center; border-top: 4px solid #2F5FA7; }
.oc2-dir .og-contact { justify-content: center; }
/* all departments */
.oc2-deps { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; padding: 16px; border: 2px solid var(--oc-line); border-radius: 14px; background: rgba(255,255,255,.55); }
.oc2-dep { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; background: #fff; border: 1px solid var(--bf-line, #DCE3DF); border-radius: 12px; text-align: left; color: inherit; font: inherit; cursor: pointer; transition: border-color .12s, box-shadow .12s, opacity .12s; }
.oc2-dep:hover, .oc2-dep:focus-visible { border-color: var(--oc-green); box-shadow: 0 4px 14px rgba(21,32,26,.10); outline: 0; }
.oc2-dep-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.oc2-dep-h b { font-size: 15px; color: var(--oc-green); letter-spacing: .02em; }
.oc2-dep-h span { font-size: 12px; color: var(--oc-muted); font-variant-numeric: tabular-nums; }
.oc2-dep-n { font-size: 13px; font-weight: 600; color: var(--oc-ink); line-height: 1.35; min-height: 2.7em; }
.oc2-dep-dir { display: flex; gap: 6px; align-items: flex-start; font-size: 12.5px; color: var(--oc-ink); }
.oc2-dep-dir i { color: #2F5FA7; margin-top: 1px; }
.oc2-dep-f { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--oc-muted); }
.oc2-dep-f .og-dot { margin-right: 4px; }
.oc2-badge { font-size: 11px; font-weight: 700; color: #184f95; background: #E3EEFC; border-radius: 10px; padding: 1px 8px; }
.oc2-hit { border-color: #2F7BD9 !important; box-shadow: 0 0 0 2px rgba(47,123,217,.18) !important; }
.oc2-dim { opacity: .45; }
.oc2-hint { margin: 12px 2px 0; font-size: 12px; color: var(--oc-muted); }
/* one department */
.oc2-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; font-size: 12.5px; color: var(--oc-muted); }
.oc2-nav .og-btn { height: 32px; padding: 0 10px; font-size: 12.5px; }
.oc2-nav .og-btn:disabled { opacity: .45; cursor: default; }
.oc2-sp { flex: 1; }
.oc2-scroll { overflow-x: auto; padding-bottom: 6px; cursor: grab; }
.oc2-scroll.drag { cursor: grabbing; user-select: none; }
.oc2-scroll.more-r { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 56px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 56px), transparent); }
.oc2-scroll.more-l { -webkit-mask-image: linear-gradient(to right, transparent, #000 56px); mask-image: linear-gradient(to right, transparent, #000 56px); }
.oc2-scroll.more-l.more-r { -webkit-mask-image: linear-gradient(to right, transparent, #000 56px, #000 calc(100% - 56px), transparent); mask-image: linear-gradient(to right, transparent, #000 56px, #000 calc(100% - 56px), transparent); }
.oc2-more { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--oc-muted); }
.oc2-more[hidden] { display: none; }
.oc2-tree { min-width: max-content; display: flex; flex-direction: column; align-items: center; padding: 0 2px; }
.oc2-divs { display: flex; justify-content: center; align-items: flex-start; list-style: none; margin: 0; padding: 0; }
.oc2-li { position: relative; padding: 22px 5px 0; width: 220px; flex: 0 0 220px; }   /* five divisions fit a 1440 px screen */
.oc2-li::before, .oc2-li::after { content: ''; position: absolute; top: 0; width: 50%; height: 22px; border-top: 2px solid var(--oc-line); }
.oc2-li::before { right: 50%; }
.oc2-li::after { left: 50%; border-left: 2px solid var(--oc-line); }
.oc2-li:first-child::before, .oc2-li:last-child::after { border-top: 0; }
.oc2-li:last-child::before { border-right: 2px solid var(--oc-line); border-top-right-radius: 10px; }
.oc2-li:first-child::after { border-top-left-radius: 10px; }
.oc2-li:only-child::before { display: none; }
.oc2-li:only-child::after { border-top: 0; border-radius: 0; }
.oc2-div { padding: 0; overflow: hidden; border-top: 4px solid var(--oc-green); }
.oc2-div-h { display: flex; align-items: center; gap: 8px; width: 100%; padding: 10px 12px 6px; background: none; border: 0; text-align: left; cursor: pointer; color: inherit; font: inherit; }
.oc2-div-h .oc2-k { margin: 0; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oc2-cnt { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--oc-ink); font-variant-numeric: tabular-nums; }
.oc2-cnt .og-dot { margin-left: 4px; }
.oc2-chev { color: var(--oc-muted); transition: transform .15s; }
.oc2-div.folded .oc2-chev { transform: rotate(-90deg); }
.oc2-mgr { padding: 0 12px 10px; }
.oc2-mgr b { font-size: 13.5px; }
.oc2-mgr .og-contact { font-size: 11.5px; }
.oc2-body { border-top: 1px solid #EEF2EF; padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 10px; }
.oc2-div.folded .oc2-body { display: none; }
.oc2-people { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 12px; }
.oc2-people li { display: flex; gap: 6px; align-items: baseline; }
.oc2-people em { flex: 0 0 auto; font-style: normal; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--oc-muted); }
.oc2-rigs { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.oc2-rig { display: flex; align-items: center; gap: 6px; min-width: 0; padding: 4px 6px; border: 1px solid var(--bf-line, #DCE3DF); border-radius: 7px; background: #fff; font: 600 12px/1.3 ui-monospace, SFMono-Regular, Consolas, monospace; color: var(--oc-ink); cursor: pointer; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oc2-rig i { flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--oc-green); }
.oc2-rig.demob { color: #6E6D66; background: #F7F7F4; }
.oc2-rig.demob i { background: #A3A29A; }
.oc2-rig:hover { border-color: var(--oc-green); }
.oc2-mark { outline: 2px solid #2F7BD9; outline-offset: 1px; border-radius: 6px; background: #EEF5FE !important; }
.oc2-none { font-size: 12px; color: var(--oc-muted); grid-column: 1 / -1; }
@media (max-width: 1000px) { .og-rail { position: static; max-height: 300px; } }   /* stacked rail no longer floats over the chart and cards */
@media (max-width: 900px) {                       /* phones and small windows: the divisions stack under the director */
  .oc2-root, .oc2-dept, .oc2-dir { min-width: 0; width: 100%; }
  .oc2-tree { min-width: 0; align-items: stretch; }
  .oc2-divs { flex-direction: column; align-items: stretch; border-left: 2px solid var(--oc-line); margin-left: 14px; padding-left: 0; }
  .oc2-li { width: auto; flex: none; padding: 10px 0 0 16px; }
  .oc2-li::before { display: block; right: auto; left: 0; top: 30px; width: 16px; height: 0; border-top: 2px solid var(--oc-line); border-right: 0; border-radius: 0; }
  .oc2-li::after { display: none; }
  .oc2-scroll { cursor: auto; }
}
