.layout-root {
  flex: 1;
  min-height: 0;
  padding: var(--gutter-size);
  background: var(--bg-gutter);
  overflow: hidden;
}

.workspace-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  gap: 6px;
  color: var(--text-muted);
}

.workspace-empty-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.workspace-empty-hint {
  font-size: 11px;
}

/* Splits */

.split {
  display: grid;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
}

.split-pane {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.split-pane > .split,
.split-pane > .panel-frame {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
}

.split-gutter {
  background: transparent;
  cursor: col-resize;
  transition: background var(--transition);
}

.split--vertical .split-gutter {
  cursor: row-resize;
}

.split-gutter:hover {
  background: var(--outline);
}

/* Panel frame with draggable outline */

.panel-frame {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-panel);
}

.panel-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid var(--outline);
  pointer-events: none;
  z-index: 55;
  transition: border-color var(--transition);
}

.panel-frame:hover:has(.panel-edge:hover)::after {
  border-color: var(--outline-hover);
}

.panel-frame--dragging {
  opacity: 0.45;
}

.panel-edge {
  position: absolute;
  z-index: 60;
  background: transparent;
}

.panel-edge--top {
  top: -2px;
  left: 8px;
  right: 8px;
  height: 5px;
  cursor: grab;
}

.panel-edge--bottom {
  bottom: -2px;
  left: 8px;
  right: 8px;
  height: 5px;
  cursor: grab;
}

.panel-edge--left {
  left: -2px;
  top: 8px;
  bottom: 8px;
  width: 5px;
  cursor: grab;
}

.panel-edge--right {
  right: -2px;
  top: 8px;
  bottom: 8px;
  width: 5px;
  cursor: grab;
}

.panel-edge:active {
  cursor: grabbing;
}

/* Panel */

.panel {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  background: var(--bg-panel);
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.panel-header {
  display: flex;
  align-items: center;
  height: var(--panel-header-height);
  min-height: var(--panel-header-height);
  padding: 0 8px;
  background: linear-gradient(180deg, #3e3e3e 0%, var(--bg-panel-header) 100%);
  border-bottom: 1px solid var(--outline-subtle);
  gap: 6px;
}

.panel-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.9;
}

.panel-icon--filetree-repo {
  filter: var(--icon-repo-filter);
}

.panel-icon--filetree-workspace {
  filter: var(--icon-workspace-filter);
}

.panel-icon--history {
  filter: var(--icon-history-filter);
}

.panel-icon--availability {
  filter: var(--icon-organization-filter);
}

.panel-icon--members {
  filter: var(--icon-organization-filter);
}

/* User Management / Manage Devices icons stay the SVG's native near-white,
   matching Console and Server Management. (The Administration menu tab keeps
   its maroon filter — that's a different selector in components.css.) */
.panel-icon--users {
  filter: none;
}

.panel-title {
  font-weight: 600;
  font-size: 12px;
  text-shadow: var(--text-shadow);
}

.panel-header-menus {
  display: flex;
  gap: 2px;
  margin-left: 8px;
}

.panel-header-menu {
  position: relative;
  padding: 2px 8px;
  font-size: 11px;
  font-family: var(--font-ui);
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.panel-header-menu:hover {
  background: var(--bg-hover-strong);
  color: var(--text-primary);
}

/* "List Changes" shimmer — a white band wipes left-to-right across the
   label roughly every 12 seconds while the changelist has anything in it
   (Settings > Appearance > List changes hint turns it off).
   Cousin of the Pull Latest .tree-label--pulse flash in components.css,
   but a directional wipe rather than a whole-label glow.

   The band lives on an aria-hidden overlay copy of the label rather than on
   the button's own text: background-clip:text requires color:transparent,
   which would permanently defeat .panel-header-menu:hover's colour change. */
.panel-header-shimmer {
  position: absolute;
  inset: 2px 8px; /* matches .panel-header-menu's padding box */
  pointer-events: none;
  white-space: nowrap;
  background-image: linear-gradient(
    100deg,
    transparent 40%,
    rgba(255, 255, 255, 0.95) 50%,
    transparent 60%
  );
  background-size: 300% 100%;
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: list-changes-shimmer 12s linear infinite;
}

@keyframes list-changes-shimmer {
  /* background-position runs 100% -> 0% because the gradient is 3x the
     element's width: at 100% the bright band sits off the left edge, at 0%
     off the right edge, so decreasing it sweeps left-to-right. The sweep
     takes the first 12% of the cycle (~1.4s) and then rests off-glyph for
     the remaining ~10.6s — a periodic shimmer, not a continuous crawl. */
  0% {
    background-position: 100% 0;
  }
  12%,
  100% {
    background-position: 0% 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .panel-header-shimmer {
    display: none;
  }
}

.panel-body {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--bg-panel-inner);
}

/* Drag drop */

.drop-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 58;
  border-radius: var(--radius-md);
}

.drop-zone {
  position: absolute;
  pointer-events: all;
  background: transparent;
  transition: background var(--transition);
  border-radius: var(--radius-sm);
}

.drop-zone--active {
  background: rgba(86, 128, 194, 0.35);
  outline: 2px solid var(--bg-selected);
}

.drop-zone--left {
  top: 0;
  left: 0;
  width: 25%;
  height: 100%;
}

.drop-zone--right {
  top: 0;
  right: 0;
  width: 25%;
  height: 100%;
}

.drop-zone--top {
  top: 0;
  left: 0;
  width: 100%;
  height: 25%;
}

.drop-zone--bottom {
  bottom: 0;
  left: 0;
  width: 100%;
  height: 25%;
}

.drag-ghost {
  position: fixed;
  z-index: 1000;
  pointer-events: none;
  opacity: 0.9;
  border-radius: var(--radius-md);
  outline: 1px solid var(--outline-hover);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

/* Disconnected notice (server-backed pages with no active connection) */

.workspace-empty-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 6px 14px;
  border: 1px solid var(--outline-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-panel-inner);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}

.workspace-empty-action:hover {
  background: var(--bg-hover-strong);
  border-color: var(--outline);
}

.workspace-empty-action img {
  width: 14px;
  height: 14px;
  opacity: 0.85;
}
