.app-shell {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ---- Sidebar (matches the Studio / Workflow sidebar in canvas.css) ---- */
.sidebar {
  width: 220px;
  background: #101014; /* matches --sidebar-bg on the Studio / Workflow pages */
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 14px 10px;
  flex-shrink: 0;
}

/* Quiet text row, not a filled button (Arcads) */
.new-project-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 7px;
  background: none;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
}

.new-project-btn svg { color: var(--text-secondary); }

.new-project-btn:hover {
  background: rgba(255, 255, 255, 0.05);
}

.sidebar-section {
  margin-bottom: 6px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.folder-tree, .project-list-mini {
  display: flex;
  flex-direction: column;
}

.folder-row {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 8px;
  border-radius: 7px;
  font-size: 13px;
  color: var(--text-primary);
  cursor: pointer;
}

.folder-row:hover {
  background: rgba(255, 255, 255, 0.05);
}

.folder-row .chevron-icon {
  display: inline-flex;
  color: var(--text-secondary);
  transition: transform 0.15s;
}

.folder-row.collapsed .chevron-icon {
  transform: rotate(-90deg);
}

.folder-row-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.folder-row-menu-btn {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  color: var(--text-secondary);
}

.folder-row:hover .folder-row-menu-btn {
  display: flex;
}

.folder-row-menu-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.project-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 7px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
}

.project-row:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.project-row-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-row-menu-btn {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  color: var(--text-secondary);
}

.project-row:hover .project-row-menu-btn {
  display: flex;
}

.project-row-menu-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.folder-children {
  margin-left: 14px;
  display: flex;
  flex-direction: column;
}

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

.empty-hint {
  padding: 6px 8px;
  font-size: 12px;
  color: var(--text-secondary);
}

.sidebar-bottom {
  margin-top: auto;
  display: flex;
  gap: 6px;
}

/* ---- Main content ---- */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
}

.main-header h1 {
  font-size: 15px;
  font-weight: 600;
}

.main-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.main-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.empty-state {
  text-align: center;
  max-width: 320px;
}

.empty-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.empty-state h2 {
  font-size: 15px;
  margin-bottom: 6px;
}

.empty-state p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 18px;
}

.empty-state .pill-btn {
  margin: 0 auto;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  width: 100%;
  max-width: 900px;
  align-content: start;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
}

.project-card:hover {
  border-color: rgba(255, 255, 255, 0.25);
}

.project-card .card-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: rgba(180, 255, 60, 0.1);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.project-card .card-name {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 2px;
}

.project-card .card-date {
  font-size: 12px;
  color: var(--text-secondary);
}
