:root {
  --bg: #f5f7f8;
  --surface: #ffffff;
  --surface-strong: #eef3f1;
  --text: #18201d;
  --muted: #65736d;
  --border: #d7dfdc;
  --accent: #0f766e;
  --accent-strong: #0a5953;
  --accent-soft: #dcefed;
  --warn: #b7791f;
  --blue: #2563eb;
  --radius: 8px;
  --shadow: 0 12px 34px rgba(24, 32, 29, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

[hidden] {
  display: none !important;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  border-right: 1px solid var(--border);
  background: #fbfcfc;
  padding: 22px;
}

.sidebar-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 22px;
  line-height: 1.25;
}

h2 {
  max-width: 920px;
  font-size: 28px;
  line-height: 1.25;
}

h3 {
  font-size: 17px;
}

.icon-button,
.primary-button,
.secondary-button {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  min-height: 38px;
  padding: 0 12px;
  white-space: nowrap;
}

.icon-button:hover,
.primary-button:hover,
.secondary-button:hover {
  border-color: var(--accent);
}

.primary-button {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 700;
}

.primary-button:hover {
  background: var(--accent-strong);
}

.secondary-button {
  color: var(--accent-strong);
  font-weight: 700;
}

.danger-button {
  color: #b42318;
}

.platform-home {
  min-height: 100vh;
  padding: 48px;
}

.platform-hero {
  display: grid;
  gap: 12px;
  max-width: 880px;
  margin-bottom: 28px;
}

.platform-hero h1 {
  font-size: 40px;
  line-height: 1.2;
}

.platform-hero p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.module-card {
  display: grid;
  grid-template-rows: auto auto minmax(74px, 1fr) auto;
  gap: 14px;
  min-height: 330px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 24px;
}

.module-card h2 {
  font-size: 22px;
}

.module-card p {
  margin: 0;
  color: var(--muted);
}

.module-icon {
  display: inline-grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.module-icon svg {
  width: 31px;
  height: 31px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.module-launch {
  justify-self: start;
}

.module-placeholder {
  min-height: 100vh;
  padding: 32px;
}

.placeholder-panel {
  display: grid;
  gap: 14px;
  max-width: 760px;
  margin: 28px auto 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 32px;
}

.placeholder-panel h1 {
  font-size: 32px;
}

.placeholder-panel p:last-child {
  margin: 0;
  color: var(--muted);
}

.placeholder-icon {
  margin-bottom: 4px;
}

.organization-module {
  min-height: 100vh;
  padding: 22px 28px;
}

.module-topbar {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 18px;
}

.module-topbar.compact {
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.module-topbar > div {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.module-topbar.compact > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  align-items: baseline;
}

.module-topbar.compact .platform-back {
  min-height: 34px;
  padding: 0 10px;
  font-size: 13px;
}

.module-topbar.compact .eyebrow {
  margin: 0;
  font-size: 12px;
}

.module-topbar.compact h1 {
  font-size: 20px;
}

.module-topbar p:last-child {
  max-width: 860px;
  margin: 0;
  color: var(--muted);
}

.module-topbar.compact p:last-child {
  font-size: 13px;
  font-weight: 700;
}

.org-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  margin-bottom: 10px;
  overflow-x: auto;
  scrollbar-gutter: stable;
}

.org-tab {
  flex: 0 0 auto;
  min-height: 32px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--accent-strong);
  padding: 0 10px;
  font-size: 14px;
  font-weight: 800;
}

.org-tab:hover {
  border-color: var(--accent);
}

.org-tab[data-active="true"] {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.org-panel {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.org-notice {
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  padding: 12px 14px;
  font-weight: 800;
}

.org-notice[data-tone="warning"] {
  border-color: #f3c26b;
  background: #fff4df;
  color: var(--warn);
}

.org-stat-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--border);
  gap: 1px;
}

.org-stat-grid > div {
  display: grid;
  gap: 2px;
  min-width: 0;
  background: #fafbfb;
  padding: 12px;
}

.org-stat-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.org-stat-grid strong {
  color: var(--accent-strong);
  font-size: 23px;
  line-height: 1.2;
}

.org-layout-two {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.8fr);
  gap: 16px;
  align-items: start;
}

.org-side-stack {
  display: grid;
  gap: 16px;
}

.org-tree-wrap,
.org-info-panel,
.org-check-panel,
.org-table-section {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fafbfb;
  padding: 14px;
}

.org-table-section {
  display: grid;
  gap: 12px;
}

.org-table-section h4,
.org-form h4,
.org-subheading {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
}

.org-tree,
.org-tree ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.org-tree ul {
  margin-top: 8px;
  margin-left: 14px;
  border-left: 1px solid var(--border);
  padding-left: 14px;
}

.org-node {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 34px;
  border-radius: 6px;
  background: #fff;
  padding: 7px 10px;
}

.org-node[data-level="company"] {
  border-left: 4px solid var(--accent);
}

.org-node[data-level="location"] {
  border-left: 4px solid var(--blue);
}

.org-node[data-level="department"] {
  border-left: 4px solid var(--warn);
}

.org-node[data-level="person"] {
  border-left: 4px solid var(--border);
}

.org-node-title {
  font-weight: 900;
}

.org-node-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.org-node-stats {
  max-width: 118px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.org-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  width: fit-content;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  padding: 0 8px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.org-badge[data-tone="blue"] {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: var(--blue);
}

.org-badge[data-tone="warn"] {
  border-color: #f3c26b;
  background: #fff4df;
  color: var(--warn);
}

.org-badge[data-tone="success"] {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.org-badge[data-tone="danger"] {
  border-color: #fda29b;
  background: #fff1f0;
  color: #b42318;
}

.org-badge[data-tone="muted"] {
  background: #eef3f1;
}

.org-visual-badges {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  min-width: 0;
}

.org-visual-badges.table {
  justify-content: flex-start;
}

.org-path-cell {
  display: inline-block;
  max-width: 360px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.org-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.org-chip-list span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--accent-strong);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
}

.org-info-panel p,
.org-check-more,
.org-empty,
.org-empty-inline {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.org-empty {
  margin: 0;
}

.org-empty-inline {
  margin-left: 14px;
}

.org-issue-list {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.org-issue-list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  color: var(--text);
  font-size: 13px;
}

.org-issue-level {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  background: #fff4df;
  color: var(--warn);
  padding: 0 8px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.org-issue-level[data-level="danger"] {
  background: #fff1f0;
  color: #b42318;
}

.org-editor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.org-editor-grid.single {
  grid-template-columns: minmax(0, 680px);
}

.org-form {
  display: grid;
  gap: 12px;
  align-content: start;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fafbfb;
  padding: 14px;
}

.org-form button {
  justify-self: start;
}

.org-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.org-form-field {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.org-form-field-wide {
  grid-column: 1 / -1;
}

.org-form-field input,
.org-form-field select,
.org-form-field textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  padding: 0 10px;
}

.org-form-field textarea {
  min-height: 88px;
  padding: 10px;
  resize: vertical;
}

.org-readonly-field {
  display: flex;
  align-items: center;
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #f3f6f5;
  color: var(--muted);
  padding: 0 10px;
  font-weight: 800;
}

.org-form-field input:focus,
.org-form-field select:focus,
.org-form-field textarea:focus {
  outline: 2px solid var(--accent-soft);
  border-color: var(--accent);
}

.org-form-field .org-multi-select {
  min-height: 112px;
  padding: 8px;
}

.org-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
}

.org-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.org-table th,
.org-table td {
  border-bottom: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
  vertical-align: middle;
  font-size: 13px;
}

.org-table th {
  background: var(--surface-strong);
  color: var(--muted);
  font-weight: 900;
  white-space: nowrap;
}

.org-table tr:last-child td {
  border-bottom: 0;
}

.org-row-action {
  min-height: 32px;
  padding: 0 10px;
}

.org-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.org-people-workspace {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  min-height: calc(100vh - 292px);
}

.org-people-results {
  display: grid;
  gap: 16px;
  min-height: 0;
  align-content: start;
}

.org-people-search-panel {
  min-height: 0;
  padding: 10px 12px;
}

.org-people-list-panel {
  min-height: 0;
  padding: 12px;
  background: #fbfcfc;
}

.org-people-result-wrap {
  overflow-x: hidden;
  overflow-y: hidden;
  border: 1px solid #e4ebe8;
  border-radius: 6px;
  background: #fff;
}

.org-people-result-wrap .org-table-wrap {
  border: 0;
  border-radius: 0;
}

.org-people-table {
  min-width: 0;
  width: 100%;
  table-layout: fixed;
}

.org-people-col-name {
  width: 20%;
}

.org-people-col-employee {
  width: 13%;
}

.org-people-col-title {
  width: 17%;
}

.org-people-col-unit {
  width: 22%;
}

.org-people-col-tenure {
  width: 13%;
}

.org-people-col-status {
  width: 7%;
}

.org-people-col-action {
  width: 8%;
}

.org-people-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f3f7f5;
  color: #6b7772;
  font-size: 12px;
  font-weight: 800;
}

.org-people-table tbody tr {
  cursor: pointer;
  background: #fff;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.org-people-table tbody tr:hover {
  background: #f7fbfa;
}

.org-people-table tbody tr[data-selected="true"] {
  background: #f0faf8;
  box-shadow: inset 3px 0 0 var(--accent);
}

.org-people-table tbody tr[data-probation="true"] {
  background: #fff8f8;
}

.org-people-table th,
.org-people-table td {
  border-bottom-color: #e4ebe8;
  padding: 7px 10px;
  color: #26302c;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  text-align: left;
  vertical-align: middle;
}

.org-people-table td {
  height: 46px;
}

.org-people-table th:nth-child(5),
.org-people-table td:nth-child(5),
.org-people-table th:nth-child(6),
.org-people-table td:nth-child(6),
.org-people-table th:nth-child(7),
.org-people-table td:nth-child(7) {
  text-align: center;
}

.org-people-table th:last-child,
.org-people-table td:last-child {
  padding-right: 10px;
  padding-left: 10px;
}

.org-people-table td:nth-child(2),
.org-people-table td:nth-child(3),
.org-people-table td:nth-child(4),
.org-people-table td:nth-child(5),
.org-people-table td:nth-child(6) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.org-people-name-wrap {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  max-width: 100%;
  overflow: hidden;
  vertical-align: middle;
}

.org-people-name {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.org-employee-no {
  color: #51605a;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
}

.org-status-text {
  display: inline-block;
  min-width: 34px;
  color: #2f3a35;
  font-weight: 700;
  text-align: center;
}

.org-people-table .org-row-action {
  width: 52px;
  min-height: 28px;
  border-color: #cfd9d5;
  background: #fff;
  padding: 0 6px;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
}

.org-people-table .org-row-action:hover {
  border-color: var(--accent);
  background: #f0faf8;
}

.org-people-search-grid {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) minmax(260px, 1.45fr) minmax(112px, 0.62fr) minmax(124px, 0.72fr) minmax(112px, 0.62fr) auto;
  gap: 8px;
  align-items: end;
}

.org-people-search-panel .org-form-field {
  gap: 4px;
  font-size: 12px;
}

.org-people-search-panel .org-form-field input,
.org-people-search-panel .org-form-field select {
  min-height: 34px;
  padding: 0 8px;
  font-size: 13px;
}

.org-people-search-actions {
  display: inline-flex;
  gap: 6px;
  align-items: end;
}

.org-people-search-actions button {
  min-height: 34px;
  padding: 0 12px;
  white-space: nowrap;
}

.org-page-size-control {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.org-page-size-control select {
  min-height: 32px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  padding: 0 8px;
  font-weight: 900;
}

.org-people-list-tools,
.org-pagination-controls {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  align-items: center;
}

.org-people-list-tools {
  margin-left: auto;
}

.org-pagination-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.org-pagination-controls span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.org-pagination-controls button:disabled {
  opacity: 0.45;
  cursor: default;
}

.org-people-list-tools > .org-row-action {
  min-height: 32px;
  font-size: 12px;
}

.org-people-detail-panel {
  position: relative;
  z-index: 1;
  width: min(1040px, calc(100vw - 48px));
  min-height: 0;
  max-height: calc(100vh - 72px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  box-shadow: 0 20px 60px rgba(16, 24, 40, 0.24);
}

.org-person-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px;
}

.org-person-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.38);
}

.org-person-modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  align-items: center;
}

.org-person-governance {
  display: grid;
  gap: 12px;
}

.org-person-info-block {
  display: grid;
  gap: 10px;
  border: 1px solid #e4ebe8;
  border-radius: 6px;
  background: #fbfcfc;
  padding: 12px;
}

.org-person-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid #e4ebe8;
  border-radius: 6px;
  background: #e4ebe8;
  gap: 1px;
}

.org-person-info-grid > div {
  display: grid;
  gap: 3px;
  min-width: 0;
  background: #fff;
  padding: 9px 10px;
}

.org-person-info-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.org-person-info-grid strong {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.org-person-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.org-person-check-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.org-person-check-list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  border: 1px solid #d6eadf;
  border-radius: 6px;
  background: #f6fffa;
  padding: 8px 10px;
}

.org-person-check-list li[data-level="warning"] {
  border-color: #f3d79c;
  background: #fff8e8;
}

.org-person-check-list li[data-level="danger"] {
  border-color: #fecaca;
  background: #fff5f5;
}

.org-person-check-list span {
  border-radius: 999px;
  background: #dff5ec;
  color: #166534;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.org-person-check-list li[data-level="warning"] span {
  background: #fff4df;
  color: #92400e;
}

.org-person-check-list li[data-level="danger"] span {
  background: #fff1f0;
  color: #b42318;
}

.org-person-check-list strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.org-search-heading {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.org-search-heading span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.org-people-search-form {
  border: 0;
  background: transparent;
  padding: 0;
}

.org-people-list {
  display: grid;
  gap: 8px;
}

.org-people-list-item {
  display: grid;
  gap: 4px;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  padding: 10px;
  text-align: left;
}

.org-people-list-item:hover,
.org-people-list-item[data-selected="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.org-people-list-item[data-probation="true"] {
  border-color: #f4b4b4;
  background: #fff5f5;
}

.org-people-list-item span {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: baseline;
}

.org-people-list-item strong {
  font-size: 14px;
}

.org-people-list-item em,
.org-people-list-item small {
  overflow: hidden;
  color: var(--muted);
  font-style: normal;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.org-people-list-item small {
  font-size: 12px;
}

.org-visual-card-head.compact h4 {
  font-size: 16px;
}

.org-person-records {
  display: grid;
  gap: 10px;
}

.org-person-record {
  display: grid;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  padding: 12px;
}

.org-person-record-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.org-visual-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fafbfb;
  padding: 12px 14px;
}

.org-visual-toolbar > div:first-child {
  display: grid;
  gap: 2px;
}

.org-visual-toolbar span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.org-visual-toolbar strong {
  font-size: 16px;
}

.org-visual-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.org-visual-board {
  display: grid;
  grid-template-columns: minmax(420px, 1.3fr) minmax(340px, 0.8fr);
  gap: 16px;
  align-items: stretch;
  height: calc(100vh - 332px);
  min-height: 520px;
  overflow: hidden;
}

.org-visual-tree-panel,
.org-visual-card {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fafbfb;
  padding: 14px;
}

.org-visual-tree-panel,
.org-visual-detail {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.org-visual-detail {
  display: grid;
  gap: 16px;
  min-width: 0;
  align-content: start;
  padding-right: 4px;
}

.org-visual-tree,
.org-visual-tree ul {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.org-visual-tree ul {
  margin-top: 8px;
  margin-left: 17px;
  border-left: 1px solid var(--border);
  padding-left: 13px;
}

.org-visual-node {
  display: grid;
  grid-template-columns: 32px 18px minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 6px;
  min-height: 42px;
  border: 1px solid var(--node-border, var(--border));
  border-radius: 6px;
  background: var(--node-bg, #fff);
  padding: 6px 8px;
}

.org-visual-node[data-sortable="true"] {
  cursor: grab;
}

.org-visual-node[data-sortable="true"]:active,
.org-visual-node.is-dragging {
  cursor: grabbing;
}

.org-visual-node.is-dragging {
  opacity: 0.62;
  box-shadow: 0 10px 22px rgba(16, 24, 40, 0.16);
}

.org-visual-drag-handle {
  width: 18px;
  height: 28px;
  border-radius: 4px;
  background-image: radial-gradient(circle, rgba(83, 99, 93, 0.62) 1.5px, transparent 1.6px);
  background-position: 2px 3px;
  background-size: 6px 6px;
}

.org-visual-node[data-sortable="false"] .org-visual-drag-handle {
  opacity: 0;
}

.org-visual-item {
  position: relative;
}

.org-visual-item.is-drop-before::before,
.org-visual-item.is-drop-after::after {
  content: "";
  position: absolute;
  right: 0;
  left: 0;
  z-index: 2;
  height: 3px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.org-visual-item.is-drop-before::before {
  top: -5px;
}

.org-visual-item.is-drop-after::after {
  bottom: -5px;
}

.org-visual-node[data-kind="platform"],
.org-visual-node[data-kind="company"],
.org-visual-node[data-kind="centerGroup"] {
  --node-border: #b8d8d3;
  --node-bg: #edf8f6;
}

.org-visual-node[data-kind="operationGroup"],
.org-visual-node[data-kind="region"] {
  --node-border: #bfdbfe;
  --node-bg: #eff6ff;
}

.org-visual-node[data-kind="location"] {
  --node-border: #f3d79c;
  --node-bg: #fff8e8;
}

.org-visual-node[data-kind="department"] {
  --node-border: #d7dfdc;
  --node-bg: #f7faf9;
}

.org-visual-node[data-kind="section"] {
  --node-border: #bbf7d0;
  --node-bg: #ecfdf3;
}

.org-visual-node[data-kind="team"] {
  --node-border: #d8e0e7;
  --node-bg: #f8fafc;
}

.org-visual-node[data-selected="true"] {
  border-color: var(--accent);
  background: var(--node-bg, #dcefed);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.org-visual-toggle {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--accent-strong);
  font-weight: 900;
}

.org-visual-toggle:disabled {
  border-color: transparent;
  background: transparent;
  cursor: default;
}

.org-visual-main {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 0;
  text-align: left;
}

.org-visual-title {
  flex: 0 1 auto;
  overflow: hidden;
  min-width: 0;
  max-width: min(280px, 46%);
  font-size: 14px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.org-visual-manager {
  display: inline-flex;
  flex: 0 1 auto;
  align-items: baseline;
  gap: 5px;
  overflow: hidden;
  min-width: 0;
  max-width: min(230px, 40%);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.org-visual-manager::before {
  content: "/ ";
  color: var(--muted);
}

.org-visual-manager-name {
  overflow: hidden;
  min-width: 0;
  color: #c2413a;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.org-visual-manager-title {
  overflow: hidden;
  min-width: 0;
  max-width: 88px;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.org-visual-subtitle {
  flex: 0 1 auto;
  overflow: hidden;
  min-width: 0;
  max-width: 120px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.org-visual-subtitle::before {
  content: "/ ";
}

.org-visual-alert {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #fff1f0;
  color: #b42318;
  font-size: 12px;
  font-weight: 900;
}

.org-visual-card {
  display: grid;
  gap: 14px;
}

.org-visual-editor-card {
  gap: 18px;
}

.org-visual-form {
  display: grid;
  gap: 12px;
}

.org-visual-form + .org-visual-form {
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.org-visual-form button {
  justify-self: start;
}

.org-visual-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.org-visual-card-head > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.org-visual-card-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.org-visual-card-head h4 {
  margin: 0;
  font-size: 20px;
}

.org-path-line {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
  padding: 10px;
  font-size: 13px;
  font-weight: 700;
}

.org-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--border);
  gap: 1px;
}

.org-detail-grid > div {
  display: grid;
  gap: 3px;
  min-width: 0;
  background: #fff;
  padding: 10px;
}

.org-detail-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.org-detail-grid strong {
  color: var(--text);
  font-size: 14px;
}

.org-chip-list.compact {
  margin-top: 0;
}

.org-mini-list,
.org-child-preview,
.org-visual-issues {
  display: grid;
  gap: 8px;
}

.org-collapsible-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  padding: 8px 10px;
  text-align: left;
}

.org-collapsible-heading span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.org-collapsible-heading strong {
  overflow: hidden;
  min-width: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.org-collapsible-heading em {
  min-width: 44px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  padding: 3px 8px;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  text-align: center;
}

.org-collapsible-heading:hover {
  border-color: var(--accent);
}

.org-list-summary {
  border: 1px dashed var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
  padding: 9px 10px;
  font-size: 13px;
  font-weight: 800;
}

.org-person-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  padding: 9px 10px;
}

.org-person-row[data-probation="true"] {
  border-color: #f4b4b4;
  background: #fff5f5;
}

.org-person-meta {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
  text-align: right;
}

.org-person-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.org-probation-label {
  color: #c32222;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.org-child-preview button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  padding: 8px 10px;
  text-align: left;
}

.org-child-preview button:hover {
  border-color: var(--accent);
}

.org-child-preview span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.org-visual-issues span {
  border: 1px solid #fda29b;
  border-radius: 6px;
  background: #fff1f0;
  color: #b42318;
  padding: 9px 10px;
  font-size: 13px;
  font-weight: 800;
}

.org-color-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.org-color-choice {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  padding: 6px 8px;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.org-color-choice input {
  width: auto;
  min-height: 0;
  border: 0;
  accent-color: var(--accent);
  padding: 0;
}

.org-color-swatch {
  display: inline-block;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border: 1px solid var(--swatch-border);
  border-radius: 5px;
  background: var(--swatch-bg);
}

.org-approval-route {
  display: grid;
  gap: 10px;
}

.org-approval-step {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 8px 10px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  padding: 10px;
}

.org-approval-step span {
  display: inline-grid;
  place-items: center;
  grid-row: span 2;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 900;
}

.org-approval-step strong {
  font-size: 14px;
}

.org-approval-step em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.sidebar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-control select:focus,
.select-field select:focus {
  outline: 2px solid var(--accent-soft);
  border-color: var(--accent);
}

.scenario-list {
  display: grid;
  gap: 8px;
}

.scenario-button {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 8px 10px;
  width: 100%;
  min-height: 72px;
  padding: 12px;
  text-align: left;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.scenario-button[data-active="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 3px 0 0 var(--accent);
}

.scenario-button:hover {
  border-color: var(--accent);
}

.scenario-index {
  color: var(--accent);
  font-weight: 800;
}

.scenario-name {
  min-width: 0;
  font-weight: 700;
  line-height: 1.35;
}

.scenario-state {
  grid-column: 2;
  justify-self: start;
  color: var(--muted);
  font-size: 12px;
}

.content {
  min-width: 0;
  padding: 28px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.meta-line span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  padding: 0 10px;
  font-size: 13px;
}

.status-control {
  display: grid;
  gap: 6px;
  min-width: 150px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.status-control select {
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  padding: 0 10px;
}

.section-block {
  margin-bottom: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  border-bottom: 1px solid var(--border);
  padding: 0 14px;
  background: var(--surface-strong);
}

.section-heading-main,
.section-heading-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.section-heading-main h3 {
  font-size: 17px;
}

.section-heading-actions {
  justify-content: flex-end;
}

.org-source-inline {
  overflow: hidden;
  max-width: 260px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-button {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

.menu-select-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 16px;
  padding: 16px;
}

.select-field {
  display: grid;
  gap: 8px;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.select-field select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  padding: 0 12px;
}

.selected-menu-path {
  border-top: 1px solid var(--border);
  background: #fafbfb;
  color: var(--muted);
  padding: 14px 16px;
  font-size: 14px;
}

.selected-menu-path strong {
  color: var(--accent-strong);
  font-weight: 800;
}

.selected-menu-path span {
  color: var(--text);
}

.form-profile {
  display: grid;
  gap: 14px;
  border-bottom: 1px solid var(--border);
  padding: 16px;
}

.form-profile-main {
  display: grid;
  gap: 8px;
}

.form-profile-main p {
  margin: 0;
  color: var(--muted);
}

.form-type {
  width: fit-content;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 800;
}

.form-profile-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1.2fr;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--border);
}

.form-profile-grid > div {
  display: grid;
  gap: 4px;
  min-width: 0;
  background: #fafbfb;
  padding: 12px;
}

.form-profile-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.form-profile-grid strong {
  color: var(--text);
  font-size: 14px;
  line-height: 1.35;
}

.application-form {
  display: grid;
  gap: 18px;
  padding: 16px;
}

.form-section {
  min-width: 0;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 16px;
}

.form-section legend {
  padding: 0 8px;
  color: var(--accent-strong);
  font-size: 14px;
  font-weight: 800;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}

.form-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.form-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
}

.required-badge,
.optional-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 999px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 800;
}

.required-badge {
  background: #fff4df;
  color: var(--warn);
}

.optional-badge {
  background: #eef3f1;
  color: var(--muted);
}

.form-control {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  padding: 0 12px;
}

textarea.form-control {
  min-height: 84px;
  padding: 10px 12px;
  resize: vertical;
}

.file-control {
  padding: 8px 12px;
}

.form-control[readonly] {
  background: #f4f6f5;
  color: var(--muted);
}

.form-control:focus {
  outline: 2px solid var(--accent-soft);
  border-color: var(--accent);
}

.form-help {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.range-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.range-control span {
  color: var(--muted);
  font-size: 13px;
}

.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 40px;
  align-items: center;
}

.checkbox-group label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  padding: 0 10px;
  color: var(--text);
  font-size: 13px;
}

.detail-control {
  display: grid;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fafbfb;
  padding: 10px;
}

.detail-control-row {
  display: grid;
  grid-template-columns: 1fr 140px 1.3fr;
  gap: 8px;
}

.detail-control-head {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.detail-add-button {
  justify-self: start;
  min-height: 34px;
}

.form-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.form-action-note {
  color: var(--muted);
  font-size: 13px;
}

.list-count {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.draft-list {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.draft-empty {
  margin: 0;
  padding: 18px;
  color: var(--muted);
}

.draft-empty[hidden] {
  display: none;
}

.draft-item {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
}

.draft-item[data-selected="true"] {
  border-color: var(--accent);
  box-shadow: inset 3px 0 0 var(--accent);
}

.draft-row {
  display: grid;
  grid-template-columns: minmax(170px, 0.8fr) minmax(240px, 1.4fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
}

.draft-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.draft-main strong {
  color: var(--accent-strong);
  font-size: 15px;
}

.draft-main span {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.draft-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.draft-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fafbfb;
  color: var(--muted);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 700;
}

.draft-meta .draft-status {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.draft-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.draft-actions button {
  min-height: 34px;
}

.draft-detail {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  border-top: 1px solid var(--border);
  background: var(--border);
}

.draft-detail[hidden] {
  display: none;
}

.draft-detail > div {
  display: grid;
  gap: 4px;
  min-width: 0;
  background: #fafbfb;
  padding: 12px 14px;
}

.draft-detail span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.draft-detail strong {
  color: var(--text);
  font-size: 13px;
  line-height: 1.4;
}

.flowchart {
  overflow-x: auto;
  padding: 18px;
}

.flowchart-track {
  display: flex;
  align-items: center;
  min-width: max-content;
}

.flow-step {
  display: grid;
  grid-template-columns: 34px minmax(120px, 1fr);
  align-items: center;
  gap: 10px;
  width: 220px;
  min-height: 64px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #ffffff;
  padding: 10px 12px;
}

.flow-step-number {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 800;
}

.flow-step-text {
  min-width: 0;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.flow-arrow {
  display: inline-grid;
  place-items: center;
  width: 34px;
  color: var(--accent);
  font-weight: 800;
}

.detail-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 16px;
  list-style: none;
}

.detail-list li {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.detail-list.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.list-number {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #fff4df;
  color: var(--warn);
  font-size: 13px;
  font-weight: 800;
}

@media (max-width: 980px) {
  .platform-home {
    padding: 30px;
  }

  .organization-module {
    padding: 30px;
  }

  .platform-hero h1 {
    font-size: 32px;
  }

  .module-grid {
    grid-template-columns: 1fr;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .scenario-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topbar {
    grid-template-columns: 1fr;
    display: grid;
  }

  .module-topbar {
    display: grid;
  }

  .org-stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .org-layout-two,
  .org-visual-board,
  .org-people-workspace,
  .org-people-search-grid,
  .org-editor-grid,
  .org-editor-grid.single,
  .org-form-grid {
    grid-template-columns: 1fr;
  }

  .org-people-workspace {
    height: auto;
    min-height: 0;
  }

  .org-person-info-grid {
    grid-template-columns: 1fr;
  }

  .org-person-modal {
    align-items: stretch;
    padding: 14px;
  }

  .org-people-detail-panel {
    width: 100%;
    max-height: calc(100vh - 28px);
  }

  .org-people-results,
  .org-people-list-panel {
    max-height: none;
    overflow: visible;
    scrollbar-gutter: auto;
  }

  .org-people-search-actions button {
    flex: 1;
  }

  .org-visual-board {
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .org-visual-tree-panel,
  .org-visual-detail {
    overflow: visible;
    scrollbar-gutter: auto;
  }

  .menu-select-layout,
  .form-profile-grid,
  .form-grid,
  .draft-row,
  .draft-detail,
  .detail-list.compact {
    grid-template-columns: 1fr;
  }

  .draft-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 620px) {
  .platform-home,
  .module-placeholder,
  .organization-module {
    padding: 18px;
  }

  .platform-hero h1,
  .placeholder-panel h1 {
    font-size: 27px;
  }

  .module-card {
    min-height: 0;
    padding: 18px;
  }

  .content,
  .sidebar {
    padding: 18px;
  }

  h2 {
    font-size: 23px;
  }

  .scenario-list {
    grid-template-columns: 1fr;
  }

  .org-tabs {
    display: flex;
  }

  .org-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .org-visual-toolbar,
  .org-visual-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .org-visual-actions button {
    width: 100%;
  }

  .org-visual-node {
    grid-template-columns: 32px 18px minmax(0, 1fr);
  }

  .org-visual-node .org-node-meta,
  .org-visual-node .org-badge,
  .org-visual-node .org-visual-badges {
    grid-column: 3 / -1;
    justify-self: start;
  }

  .org-visual-node .org-visual-main {
    min-width: 0;
  }

  .org-visual-title,
  .org-visual-manager,
  .org-visual-subtitle {
    max-width: 100%;
  }

  .org-visual-node .org-visual-subtitle {
    min-width: 0;
  }

  .org-detail-grid {
    grid-template-columns: 1fr;
  }

  .org-color-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .meta-line span {
    width: 100%;
    border-radius: 6px;
  }

  .flowchart-track {
    align-items: stretch;
    flex-direction: column;
    min-width: 0;
  }

  .flow-step {
    width: 100%;
  }

  .flow-arrow {
    width: 100%;
    height: 28px;
    transform: rotate(90deg);
  }

  .range-control,
  .detail-control-row {
    grid-template-columns: 1fr;
  }

  .range-control span {
    display: none;
  }

  .form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .form-actions button {
    width: 100%;
  }

  .draft-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .draft-actions button {
    width: 100%;
  }
}
