/* ==========================================================================
   ReCyF Tool - Layout (Header, Sidebar, Main, Side Panel)
   ========================================================================== */

/* --- Unofficial Copy Banner --- */
.recyf-origin-banner {
  background: var(--color-warning, #f59e0b);
  color: var(--color-dark);
  text-align: center;
  padding: var(--space-sm) var(--space-lg);
  font-size: var(--text-sm);
  font-family: var(--font-body, Mulish, sans-serif);
  font-weight: var(--weight-semibold);
  z-index: var(--z-notice);
  position: relative;
}

.recyf-origin-banner a {
  color: #1a1a1a;
  text-decoration: underline;
  font-weight: 700;
}

.recyf-origin-banner a:hover {
  color: #000;
}

/* --- App Shell --- */
.app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  opacity: 1;
  transition: opacity 0.3s ease;
}
/* .app.hidden transition defined in base.css */

/* --- Header --- */
.header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  height: var(--header-height);
  padding: 0 var(--space-lg);
  background: var(--color-header-bg);
  color: var(--color-header-text);
  z-index: var(--z-header);
  flex-shrink: 0;
}

.header__logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
  color: var(--color-header-text);
}


.header__logo:hover {
  text-decoration: none;
}

.header__logo img {
  height: 40px;
  width: 40px;
}

.header__logo-text {
  font-family: var(--font-heading);
  font-weight: var(--weight-bold);
  font-size: var(--text-lg);
  letter-spacing: -0.02em;
}

.header__spacer {
  flex: 1;
}

.header__org-switcher {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  width: 200px;
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-md);
  color: var(--color-header-text);
  background: rgba(255, 255, 255, 0.08);
  font-size: var(--text-sm);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.header__org-switcher #org-switcher-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header__org-switcher:hover {
  background: rgba(255, 255, 255, 0.15);
}

.header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.header__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  color: var(--color-header-text);
  transition: background var(--transition-fast);
}

.header__btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* --- Language Switcher (pill style, matches header__btn height) --- */
.header__lang {
  display: inline-flex;
  align-items: center;
  height: 34px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.08);
  padding: 0 3px;
  gap: 2px;
}

.lang-btn {
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: var(--weight-semibold);
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
  line-height: 1;
}

.lang-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.lang-btn.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
}

/* --- Tools Menu (Hamburger Dropdown) --- */
.header__tools-wrap {
  position: relative;
}

.tools-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 240px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: var(--z-overlay);
  overflow: hidden;
}

.tools-menu.open {
  display: block;
}

.tools-menu__label {
  padding: var(--space-sm) var(--space-lg);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  background: var(--color-bg-alt);
  border-bottom: 1px solid var(--color-border-light);
}

.tools-menu__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-lg);
  font-size: var(--text-sm);
  color: var(--color-text);
  text-decoration: none;
  transition: background var(--transition-fast);
}

.tools-menu__item:hover {
  background: var(--color-bg-alt);
  text-decoration: none;
}

.tools-menu__item--active {
  color: var(--color-primary);
  font-weight: var(--weight-semibold);
}

.tools-menu__item svg {
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.tools-menu__badge {
  font-size: var(--text-xs);
  color: var(--color-primary);
  background: var(--color-primary-bg);
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  font-weight: var(--weight-semibold);
}

.tools-menu__divider {
  height: 1px;
  background: var(--color-border-light);
  margin: var(--space-xs) 0;
}

/* --- Org Dropdown --- */
.org-dropdown {
  position: absolute;
  top: calc(var(--header-height) - 6px);
  right: 0;
  min-width: 200px;
  width: 260px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: var(--z-overlay);
  overflow: hidden;
  max-height: 60vh;
  overflow-y: auto;
}

.org-dropdown__item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  font-size: var(--text-sm);
  color: var(--color-text);
  text-decoration: none;
  transition: background var(--transition-fast);
}

.org-dropdown__item:hover {
  background: var(--color-bg-alt);
  text-decoration: none;
}

.org-dropdown__item--active {
  background: var(--color-primary-bg);
  color: var(--color-primary);
  font-weight: var(--weight-semibold);
}

.org-dropdown__divider {
  height: 1px;
  background: var(--color-border-light);
  margin: var(--space-xs) 0;
}

.org-dropdown__empty {
  padding: var(--space-lg);
  text-align: center;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* --- Body (Sidebar + Main) --- */
.app__body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* --- Sidebar --- */
.sidebar {
  width: var(--sidebar-width);
  background: var(--color-sidebar-bg);
  color: var(--color-sidebar-text);
  display: flex;
  flex-direction: column;
  z-index: var(--z-sidebar);
  flex-shrink: 0;
  transition: width var(--transition-base);
  overflow: hidden;
}

#sidebar-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

#sidebar-nav:hover {
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

#sidebar-nav::-webkit-scrollbar {
  width: 4px;
}

#sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}

#sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

#sidebar-nav:hover::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
}

.sidebar.collapsed {
  width: var(--sidebar-collapsed-width);
  overflow: hidden;
}

/* --- Sidebar Search --- */
.sidebar__search {
  padding: var(--space-sm) var(--space-lg);
}

.sidebar__search-input {
  width: 100%;
  padding: var(--space-xs) var(--space-sm);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  color: var(--color-sidebar-text);
  font-size: var(--text-sm);
  font-family: var(--font-body);
  box-sizing: border-box;
  text-overflow: ellipsis;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.sidebar__search-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
  text-overflow: ellipsis;
}

.sidebar__search-input:focus {
  outline: none;
  border-color: var(--color-primary);
  background: rgba(255, 255, 255, 0.12);
}

.sidebar.collapsed .sidebar__subitems,
.sidebar.collapsed .sidebar__shortcuts,
.sidebar.collapsed .sidebar__search {
  display: none;
}

.sidebar.collapsed .sidebar__item {
  justify-content: center;
  padding: var(--space-md) 0;
}

.sidebar.collapsed .sidebar__section {
  padding: var(--space-xs) 0;
}

.sidebar__section {
  padding: var(--space-sm) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar__label {
  padding: var(--space-md) var(--space-xl);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
}

.sidebar.collapsed .sidebar__label {
  display: none;
}

.sidebar__item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-xl);
  color: var(--color-sidebar-text);
  font-size: var(--text-base);
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
}

.sidebar__item:hover {
  background: var(--color-sidebar-hover);
  color: #ffffff;
  text-decoration: none;
}

.sidebar__item.active {
  background: rgba(43, 122, 15, 0.15);
  color: #ffffff;
  border-left: 3px solid var(--color-primary);
  border-right: none;
  padding-left: calc(var(--space-xl) - 3px);
}

.sidebar.collapsed .sidebar__item.active {
  border-right: none;
  border-left: 3px solid var(--color-primary);
  padding-left: calc(var(--space-md) - 3px);
}

.sidebar__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.85;
}

.sidebar__icon svg {
  width: 18px;
  height: 18px;
}

.sidebar.collapsed .sidebar__item span:not(.sidebar__icon) {
  display: none;
}

/* --- Sidebar Groups (expandable) --- */
.sidebar__group {}

.sidebar__expand {
  margin-left: auto;
  transition: transform var(--transition-fast);
  opacity: 0.4;
  flex-shrink: 0;
}

.sidebar__group--open .sidebar__expand {
  transform: rotate(90deg);
  opacity: 0.7;
}

.sidebar__subitems {
  padding: 0 0 var(--space-xs) 0;
}

.sidebar__subitem {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xs) var(--space-xl);
  padding-left: calc(var(--space-xl) + 28px);
  color: var(--color-sidebar-text);
  font-size: var(--text-xs);
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
  opacity: 0.75;
}

.sidebar__subitem:hover {
  background: var(--color-sidebar-hover);
  color: #ffffff;
  opacity: 1;
  text-decoration: none;
}

.sidebar__subitem.active {
  color: var(--color-primary-light);
  opacity: 1;
}

.sidebar__subitem-meta {
  margin-left: auto;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  opacity: 0.6;
}

.sidebar__func-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 18px;
  border-radius: var(--radius-sm);
  background: rgba(43, 122, 15, 0.2);
  color: var(--color-primary-light);
  font-size: 9px;
  font-weight: var(--weight-bold);
  font-family: var(--font-mono);
  flex-shrink: 0;
}

.sidebar__func-badge--icon {
  background: none;
  color: var(--color-primary);
  width: 20px;
  height: 20px;
}

.sidebar__item--back {
  opacity: 0.6;
  font-size: var(--text-sm);
}

.sidebar__item--back:hover {
  opacity: 1;
}

/* --- Sidebar: Entity Name & Badge --- */
.sidebar__org-name {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-xl);
  padding-left: calc(var(--space-xl) + 4px);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-sidebar-text);
  white-space: nowrap;
  overflow: hidden;
  max-width: 100%;
  text-overflow: ellipsis;
}

.sidebar__org-name-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.badge--entity-type {
  flex-shrink: 0;
  min-width: 2.5rem;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.badge--entity-type--ei {
  background: var(--color-entity-ei);
  color: #fff;
}

.badge--entity-type--ee {
  background: var(--color-entity-ee);
  color: #fff;
}

/* --- Sidebar: Pillars nested under Assessment --- */
.sidebar__assess-children {
  padding-left: calc(var(--space-md) + var(--space-sm));
  margin-left: var(--space-sm);
  border-left: 1px solid rgba(255,255,255,0.08);
}

.sidebar__assess-children .sidebar__pillar-toggle {
  padding-left: var(--space-md);
  font-size: var(--text-xs);
}

.sidebar__assess-children .sidebar__pillar-label {
  padding-left: var(--space-md);
  font-size: var(--text-xs);
}

.sidebar__assess-children .sidebar__obj-item {
  padding-left: calc(var(--space-md) + var(--space-lg));
  font-size: var(--text-xs);
}

.sidebar__assess-children .sidebar__obj-bar {
  margin-left: calc(var(--space-md) + var(--space-lg) + 3px);
}

.sidebar__section--pillars-nested {
  padding: 0 0 var(--space-sm);
  border-bottom: none;
}

/* Dim pillars when Dashboard is active */
.sidebar__assess-children--dimmed {
  opacity: 0.5;
  transition: opacity var(--transition-fast);
}

.sidebar__assess-children--dimmed:hover {
  opacity: 0.85;
}

/* Hide nested pillars when sidebar is collapsed */
.sidebar.collapsed .sidebar__assess-children {
  display: none;
}

/* --- Sidebar: Reference sub-tabs (collapsible) --- */
/* Collapse button inside the active Reference link */
.sidebar__ref-collapse-btn {
  margin-left: auto;
  background: none;
  border: none;
  color: rgba(255,255,255,0.4);
  font-size: 0.55rem;
  cursor: pointer;
  padding: 4px 6px;
  line-height: 1;
  border-radius: var(--radius-sm);
}
.sidebar__ref-collapse-btn:hover {
  color: rgba(255,255,255,0.8);
  background: rgba(255,255,255,0.08);
}
/* Make the active reference link a flex container for the collapse button */
.sidebar__item.active:has(.sidebar__ref-collapse-btn) {
  display: flex;
  align-items: center;
}

.sidebar__ref-children {
  margin-left: calc(var(--space-md) + var(--space-sm));
  padding-left: var(--space-sm);
  border-left: 1px solid rgba(255,255,255,0.08);
}

.sidebar__ref-children--collapsed {
  display: none;
}

.sidebar__ref-subtabs {
  padding: 0 0 var(--space-xs) 0;
}

.sidebar.collapsed .sidebar__ref-subtabs,
.sidebar.collapsed .sidebar__ref-children,
.sidebar.collapsed .sidebar__ref-toggle {
  display: none;
}

.sidebar__item-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar__icon--badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 18px;
  border-radius: var(--radius-sm);
  font-size: 10px;
  font-weight: var(--weight-bold);
  color: #ffffff;
  flex-shrink: 0;
}

.sidebar__icon--badge.badge--basic { background: var(--color-level-basic); }
.sidebar__icon--badge.badge--important { background: var(--color-level-important); }
.sidebar__icon--badge.badge--essential { background: var(--color-level-essential); }

/* --- Keyboard Shortcuts Hint --- */
.sidebar__shortcuts {
  opacity: 0.5;
  padding-bottom: var(--space-md);
}

.sidebar__shortcut {
  padding: 2px var(--space-xl);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.sidebar__shortcut kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.05);
}

/* --- Sidebar Footer --- */
.sidebar__footer {
  padding: var(--space-xs) var(--space-md);
  font-size: 10px;
  color: rgba(255, 255, 255, 0.45);
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  align-items: center;
  justify-content: center;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  line-height: 1.4;
}

.sidebar__footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  justify-content: center;
}

.sidebar__footer-sep {
  opacity: 0.4;
  margin: 0 1px;
}

.sidebar__footer-copy {
  opacity: 0.5;
  font-size: 10px;
  width: 100%;
  text-align: center;
}

.sidebar__footer a {
  color: var(--color-text-muted);
  text-decoration: none;
}

.sidebar__footer a:hover {
  color: #ffffff;
}

.sidebar.collapsed .sidebar__footer {
  display: none;
}

.sidebar__toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  cursor: pointer;
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.sidebar__toggle:hover {
  color: #ffffff;
}

/* --- Sidebar: Pillar Groups & Objective List --- */
.sidebar__section--pillars {
  padding: var(--space-sm) 0 var(--space-md);
}

.sidebar__pillar-group {
  margin-bottom: var(--space-sm);
}

.sidebar__pillar-toggle {
  display: flex;
  align-items: center;
  width: 100%;
  background: none;
  border: none;
  padding: var(--space-sm) var(--space-lg);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.7);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  font-family: inherit;
  transition: color var(--transition-fast);
}

.sidebar__pillar-toggle:hover {
  color: rgba(255, 255, 255, 0.95);
}

.sidebar__pillar-arrow {
  font-size: 8px;
  margin-right: 6px;
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.sidebar__pillar-objectives {
  overflow: hidden;
}

.sidebar__pillar-label {
  display: block;
  padding: var(--space-sm) var(--space-lg);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.7);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar__obj-item {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-lg);
  padding-left: calc(var(--space-lg) + 11px);
  color: var(--color-sidebar-text);
  font-size: var(--text-xs);
  text-decoration: none;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
  white-space: nowrap;
  opacity: 0.8;
}

.sidebar__obj-item:hover {
  background: var(--color-sidebar-hover);
  color: #ffffff;
  opacity: 1;
  text-decoration: none;
}

.sidebar__obj-item.active {
  color: var(--color-primary-light);
  opacity: 1;
}

.sidebar__obj-num {
  flex-shrink: 0;
  min-width: 1.6em;
  font-weight: var(--weight-semibold);
  font-variant-numeric: tabular-nums;
}

.sidebar__obj-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.sidebar__obj-pct {
  flex-shrink: 0;
  margin-left: auto;
  padding-left: var(--space-sm);
  font-size: var(--text-xs);
  font-variant-numeric: tabular-nums;
  color: var(--color-text-muted);
  opacity: 0.7;
  min-width: 2.5em;
  text-align: right;
}

.sidebar__obj-bar {
  height: 2px;
  border-radius: 1px;
  margin: 0 var(--space-lg) var(--space-xs);
  margin-left: calc(var(--space-lg) + 11px);
  overflow: hidden;
}

.sidebar__obj-bar-fill {
  height: 100%;
  border-radius: 1px;
  transition: width 0.3s ease;
}

/* --- EE-only objectives toggle & group --- */
.sidebar__pillar-group--ee {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: var(--space-sm);
  padding-top: var(--space-xs);
}

.sidebar__ee-toggle {
  display: flex;
  align-items: center;
  width: 100%;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: inherit;
  font: inherit;
}

.sidebar__ee-toggle .sidebar__pillar-label {
  flex: 1;
  text-align: left;
}

.sidebar__ee-toggle .sidebar__expand {
  margin-right: var(--space-lg);
  opacity: 0.4;
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.sidebar__ee-toggle:hover .sidebar__expand {
  opacity: 0.7;
}

.sidebar__ee-objectives {
  padding-bottom: var(--space-xs);
}

.sidebar__obj-item--ee {
  opacity: 0.65;
}

.sidebar__obj-item--ee:hover {
  opacity: 0.9;
}

/* Hide pillar section items when sidebar is collapsed */
.sidebar.collapsed .sidebar__section--pillars {
  display: none;
}

/* --- Main Content --- */
.main {
  flex: 1;
  display: flex;
  overflow: hidden;
}

.main__content {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-lg) var(--space-xl);
}

/* When assessment is active, the layout manages its own padding/scrolling */
.main__content:has(.assess-layout) {
  padding: 0;
  overflow: hidden;
}

/* --- Side Panel (Requirement Detail) --- */
.side-panel {
  width: var(--side-panel-width);
  min-width: var(--side-panel-min-width);
  max-width: var(--side-panel-max-width);
  background: var(--color-bg);
  border-left: 1px solid var(--color-border);
  overflow-y: auto;
  display: none;
  flex-direction: column;
}

.side-panel.open {
  display: flex;
}

.side-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}

.side-panel__title {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
}

.side-panel__close {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  font-size: var(--text-lg);
}

.side-panel__close:hover {
  background: var(--color-bg-alt);
  color: var(--color-text);
}

.side-panel__body {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-lg);
}

/* --- Resize Handle --- */
.side-panel__resize {
  position: absolute;
  left: -3px;
  top: 0;
  bottom: 0;
  width: 6px;
  cursor: col-resize;
  z-index: var(--z-above);
}

.side-panel__resize:hover {
  background: var(--color-primary-bg);
}

/* --- Offline Badge --- */
.offline-badge { display: none; font-size: 11px; padding: 2px 8px; border-radius: var(--radius-pill); background: var(--color-warning); color: #fff; margin-right: var(--space-sm); }
.offline-badge.visible { display: inline-block; }

/* --- Save Indicator --- */
.save-indicator { font-size: 11px; color: var(--color-text-muted); opacity: 0; transition: opacity 0.3s; margin-right: var(--space-sm); }
.save-indicator.visible { opacity: 1; }
