
.auth-wrap {
  min-height: 70vh;
  display: grid;
  place-items: center;
}

.auth-card {
  width: min(30rem, 100%);
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.empty-state {
  padding: 1.2rem 0 0;
  border-top: 1px solid var(--border);
}

.folder-grid {
  grid-template-columns: 1fr;
}

.folder-row {
  position: relative;
  padding: 0.9rem 1.1rem;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 2px rgba(30, 35, 41, 0.04), 0 10px 24px -16px rgba(30, 35, 41, 0.35);
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.folder-row:hover {
  border-color: var(--border-strong);
  box-shadow: 0 2px 4px rgba(30, 35, 41, 0.05), 0 16px 32px -18px rgba(30, 35, 41, 0.4);
}

.folder-row-display {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.folder-row.is-editing .folder-row-display {
  display: none;
}

.folder-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--folder-color, var(--accent)) 16%, var(--surface-strong));
  color: var(--folder-color, var(--accent));
}

.folder-icon svg {
  width: 1.4rem;
  height: 1.4rem;
  fill: currentColor;
}

.folder-row-main {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
  flex: 1 1 auto;
}

.folder-name {
  margin: 0;
  overflow: hidden;
  font-family: 'Lora', Georgia, serif;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.folder-meta {
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.85rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.folder-kind-pill {
  flex-shrink: 0;
  font-size: 0.72rem;
}

.avatar-stack {
  display: flex;
  align-items: center;
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.8rem;
  height: 1.8rem;
  margin-left: -0.5rem;
  border: 2px solid var(--surface-strong);
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
}

.avatar:first-child {
  margin-left: 0;
}

.avatar-add {
  padding: 0;
  background: var(--surface-muted);
  color: var(--muted);
  cursor: not-allowed;
}

.folder-menu {
  position: relative;
}

.folder-menu-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-sm);
  color: var(--muted);
  cursor: pointer;
  list-style: none;
}

.folder-menu-trigger::-webkit-details-marker {
  display: none;
}

.folder-menu-trigger:hover {
  background: var(--surface-muted);
  color: var(--text);
}

.folder-menu-trigger svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: currentColor;
}

.folder-menu-panel {
  position: absolute;
  top: calc(100% + 0.3rem);
  right: 0;
  z-index: 5;
  display: grid;
  min-width: 11rem;
  padding: 0.35rem;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 8px rgba(30, 35, 41, 0.06), 0 20px 40px -20px rgba(30, 35, 41, 0.5);
}

.folder-menu-item {
  display: block;
  width: 100%;
  padding: 0.5rem 0.6rem;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  font-size: 0.88rem;
  text-align: left;
  cursor: pointer;
}

.folder-menu-item:hover {
  background: var(--surface-muted);
}

.folder-menu-item.danger {
  color: #8d3129;
}

.folder-menu-item.danger:hover {
  background: rgba(141, 49, 41, 0.1);
}

.folder-menu-item.disabled {
  color: var(--muted);
  cursor: default;
}

.folder-row-new-trigger {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-height: 2.5rem;
  cursor: pointer;
  list-style: none;
}

.folder-row-new-trigger::-webkit-details-marker {
  display: none;
}

.folder-icon-add {
  background: var(--surface-muted);
  color: var(--muted);
}

.folder-row-new[open] {
  border-style: dashed;
}

.folder-row-new[open] .folder-icon-add {
  background: var(--accent-soft);
  color: var(--accent);
}

.folder-inline-form {
  display: grid;
  gap: 0.85rem;
  padding-top: 0.85rem;
  margin-top: 0.85rem;
  border-top: 1px solid var(--border);
}

.folder-row-edit {
  display: none;
}

.folder-row.is-editing .folder-row-edit {
  display: block;
}

@media (min-width: 640px) {
  .folder-inline-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .folder-inline-form .form-actions {
    grid-column: 1 / -1;
  }
}

