/* ========================================
   Organigrama Module - VITALI ERP
   ======================================== */

:root {
  --org-primary: #6273FF;
  --org-primary-light: #EEF0FE;
  --org-neutral-900: #0F172A;
  --org-neutral-700: #475569;
  --org-neutral-600: #64748B;
  --org-neutral-500: #94A3B8;
  --org-neutral-200: #E2E8F0;
  --org-neutral-50: #F8FAFC;
}

/* Page Container */
.org-page {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  max-width: 100%;
  min-width: 0;
}

.org-page * {
  font-family: inherit;
}

/* Header */
.org-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.org-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.org-header-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: white;
  border: 2px solid var(--org-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.org-header-icon svg {
  width: 24px;
  height: 24px;
  color: var(--org-primary);
}

.org-header h1 {
  font-size: 20px;
  font-weight: 600;
  color: var(--org-neutral-900);
  margin: 0;
}

.org-header p {
  font-size: 14px;
  color: var(--org-neutral-700);
  margin: 4px 0 0;
}

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

/* View Toggle Buttons */
.org-view-toggle {
  display: inline-flex;
  border: 2px solid var(--org-neutral-200);
  border-radius: 9999px;
  overflow: hidden;
}

.org-view-btn {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--org-neutral-600);
  background: white;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.org-view-btn:first-child {
  border-right: 1px solid var(--org-neutral-200);
}

.org-view-btn.is-active {
  background: var(--org-primary);
  color: white;
}

.org-view-btn:hover:not(.is-active) {
  background: var(--org-neutral-50);
}

.org-view-btn svg {
  width: 16px;
  height: 16px;
}

/* Action Buttons */
.org-btn-primary {
  height: 40px;
  padding: 0 20px;
  border-radius: 9999px;
  background: var(--org-primary);
  color: white;
  font-weight: 600;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.org-btn-primary:hover {
  background: #5161E6;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(98, 115, 255, 0.3);
}

.org-btn-primary svg {
  width: 16px;
  height: 16px;
}

.org-btn-secondary {
  height: 40px;
  padding: 0 20px;
  border-radius: 9999px;
  background: white;
  color: var(--org-neutral-900);
  border: 2px solid var(--org-neutral-200);
  font-weight: 600;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.org-btn-secondary:hover {
  border-color: var(--org-primary);
  background: var(--org-primary-light);
  color: var(--org-primary);
}

.org-btn-secondary svg {
  width: 16px;
  height: 16px;
}

.org-btn-icon {
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  background: white;
  border: 2px solid var(--org-neutral-200);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

.org-btn-icon:hover {
  border-color: var(--org-primary);
  background: var(--org-primary-light);
}

.org-btn-icon svg {
  width: 18px;
  height: 18px;
  color: var(--org-neutral-600);
}

.org-btn-icon:hover svg {
  color: var(--org-primary);
}

/* Zoom Controls */
.org-zoom-controls {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 2px solid var(--org-neutral-200);
  border-radius: 9999px;
  padding: 2px;
  background: white;
}

.org-zoom-controls .org-btn-icon {
  width: 32px;
  height: 32px;
  border: none;
  background: none;
}

.org-zoom-controls .org-btn-icon:hover {
  background: var(--org-primary-light);
}

.org-zoom-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--org-neutral-600);
  min-width: 36px;
  text-align: center;
  user-select: none;
}

/* Manifesto Card */
.org-manifesto {
  background: white;
  border-radius: 16px;
  border: 2px solid var(--org-neutral-200);
  margin-bottom: 24px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.org-manifesto::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--org-primary), #8B92FF);
}

.org-manifesto-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  cursor: pointer;
  user-select: none;
}

.org-manifesto-header:hover {
  background: var(--org-neutral-50);
}

.org-manifesto-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.org-manifesto-title svg {
  width: 20px;
  height: 20px;
  color: var(--org-primary);
}

.org-manifesto-title h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--org-neutral-900);
  margin: 0;
}

.org-manifesto-chevron {
  width: 20px;
  height: 20px;
  color: var(--org-neutral-500);
  transition: transform 0.3s ease;
}

.org-manifesto-chevron.is-open {
  transform: rotate(180deg);
}

.org-manifesto-body {
  padding: 0 24px 24px;
  display: none;
}

.org-manifesto-body.is-open {
  display: block;
}

.org-manifesto-content {
  font-size: 14px;
  color: var(--org-neutral-700);
  line-height: 1.7;
}
.org-manifesto-content p {
  margin: 0 0 8px 0;
}
.org-manifesto-content strong {
  color: var(--org-neutral-900);
}
.org-manifesto-content ul {
  margin: 4px 0 12px 0;
  padding-left: 20px;
}
.org-manifesto-content li {
  margin-bottom: 4px;
}
.org-manifesto-content br {
  display: block;
  content: "";
  margin: 4px 0;
}

.org-manifesto-empty {
  font-size: 14px;
  color: var(--org-neutral-500);
  font-style: italic;
}

.org-manifesto-actions {
  margin-top: 16px;
  display: flex;
  gap: 8px;
}

/* Tree Container */
.org-tree-container {
  overflow-x: auto;
  overflow-y: visible;
  padding: 24px 0;
  -webkit-overflow-scrolling: touch;
  position: relative;
  scrollbar-width: thin;
  scrollbar-color: var(--org-neutral-200) transparent;
}

.org-tree-container::-webkit-scrollbar {
  height: 6px;
}

.org-tree-container::-webkit-scrollbar-track {
  background: transparent;
}

.org-tree-container::-webkit-scrollbar-thumb {
  background: var(--org-neutral-200);
  border-radius: 3px;
}

.org-tree-container::-webkit-scrollbar-thumb:hover {
  background: var(--org-neutral-500);
}

/* Tree View - CSS-only hierarchy */
.org-tree {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
  min-width: fit-content;
  transition: transform 0.2s ease;
}

.org-tree-level {
  display: flex;
  justify-content: center;
  gap: 12px;
  position: relative;
  width: 100%;
}

.org-tree-branch {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

/* Vertical line from parent to connector */
.org-tree-branch::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 50%;
  width: 2px;
  height: 12px;
  background: var(--org-neutral-200);
}

.org-tree-branch:only-child::before,
.org-tree > .org-tree-branch::before {
  display: none;
}

/* Children container */
.org-tree-children {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
  position: relative;
  padding-top: 12px;
}

/* Horizontal connector line */
.org-tree-children::before {
  content: '';
  position: absolute;
  top: 0;
  left: var(--conn-left, 50%);
  width: var(--conn-width, 0px);
  height: 2px;
  background: var(--org-neutral-200);
}

.org-tree-children[data-count="1"]::before {
  display: none;
}

/* Vertical line from connector to node */
.org-tree-children > .org-tree-branch::before {
  top: -12px;
  height: 12px;
}

/* Root grouping rows (Staff vs Linea) */
.org-root-row {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 10px;
}

.org-root-row-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--org-neutral-500);
  margin-bottom: 8px;
}

/* A dedicated lane for staff roles that report to CEO but don't manage departments. */
.org-root-row--staff {
  padding-top: 14px;
  position: relative;
}

.org-root-row--staff::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 14px;
  background: repeating-linear-gradient(
    to bottom,
    var(--org-neutral-200),
    var(--org-neutral-200) 4px,
    transparent 4px,
    transparent 8px
  );
}

.org-staff-children {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.org-root-row--line {
  margin-top: 14px;
}

/* Node Card */
.org-node {
  background: white;
  border-radius: 12px;
  border: 2px solid var(--org-neutral-200);
  padding: 10px 8px;
  width: 150px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  text-align: center;
}

.org-node:hover {
  border-color: var(--org-primary);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px -4px rgba(0, 0, 0, 0.12);
}

.org-node.is-selected {
  border-color: var(--org-primary);
  box-shadow: 0 0 0 3px rgba(98, 115, 255, 0.2);
}

.org-node--staff {
  border-style: dashed;
  background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFF 100%);
}

.org-node-staff-tag {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 8px;
  border-radius: 9999px;
  background: rgba(98, 115, 255, 0.12);
  color: var(--org-primary);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.6px;
}

.org-node-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  margin: 0 auto 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: white;
  overflow: hidden;
  flex-shrink: 0;
}

.org-node-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.org-node-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--org-neutral-900);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  line-height: 1.3;
}

.org-node-name {
  font-size: 10px;
  font-weight: 500;
  color: var(--org-neutral-600);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.org-node-badge {
  display: inline-flex;
  padding: 2px 6px;
  background: var(--org-primary-light);
  color: var(--org-primary);
  font-size: 8px;
  font-weight: 600;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.org-node-children-count {
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--org-neutral-50);
  border: 2px solid var(--org-neutral-200);
  border-radius: 9999px;
  padding: 1px 8px;
  font-size: 10px;
  font-weight: 600;
  color: var(--org-neutral-600);
  cursor: pointer;
}

.org-node-children-count:hover {
  background: var(--org-primary-light);
  border-color: var(--org-primary);
  color: var(--org-primary);
}

/* Expand/collapse toggle on node */
.org-node-toggle {
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 20px;
  background: white;
  border: 2px solid var(--org-neutral-200);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 2;
}

.org-node-toggle:hover {
  border-color: var(--org-primary);
  background: var(--org-primary-light);
}

.org-node-toggle svg {
  width: 12px;
  height: 12px;
  color: var(--org-neutral-600);
  transition: transform 0.3s ease;
}

.org-node-toggle.is-collapsed svg {
  transform: rotate(-90deg);
}

.org-node-toggle:hover svg {
  color: var(--org-primary);
}

/* List View */
.org-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.org-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid transparent;
}

.org-list-item:hover {
  background: var(--org-neutral-50);
  border-color: var(--org-neutral-200);
}

.org-list-item.is-selected {
  background: var(--org-primary-light);
  border-color: var(--org-primary);
}

.org-list-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: white;
  overflow: hidden;
  flex-shrink: 0;
}

.org-list-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.org-list-info {
  flex: 1;
  min-width: 0;
}

.org-list-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--org-neutral-900);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.org-list-title {
  font-size: 12px;
  font-weight: 500;
  color: var(--org-neutral-600);
}

.org-list-badge {
  display: inline-flex;
  padding: 3px 8px;
  background: var(--org-primary-light);
  color: var(--org-primary);
  font-size: 10px;
  font-weight: 600;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.org-list-toggle {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  flex-shrink: 0;
}

.org-list-toggle svg {
  width: 16px;
  height: 16px;
  color: var(--org-neutral-500);
  transition: transform 0.2s ease;
}

.org-list-toggle.is-expanded svg {
  transform: rotate(90deg);
}

.org-list-children {
  padding-left: 32px;
  border-left: 2px solid var(--org-neutral-200);
  margin-left: 34px;
}

.org-list-lane-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--org-neutral-500);
  padding: 10px 16px 6px;
}

.org-detail-mini-tag {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 8px;
  border-radius: 9999px;
  background: rgba(98, 115, 255, 0.10);
  color: var(--org-primary);
  border: 1px solid rgba(98, 115, 255, 0.25);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.6px;
}

/* Detail Panel */
.org-detail-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  z-index: 200;
  opacity: 0;
  transition: opacity 0.2s ease;
  display: none;
}

.org-detail-overlay.is-open {
  display: block;
  opacity: 1;
}

.org-detail-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 420px;
  max-width: 100vw;
  height: 100%;
  background: white;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.1);
  z-index: 201;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.org-detail-panel.is-open {
  transform: translateX(0);
}

.org-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--org-neutral-200);
  flex-shrink: 0;
}

.org-detail-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--org-neutral-900);
  margin: 0;
}

.org-detail-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.org-detail-close:hover {
  background: var(--org-neutral-50);
}

.org-detail-close svg {
  width: 20px;
  height: 20px;
  color: var(--org-neutral-600);
}

.org-detail-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.org-detail-avatar-section {
  text-align: center;
  margin-bottom: 24px;
}

.org-detail-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  color: white;
  overflow: hidden;
}

.org-detail-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.org-detail-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--org-neutral-900);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.org-detail-title-text {
  font-size: 14px;
  font-weight: 500;
  color: var(--org-neutral-600);
}

/* Detail sections */
.org-detail-section {
  margin-bottom: 20px;
}

.org-detail-section-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--org-neutral-500);
  margin-bottom: 8px;
}

.org-detail-field {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--org-neutral-50);
}

.org-detail-field svg {
  width: 16px;
  height: 16px;
  color: var(--org-neutral-500);
  flex-shrink: 0;
  margin-top: 2px;
}

.org-detail-field-label {
  font-size: 12px;
  color: var(--org-neutral-500);
}

.org-detail-field-value {
  font-size: 14px;
  color: var(--org-neutral-900);
}

.org-detail-tag {
  display: inline-flex;
  padding: 4px 10px;
  background: var(--org-neutral-50);
  border: 1px solid var(--org-neutral-200);
  border-radius: 6px;
  font-size: 12px;
  color: var(--org-neutral-700);
  margin: 2px;
}

.org-detail-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--org-neutral-200);
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

/* Form Modal */
.org-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.org-modal-overlay.is-open {
  display: flex;
}

.org-modal {
  background: white;
  border-radius: 20px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: scaleIn 0.3s ease-out;
}

.org-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--org-neutral-200);
}

.org-modal-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--org-neutral-900);
  margin: 0;
}

.org-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.org-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--org-neutral-200);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* Form fields */
.org-form-group {
  margin-bottom: 16px;
}

.org-form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--org-neutral-700);
  margin-bottom: 6px;
}

.org-form-input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 2px solid var(--org-neutral-200);
  border-radius: 10px;
  font-size: 14px;
  color: var(--org-neutral-900);
  background: white;
  transition: border-color 0.2s ease;
  font-family: inherit;
  box-sizing: border-box;
}

.org-form-input:focus {
  outline: none;
  border-color: var(--org-primary);
  box-shadow: 0 0 0 3px rgba(98, 115, 255, 0.15);
}

.org-form-textarea {
  width: 100%;
  min-height: 80px;
  padding: 10px 14px;
  border: 2px solid var(--org-neutral-200);
  border-radius: 10px;
  font-size: 14px;
  color: var(--org-neutral-900);
  background: white;
  resize: vertical;
  font-family: inherit;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
}

.org-form-textarea:focus {
  outline: none;
  border-color: var(--org-primary);
  box-shadow: 0 0 0 3px rgba(98, 115, 255, 0.15);
}

.org-form-select {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 2px solid var(--org-neutral-200);
  border-radius: 10px;
  font-size: 14px;
  color: var(--org-neutral-900);
  background: white;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394A3B8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 36px;
}

.org-form-select:focus {
  outline: none;
  border-color: var(--org-primary);
}

/* Color picker */
.org-color-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.org-color-swatch {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.org-color-swatch:hover {
  transform: scale(1.15);
}

.org-color-swatch.is-selected {
  border-color: var(--org-neutral-900);
  box-shadow: 0 0 0 2px white, 0 0 0 4px var(--org-neutral-900);
}

/* Empty State */
.org-empty {
  text-align: center;
  padding: 60px 24px;
}

.org-empty-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 16px;
  background: var(--org-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
}

.org-empty-icon svg {
  width: 32px;
  height: 32px;
  color: var(--org-primary);
}

.org-empty h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--org-neutral-900);
  margin: 0 0 8px;
}

.org-empty p {
  font-size: 14px;
  color: var(--org-neutral-600);
  margin: 0 0 20px;
}

/* Move Mode */
.org-move-banner {
  background: #FEF3C7;
  border: 2px solid #F59E0B;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.org-move-banner p {
  font-size: 13px;
  font-weight: 600;
  color: #92400E;
  margin: 0;
}

.org-node.is-move-target {
  border-color: #F59E0B;
  border-style: dashed;
}

.org-node.is-move-target:hover {
  border-color: #D97706;
  background: #FFFBEB;
}

/* Loading */
.org-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  color: var(--org-neutral-500);
  font-size: 14px;
  gap: 8px;
}

.org-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--org-neutral-200);
  border-top-color: var(--org-primary);
  border-radius: 50%;
  animation: orgSpin 0.6s linear infinite;
}

@keyframes orgSpin {
  to { transform: rotate(360deg); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive - Small laptops (1280px and below) */
@media (max-width: 1280px) {
  .org-node {
    width: 135px;
    padding: 8px 6px;
  }

  .org-node-avatar {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }

  .org-node-title {
    font-size: 11px;
  }

  .org-node-name {
    font-size: 9px;
  }

  .org-node-badge {
    font-size: 7px;
    padding: 2px 5px;
  }

  .org-tree-children {
    gap: 8px;
  }

  .org-detail-panel {
    width: 380px;
  }

  .org-detail-body {
    padding: 20px;
  }

  .org-manifesto-header {
    padding: 16px 20px;
  }

  .org-manifesto-body {
    padding: 0 20px 20px;
  }

  .org-manifesto-content {
    font-size: 13px;
  }
}

/* Very small laptops / large tablets (1024px and below) */
@media (max-width: 1024px) {
  .org-page {
    padding: 0;
  }

  .org-header {
    gap: 12px;
    margin-bottom: 16px;
  }

  .org-header-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
  }

  .org-header-icon svg {
    width: 20px;
    height: 20px;
  }

  .org-header h1 {
    font-size: 18px;
  }

  .org-header p {
    font-size: 12px;
  }

  .org-node {
    width: 120px;
    padding: 8px 5px;
    border-radius: 10px;
  }

  .org-node-avatar {
    width: 28px;
    height: 28px;
    font-size: 11px;
    margin-bottom: 4px;
  }

  .org-node-title {
    font-size: 10px;
  }

  .org-node-name {
    font-size: 8px;
    margin-bottom: 3px;
  }

  .org-node-badge {
    font-size: 7px;
    padding: 1px 4px;
  }

  .org-tree-children {
    gap: 6px;
    margin-top: 10px;
    padding-top: 10px;
  }

  .org-tree-branch::before {
    top: -10px;
    height: 10px;
  }

  .org-tree-children > .org-tree-branch::before {
    top: -10px;
    height: 10px;
  }

  .org-tree-container {
    padding: 16px 0;
  }

  .org-detail-panel {
    width: 340px;
  }

  .org-detail-header {
    padding: 16px 20px;
  }

  .org-detail-body {
    padding: 16px;
  }

  .org-detail-avatar {
    width: 64px;
    height: 64px;
    font-size: 22px;
  }

  .org-detail-name {
    font-size: 16px;
  }

  .org-detail-footer {
    padding: 12px 16px;
  }

  .org-manifesto {
    margin-bottom: 16px;
    border-radius: 12px;
  }

  .org-manifesto-title h3 {
    font-size: 14px;
  }

  .org-btn-primary {
    height: 36px;
    padding: 0 16px;
    font-size: 12px;
  }

  .org-btn-secondary {
    height: 36px;
    padding: 0 16px;
    font-size: 12px;
  }

  .org-btn-icon {
    width: 36px;
    height: 36px;
  }

  .org-view-btn {
    padding: 6px 12px;
    font-size: 12px;
  }

  .org-modal {
    max-width: 460px;
  }
}

/* Tablets / Mobile (768px and below) */
@media (max-width: 768px) {
  .org-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .org-header-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .org-node {
    width: 110px;
    padding: 6px 4px;
  }

  .org-node-avatar {
    width: 26px;
    height: 26px;
    font-size: 10px;
  }

  .org-node-title {
    font-size: 10px;
  }

  .org-node-name {
    font-size: 8px;
  }

  .org-tree-children {
    gap: 4px;
  }

  .org-detail-panel {
    width: 100vw;
  }

  .org-detail-avatar {
    width: 56px;
    height: 56px;
    font-size: 20px;
  }

  .org-manifesto-header {
    padding: 14px 16px;
  }

  .org-manifesto-body {
    padding: 0 16px 16px;
  }

  .org-manifesto-content {
    font-size: 12px;
    line-height: 1.6;
  }

  .org-modal {
    max-width: 100%;
    border-radius: 16px;
  }

  .org-list-item {
    padding: 10px 12px;
    gap: 10px;
  }

  .org-list-name {
    font-size: 13px;
  }

  .org-list-title {
    font-size: 11px;
  }
}

/* Small phones (480px and below) */
@media (max-width: 480px) {
  .org-view-toggle {
    width: 100%;
  }

  .org-view-btn {
    flex: 1;
    justify-content: center;
  }

  .org-node {
    width: 95px;
    padding: 5px 3px;
  }

  .org-node-avatar {
    width: 22px;
    height: 22px;
    font-size: 9px;
    margin-bottom: 3px;
  }

  .org-node-title {
    font-size: 9px;
  }

  .org-node-name {
    font-size: 7px;
  }

  .org-node-badge {
    font-size: 6px;
    padding: 1px 3px;
  }

  .org-header h1 {
    font-size: 16px;
  }
}
