/* БЛОК: Layout, header, breadcrumb, file-controls */
.layout {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  position: relative;
}
.sidebar-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 10px;
  background: var(--yd-hover);
  cursor: pointer;
  flex-shrink: 0;
}
.sidebar-toggle svg { width: 22px; height: 22px; }
.header {
  flex-shrink: 0;
  background: var(--yd-page-bg);
  border-bottom: none;
  padding: 0 20px;
  min-height: 56px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 10;
}
.header-bar {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
}
.header-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  height: 40px;
  padding: 0 2px;
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  color: var(--yd-text);
  text-decoration: none;
  white-space: nowrap;
}
.header-brand:hover { color: var(--yd-red); }
.header-bar-sep {
  flex-shrink: 0;
  color: var(--yd-border);
  font-size: 18px;
  font-weight: 300;
  line-height: 40px;
  user-select: none;
}
.breadcrumb {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  height: 40px;
  font-size: 15px;
  line-height: 40px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.breadcrumb::-webkit-scrollbar { display: none; }
.breadcrumb a,
.breadcrumb span,
.breadcrumb .current {
  display: inline-flex;
  align-items: center;
  height: 40px;
  line-height: 1;
  white-space: nowrap;
  flex-shrink: 0;
}
.breadcrumb a {
  color: var(--yd-text-muted);
  text-decoration: none;
}
.breadcrumb a:hover { color: var(--yd-red); }
.breadcrumb .sep {
  color: var(--yd-border);
  user-select: none;
  line-height: 40px;
  flex-shrink: 0;
}
.breadcrumb .current {
  color: var(--yd-text);
  font-weight: 500;
}
.breadcrumb-hint {
  color: var(--yd-text-muted);
  font-weight: 400;
}
.file-controls {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding: 0 24px 10px;
  background: var(--yd-page-bg);
  position: relative;
  z-index: 9;
}
.file-controls-inner {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: wrap;
}
.file-dropdown {
  position: relative;
}
.file-control-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px 7px 8px;
  border: none;
  border-radius: 8px;
  background: transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 400;
  color: var(--yd-text);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s;
}
.file-control-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}
.file-control-btn[aria-expanded="true"] {
  background: rgba(0, 0, 0, 0.07);
}
.file-control-btn .ctrl-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.file-control-btn .ctrl-chevron {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--yd-text-muted);
  margin-left: -2px;
}
.file-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 220px;
  background: var(--yd-bg);
  border: 1px solid var(--yd-border);
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
  padding: 6px;
  z-index: 30;
}
.file-dropdown-menu[hidden] {
  display: none;
}
.file-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  color: var(--yd-text);
}
.file-dropdown-item:hover {
  background: var(--yd-hover);
}
.file-dropdown-item.active {
  font-weight: 500;
}
.file-dropdown-item .item-check {
  width: 16px;
  flex-shrink: 0;
  color: var(--yd-red);
  opacity: 0;
  font-size: 14px;
  line-height: 1;
}
.file-dropdown-item.active .item-check {
  opacity: 1;
}
.file-dropdown-sep {
  height: 1px;
  margin: 4px 8px;
  background: var(--yd-border);
}
