/* ============================================
   PHASE 2 — ORG/TEAM MODE STYLES
   Additive only — zero changes to existing CSS
   ============================================ */

/* ==========================================
   WORKSPACE TOGGLE
   ========================================== */

.workspace-toggle-wrapper {
  padding: 12px 16px 8px;
  border-bottom: 1px solid var(--color-border);
}

.workspace-toggle {
  display: flex;
  align-items: center;
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
  position: relative;
}

.workspace-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 7px;
  border: none;
  background: transparent;
  color: var(--color-text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  z-index: 1;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.workspace-tab:hover {
  color: var(--color-text-primary);
}

.workspace-tab.active {
  background: var(--color-surface);
  color: var(--color-text-primary);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.08);
}

.workspace-tab.active.org-tab {
  background: linear-gradient(135deg, #4F46E5, #7C3AED);
  color: white;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.35);
}

.workspace-tab-icon {
  font-size: 13px;
  line-height: 1;
}

[data-theme="dark"] .workspace-tab.active {
  background: var(--color-bg-primary);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .workspace-tab.active.org-tab {
  background: linear-gradient(135deg, #4F46E5, #7C3AED);
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.4);
}

/* ==========================================
   ORG MODE SIDEBAR SECTIONS
   ========================================== */

.org-sidebar-sections {
  display: none;
  flex-direction: column;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
}

.org-sidebar-sections.visible {
  display: flex;
}

/* Hide personal sections when org mode is active */
.sidebar.org-active .personal-sidebar-content {
  display: none;
}

.sidebar.org-active .org-sidebar-sections {
  display: flex;
}

/* Personal content wrapper — wraps existing folders/trash */
.personal-sidebar-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
}

/* ==========================================
   ORG NAV ITEMS
   ========================================== */

.org-nav {
  padding: 12px 12px 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.org-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.18s ease;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  color: var(--color-text-secondary);
  font-size: 14px;
  font-weight: 500;
  position: relative;
}

.org-nav-item:hover {
  background: var(--color-bg-secondary);
  color: var(--color-text-primary);
}

.org-nav-item.active {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.12), rgba(124, 58, 237, 0.08));
  color: var(--color-primary);
  font-weight: 600;
}

.org-nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: linear-gradient(180deg, #4F46E5, #7C3AED);
  border-radius: 0 3px 3px 0;
}

.org-nav-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.org-nav-label {
  flex: 1;
}

.org-nav-count {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-secondary);
  background: var(--color-bg-secondary);
  padding: 2px 7px;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
}

.org-nav-item.active .org-nav-count {
  background: rgba(79, 70, 229, 0.15);
  color: var(--color-primary);
}

/* ==========================================
   ORG SECTION DIVIDER
   ========================================== */

.org-section-divider {
  margin: 8px 16px;
  height: 1px;
  background: var(--color-border);
  opacity: 0.6;
}

.org-section-label {
  padding: 8px 16px 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-tertiary);
}

/* ==========================================
   ORG MODE BADGE (main content area)
   ========================================== */

.org-mode-banner {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.08), rgba(124, 58, 237, 0.05));
  border-bottom: 1px solid rgba(79, 70, 229, 0.15);
  font-size: 12px;
  font-weight: 600;
  color: var(--color-primary);
  letter-spacing: 0.02em;
}

.org-mode-banner.visible {
  display: flex;
}

.org-mode-banner-icon {
  font-size: 14px;
}

.org-mode-banner-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4F46E5;
  margin-left: auto;
  animation: orgPulse 2.5s ease-in-out infinite;
}

@keyframes orgPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

/* ==========================================
   ORG WELCOME / EMPTY STATE
   ========================================== */

.org-empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  text-align: center;
  gap: 12px;
}

.org-empty-icon {
  font-size: 40px;
  opacity: 0.6;
}

.org-empty-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-primary);
}

.org-empty-desc {
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.5;
  max-width: 200px;
}

.org-empty-cta {
  margin-top: 8px;
  padding: 9px 18px;
  background: linear-gradient(135deg, #4F46E5, #7C3AED);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

.org-empty-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.4);
}

/* ==========================================
   NEW MEETING BUTTON (org sidebar footer)
   ========================================== */

.org-sidebar-footer {
  padding: 12px;
  border-top: 1px solid var(--color-border);
  margin-top: auto;
}

.btn-new-meeting {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  background: linear-gradient(135deg, #4F46E5, #7C3AED);
  color: white;
  border: none;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
  letter-spacing: 0.01em;
}

.btn-new-meeting:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.45);
}

.btn-new-meeting:active {
  transform: translateY(0);
}

/* ==========================================
   MAIN CONTENT — ORG VIEW PANELS
   ========================================== */

.org-panel {
  display: none;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.org-panel.active {
  display: flex;
}

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

.org-panel-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

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

/* ==========================================
   ORG MODE TRANSITION
   ========================================== */

.org-sidebar-sections {
  animation: fadeInSidebar 0.2s ease;
}

.personal-sidebar-content {
  animation: fadeInSidebar 0.2s ease;
}

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