/* Кастомный скролл для списка проектов */
.projects-list::-webkit-scrollbar {
  width: 7px;
}
.projects-list::-webkit-scrollbar-track {
  background: transparent;
}
.projects-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: linear-gradient(120deg, #ff62c5, #00b4ff);
  box-shadow: 0 0 10px rgba(0,0,0,0.8);
}
.projects-list {
  scrollbar-width: thin;
  scrollbar-color: #ff62c5 #181825;
}
/* Карточка папки в списке проектов */
.folder-card {
  background: linear-gradient(90deg, #23243a 60%, #23243a 100%);
  border: 1.5px dashed #4e4e7e;
  color: #b6b7d6;
  cursor: pointer;
  transition: border 0.2s, box-shadow 0.2s;
}
.folder-card:hover {
  border: 1.5px solid #7a7ad6;
  box-shadow: 0 2px 8px 0 rgba(122,122,214,0.08);
  background: linear-gradient(90deg, #2a2b4a 60%, #23243a 100%);
}
.folder-card .project-title {
  font-weight: 600;
  color: #e9e9f4;
}
.folder-card .thumb-label {
  color: #7a7ad6;
  font-weight: 700;
}
.folder-card .thumb-type {
  color: #b6b7d6;
  font-size: 12px;
}
/* --- Стили для инлайн-редактирования названия и описания (input, textarea) --- */
.details-title-edit, .details-path-edit {
  background: rgba(20, 18, 28, 0.98);
  color: #f5f5ff;
  border: 1px solid #ff62c5;
  border-radius: 10px;
  padding: 7px 12px;
  font-size: 18px;
  font-weight: 600;
  box-shadow: 0 2px 12px rgba(255,0,140,0.08);
  outline: none;
  scrollbar-width: thin;
  scrollbar-color: #ff62c5 #181825;
}

.tree::-webkit-scrollbar {
  width: 6px;
}
.tree::-webkit-scrollbar-track {
  background: transparent;
}
.tree::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: linear-gradient(120deg, #ff62c5, #00b4ff);
  box-shadow: 0 0 10px rgba(0,0,0,0.8);
}
.details-title-edit:focus, .details-path-edit:focus {
  border-color: #00b4ff;
}
.details-desc-edit {
  background: rgba(20, 18, 28, 0.98);
  color: #f5f5ff;
  border: 1px solid #ff62c5;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 15px;
  box-shadow: 0 2px 12px rgba(255,0,140,0.08);
  outline: none;
  resize: vertical;
  transition: border-color 0.18s;
}
.details-desc-edit:focus {
  border-color: #00b4ff;
}

/* --- Стили для полей редактирования дерева --- */
.tree-edit-input, .tree-edit-textarea {
  background: rgba(20, 18, 28, 0.98);
  color: #f5f5ff;
  border: 1px solid #ff62c5;
  border-radius: 12px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 4px 24px rgba(255,0,140,0.12);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
  margin-top: 2px;
  scrollbar-width: thin;
  scrollbar-color: #ff62c5 #181825;
}
.tree-edit-textarea {
  padding: 10px 14px;
  resize: vertical;
  min-height: 32px;
}
.tree-edit-input:focus, .tree-edit-textarea:focus {
  border-color: #00b4ff;
  box-shadow: 0 0 0 2px rgba(0,180,255,0.27);
}
.tree-edit-actions {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}
.tree-edit-btn {
  border-radius: 999px;
  padding: 5px 14px;
  border: none;
  background: linear-gradient(120deg, #ff62c5, #ff008c);
  color: #07040a;
  font-size: 12px;
  font-weight: 550;
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08);
  transition: background 0.2s;
}
.tree-edit-btn.cancel {
  background: rgba(255,255,255,0.08);
  color: #d0d0df;
}

/* ---------- Панели и layout для дерева проектов ---------- */
.main {
  flex: 1;
  display: grid;
  grid-template-columns: 280px 420px 1fr;
  gap: 18px;
  min-height: 0;
}

.main.main--tree-standalone {
  grid-template-columns: 280px minmax(0, 1fr);
}

@media (max-width: 1200px) {
  .main {
    grid-template-columns: 1fr 1.2fr;
    grid-template-rows: auto minmax(0, 1fr);
  }
  .panel-right {
    grid-column: 1 / -1;
  }
}

@media (max-width: 840px) {
  .main {
    grid-template-columns: minmax(0,1fr);
    grid-template-rows: auto auto auto;
  }
}

.panel {
  border-radius: 24px;
  background:
    radial-gradient(circle at 0 0, rgba(255,0,140,0.18), transparent 55%),
    rgba(9,9,16,0.96);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow:
    0 24px 64px rgba(0,0,0,0.9),
    0 0 0 1px rgba(255,255,255,0.02);
  padding: 14px 14px 12px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.panel-tree .panel-header {
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.panel-tree .panel-toolbar {
  width: 100%;
  justify-content: flex-start;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.panel-title {
  font-size: 14px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #d6d6e5;
}

.panel-sub {
  font-size: 12px;
  color: #9090a5;
}

.panel-toolbar {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
}

.pill-btn {
  border-radius: 999px;
  padding: 5px 10px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.03);
  font-size: 12px;
  color: #f5f5ff;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  white-space: nowrap;
}

.pill-btn.primary {
  border-color: rgba(255,0,140,0.6);
  background: linear-gradient(120deg, #ff62c5, #ff008c);
  color: #07040a;
  font-weight: 550;
}

.pill-btn.icon {
  padding-inline: 8px;
}

.icon-btn {
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.03);
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}
.icon-btn svg {
  width: 15px;
  height: 15px;
  stroke: #f7f7ff;
  stroke-width: 1.6;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-btn:hover {
  background: rgba(255,255,255,0.08);
}
.icon-btn-danger {
  border-color: rgba(255,80,120,0.7);
  background: rgba(255,0,80,0.18);
}
.icon-btn-danger:hover {
  background: rgba(255,0,80,0.26);
}

/* --- Дерево проектов (tree) --- */
.tree {
  font-size: 13px;
  color: #d0d0df;
  padding: 4px 0;
  padding-right: 18px;
  margin-right: -14px;
  overflow: auto;
  height: 100%;
  min-height: 220px;
  max-height: 60vh;
  scrollbar-gutter: stable;
}

.tree-node {
  display: flex;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 12px;
  cursor: pointer;
  border: 1px solid transparent;
  background: transparent;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.tree-node:hover {
  border-color: rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.05);
}

.tree-node.active {
  border-color: rgba(255,255,255,0.32);
  background: linear-gradient(135deg, rgba(255,255,255,0.06), rgba(255,0,140,0.18));
  box-shadow: 0 0 0 1px rgba(255,0,140,0.5);
}

.tree-node.favorite {
  border-color: transparent;
  background: transparent;
}

.tree-node.active.favorite {
  border-color: #ffd86f;
  background: rgba(255,215,120,0.28);
  box-shadow:
    0 0 0 1px rgba(255,215,120,0.65),
    0 8px 22px rgba(255,215,120,0.3);
}

.tree-head {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.tree-name {
  display: inline-flex;
  align-items: flex-end;
  gap: 4px;
  flex-wrap: wrap;
}

.tree-icon {
  width: 26px;
  min-width: 26px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0.9;
}

.tree-icon img {
  width: 22px;
  height: 20px;
  object-fit: contain;
  display: block;
  filter: brightness(0) invert(1);
}

.tree-icon svg {
  width: 20px;
  height: 20px;
  stroke: #ff62c5;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tree-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tree-label-main {
  font-size: 13px;
}

.tree-label-sub {
  font-size: 11px;
  color: #8f90a5;
}

.tree-placeholder {
  padding: 12px;
  text-align: center;
  color: #8f90a5;
  font-size: 12px;
}

.tree-indent-1 { padding-left: 16px; }
.tree-indent-2 { padding-left: 32px; }
.tree-indent-3 { padding-left: 48px; }
.tree-indent-4 { padding-left: 64px; }
.tree-indent-5 { padding-left: 80px; }
.tree-indent-6 { padding-left: 96px; }

.project-fav-star-btn {
  border: none;
  background: transparent;
  color: #8b8ea3;
  font-size: 14px;
  line-height: 1;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-right: 6px;
  padding: 0;
}
.project-fav-star-btn.active {
  color: #ffd86f;
  text-shadow: 0 0 6px rgba(255,216,111,0.65);
}
/* Розовая рамка для выделенного проекта */
.project-card.selected,
.project-card.active {
  border: 1px solid #ff3fa6 !important;
  box-shadow: 0 0 0 1px #ff3fa633;
}
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background: radial-gradient(circle at top, #1c1c1f 0, #050509 55%, #000 100%);
  color: #f5f5f5;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
}

.shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 18px 18px 26px;
}

/* ---------- TOP BAR + NAV ---------- */

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.brand-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.98;
  display: inline-flex;
  align-items: center;
  gap: 16px;
}

.brand-title span.logo {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: radial-gradient(circle at 20% 0, #ffd6f1, #ff008c);
  box-shadow:
    0 0 26px rgba(255, 0, 140, 0.9),
    0 0 0 1px rgba(0, 0, 0, 0.7);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.brand-title span.logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}

.brand-title span.mark {
  color: #ff6fc9;
}

.brand-sub {
  font-size: 13px;
  color: #b6b6c7;
  letter-spacing: 0.22em;
}

.top-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.top-right-text {
  font-size: 12px;
  color: #b4b4b8;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  white-space: nowrap;
}

.lang-switch {
  display: inline-flex;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

.lang-btn {
  border: none;
  background: transparent;
  padding: 5px 13px;
  font-size: 12px;
  color: #c2c2d0;
  cursor: pointer;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.lang-btn--active {
  background: linear-gradient(120deg, #ff62c5, #ff008c);
  color: #07040a;
}

.nav-bar {
  margin-top: 10px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.nav-links {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
}

.nav-link {
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid transparent;
  color: #c6c6d5;
  background: rgba(255, 255, 255, 0.03);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.nav-link span.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle at 20% 0, #ffd6f1, #ff008c);
}

.nav-link--ghost span.dot {
  background: radial-gradient(circle at 20% 0, #d0f3ff, #00b4ff);
}

.nav-link--active {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  box-shadow: 0 0 0 1px rgba(255, 0, 140, 0.45);
}

.nav-secondary {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.btn-outline {
  border-radius: 999px;
  padding: 7px 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.03);
  font-size: 13px;
  color: #f5f5ff;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  white-space: nowrap;
}

.btn-outline--active {
  border-color: rgba(255, 0, 140, 0.7);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  box-shadow: 0 0 0 1px rgba(255, 0, 140, 0.45);
}

.btn-primary {
  border-radius: 999px;
  padding: 8px 18px;
  border: none;
  background: linear-gradient(120deg, #ff62c5, #ff008c);
  font-size: 14px;
  color: #07040a;
  font-weight: 550;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow:
    0 0 26px rgba(255, 0, 140, 0.8),
    0 0 0 1px rgba(255, 255, 255, 0.1);
}

.btn-primary span.icon {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.accent {
  background: linear-gradient(120deg, #ff62c5, #ffcf4b);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

.projects-list .project-card {
  margin-bottom: 9px;
}
.projects-list .project-card:last-child {
  margin-bottom: 0;
}

@media (max-width: 640px) {
  .shell {
    padding: 12px;
  }

  .nav-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-secondary {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .top-right {
    justify-content: space-between;
    width: 100%;
  }
}

/* ---------- PLACEHOLDER SECTIONS ---------- */

.placeholder {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 0;
}

.placeholder-card {
  width: min(680px, 100%);
  border-radius: 28px;
  padding: 36px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background:
    radial-gradient(circle at 0 0, rgba(255, 0, 140, 0.18), transparent 55%),
    radial-gradient(circle at 100% 100%, rgba(0, 180, 255, 0.12), transparent 60%),
    rgba(7, 6, 12, 0.9);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.placeholder-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #ffe2ff;
}

.placeholder-title {
  font-size: clamp(28px, 5vw, 40px);
  line-height: 1.2;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.placeholder-desc {
  margin: 0;
  font-size: 16px;
  color: #dcdcec;
  line-height: 1.5;
}

.placeholder-note {
  margin: 0;
  font-size: 14px;
  color: #b6b6c7;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 640px) {
  .placeholder-card {
    padding: 26px;
  }
}
