$primary: #6366f1;

// ─── Shell ────────────────────────────────────────────────────────────────────
.collections-shell {
  display: flex;
  height: 100%;
  overflow: hidden;
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: #f3f4f6;
}

// ─── List Panel ───────────────────────────────────────────────────────────────
.list-panel {
  width: 280px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-right: 1px solid #e5e7eb;
  overflow-y: auto;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid #e5e7eb;

  h3 {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    margin: 0;
  }
}

.btn-new {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  background: $primary;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;

  &:hover { background: #4f46e5; }
}

.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid #f3f4f6;
  transition: background 0.15s;

  &:hover { background: #f9fafb; }

  &.selected { background: #eef2ff; }
}

.item-name {
  font-size: 13px;
  font-weight: 500;
  color: #111827;
}

.type-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  background: #f3f4f6;
  color: #6b7280;
  text-transform: uppercase;

  &.dynamic {
    background: #e0e7ff;
    color: $primary;
  }
}

.loading-state,
.empty {
  padding: 24px 16px;
  font-size: 13px;
  color: #9ca3af;
  text-align: center;
}

// ─── Detail Panel ─────────────────────────────────────────────────────────────
.detail-panel {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.detail-title {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 20px;
}

.detail-form {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
}

.field-label {
  display: flex;
  flex-direction: column;
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  margin-bottom: 16px;
}

.field-input,
.field-select {
  margin-top: 6px;
  padding: 9px 12px;
  font-size: 14px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  color: #111827;
  background: #fff;
  outline: none;
  transition: border-color 0.2s;

  &:focus { border-color: $primary; box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1); }
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

.btn-save {
  padding: 9px 24px;
  font-size: 13px;
  font-weight: 600;
  background: $primary;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;

  &:hover { background: #4f46e5; }
}

// ─── Preview Section ──────────────────────────────────────────────────────────
.preview-section {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
}

.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;

  h4 {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    margin: 0;
  }
}

.btn-refresh {
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 500;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  color: #374151;
  cursor: pointer;
  transition: background 0.2s;

  &:hover { background: #e5e7eb; }
}

.preview-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #f3f4f6;

  &:last-child { border-bottom: none; }
}

.item-title {
  font-size: 13px;
  font-weight: 500;
  color: #111827;
}

.item-type {
  font-size: 11px;
  color: #9ca3af;
}

.loading-text,
.empty-preview {
  font-size: 13px;
  color: #9ca3af;
  text-align: center;
  padding: 16px 0;
  margin: 0;
}

// ─── Placeholder ──────────────────────────────────────────────────────────────
.placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 12px;
  color: #9ca3af;

  .placeholder-icon {
    font-family: 'Material Icons';
    font-size: 48px;
    color: #d1d5db;
  }

  p {
    font-size: 14px;
    margin: 0;
  }
}
